Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 296767 Details for
Bug 395633
prefix-portage-2.2.01.19981 fails with EPREFIX='' emerge
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
0001-before-building-load-EPREFIX-from-environment.patch
0001-before-building-load-EPREFIX-from-environment.patch (text/plain), 4.60 KB, created by
Benda Xu
on 2011-12-23 18:17:57 UTC
(
hide
)
Description:
0001-before-building-load-EPREFIX-from-environment.patch
Filename:
MIME Type:
Creator:
Benda Xu
Created:
2011-12-23 18:17:57 UTC
Size:
4.60 KB
patch
obsolete
>From 0ace2de1376a76bc8aea14ffa72da455218688ec Mon Sep 17 00:00:00 2001 >From: XU Benda <heroxbd@gmail.com> >Date: Sat, 24 Dec 2011 03:14:00 +0900 >Subject: [PATCH] before building, load EPREFIX from environment > >forbid things to pull portage.const.EPREFIX later. > >this is only a dirty fix. not sure if it breaks prefix bootstrap > >there is a conflict for the handling of EPREFIX between master and >prefix branches (and between zmedico and grobian). > >we should sit down and settle the scheme. >--- > pym/_emerge/emergelog.py | 3 +-- > pym/_emerge/main.py | 4 +--- > pym/portage/__init__.py | 6 ++++++ > pym/portage/const.py | 6 ------ > pym/portage/package/ebuild/doebuild.py | 3 +-- > 5 files changed, 9 insertions(+), 13 deletions(-) > >diff --git a/pym/_emerge/emergelog.py b/pym/_emerge/emergelog.py >index 3b6b595..b1b093f 100644 >--- a/pym/_emerge/emergelog.py >+++ b/pym/_emerge/emergelog.py >@@ -13,13 +13,12 @@ from portage import _unicode_decode > from portage import _unicode_encode > from portage.data import secpass > from portage.output import xtermTitle >-from portage.const import EPREFIX > > # We disable emergelog by default, since it's called from > # dblink.merge() and we don't want that to trigger log writes > # unless it's really called via emerge. > _disable = True >-_emerge_log_dir = EPREFIX + '/var/log' >+_emerge_log_dir = '/var/log' > > # Coerce to unicode, in order to prevent TypeError when writing > # raw bytes to TextIOWrapper with python2. >diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py >index 77a54df..765f417 100644 >--- a/pym/_emerge/main.py >+++ b/pym/_emerge/main.py >@@ -1368,9 +1368,7 @@ def missing_sets_warning(root_config, missing_sets): > "missing set(s): %s" % missing_sets_str] > if root_config.sets: > msg.append(" sets defined: %s" % ", ".join(root_config.sets)) >- global_config_path = portage.const.GLOBAL_CONFIG_PATH >- if root_config.settings['EPREFIX']: >- global_config_path = os.path.join(root_config.settings['EPREFIX'], >+ global_config_path = os.path.join(root_config.settings['EROOT'], > portage.const.GLOBAL_CONFIG_PATH.lstrip(os.sep)) > msg.append(" This usually means that '%s'" % \ > (os.path.join(global_config_path, "sets/portage.conf"),)) >diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py >index e7a4934..7d1ee64 100644 >--- a/pym/portage/__init__.py >+++ b/pym/portage/__init__.py >@@ -508,6 +508,12 @@ def create_trees(config_root=None, target_root=None, trees=None, env=None, > env = os.environ > settings = config(config_root=config_root, target_root=target_root, > env=env, eprefix=eprefix) >+ # override EPREFIX and EROOT with os.environ['EPREFIX'] for final building >+ settings['EMERGE_LOG_DIR'] = os.path.join(os.sep, settings["EPREFIX"].rstrip(os.sep), "var", "log") >+ settings['EPREFIX'] = os.environ.get('EPREFIX', settings['EPREFIX']) >+ settings['EROOT'] = settings['ROOT'].rstrip(os.sep) + settings['EPREFIX'] + os.sep >+ settings.backup_changes("EPREFIX") >+ settings.backup_changes("EROOT") > settings.lock() > > trees._target_eroot = settings['EROOT'] >diff --git a/pym/portage/const.py b/pym/portage/const.py >index aa45cb2..4fd0d64 100644 >--- a/pym/portage/const.py >+++ b/pym/portage/const.py >@@ -11,12 +11,6 @@ import os > > # save the original prefix > BPREFIX = EPREFIX >-# pick up EPREFIX from the environment if set >-if "EPREFIX" in os.environ: >- if os.environ["EPREFIX"] != "": >- EPREFIX = os.path.normpath(os.environ["EPREFIX"]) >- else: >- EPREFIX = os.environ["EPREFIX"] > > # =========================================================================== > # START OF CONSTANTS -- START OF CONSTANTS -- START OF CONSTANTS -- START OF >diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py >index 194cdbf..7bbdcec 100644 >--- a/pym/portage/package/ebuild/doebuild.py >+++ b/pym/portage/package/ebuild/doebuild.py >@@ -36,7 +36,7 @@ from portage import auxdbkeys, bsd_chflags, \ > _shell_quote, _unicode_decode, _unicode_encode > from portage.const import EBUILD_SH_ENV_FILE, EBUILD_SH_ENV_DIR, \ > EBUILD_SH_BINARY, INVALID_ENV_FILE, MISC_SH_BINARY, \ >- EPREFIX, MACOSSANDBOX_PROFILE >+ MACOSSANDBOX_PROFILE > from portage.data import portage_gid, portage_uid, secpass, \ > uid, userpriv_groups > from portage.dbapi.porttree import _parse_uri_map >@@ -230,7 +230,6 @@ def doebuild_environment(myebuild, mydo, myroot=None, settings=None, > # due to how it's coded... Don't overwrite this so we can use it. > mysettings["PORTAGE_DEBUG"] = "1" > >- mysettings["EPREFIX"] = EPREFIX > mysettings["EBUILD"] = ebuild_path > mysettings["O"] = pkg_dir > mysettings.configdict["pkg"]["CATEGORY"] = cat >-- >1.7.8.rc3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 395633
:
296717
| 296767 |
351172