Merge remote-tracking branch 'overlays-gentoo-org/master' into prefix
authorFabian Groffen <grobian@gentoo.org>
Sat, 31 Mar 2012 19:30:59 +0000 (21:30 +0200)
committerFabian Groffen <grobian@gentoo.org>
Sat, 31 Mar 2012 19:30:59 +0000 (21:30 +0200)
Conflicts:
bin/ebuild-helpers/dosym
bin/ebuild-helpers/fowners
bin/etc-update
bin/repoman
pym/_emerge/main.py

23 files changed:
1  2 
bin/dispatch-conf
bin/ebuild-helpers/dosym
bin/ebuild-helpers/fowners
bin/ebuild.sh
bin/emerge-webrsync
bin/etc-update
bin/isolated-functions.sh
bin/misc-functions.sh
bin/portageq
bin/repoman
pym/_emerge/EbuildBuild.py
pym/_emerge/Package.py
pym/_emerge/actions.py
pym/_emerge/depgraph.py
pym/_emerge/main.py
pym/portage/dbapi/bintree.py
pym/portage/dbapi/vartree.py
pym/portage/dispatch_conf.py
pym/portage/output.py
pym/portage/package/ebuild/doebuild.py
pym/portage/process.py
pym/portage/util/__init__.py
pym/portage/util/_pty.py

index 1b86461c91f51147be4ab533c002961b0bb975fc,139a001e8f7b129bad21aaf90f530848470f91fa..de8d85db7e9c70d468d235bacbe19470ed201f9f
@@@ -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'"
index 8f436fa95c493d8ee9d6f102a1ef09c17efbb877,2489e22a2366f8f2968b1b0db5d09705bd88d2fd..b96f845210b8c99854903ae547669f927ee227d5
@@@ -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"
index 9815d2ea681fe36fb312a11b18984003ce8b8cb7,a213c9eb128d20d5825b8d022a85d4140c082d17..b60aad7c1a7d4ad0586d16a19fc0b7d97b56f68f
@@@ -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/ebuild.sh
Simple merge
index c41eb79358e384242a1a048ab662a068eba613b6,bfd9aa2fc06632556d181fa94c9582e25c44c995..581dc5490c05eb5f3502ecc4668529e806d19a17
@@@ -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 b3877fbea8788320c0b6eb8481a455dfef5ae9e1,1edc91fab70a19dbcaabed0d73f17072f0917490..2a24613e4be98f0a1f033c830e19c5bd8e580bef
@@@ -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>
Simple merge
index 406cd8f82fb586472f1756c04403c8b2a30e2d7d,b08389714cc4a80fa801574d43f5e3e2ee962843..0d60a51e7b86b73b612038e8b8886b8030d30aa0
mode 100644,100755..100644
diff --cc bin/portageq
Simple merge
diff --cc bin/repoman
index 1f51ddf870fee9f0a3f0eae8accc16106dc487d7,54d864f1547833b41ff090b3f7594ff793ccc3ab..b89e5efbfed5c80a7a2698152aab16ca9b36f42a
@@@ -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
Simple merge
Simple merge
index 15a0bc1ace2f00ac7b5874deb404956f67914bd2,22c3e265f1ab4b5a4100768c337e5b3f63af3777..cbc5de2bd7059534a31cd7f1c08b15e9015a7fbe
@@@ -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
Simple merge
index 3d50b7d8757005829253f4c52145e23bf8d053a7,0fbc4b7f7256e48a043e4bfd3685b7f42433651c..68e951d4fd13c7d344c66381b7dabab00789bce4
@@@ -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
Simple merge
Simple merge
index 88ed222ddef5c364d4c823122b67f8c3822311c2,cc98fad16693289777a42c6e89c9cb9eb7c9600c..2fa1357f56dc658b46e06666e70baf8d55fb548e
@@@ -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()
Simple merge
Simple merge
Simple merge
Simple merge