From: "Fabian Groffen" <grobian@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:prefix commit in: /
Date: Sat, 31 Mar 2012 19:31:32 +0000 (UTC) [thread overview]
Message-ID: <1333222259.1fac28c57317b8174580b8243c3549fd75aeaa6d.grobian@gentoo> (raw)
commit: 1fac28c57317b8174580b8243c3549fd75aeaa6d
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 31 19:30:59 2012 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sat Mar 31 19:30:59 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=1fac28c5
Merge remote-tracking branch 'overlays-gentoo-org/master' into prefix
Conflicts:
bin/ebuild-helpers/dosym
bin/ebuild-helpers/fowners
bin/etc-update
bin/repoman
pym/_emerge/main.py
Makefile | 215 ++++++
bin/dispatch-conf | 50 +-
bin/ebuild-helpers/dosym | 7 +-
bin/ebuild-helpers/fowners | 16 +-
bin/ebuild.sh | 46 +-
bin/emerge-webrsync | 12 +-
bin/etc-update | 756 +++++++++++---------
bin/isolated-functions.sh | 2 +-
bin/misc-functions.sh | 19 +
bin/portageq | 8 +
bin/repoman | 68 ++-
man/etc-update.1 | 32 +-
man/portage.5 | 5 +-
man/repoman.1 | 17 +-
mkrelease.sh | 2 +-
pym/_emerge/AsynchronousTask.py | 15 +
pym/_emerge/Binpkg.py | 6 +-
pym/_emerge/BlockerCache.py | 2 +-
pym/_emerge/CompositeTask.py | 2 +-
pym/_emerge/EbuildBuild.py | 11 +-
pym/_emerge/EbuildFetcher.py | 14 +-
pym/_emerge/JobStatusDisplay.py | 2 +-
pym/_emerge/Package.py | 4 +-
pym/_emerge/PollScheduler.py | 2 +-
pym/_emerge/QueueScheduler.py | 2 +-
pym/_emerge/Scheduler.py | 12 +-
pym/_emerge/_flush_elog_mod_echo.py | 2 +-
pym/_emerge/actions.py | 103 ++-
pym/_emerge/depgraph.py | 12 +-
pym/_emerge/main.py | 9 +-
pym/_emerge/resolver/output.py | 30 +-
pym/_emerge/resolver/output_helpers.py | 78 ++-
pym/_emerge/unmerge.py | 14 +-
pym/_emerge/userquery.py | 6 +-
pym/portage/cache/mappings.py | 2 +-
pym/portage/dbapi/_MergeProcess.py | 13 +-
pym/portage/dbapi/bintree.py | 6 +-
pym/portage/dbapi/porttree.py | 6 +-
pym/portage/dbapi/vartree.py | 60 ++-
pym/portage/dep/__init__.py | 2 +-
pym/portage/dispatch_conf.py | 28 +-
pym/portage/env/loaders.py | 4 +-
pym/portage/glsa.py | 8 +-
pym/portage/locks.py | 22 +-
pym/portage/manifest.py | 10 +-
pym/portage/news.py | 2 +-
pym/portage/output.py | 6 +
pym/portage/package/ebuild/_ipc/QueryCommand.py | 2 +-
pym/portage/package/ebuild/_spawn_nofetch.py | 6 +-
pym/portage/package/ebuild/digestcheck.py | 2 +-
pym/portage/package/ebuild/digestgen.py | 5 +-
pym/portage/package/ebuild/doebuild.py | 63 +-
pym/portage/package/ebuild/getmaskingreason.py | 8 +-
pym/portage/process.py | 18 +-
pym/portage/tests/locks/test_lock_nonblock.py | 5 +-
pym/portage/util/ExtractKernelVersion.py | 2 +-
pym/portage/util/__init__.py | 20 +-
.../util/_dyn_libs/PreservedLibsRegistry.py | 50 +-
pym/portage/util/_eventloop/EventLoop.py | 2 +-
pym/portage/util/_pty.py | 2 +-
pym/portage/util/lafilefixer.py | 2 +-
pym/portage/util/listdir.py | 2 +-
pym/portage/util/movefile.py | 61 +-
pym/portage/util/mtimedb.py | 24 +-
pym/portage/util/whirlpool.py | 2 +-
pym/portage/xpak.py | 247 ++++----
pym/repoman/utilities.py | 39 +-
67 files changed, 1513 insertions(+), 799 deletions(-)
diff --cc bin/dispatch-conf
index 1b86461,139a001..de8d85d
--- a/bin/dispatch-conf
+++ b/bin/dispatch-conf
@@@ -33,9 -27,8 +33,9 @@@ import portag
from portage import os
from portage import dispatch_conf
from portage import _unicode_decode
- from portage.dispatch_conf import diffstatusoutput_len
+ from portage.dispatch_conf import diffstatusoutput
from portage.process import find_binary
+from portage.const import EPREFIX
FIND_EXTANT_CONFIGS = "find '%s' %s -name '._cfg????_%s' ! -name '.*~' ! -iname '.*.bak' -print"
DIFF_CONTENTS = "diff -Nu '%s' '%s'"
diff --cc bin/ebuild-helpers/dosym
index 8f436fa,2489e22..b96f845
--- a/bin/ebuild-helpers/dosym
+++ b/bin/ebuild-helpers/dosym
@@@ -1,8 -1,8 +1,8 @@@
-#!/bin/bash
+#!@PORTAGE_BASH@
- # Copyright 1999-2011 Gentoo Foundation
+ # Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
+source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
if [[ $# -ne 2 ]] ; then
helpers_die "${0##*/}: two arguments needed"
diff --cc bin/ebuild-helpers/fowners
index 9815d2e,a213c9e..b60aad7
--- a/bin/ebuild-helpers/fowners
+++ b/bin/ebuild-helpers/fowners
@@@ -1,18 -1,11 +1,12 @@@
-#!/bin/bash
+#!@PORTAGE_BASH@
- # Copyright 1999-2011 Gentoo Foundation
+ # Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
+source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
+
- # PREFIX LOCAL: ignore otherwise failing call
- if hasq prefix ${USE} && [[ $EUID != 0 ]] ; then
- ewarn "fowners ignored in Prefix with non-privileged user"
- exit 0
- fi
- # END PREFIX LOCAL
[[ " ${FEATURES} " == *" force-prefix "* ]] || \
- case "$EAPI" in 0|1|2) ED=${D} ;; esac
+ case "$EAPI" in 0|1|2) EPREFIX= ED=${D} ;; esac
# we can't prefix all arguments because
# chown takes random options
diff --cc bin/emerge-webrsync
index c41eb79,bfd9aa2..581dc54
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@@ -31,11 -39,10 +39,11 @@@ els
eecho "could not find 'portageq'; aborting"
exit 1
fi
- eval $(portageq envvar -v FEATURES FETCHCOMMAND GENTOO_MIRRORS \
+ eval $("${portageq}" envvar -v FEATURES FETCHCOMMAND GENTOO_MIRRORS \
PORTAGE_BIN_PATH PORTAGE_GPG_DIR \
PORTAGE_NICENESS PORTAGE_RSYNC_EXTRA_OPTS PORTAGE_TMPDIR PORTDIR \
- SYNC http_proxy ftp_proxy)
+ SYNC http_proxy ftp_proxy \
+ EPREFIX PORTAGE_USER PORTAGE_GROUP)
DISTDIR="${PORTAGE_TMPDIR}/emerge-webrsync"
export http_proxy ftp_proxy
diff --cc bin/etc-update
index b3877fb,1edc91f..2a24613
--- a/bin/etc-update
+++ b/bin/etc-update
@@@ -1,5 -1,5 +1,5 @@@
-#!/bin/bash
+#!@PORTAGE_BASH@
- # Copyright 1999-2011 Gentoo Foundation
+ # Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# Author Brandon Low <lostlogic@gentoo.org>
diff --cc bin/misc-functions.sh
index 406cd8f,b083897..0d60a51
mode 100644,100755..100644
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
diff --cc bin/repoman
index 1f51ddf,54d864f..b89e5ef
--- a/bin/repoman
+++ b/bin/repoman
@@@ -1,5 -1,5 +1,5 @@@
-#!/usr/bin/python -O
+#!@PREFIX_PORTAGE_PYTHON@ -O
- # Copyright 1999-2011 Gentoo Foundation
+ # Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# Next to do: dep syntax checking in mask files
diff --cc pym/_emerge/actions.py
index 15a0bc1,22c3e26..cbc5de2
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@@ -25,12 -25,12 +25,12 @@@ portage.proxy.lazyimport.lazyimport(glo
'portage.news:count_unread_news,display_news_notifications',
)
+ from portage.localization import _
from portage import os
from portage import shutil
- from portage import subprocess_getstatusoutput
from portage import _unicode_decode
from portage.cache.cache_errors import CacheError
-from portage.const import GLOBAL_CONFIG_PATH
+from portage.const import GLOBAL_CONFIG_PATH, EPREFIX
from portage.const import _ENABLE_DYN_LINK_MAP, _ENABLE_SET_CONFIG
from portage.dbapi.dep_expand import dep_expand
from portage.dbapi._expand_new_virt import expand_new_virt
diff --cc pym/_emerge/main.py
index 3d50b7d,0fbc4b7..68e951d
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@@ -180,11 -180,21 +181,11 @@@ def chk_updated_info_files(root, infodi
raise
del e
processed_count += 1
- try:
- proc = subprocess.Popen(
- ['/usr/bin/install-info',
- '--dir-file=%s' % os.path.join(inforoot, "dir"),
- os.path.join(inforoot, x)],
- env=dict(os.environ, LANG="C", LANGUAGE="C"),
- stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
- except OSError:
- myso = None
- else:
- myso = _unicode_decode(
- proc.communicate()[0]).rstrip("\n")
- proc.wait()
+ myso = portage.subprocess_getstatusoutput(
+ "LANG=C LANGUAGE=C %s/usr/bin/install-info " \
+ "--dir-file=%s/dir %s/%s" % (EPREFIX, inforoot, inforoot, x))[1]
existsstr="already exists, for file `"
- if myso!="":
+ if myso:
if re.search(existsstr,myso):
# Already exists... Don't increment the count for this.
pass
diff --cc pym/portage/dispatch_conf.py
index 88ed222,cc98fad..2fa1357
--- a/pym/portage/dispatch_conf.py
+++ b/pym/portage/dispatch_conf.py
@@@ -24,23 -23,23 +24,23 @@@ RCS_MERGE = "rcsmerge -p -r" + RCS_BRAN
DIFF3_MERGE = "diff3 -mE '%s' '%s' '%s' > '%s'"
- def diffstatusoutput_len(cmd):
+ def diffstatusoutput(cmd, file1, file2):
"""
Execute the string cmd in a shell with getstatusoutput() and return a
- 2-tuple (status, output_length). If getstatusoutput() raises
- UnicodeDecodeError (known to happen with python3.1), return a
- 2-tuple (1, 1). This provides a simple way to check for non-zero
- output length of diff commands, while providing simple handling of
- UnicodeDecodeError when necessary.
+ 2-tuple (status, output).
"""
- try:
- status, output = portage.subprocess_getstatusoutput(cmd)
- return (status, len(output))
- except UnicodeDecodeError:
- return (1, 1)
+ # Use Popen to emulate getstatusoutput(), since getstatusoutput() may
+ # raise a UnicodeDecodeError which makes the output inaccessible.
+ proc = subprocess.Popen(portage._unicode_encode(cmd % (file1, file2)),
+ stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
+ output = portage._unicode_decode(proc.communicate()[0])
+ if output and output[-1] == "\n":
+ # getstatusoutput strips one newline
+ output = output[:-1]
+ return (proc.wait(), output)
def read_config(mandatory_opts):
- eprefix = portage.const.EPREFIX
+ eprefix = EPREFIX
config_path = os.path.join(eprefix or os.sep, "etc/dispatch-conf.conf")
loader = KeyValuePairFileLoader(config_path, None)
opts, errors = loader.load()
next reply other threads:[~2012-03-31 19:31 UTC|newest]
Thread overview: 197+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-31 19:31 Fabian Groffen [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-11-01 19:49 [gentoo-commits] proj/portage:prefix commit in: / Fabian Groffen
2025-06-29 18:32 Fabian Groffen
2024-02-25 9:40 Fabian Groffen
2024-02-22 7:27 Fabian Groffen
2024-01-18 10:22 Fabian Groffen
2024-01-18 9:36 Fabian Groffen
2023-12-03 10:10 Fabian Groffen
2023-12-03 9:54 Fabian Groffen
2023-12-03 9:54 Fabian Groffen
2023-12-03 9:54 Fabian Groffen
2023-11-24 20:18 Fabian Groffen
2023-11-24 20:06 Fabian Groffen
2023-11-24 20:06 Fabian Groffen
2023-06-22 8:47 Fabian Groffen
2023-06-17 9:04 Fabian Groffen
2023-06-17 8:41 Fabian Groffen
2022-07-28 17:38 Fabian Groffen
2022-07-27 19:20 Fabian Groffen
2022-07-26 19:39 Fabian Groffen
2022-07-25 15:20 Fabian Groffen
2022-07-24 19:27 Fabian Groffen
2022-07-24 14:01 Fabian Groffen
2022-07-24 9:45 Fabian Groffen
2022-01-14 10:40 Fabian Groffen
2022-01-14 10:32 Fabian Groffen
2021-07-06 7:10 Fabian Groffen
2021-04-16 13:37 Fabian Groffen
2021-01-24 9:02 Fabian Groffen
2021-01-04 10:48 Fabian Groffen
2020-12-07 17:28 Fabian Groffen
2020-12-07 16:46 Fabian Groffen
2020-11-23 7:48 Fabian Groffen
2020-11-22 11:15 Fabian Groffen
2020-09-26 11:29 Fabian Groffen
2020-08-02 12:33 Fabian Groffen
2020-06-02 18:55 Fabian Groffen
2020-01-08 19:14 Fabian Groffen
2019-07-01 13:11 Fabian Groffen
2019-05-30 9:20 Fabian Groffen
2019-02-28 12:31 Fabian Groffen
2019-01-11 10:19 Fabian Groffen
2019-01-07 10:22 Fabian Groffen
2018-12-23 11:14 Fabian Groffen
2018-12-12 18:54 Fabian Groffen
2018-08-04 6:56 Fabian Groffen
2018-06-25 8:34 Fabian Groffen
2018-06-17 14:38 Fabian Groffen
2018-06-17 14:38 Fabian Groffen
2018-05-28 15:24 Fabian Groffen
2018-05-25 19:44 Fabian Groffen
2018-05-25 19:44 Fabian Groffen
2018-05-18 19:46 Fabian Groffen
2017-12-12 8:19 Fabian Groffen
2017-10-29 14:51 Fabian Groffen
2017-10-03 7:32 Fabian Groffen
2017-09-22 10:08 Fabian Groffen
2017-08-21 13:27 Fabian Groffen
2017-08-13 7:21 Fabian Groffen
2017-05-23 13:34 Fabian Groffen
2017-03-25 9:12 Fabian Groffen
2017-03-24 19:09 Fabian Groffen
2017-03-24 7:43 Fabian Groffen
2017-03-23 17:46 Fabian Groffen
2017-03-23 17:32 Fabian Groffen
2017-03-23 17:23 Fabian Groffen
2017-03-23 15:38 Fabian Groffen
2017-03-17 8:25 Fabian Groffen
2017-03-02 8:48 Fabian Groffen
2017-03-02 8:18 Fabian Groffen
2017-02-23 14:05 Fabian Groffen
2017-01-27 15:08 Fabian Groffen
2017-01-27 15:08 Fabian Groffen
2016-03-20 19:31 Fabian Groffen
2016-02-21 16:17 Fabian Groffen
2016-02-21 16:17 Fabian Groffen
2016-02-18 19:35 Fabian Groffen
2016-02-18 19:35 Fabian Groffen
2015-06-20 7:12 Fabian Groffen
2015-06-09 18:30 Fabian Groffen
2015-06-09 18:01 Fabian Groffen
2015-06-04 19:47 Fabian Groffen
2015-04-05 9:15 Fabian Groffen
2014-11-12 17:31 Fabian Groffen
2014-10-02 18:48 Fabian Groffen
2014-09-28 17:52 Fabian Groffen
2014-05-06 19:32 Fabian Groffen
2014-05-06 19:18 Fabian Groffen
2014-04-22 19:52 Fabian Groffen
2014-02-06 21:09 Fabian Groffen
2014-01-06 9:47 Fabian Groffen
2013-09-24 17:29 Fabian Groffen
2013-09-20 17:59 Fabian Groffen
2013-09-18 18:34 Fabian Groffen
2013-09-13 18:02 Fabian Groffen
2013-08-10 20:54 Fabian Groffen
2013-07-10 5:31 Fabian Groffen
2013-07-08 19:32 Fabian Groffen
2013-06-29 5:41 Fabian Groffen
2013-06-27 17:20 Fabian Groffen
2013-06-12 9:02 Fabian Groffen
2013-06-09 15:53 Fabian Groffen
2013-05-04 18:55 Fabian Groffen
2013-04-02 16:57 Fabian Groffen
2013-03-31 19:03 Fabian Groffen
2013-03-31 19:00 Fabian Groffen
2013-03-24 8:36 Fabian Groffen
2013-03-23 19:54 Fabian Groffen
2013-02-28 19:29 Fabian Groffen
2013-02-07 20:01 Fabian Groffen
2013-01-27 21:41 Fabian Groffen
2013-01-27 21:41 Fabian Groffen
2013-01-13 10:26 Fabian Groffen
2013-01-10 21:02 Fabian Groffen
2013-01-05 18:14 Fabian Groffen
2012-12-26 14:48 Fabian Groffen
2012-12-02 15:47 Fabian Groffen
2012-12-02 15:36 Fabian Groffen
2012-12-02 15:33 Fabian Groffen
2012-12-02 15:33 Fabian Groffen
2012-12-02 15:33 Fabian Groffen
2012-12-02 13:12 Fabian Groffen
2012-12-02 12:59 Fabian Groffen
2012-11-04 10:48 Fabian Groffen
2012-10-22 17:25 Fabian Groffen
2012-10-02 12:02 Fabian Groffen
2012-09-30 11:22 Fabian Groffen
2012-09-26 18:26 Fabian Groffen
2012-09-12 18:18 Fabian Groffen
2012-09-09 7:40 Fabian Groffen
2012-09-06 18:14 Fabian Groffen
2012-08-27 6:44 Fabian Groffen
2012-08-12 7:50 Fabian Groffen
2012-07-19 16:25 Fabian Groffen
2012-07-06 7:05 Fabian Groffen
2012-04-23 19:23 Fabian Groffen
2012-04-03 18:04 Fabian Groffen
2012-03-01 20:32 Fabian Groffen
2012-02-19 9:58 Fabian Groffen
2012-02-09 8:01 Fabian Groffen
2012-01-10 17:45 Fabian Groffen
2011-12-31 16:45 Fabian Groffen
2011-12-26 9:12 Fabian Groffen
2011-12-23 9:51 Fabian Groffen
2011-12-22 9:51 Fabian Groffen
2011-12-19 18:30 Fabian Groffen
2011-12-14 15:25 Fabian Groffen
2011-12-10 11:28 Fabian Groffen
2011-12-09 20:33 Fabian Groffen
2011-12-02 20:31 Fabian Groffen
2011-12-02 19:20 Fabian Groffen
2011-12-02 19:19 Fabian Groffen
2011-12-02 19:18 Fabian Groffen
2011-12-02 18:03 Fabian Groffen
2011-10-21 17:34 Fabian Groffen
2011-10-21 17:34 Fabian Groffen
2011-10-20 20:28 Fabian Groffen
2011-10-20 17:08 Fabian Groffen
2011-10-20 16:38 Fabian Groffen
2011-10-17 18:36 Fabian Groffen
2011-10-16 13:59 Fabian Groffen
2011-10-15 18:27 Fabian Groffen
2011-10-13 6:52 Fabian Groffen
2011-09-23 18:38 Fabian Groffen
2011-09-23 18:23 Fabian Groffen
2011-09-20 18:25 Fabian Groffen
2011-09-14 18:43 Fabian Groffen
2011-09-14 18:38 Fabian Groffen
2011-09-13 17:41 Fabian Groffen
2011-08-31 18:39 Fabian Groffen
2011-08-30 18:45 Fabian Groffen
2011-08-29 19:03 Fabian Groffen
2011-08-25 20:25 Fabian Groffen
2011-08-20 17:50 Fabian Groffen
2011-07-26 17:35 Fabian Groffen
2011-07-17 9:48 Fabian Groffen
2011-07-17 8:12 Fabian Groffen
2011-07-01 17:44 Fabian Groffen
2011-06-14 15:39 Fabian Groffen
2011-06-06 17:12 Fabian Groffen
2011-05-28 8:29 Fabian Groffen
2011-05-27 17:41 Fabian Groffen
2011-05-14 13:59 Fabian Groffen
2011-05-02 17:41 Fabian Groffen
2011-04-24 12:08 Fabian Groffen
2011-04-15 18:27 Fabian Groffen
2011-04-15 18:27 Fabian Groffen
2011-03-28 16:52 Fabian Groffen
2011-03-23 19:26 Fabian Groffen
2011-03-17 19:08 Fabian Groffen
2011-03-13 14:45 Fabian Groffen
2011-03-09 19:44 Fabian Groffen
2011-02-26 21:15 Fabian Groffen
2011-02-10 18:46 Fabian Groffen
2011-02-10 18:44 Fabian Groffen
2011-02-10 18:20 Fabian Groffen
2011-02-05 12:25 Fabian Groffen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1333222259.1fac28c57317b8174580b8243c3549fd75aeaa6d.grobian@gentoo \
--to=grobian@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox