Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 560646

Summary: sys-apps/dbus /var/lib/dbus/machine-id points into $EROOT when cross compiling
Product: Gentoo Linux Reporter: Dominik Diesch <bugzilla.gentoo.dominik>
Component: [OLD] Core systemAssignee: Freedesktop bugs <freedesktop-bugs>
Status: RESOLVED FIXED    
Severity: minor CC: floppym
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---

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(-)