Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 560646 - sys-apps/dbus /var/lib/dbus/machine-id points into $EROOT when cross compiling
Summary: sys-apps/dbus /var/lib/dbus/machine-id points into $EROOT when cross compiling
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: Normal minor
Assignee: Freedesktop bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-16 16:02 UTC by Dominik Diesch
Modified: 2015-10-22 19:34 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dominik Diesch 2015-09-16 16:02:46 UTC
sys-apps/dbus creates the link /var/lib/dbus/machine-id -> /etc/machine-id - which is appreciated. However when cross compiling, the link destination includes the the root path of the host. 

Example: 
emerge-armv7a-hardfloat-linux-gnueabi sys-apps/dbus

creates a link to
/usr/armv7a-hardfloat-linux-gnueabi/etc/machine-id

It seems that the ${EROOT%/} prefix in pkg_postinst() is the culprit.
Comment 1 Mike Gilbert gentoo-dev 2015-09-16 18:17:28 UTC
Right, I think we should probably do this instead:

ln -sf "${EPREFIX}"/etc/machine-id "${EROOT%/}"/var/lib/dbus/machine-id
Comment 2 Mike Gilbert gentoo-dev 2015-10-22 19:34:15 UTC
commit d70d0aa7803688a772677e2868a11b96904b56f7
Author: Mike Gilbert <floppym@gentoo.org>
Date:   Thu Oct 22 15:19:42 2015 -0400

    sys-apps/dbus: Fix machine-id symlink when ROOT != /

    Bug: https://bugs.gentoo.org/560646

    Package-Manager: portage-2.2.23_p7

 sys-apps/dbus/dbus-1.8.16.ebuild | 2 +-
 sys-apps/dbus/dbus-1.8.18.ebuild | 2 +-
 sys-apps/dbus/dbus-1.8.20.ebuild | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)