1 |
commit: 61aa6eec0b6b32818e6d77adfe78e163652d1baa |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 29 19:36:02 2019 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 29 19:37:31 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61aa6eec |
7 |
|
8 |
sys-apps/portage: fix etc-update shebang for prefix |
9 |
|
10 |
Reported-by: dingyuc <AT> 126.com |
11 |
Closes: https://bugs.gentoo.org/686940 |
12 |
Package-Manager: Portage-2.3.67, Repoman-2.3.13 |
13 |
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> |
14 |
|
15 |
sys-apps/portage/portage-2.3.62-r2.ebuild | 2 +- |
16 |
sys-apps/portage/portage-2.3.66-r1.ebuild | 2 +- |
17 |
sys-apps/portage/portage-2.3.67.ebuild | 2 +- |
18 |
sys-apps/portage/portage-9999.ebuild | 24 ++++++------------------ |
19 |
4 files changed, 9 insertions(+), 21 deletions(-) |
20 |
|
21 |
diff --git a/sys-apps/portage/portage-2.3.62-r2.ebuild b/sys-apps/portage/portage-2.3.62-r2.ebuild |
22 |
index 17b1506e277..6774b1d5563 100644 |
23 |
--- a/sys-apps/portage/portage-2.3.62-r2.ebuild |
24 |
+++ b/sys-apps/portage/portage-2.3.62-r2.ebuild |
25 |
@@ -150,7 +150,7 @@ python_prepare_all() { |
26 |
sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \ |
27 |
die "sed failed" |
28 |
fi |
29 |
- done < <(find . -type f -print0) |
30 |
+ done < <(find . -type f ! -name etc-update -print0) |
31 |
|
32 |
einfo "Adjusting make.globals, repos.conf and etc-update ..." |
33 |
hprefixify cnf/{make.globals,repos.conf} bin/etc-update |
34 |
|
35 |
diff --git a/sys-apps/portage/portage-2.3.66-r1.ebuild b/sys-apps/portage/portage-2.3.66-r1.ebuild |
36 |
index de238f425d5..1a381bdcdbc 100644 |
37 |
--- a/sys-apps/portage/portage-2.3.66-r1.ebuild |
38 |
+++ b/sys-apps/portage/portage-2.3.66-r1.ebuild |
39 |
@@ -150,7 +150,7 @@ python_prepare_all() { |
40 |
sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \ |
41 |
die "sed failed" |
42 |
fi |
43 |
- done < <(find . -type f -print0) |
44 |
+ done < <(find . -type f ! -name etc-update -print0) |
45 |
|
46 |
einfo "Adjusting make.globals, repos.conf and etc-update ..." |
47 |
hprefixify cnf/{make.globals,repos.conf} bin/etc-update |
48 |
|
49 |
diff --git a/sys-apps/portage/portage-2.3.67.ebuild b/sys-apps/portage/portage-2.3.67.ebuild |
50 |
index f186a1acf12..841947dcfff 100644 |
51 |
--- a/sys-apps/portage/portage-2.3.67.ebuild |
52 |
+++ b/sys-apps/portage/portage-2.3.67.ebuild |
53 |
@@ -148,7 +148,7 @@ python_prepare_all() { |
54 |
sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \ |
55 |
die "sed failed" |
56 |
fi |
57 |
- done < <(find . -type f -print0) |
58 |
+ done < <(find . -type f ! -name etc-update -print0) |
59 |
|
60 |
einfo "Adjusting make.globals, repos.conf and etc-update ..." |
61 |
hprefixify cnf/{make.globals,repos.conf} bin/etc-update |
62 |
|
63 |
diff --git a/sys-apps/portage/portage-9999.ebuild b/sys-apps/portage/portage-9999.ebuild |
64 |
index aa44b4b671c..e7c1e8c638f 100644 |
65 |
--- a/sys-apps/portage/portage-9999.ebuild |
66 |
+++ b/sys-apps/portage/portage-9999.ebuild |
67 |
@@ -10,7 +10,7 @@ PYTHON_COMPAT=( |
68 |
) |
69 |
PYTHON_REQ_USE='bzip2(+),threads(+)' |
70 |
|
71 |
-inherit distutils-r1 git-r3 linux-info systemd |
72 |
+inherit distutils-r1 git-r3 linux-info systemd prefix |
73 |
|
74 |
DESCRIPTION="Portage is the package management and distribution system for Gentoo" |
75 |
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage" |
76 |
@@ -136,14 +136,8 @@ python_prepare_all() { |
77 |
|
78 |
if [[ -n ${EPREFIX} ]] ; then |
79 |
einfo "Setting portage.const.EPREFIX ..." |
80 |
- sed -e "s|^\(SANDBOX_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/sandbox\"\)|\\1${EPREFIX}\\2|" \ |
81 |
- -e "s|^\(FAKEROOT_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/fakeroot\"\)|\\1${EPREFIX}\\2|" \ |
82 |
- -e "s|^\(BASH_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/bash\"\)|\\1${EPREFIX}\\2|" \ |
83 |
- -e "s|^\(MOVE_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/mv\"\)|\\1${EPREFIX}\\2|" \ |
84 |
- -e "s|^\(PRELINK_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/sbin/prelink\"\)|\\1${EPREFIX}\\2|" \ |
85 |
- -e "s|^\(EPREFIX[[:space:]]*=[[:space:]]*\"\).*|\\1${EPREFIX}\"|" \ |
86 |
- -i lib/portage/const.py || \ |
87 |
- die "Failed to patch portage.const.EPREFIX" |
88 |
+ hprefixify -e "s|^(EPREFIX[[:space:]]*=[[:space:]]*\").*|\1${EPREFIX}\"|" \ |
89 |
+ -w "/_BINARY/" lib/portage/const.py |
90 |
|
91 |
einfo "Prefixing shebangs ..." |
92 |
while read -r -d $'\0' ; do |
93 |
@@ -152,17 +146,11 @@ python_prepare_all() { |
94 |
sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \ |
95 |
die "sed failed" |
96 |
fi |
97 |
- done < <(find . -type f -print0) |
98 |
+ done < <(find . -type f ! -name etc-update -print0) |
99 |
|
100 |
- einfo "Adjusting make.globals ..." |
101 |
- sed -e "s|\(/usr/portage\)|${EPREFIX}\\1|" \ |
102 |
- -e "s|^\(PORTAGE_TMPDIR=\"\)\(/var/tmp\"\)|\\1${EPREFIX}\\2|" \ |
103 |
- -i cnf/make.globals || die "sed failed" |
104 |
+ einfo "Adjusting make.globals, repos.conf and etc-update ..." |
105 |
+ hprefixify cnf/{make.globals,repos.conf} bin/etc-update |
106 |
|
107 |
- einfo "Adjusting repos.conf ..." |
108 |
- sed -e "s|^\(location = \)\(/usr/portage\)|\\1${EPREFIX}\\2|" \ |
109 |
- -e "s|^\(sync-openpgp-key-path = \)\(.*\)|\\1${EPREFIX}\\2|" \ |
110 |
- -i cnf/repos.conf || die "sed failed" |
111 |
if prefix-guest ; then |
112 |
sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \ |
113 |
-e "s|^\\[gentoo\\]|[gentoo_prefix]|" \ |