From: | "Marien Zwart (marienz)" <marienz@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in app-admin/python-updater/files: python-updater-0.10-only-alias-sed-if-exists.patch |
Date: | Sat, 03 Mar 2012 18:05:44 |
Message-Id: | 20120303180531.CF4802004C@flycatcher.gentoo.org |
1 | marienz 12/03/03 18:05:31 |
2 | |
3 | Added: python-updater-0.10-only-alias-sed-if-exists.patch |
4 | Log: |
5 | Fix regression from bug #370935 on non-prefix portages. Thanks to maksbotan for reporting. |
6 | |
7 | (Portage version: 2.2.0_alpha89/cvs/Linux x86_64) |
8 | |
9 | Revision Changes Path |
10 | 1.1 app-admin/python-updater/files/python-updater-0.10-only-alias-sed-if-exists.patch |
11 | |
12 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/python-updater/files/python-updater-0.10-only-alias-sed-if-exists.patch?rev=1.1&view=markup |
13 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/python-updater/files/python-updater-0.10-only-alias-sed-if-exists.patch?rev=1.1&content-type=text/plain |
14 | |
15 | Index: python-updater-0.10-only-alias-sed-if-exists.patch |
16 | =================================================================== |
17 | Only alias sed to /usr/lib/portage/bin/ebuild-helpers/sed if the |
18 | latter exists (which should be the case on prefix portages, but not on |
19 | normal ones). Fixes fallout from bug #370935 on non-prefix portages. |
20 | |
21 | --- python-updater |
22 | +++ python-updater |
23 | @@ -488,8 +488,15 @@ |
24 | shift |
25 | done |
26 | |
27 | +# On a prefix portage we need to use sed from ebuild-helpers/ instead |
28 | +# of $PATH. On non-prefix portages ebuild-helpers/sed does not exist. |
29 | +# Prepending ebuild-helpers/ to $PATH uses too many tools from there. |
30 | +# So alias sed to ebuild-helpers/sed if it exists: |
31 | if [[ "${PMS_COMMAND[${PMS_INDEX}]}" == "emerge" ]]; then |
32 | - alias sed="$(/usr/bin/python -c "import os; print(os.path.dirname(os.path.realpath('$(type -p emerge)')))")/ebuild-helpers/sed" |
33 | + sed="$(/usr/bin/python -c "import os; print(os.path.dirname(os.path.realpath('$(type -p emerge)')))")/ebuild-helpers/sed" |
34 | + if [[ -x "${sed}" ]]; then |
35 | + alias sed="${sed}" |
36 | + fi |
37 | fi |
38 | |
39 | if has_version "=dev-lang/python-2*"; then |