Building with DESTDIR is broken
Bug #856315 reported by
Vincent Untz
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.
To post a comment you must log in.
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 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
$ /usr/bin/python2.7: can't open file '/var/tmp/
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.