Merge remote-tracking branch 'overlays-gentoo-org/master' into prefix
authorFabian Groffen <grobian@gentoo.org>
Thu, 13 Oct 2011 06:50:59 +0000 (08:50 +0200)
committerFabian Groffen <grobian@gentoo.org>
Thu, 13 Oct 2011 06:50:59 +0000 (08:50 +0200)
Conflicts:
bin/ebuild-helpers/prepstrip

22 files changed:
1  2 
bin/archive-conf
bin/dispatch-conf
bin/ebuild
bin/ebuild-helpers/prepstrip
bin/etc-update
bin/portageq
bin/repoman
cnf/dispatch-conf.conf
cnf/make.globals
man/emerge.1
man/make.conf.5
pym/_emerge/EbuildBuild.py
pym/_emerge/depgraph.py
pym/_emerge/main.py
pym/portage/const.py
pym/portage/dbapi/vartree.py
pym/portage/output.py
pym/portage/package/ebuild/_config/MaskManager.py
pym/portage/package/ebuild/doebuild.py
pym/portage/package/ebuild/fetch.py
pym/portage/tests/runTests
runtests.sh

index ff46444883113e7072818b4eaa4adad1aa004904,79786681710d47f3d2b35f8e899a1728136fda9a..149fdc51d9a7b3b9cebce90ec32df3d55628fdf1
  from __future__ import print_function
  
  import sys
 -try:
 -    import portage
 -except ImportError:
 -    from os import path as osp
 -    sys.path.insert(0, osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), "pym"))
 -    import portage
  
  from portage import os
- import dispatch_conf
from portage import dispatch_conf
  
  FIND_EXTANT_CONTENTS  = "find %s -name CONTENTS"
  
Simple merge
diff --cc bin/ebuild
index 77d576a1a4f19840d8d5baf61ab36022ccd0affc,d4b8b71f6b94b4ca8283769fa1b645cae61c309e..4eb848696546f04fa9d027d1f1275eae6a1fc181
@@@ -54,18 -56,13 +56,15 @@@ parser.add_option("--skip-manifest", he
  
  opts, pargs = parser.parse_args(args=sys.argv[1:])
  
- if len(pargs) < 2:
-       parser.error("missing required args")
  os.environ["PORTAGE_CALLER"]="ebuild"
 -try:
 -      import portage
 -except ImportError:
 -      from os import path as osp
 -      sys.path.insert(0, osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), "pym"))
 -      import portage
 +# for an explanation on this logic, see pym/_emerge/__init__.py
 +from os import environ as ose
 +from os import path as osp
 +if ose.__contains__("PORTAGE_PYTHONPATH"):
 +    sys.path.insert(0, ose["PORTAGE_PYTHONPATH"])
 +else:
 +    sys.path.insert(0, osp.join(osp.dirname(osp.dirname(osp.                    realpath(__file__))), "pym"))
 +import portage
  
  portage.dep._internal_warnings = True
  from portage import os
index 9c5d9dad65b52acdcf521545adaa4d9931447751,8c2ca4839573dbcff156065cd19cf37dd516004b..077656f52279d2410cc30bc5e3461331b9de453f
@@@ -2,33 -2,62 +2,62 @@@
  # Copyright 1999-2011 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
  
+ # avoid multiple calls to `has`.  this creates things like:
+ #   FEATURES_foo=false
+ # if "foo" is not in $FEATURES
+ tf() { "$@" && echo true || echo false ; }
+ exp_tf() {
+       local flag var=$1
+       shift
+       for flag in "$@" ; do
+               eval ${var}_${flag}=$(tf has ${flag} ${!var})
+       done
+ }
+ exp_tf FEATURES installsources nostrip splitdebug
+ exp_tf RESTRICT binchecks installsources strip
  banner=false
  SKIP_STRIP=false
- if has nostrip ${FEATURES} || \
-    has strip ${RESTRICT}
- then
+ if ${RESTRICT_strip} || ${FEATURES_nostrip} ; then
        SKIP_STRIP=true
        banner=true
-       has installsources ${FEATURES} || exit 0
+       ${FEATURES_installsources} || exit 0
  fi
  
- STRIP=${STRIP:-${CHOST}-strip}
- type -P -- ${STRIP} > /dev/null || STRIP=strip
- OBJCOPY=${OBJCOPY:-${CHOST}-objcopy}
- type -P -- ${OBJCOPY} > /dev/null || OBJCOPY=objcopy
+ # look up the tools we might be using
+ for t in STRIP:strip OBJCOPY:objcopy READELF:readelf ; do
+       v=${t%:*} # STRIP
+       t=${t#*:} # strip
+       eval ${v}=\"${!v:-${CHOST}-${t}}\"
+       type -P -- ${!v} >/dev/null || eval ${v}=${t}
+ done
+ # Figure out what tool set we're using to strip stuff
+ unset SAFE_STRIP_FLAGS DEF_STRIP_FLAGS SPLIT_STRIP_FLAGS
+ case $(${STRIP} --version 2>/dev/null) in
+ *elfutils*) # dev-libs/elfutils
+       # elfutils default behavior is always safe, so don't need to specify
+       # any flags at all
+       SAFE_STRIP_FLAGS=""
+       DEF_STRIP_FLAGS="--remove-comment"
+       SPLIT_STRIP_FLAGS="-f"
+       ;;
+ *GNU*) # sys-devel/binutils
+       # We'll leave out -R .note for now until we can check out the relevance
+       # of the section when it has the ALLOC flag set on it ...
+       SAFE_STRIP_FLAGS="--strip-unneeded"
+       DEF_STRIP_FLAGS="-R .comment"
+       SPLIT_STRIP_FLAGS=
+       ;;
+ esac
+ : ${PORTAGE_STRIP_FLAGS=${SAFE_STRIP_FLAGS} ${DEF_STRIP_FLAGS}}
  
- # We'll leave out -R .note for now until we can check out the relevance
- # of the section when it has the ALLOC flag set on it ...
- export SAFE_STRIP_FLAGS="--strip-unneeded"
- export PORTAGE_STRIP_FLAGS=${PORTAGE_STRIP_FLAGS-${SAFE_STRIP_FLAGS} -R .comment}
 -prepstrip_sources_dir=/usr/src/debug/${CATEGORY}/${PF}
 +prepstrip_sources_dir="${EPREFIX}"/usr/src/debug/${CATEGORY}/${PF}
  
- if has installsources ${FEATURES} && ! type -P debugedit >/dev/null ; then
-       ewarn "FEATURES=installsources is enabled but the debugedit binary could not"
-       ewarn "be found. This feature will not work unless debugedit is installed!"
- fi
+ type -P debugedit >/dev/null && debugedit_found=true || debugedit_found=false
+ debugedit_warned=false
  
  unset ${!INODE_*}
  
@@@ -53,10 -96,10 +96,10 @@@ save_elf_sources() 
  }
  
  save_elf_debug() {
-       has splitdebug ${FEATURES} || return 0
+       ${FEATURES_splitdebug} || return 0
  
        local x=$1
 -      local y="${D}usr/lib/debug/${x:${#D}}.debug"
 +      local y="${ED}usr/lib/debug/${x:${#D}}.debug"
  
        # dont save debug info twice
        [[ ${x} == *".debug" ]] && return 0
        # actually causes problems.  install sources for all
        # elf types though cause that stuff is good.
  
+       buildid=
        if [[ ${f} == *"current ar archive"* ]] ; then
 -              vecho "   ${x:${#D}}"
 +              vecho "   ${x:${#ED}}"
                if ${strip_this} ; then
                        # hmm, can we split debug/sources for .a ?
                        ${STRIP} -g "${x}"
                fi
        elif [[ ${f} == *"SB executable"* || ${f} == *"SB shared object"* ]] ; then
-               vecho "   ${x:${#ED}}"
-               save_elf_sources "${x}"
-               if ${strip_this} ; then
-                       save_elf_debug "${x}"
-                       ${STRIP} ${PORTAGE_STRIP_FLAGS} "${x}"
-               fi
+               process_elf "${x}" ${PORTAGE_STRIP_FLAGS}
        elif [[ ${f} == *"SB relocatable"* ]] ; then
-               vecho "   ${x:${#ED}}"
-               save_elf_sources "${x}"
-               if ${strip_this} ; then
-                       [[ ${x} == *.ko ]] && save_elf_debug "${x}"
-                       ${STRIP} ${SAFE_STRIP_FLAGS} "${x}"
-               fi
+               process_elf "${x}" ${SAFE_STRIP_FLAGS}
        fi
 +
 +      if [[ ${was_not_writable} == "true" ]] ; then
 +              chmod u-w "${x}"
 +      fi
  done
  
  if [[ -s ${T}/debug.sources ]] && \
diff --cc bin/etc-update
Simple merge
diff --cc bin/portageq
Simple merge
diff --cc bin/repoman
Simple merge
Simple merge
Simple merge
diff --cc man/emerge.1
Simple merge
diff --cc man/make.conf.5
Simple merge
Simple merge
Simple merge
Simple merge
index 7fc034a4c0247a424368559139adc7d424162d04,29c3878a6a41ad25246ac7b511312437e4ff6c2f..63e7c67da808082e0dd896c0b45a96268f96dfbe
@@@ -135,9 -90,8 +134,9 @@@ SUPPORTED_FEATURES       = frozenset(
                             "ccache", "chflags", "clean-logs",
                             "collision-protect", "compress-build-logs",
                             "digest", "distcc", "distcc-pump", "distlocks", "ebuild-locks", "fakeroot",
-                            "fail-clean", "fixpackages", "force-mirror", "getbinpkg",
+                            "fail-clean", "force-mirror", "getbinpkg",
                             "installsources", "keeptemp", "keepwork", "fixlafiles", "lmirror",
 +                            "macossandbox", "macosprefixsandbox", "macosusersandbox",
                             "metadata-transfer", "mirror", "multilib-strict", "news",
                             "noauto", "noclean", "nodoc", "noinfo", "noman",
                             "nostrip", "notitles", "parallel-fetch", "parallel-install",
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc runtests.sh
Simple merge