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

Bug 433499

Summary: app-admin/python-updater - Fix prefix support
Product: Gentoo Linux Reporter: Greg Turner <gmturner007>
Component: Current packagesAssignee: Gentoo Prefix <prefix>
Status: RESOLVED FIXED    
Severity: normal CC: python
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 315803    
Attachments: Secondary python-updater patch for prefix to fix EROOT troubles.

Description Greg Turner 2012-08-31 07:46:41 UTC
app-admin/python-updater is broken on prefix.  It can't find any pythons.  This is due to the fact that it's relying on portageq to accept an EROOT of "/" -- probably nobody has updated it since portageq converted from ROOTs to EROOTs.

Easily fixed, patch enclosed.

Reproducible: Always
Comment 1 Greg Turner 2012-08-31 07:58:29 UTC
Created attachment 322621 [details, diff]
Secondary python-updater patch for prefix to fix EROOT troubles.

Just add this to your ebuild after the original patch, i.e.:

----->8----->
--- a/app-admin/python-updater/python-updater-0.10-r2.ebuild
+++ b/app-admin/python-updater/python-updater-0.10-r2.ebuild
@@ -33,6 +33,7 @@
        epatch "${FILESDIR}"/${P}-only-alias-sed-if-exists.patch

        epatch "${FILESDIR}"/${P}-prefix.patch
+       epatch "${FILESDIR}"/${P}-prefix2.patch
        ebegin "Adjusting to prefix"
        sed -i \
                -e "s:@GENTOO_PORTAGE_EPREFIX@:${EPREFIX}:g" \
<-----8<-----

If someone prefers a "squashed" version of these two patches I'd be happy to provide that -- I only did it this way for purposes of clarity during triage however it makes sense for a single prefix patch to exist since prefix.patch and prefix2.patch don't really do anything miraculously different from each other.

The patch makes the following changes:

o provide the correct hard-coded EROOT argument when invoking portageq (the current code is broken due to an interface change in portageq (ROOT became EROOT, so the hard coded "/"'s were once correct); presumably nobody remembered python-updater's dependency on it and prefix users have found ways to scrape by without it.

o likewise, when constructing the dbapi object, pick the one for EPREFIX, not '/'
Comment 2 Fabian Groffen gentoo-dev 2012-09-29 14:12:25 UTC
Thanks, I've merged your patch with the existing one.