Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 327563 - cfg-update uses old style bashrc hooking and isn't ROOT aware
Summary: cfg-update uses old style bashrc hooking and isn't ROOT aware
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Harald van Dijk (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-09 06:33 UTC by Brian Harring (RETIRED)
Modified: 2010-07-11 06:10 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 Brian Harring (RETIRED) gentoo-dev 2010-07-09 06:33:44 UTC
cfg-updates attempt to hook into the ebuild process is via jamming some inline code into /etc/portage/bashrc; this hasn't been the correct way to do it in a long while.

It should be appending the following command instead-
pre_pkg_setup() {
 [ "$ROOT" == / ] && [ -e "/usr/bin/cfg-update" ] && cfg-update --index
}

Specifically, it needs to use the defined hooks, and it should not run when the target isn't the local ROOT (the code isn't ROOT aware at all).

Not to be a complete ass about this, but you've got about 2 weeks before I revbump it w/ a patch adding this- the current inline crap flat out breaks pkgcore env sourcing (pkgcore is strict about ensuring nothing randomly spews crap during sourcing).
Comment 1 Harald van Dijk (RETIRED) gentoo-dev 2010-07-10 22:29:34 UTC
Fixed, but without a revbump, because anyone who already has cfg-update installed won't get his/her bashrc rewritten. If you prefer, feel free to revbump with a version that does do this. Thanks for the report.
Comment 2 Brian Harring (RETIRED) gentoo-dev 2010-07-11 06:10:00 UTC
a grep'ing of /etc/portage/bashrc from w/in pkg_preinst looking for the old form comes to mind...