From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1SE41h-00062X-S0 for garchives@archives.gentoo.org; Sat, 31 Mar 2012 19:31:54 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 43799E1242; Sat, 31 Mar 2012 19:31:35 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id F0581E1242 for ; Sat, 31 Mar 2012 19:31:34 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 339271B4006 for ; Sat, 31 Mar 2012 19:31:34 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id DFE3CE5402 for ; Sat, 31 Mar 2012 19:31:32 +0000 (UTC) From: "Fabian Groffen" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" Message-ID: <1333222259.1fac28c57317b8174580b8243c3549fd75aeaa6d.grobian@gentoo> Subject: [gentoo-commits] proj/portage:prefix commit in: / X-VCS-Repository: proj/portage X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: 1fac28c57317b8174580b8243c3549fd75aeaa6d X-VCS-Branch: prefix Date: Sat, 31 Mar 2012 19:31:32 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: cbb91c5e-a69e-4e0f-9346-6fe228563514 X-Archives-Hash: 1e9419248c31b4b5a4d3de8b03768b67 commit: 1fac28c57317b8174580b8243c3549fd75aeaa6d Author: Fabian Groffen gentoo org> AuthorDate: Sat Mar 31 19:30:59 2012 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Sat Mar 31 19:30:59 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D1fac28c5 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 =20 FIND_EXTANT_CONFIGS =3D "find '%s' %s -name '._cfg????_%s' ! -name '.*= ~' ! -iname '.*.bak' -print" DIFF_CONTENTS =3D "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 =20 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.s= h +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh =20 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 =20 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.s= h +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh + - # PREFIX LOCAL: ignore otherwise failing call - if hasq prefix ${USE} && [[ $EUID !=3D 0 ]] ; then - ewarn "fowners ignored in Prefix with non-privileged user" - exit 0 - fi - # END PREFIX LOCAL =20 [[ " ${FEATURES} " =3D=3D *" force-prefix "* ]] || \ - case "$EAPI" in 0|1|2) ED=3D${D} ;; esac + case "$EAPI" in 0|1|2) EPREFIX=3D ED=3D${D} ;; esac =20 # 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=3D"${PORTAGE_TMPDIR}/emerge-webrsync" export http_proxy ftp_proxy =20 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 =20 # Author Brandon Low 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 =20 # 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', ) =20 + 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 +=3D 1 - try: - proc =3D subprocess.Popen( - ['/usr/bin/install-info', - '--dir-file=3D%s' % os.path.join(inforoot, "dir"), - os.path.join(inforoot, x)], - env=3Ddict(os.environ, LANG=3D"C", LANGUAGE=3D"C"), - stdout=3Dsubprocess.PIPE, stderr=3Dsubprocess.STDOUT) - except OSError: - myso =3D None - else: - myso =3D _unicode_decode( - proc.communicate()[0]).rstrip("\n") - proc.wait() + myso =3D portage.subprocess_getstatusoutput( + "LANG=3DC LANGUAGE=3DC %s/usr/bin/install-info " \ + "--dir-file=3D%s/dir %s/%s" % (EPREFIX, inforoot, inforoot, x))[1= ] existsstr=3D"already exists, for file `" - if myso!=3D"": + 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 =3D "rcsmerge -p -r" + RCS_BRAN =20 DIFF3_MERGE =3D "diff3 -mE '%s' '%s' '%s' > '%s'" =20 - 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 =3D portage.subprocess_getstatusoutput(cmd) - return (status, len(output)) - except UnicodeDecodeError: - return (1, 1) + # Use Popen to emulate getstatusoutput(), since getstatusoutput() m= ay + # raise a UnicodeDecodeError which makes the output inaccessible. + proc =3D subprocess.Popen(portage._unicode_encode(cmd % (file1, fil= e2)), + stdout=3Dsubprocess.PIPE, stderr=3Dsubprocess.STDOUT, shell=3DT= rue) + output =3D portage._unicode_decode(proc.communicate()[0]) + if output and output[-1] =3D=3D "\n": + # getstatusoutput strips one newline + output =3D output[:-1] + return (proc.wait(), output) =20 def read_config(mandatory_opts): - eprefix =3D portage.const.EPREFIX + eprefix =3D EPREFIX config_path =3D os.path.join(eprefix or os.sep, "etc/dispatch-conf.= conf") loader =3D KeyValuePairFileLoader(config_path, None) opts, errors =3D loader.load()