From: Fabian Groffen Date: Thu, 25 Aug 2011 20:22:02 +0000 (+0200) Subject: Merge remote-tracking branch 'overlays-gentoo-org/master' into prefix X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=253d0140bb34d02368162b5d5fd5b030ea96965d;p=portage.git Merge remote-tracking branch 'overlays-gentoo-org/master' into prefix Conflicts: bin/ebuild-helpers/dosym --- 253d0140bb34d02368162b5d5fd5b030ea96965d diff --cc bin/ebuild index 58c2d839f,db7e5e385..e91149efa --- a/bin/ebuild +++ b/bin/ebuild @@@ -57,19 -57,13 +57,15 @@@ opts, pargs = parser.parse_args(args=sy if len(pargs) < 2: parser.error("missing required args") - if "merge" in pargs: - print("Disabling noauto in features... merge disables it. (qmerge doesn't)") - os.environ["FEATURES"] = os.environ.get("FEATURES", "") + " -noauto" - 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 diff --cc bin/ebuild-helpers/dosym index bd4044f63,7dd4c6d51..16e0df059 --- a/bin/ebuild-helpers/dosym +++ b/bin/ebuild-helpers/dosym @@@ -9,13 -9,16 +9,18 @@@ if [[ $# -ne 2 ]] ; the exit 1 fi - target="${1}" - linkname="${2}" - [[ ${target:0:1} == "/" ]] && target="${EPREFIX}${target}" - destdir=${linkname%/*} + if [[ ${2} == */ ]] || \ - [[ -d ${D}${2} && ! -L ${D}${2} ]] ; then ++ [[ -d ${ED}${2} && ! -L ${ED}${2} ]] ; then + # implicit basename not allowed by PMS (bug #379899) + eqawarn "QA Notice: dosym target omits basename: '${2}'" + fi + + destdir=${2%/*} -[[ ! -d ${D}${destdir} ]] && dodir "${destdir}" +[[ ! -d ${ED}${destdir} ]] && dodir "${destdir}" - ln -snf "${target}" "${ED}/${linkname}" -ln -snf "$1" "${D}$2" ++target="${1}" ++[[ ${target:0:1} == "/" ]] && target="${EPREFIX}${target}" ++ln -snf "${target}" "${ED}/${2}" ret=$? [[ $ret -ne 0 ]] && helpers_die "${0##*/} failed" exit $ret