Building with DESTDIR is broken

Bug #856315 reported by Vincent Untz
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Decibel Audio Player
New
Undecided
Unassigned

Bug Description

The fix for bug 731383 is wrong: DESTDIR is used when building packages, and the value of the DESTDIR variable should never be mentioned in the installed files.

Revision history for this message
null (nightmorph-deactivatedaccount) wrote :

Correct; it should only be used when installing packages; it should not show up in the source.

This is what happens with the existing $(PREFIX) call in CONFIGURE_IN, which looks to $(DESTDIR)/$(prefix):

$ decibel-audio-player
$ /usr/bin/python2.7: can't open file '/var/tmp/portage/media-sound/decibel-audio-player-1.08/image//usr/share/decibel-audio-player/src/decibel-audio-player.py': [Errno 2] No such file or directory

On Gentoo, ${DESTDIR} is set to a temporary directory, ${D} (/var/tmp/portage/$package_foo), where the installation image is created before it is moved to the live filesystem. This is how builds are safely sandboxed before they can overwrite anything they shouldn't. However, that sed script in the Makefile puts this temporary DESTDIR value into the execution path of Decibel, which means it will fail to run later on.

My workaround in the Gentoo ebuild was to just use $(prefix) for that sed call, not $(DESTDIR)/$(prefix). Since $(prefix) -- /usr -- is where the executable will be stored on the live filesystem. Nothing is ever stored in ${DESTDIR}, since it's a dynamic, temporary storage space.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.