GNOME Bugzilla – Bug 758097
gnome-documents-3.18.2: make install tries to remove a file installed in real filesystem
Last modified: 2015-12-14 13:17:30 UTC
On Gentoo we build things on a sandbox to prevent build systems messing with the real filesystem and, then, we get a failure due to make install trying to remove a file in real filesystem: make[4]: Entering directory '/var/tmp/portage/gnome-extra/gnome-documents-3.18.2/work/gnome-documents-3.18.2/data' /bin/mkdir -p '/var/tmp/portage/gnome-extra/gnome-documents-3.18.2/image//usr/share/appdata' rm -f /usr/share/gnome-documents/org.gnome.Books.data.gresource /bin/mkdir -p '/var/tmp/portage/gnome-extra/gnome-documents-3.18.2/image//usr/share/applications' * ACCESS DENIED: unlinkat: /usr/share/gnome-documents/org.gnome.Books.data.gresource rm: cannot remove ‘/usr/share/gnome-documents/org.gnome.Books.data.gresource’: Permission denied /bin/mkdir -p '/var/tmp/portage/gnome-extra/gnome-documents-3.18.2/image//usr/share/gnome-documents' Makefile:899: recipe for target 'install-exec-hook' failed make[4]: [install-exec-hook] Error 1 (ignored) This comes from data/Makefile.am: install-exec-hook: -rm -f $(appdir)/org.gnome.Books.data.gresource $(LN_S) $(appdir)/org.gnome.Documents.data.gresource $(DESTDIR)$(appdir)/org.gnome.Books.data.gresource Thanks
Created attachment 316967 [details] [review] books: Fix installation on some systems Instead of using symlinks and creating those ourselves in the install directory, which creates problems with installing in a different location than the prefix, just process 2 versions of the same file, through a symlink in the source tree.
Review of attachment 316967 [details] [review]: Thanks for the patch, Bastien. No strong opinion on this one. :) ::: data/Makefile.am @@ -65,3 @@ - $(LN_S) $(appdir)/org.gnome.Documents.data.gresource $(DESTDIR)$(appdir)/org.gnome.Books.data.gresource -uninstall-hook: - -rm -f $(appdir)/org.gnome.Books.data.gresource I was expecting the '-rm ...' to ignore failures, but if this fixes the problem on Gentoo, then sure.
Review of attachment 316967 [details] [review]: ::: data/Makefile.am @@ +64,3 @@ CLEANFILES = \ org.gnome.Documents.data.gresource \ + org.gnome.Books.data.gresource.xml \ Should this not be the gresource file (as opposed to the gresource.xml)?
(In reply to Cosimo Cecchi from comment #3) > Review of attachment 316967 [details] [review] [review]: > > ::: data/Makefile.am > @@ +64,3 @@ > CLEANFILES = \ > org.gnome.Documents.data.gresource \ > + org.gnome.Books.data.gresource.xml \ > > Should this not be the gresource file (as opposed to the gresource.xml)? Yeah, completely. Would be great if Pacho could actually test the patch though.
Created attachment 317197 [details] [review] books: Fix installation on some systems Instead of using symlinks and creating those ourselves in the install directory, which creates problems with installing in a different location than the prefix, just process 2 versions of the same file, through a symlink in the source tree.
It looks to work fine for me Thanks!
Review of attachment 317197 [details] [review]: Looks good to me.
Attachment 317197 [details] pushed as 5ff8458 - books: Fix installation on some systems