I'm trying to build a package. It's an update on SparkleShare package. I build it
locally with mock and everything seems ok. Package is
built successfully. But when I try to build it on koji
I get an error and build fails on both f16 f17
targets:
"The databases in [/usr/share/applications] could not
be updated."
which I think has something to do with the
desktop-file-validate on %install phase
From the log, it looks like it fails in
'install-data-hook'. If so, the culprit might be some
Makefile.am. Have upstream updated a Makefile.am to include
'desktop-file-install', failing when not making a "real"
install int /usr?
If this is right, you should be able to verify that the
%install hasn't really begun when the error is triggered. If
unsure, put some simple 'echo' statement in top of %install
to verify that it hasn't been started.
If this doesn't help, scanning the generated Makefiles for
'desktop-file-install' and/or '/usr/share/applications'
might give a clue
which seems to be the exact point that installation fails
You must patch that, it will try to update /usr/share/applications
when building the rpm which of course isn't acceptable.
For Fedora, you could just remove the target and run automake;
autoconf; ./configure, given that you run update-desktop-database as
part of %install.
However, this should really be resolved together with upstream. If
they want to keep the functionality, one could possibly:
- Move it from install-data-hook to a separate target such as
'install-desktop' and let users run this as part of installation
into system dirs.
- Only run update-desktop-database if $(datadir)/applications is
writeable:
Personally, I would prefer the first one. To mess with
/usr/share/applications when DESTDIR is set is not really the way
'make install' is supposed to work. And updating
$(DESTDIR)/$(datadir)/applications just doesn't make sense.
But I'm just a newbie, maybe someone else has a better piece of
advice here?