/usr/share/applications weird error on koji

Alec Leamas leamas.alec at gmail.com
Mon Mar 19 14:44:25 UTC 2012


On 03/19/2012 02:32 PM, Nikos Roussos wrote:
> On Mon, Mar 19, 2012 at 2:09 PM, Alec Leamas <leamas.alec at gmail.com 
> <mailto:leamas.alec at gmail.com>> wrote:
>
>     On 03/19/2012 12:50 PM, Nikos Roussos wrote:
>>     Hi,
>>
>>     I'm trying to build a package. It's an update on SparkleShare
>>     <https://admin.fedoraproject.org/updates/search/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
>>
>>     See the relevant koji task and build log for more:
>>     http://koji.fedoraproject.org/koji/taskinfo?taskID=3908835
>>
>>     Any help appreciated
>>
>>     -- 
>>     Nikos Roussos <http://autoverse.net>
>>
>>
>>
>     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
>
>
> Actually there is an:
>
> install-data-hook:
>         update-desktop-database $(datadir)/applications
>
> 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?



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.fedoraproject.org/pipermail/devel/attachments/20120319/bac49e09/attachment.html>


More information about the devel mailing list