[Portland] DESTDIR support for xdg-utils
Stefan Schweizer
genstef at gentoo.org
Tue Aug 22 07:23:39 PDT 2006
Hi,
I noticed that xdg-utils does noes not support the DESTDIR environment
viarable that allows to tell it to only install in one directory.
I worked around that with some simple sed calls in the googleearth
ebuild, but I noticed that it does not work with current xdg-utils,
first let me explained how I hacked googleearth:
# make the postinst scripts behave
sed -i -e 's:$SETUP_INSTALLPATH/::' -e "s: --user: --system:" \
-e 's:$SETUP_INSTALLPATH:1:' postinstall.sh
sed -i -e "s:/usr:${D}/usr:g" -e "s:^detectDE$::" \
-e 's:-x $x/update-mime:-d nonexis:' \
-e 's:-x $x/update-desktop:-d nonexis:' linux/xdg/xdg-m{ime,enu}
http://sources.gentoo.org/viewcvs.py/*checkout*/gentoo-x86/x11-misc/googleearth/googleearth-4_beta.ebuild
--system tells the googleearth xdg to install systemwide.
"s:/usr:${D}/usr:g" - $D = DESTDIR the directory that gets merged to / later
's:-x $x/update-mime:-d nonexis:' - tell it not to call update-mime
(that would write global and violate the sandbox that Gentoo has in
place)
The problem with xdg-utils is that it does not have the
--user|--system setting and it does not allow to specify a DESTDIR.
Also it does not allow to omit update-mime-database
What I propose is to care for the DESTDIR env var. And install in
system ($DESTDIR/usr/share..) when it is non-empty as well as omit
update-mime.
Does that make sense - would you want me to make a patch for it?
Regards,
Stefan
More information about the Portland
mailing list