1 |
commit: 3d0d365f6de736c45bb8d67f421cb6b8ea09697c |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jul 30 01:35:23 2019 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jul 30 01:36:08 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3d0d365f |
7 |
|
8 |
sys-apps/portage: Remove old versions |
9 |
|
10 |
Package-Manager: Portage-2.3.69, Repoman-2.3.16 |
11 |
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> |
12 |
|
13 |
sys-apps/portage/Manifest | 2 - |
14 |
sys-apps/portage/portage-2.3.62-r2.ebuild | 261 ----------------------------- |
15 |
sys-apps/portage/portage-2.3.68-r1.ebuild | 263 ------------------------------ |
16 |
3 files changed, 526 deletions(-) |
17 |
|
18 |
diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest |
19 |
index b35a0a139fd..f54e105fb3a 100644 |
20 |
--- a/sys-apps/portage/Manifest |
21 |
+++ b/sys-apps/portage/Manifest |
22 |
@@ -1,5 +1,3 @@ |
23 |
-DIST portage-2.3.62.tar.bz2 1021442 BLAKE2B 37d5dab0e678ced78e0ff4dc9907af3d20370a4b0f52cea9118be3d06bb14e24fe6597d86c9bbd9d3ed2fc51f9e031d4e9ba84f354b945f7a399da3cbb95d74a SHA512 d4eca7e70573aae07a0522b4bf361191fded00fa02c5e6d8f70cf72c19c4dcfa9be7169a267afdc58cdd0a8ee333774a7779ac08dee3490aa8e8a1ebd39deb49 |
24 |
DIST portage-2.3.66.tar.bz2 1023966 BLAKE2B dc378b714101b287fa33defeb778e586da83275cdc2d0bc7a98e9f2ea568568313d6a2767f693f3111fc41f0c6f07451315021186a1719bd52520da327c103d6 SHA512 f8642237e0127d9838c6e91430a19b8886295f8ce6b18cf915d6eb63204c7a8c65783f1554eec90b7ce7d0b613ef4206643eec8751b0594de1dcb4ede4491779 |
25 |
-DIST portage-2.3.68.tar.bz2 1025806 BLAKE2B 70d5011548a11f3f8859fba407603c34162274698d5a4351e7ed10addf6cf5df88261ab3a1aed73dd7600d9038aa0cf3bb67705e78a51103a5e355c7fa615d8b SHA512 4dc9ac1e03c267b280c932fbcde14f74cac1fb111fe75f21521d156696ab9a7aab2ca175a35615375b097196ad998ae774e8535a6c6205398b10596fb9d1a859 |
26 |
DIST portage-2.3.69.tar.bz2 1027945 BLAKE2B 22a06370d9db8f8954f609a4435983b914f03c11fa1c4c857089738db574e3346fc286c77bb62103d868742b423484b3a186cbc22545cccca0f516a5724e331e SHA512 20a6c9d26829e9d3738da824aa3fcc0bc8f01019ae9631871ce56e5ff37d91ed27d7b9505c433cc3b7441290abf98bf0897bbb66c099cbb982854047e6c8f045 |
27 |
DIST repoman-bug-685482-fbebef9677d6.patch 3350 BLAKE2B f715267e2731c1ec7c780aa9c6cffe1f848b3ad050273646579677a0522483df6fef844ffd87fb22f7dad53f1ec60221acd0d81a813569baf768ba62a6c1921c SHA512 0e44625aeec7c239d7db8fdcf6a13313f4a8c1275e0e474cc2f05e5476d86214881cec2917d816c8b63f69d508c0bfa69e6a8e05b614b405463c998a4fb7ce12 |
28 |
|
29 |
diff --git a/sys-apps/portage/portage-2.3.62-r2.ebuild b/sys-apps/portage/portage-2.3.62-r2.ebuild |
30 |
deleted file mode 100644 |
31 |
index 6774b1d5563..00000000000 |
32 |
--- a/sys-apps/portage/portage-2.3.62-r2.ebuild |
33 |
+++ /dev/null |
34 |
@@ -1,261 +0,0 @@ |
35 |
-# Copyright 1999-2019 Gentoo Authors |
36 |
-# Distributed under the terms of the GNU General Public License v2 |
37 |
- |
38 |
-EAPI=5 |
39 |
- |
40 |
-PYTHON_COMPAT=( |
41 |
- pypy |
42 |
- python3_5 python3_6 python3_7 |
43 |
- python2_7 |
44 |
-) |
45 |
-PYTHON_REQ_USE='bzip2(+),threads(+)' |
46 |
- |
47 |
-inherit distutils-r1 epatch linux-info systemd prefix |
48 |
- |
49 |
-DESCRIPTION="Portage is the package management and distribution system for Gentoo" |
50 |
-HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage" |
51 |
- |
52 |
-LICENSE="GPL-2" |
53 |
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 ~riscv s390 sh sparc x86 ~amd64-fbsd" |
54 |
-SLOT="0" |
55 |
-IUSE="build doc epydoc gentoo-dev +ipc +native-extensions +rsync-verify selinux xattr" |
56 |
- |
57 |
-DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') ) |
58 |
- >=app-arch/tar-1.27 |
59 |
- dev-lang/python-exec:2 |
60 |
- >=sys-apps/sed-4.0.5 sys-devel/patch |
61 |
- doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 ) |
62 |
- epydoc? ( >=dev-python/epydoc-2.0[$(python_gen_usedep 'python2*')] )" |
63 |
-# Require sandbox-2.2 for bug #288863. |
64 |
-# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's |
65 |
-# quite slow, so it's not considered in the dependencies as an alternative to |
66 |
-# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so |
67 |
-# for now, don't pull in xattr deps for other kernels. |
68 |
-# For whirlpool hash, require python[ssl] (bug #425046). |
69 |
-# For compgen, require bash[readline] (bug #445576). |
70 |
-# app-portage/gemato goes without PYTHON_USEDEP since we're calling |
71 |
-# the executable. |
72 |
-RDEPEND=" |
73 |
- >=app-arch/tar-1.27 |
74 |
- dev-lang/python-exec:2 |
75 |
- !build? ( |
76 |
- >=sys-apps/sed-4.0.5 |
77 |
- app-shells/bash:0[readline] |
78 |
- >=app-admin/eselect-1.2 |
79 |
- $(python_gen_cond_dep 'dev-python/pyblake2[${PYTHON_USEDEP}]' \ |
80 |
- python{2_7,3_5} pypy) |
81 |
- rsync-verify? ( |
82 |
- >=app-portage/gemato-14[${PYTHON_USEDEP}] |
83 |
- >=app-crypt/openpgp-keys-gentoo-release-20180706 |
84 |
- >=app-crypt/gnupg-2.2.4-r2[ssl(-)] |
85 |
- ) |
86 |
- ) |
87 |
- elibc_FreeBSD? ( sys-freebsd/freebsd-bin ) |
88 |
- elibc_glibc? ( >=sys-apps/sandbox-2.2 ) |
89 |
- elibc_musl? ( >=sys-apps/sandbox-2.2 ) |
90 |
- elibc_uclibc? ( >=sys-apps/sandbox-2.2 ) |
91 |
- kernel_linux? ( sys-apps/util-linux ) |
92 |
- >=app-misc/pax-utils-0.1.17 |
93 |
- selinux? ( >=sys-libs/libselinux-2.0.94[python,${PYTHON_USEDEP}] ) |
94 |
- xattr? ( kernel_linux? ( |
95 |
- >=sys-apps/install-xattr-0.3 |
96 |
- $(python_gen_cond_dep 'dev-python/pyxattr[${PYTHON_USEDEP}]' \ |
97 |
- python2_7 pypy) |
98 |
- ) ) |
99 |
- !<app-admin/logrotate-3.8.0 |
100 |
- !<app-portage/repoman-2.3.10" |
101 |
-PDEPEND=" |
102 |
- !build? ( |
103 |
- >=net-misc/rsync-2.6.4 |
104 |
- userland_GNU? ( >=sys-apps/coreutils-6.4 ) |
105 |
- )" |
106 |
-# coreutils-6.4 rdep is for date format in emerge-webrsync #164532 |
107 |
-# NOTE: FEATURES=installsources requires debugedit and rsync |
108 |
- |
109 |
-REQUIRED_USE="epydoc? ( $(python_gen_useflags 'python2*') )" |
110 |
- |
111 |
-SRC_ARCHIVES="https://dev.gentoo.org/~zmedico/portage/archives" |
112 |
- |
113 |
-prefix_src_archives() { |
114 |
- local x y |
115 |
- for x in ${@}; do |
116 |
- for y in ${SRC_ARCHIVES}; do |
117 |
- echo ${y}/${x} |
118 |
- done |
119 |
- done |
120 |
-} |
121 |
- |
122 |
-TARBALL_PV=${PV} |
123 |
-SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2 |
124 |
- $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2) |
125 |
- https://github.com/gentoo/portage/commit/fbebef9677d63db70f1c68b197e58b041ec6ac61.patch -> repoman-bug-685482-fbebef9677d6.patch" |
126 |
- |
127 |
-pkg_pretend() { |
128 |
- local CONFIG_CHECK="~IPC_NS ~PID_NS ~NET_NS" |
129 |
- |
130 |
- check_extra_config |
131 |
-} |
132 |
- |
133 |
-pkg_setup() { |
134 |
- use epydoc && DISTUTILS_ALL_SUBPHASE_IMPLS=( python2.7 ) |
135 |
-} |
136 |
- |
137 |
-python_prepare_all() { |
138 |
- distutils-r1_python_prepare_all |
139 |
- epatch "${DISTDIR}/repoman-bug-685482-fbebef9677d6.patch" |
140 |
- |
141 |
- if use gentoo-dev; then |
142 |
- einfo "Disabling --dynamic-deps by default for gentoo-dev..." |
143 |
- sed -e 's:\("--dynamic-deps", \)\("y"\):\1"n":' \ |
144 |
- -i lib/_emerge/create_depgraph_params.py || \ |
145 |
- die "failed to patch create_depgraph_params.py" |
146 |
- |
147 |
- einfo "Enabling additional FEATURES for gentoo-dev..." |
148 |
- echo 'FEATURES="${FEATURES} ipc-sandbox network-sandbox strict-keepdir"' \ |
149 |
- >> cnf/make.globals || die |
150 |
- fi |
151 |
- |
152 |
- if use native-extensions; then |
153 |
- printf "[build_ext]\nportage-ext-modules=true\n" >> \ |
154 |
- setup.cfg || die |
155 |
- fi |
156 |
- |
157 |
- if ! use ipc ; then |
158 |
- einfo "Disabling ipc..." |
159 |
- sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \ |
160 |
- -i lib/_emerge/AbstractEbuildProcess.py || \ |
161 |
- die "failed to patch AbstractEbuildProcess.py" |
162 |
- fi |
163 |
- |
164 |
- if use xattr && use kernel_linux ; then |
165 |
- einfo "Adding FEATURES=xattr to make.globals ..." |
166 |
- echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \ |
167 |
- || die "failed to append to make.globals" |
168 |
- fi |
169 |
- |
170 |
- if use build || ! use rsync-verify; then |
171 |
- sed -e '/^sync-rsync-verify-metamanifest/s|yes|no|' \ |
172 |
- -i cnf/repos.conf || die "sed failed" |
173 |
- fi |
174 |
- |
175 |
- if [[ -n ${EPREFIX} ]] ; then |
176 |
- einfo "Setting portage.const.EPREFIX ..." |
177 |
- hprefixify -e "s|^(EPREFIX[[:space:]]*=[[:space:]]*\").*|\1${EPREFIX}\"|" \ |
178 |
- -w "/_BINARY/" lib/portage/const.py |
179 |
- |
180 |
- einfo "Prefixing shebangs ..." |
181 |
- while read -r -d $'\0' ; do |
182 |
- local shebang=$(head -n1 "$REPLY") |
183 |
- if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then |
184 |
- sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \ |
185 |
- die "sed failed" |
186 |
- fi |
187 |
- done < <(find . -type f ! -name etc-update -print0) |
188 |
- |
189 |
- einfo "Adjusting make.globals, repos.conf and etc-update ..." |
190 |
- hprefixify cnf/{make.globals,repos.conf} bin/etc-update |
191 |
- |
192 |
- if use prefix-guest ; then |
193 |
- sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \ |
194 |
- -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \ |
195 |
- -e "s|^\(sync-uri = \).*|\\1rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix|" \ |
196 |
- -i cnf/repos.conf || die "sed failed" |
197 |
- fi |
198 |
- |
199 |
- einfo "Adding FEATURES=force-prefix to make.globals ..." |
200 |
- echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \ |
201 |
- || die "failed to append to make.globals" |
202 |
- fi |
203 |
- |
204 |
- cd "${S}/cnf" || die |
205 |
- if [ -f "make.conf.example.${ARCH}".diff ]; then |
206 |
- patch make.conf.example "make.conf.example.${ARCH}".diff || \ |
207 |
- die "Failed to patch make.conf.example" |
208 |
- else |
209 |
- eerror "" |
210 |
- eerror "Portage does not have an arch-specific configuration for this arch." |
211 |
- eerror "Please notify the arch maintainer about this issue. Using generic." |
212 |
- eerror "" |
213 |
- fi |
214 |
-} |
215 |
- |
216 |
-python_compile_all() { |
217 |
- local targets=() |
218 |
- use doc && targets+=( docbook ) |
219 |
- use epydoc && targets+=( epydoc ) |
220 |
- |
221 |
- if [[ ${targets[@]} ]]; then |
222 |
- esetup.py "${targets[@]}" |
223 |
- fi |
224 |
-} |
225 |
- |
226 |
-python_test() { |
227 |
- esetup.py test |
228 |
-} |
229 |
- |
230 |
-python_install() { |
231 |
- # Install sbin scripts to bindir for python-exec linking |
232 |
- # they will be relocated in pkg_preinst() |
233 |
- distutils-r1_python_install \ |
234 |
- --system-prefix="${EPREFIX}/usr" \ |
235 |
- --bindir="$(python_get_scriptdir)" \ |
236 |
- --docdir="${EPREFIX}/usr/share/doc/${PF}" \ |
237 |
- --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \ |
238 |
- --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \ |
239 |
- --sbindir="$(python_get_scriptdir)" \ |
240 |
- --sysconfdir="${EPREFIX}/etc" \ |
241 |
- "${@}" |
242 |
-} |
243 |
- |
244 |
-python_install_all() { |
245 |
- distutils-r1_python_install_all |
246 |
- |
247 |
- local targets=() |
248 |
- use doc && targets+=( |
249 |
- install_docbook |
250 |
- --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" |
251 |
- ) |
252 |
- use epydoc && targets+=( |
253 |
- install_epydoc |
254 |
- --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" |
255 |
- ) |
256 |
- |
257 |
- # install docs |
258 |
- if [[ ${targets[@]} ]]; then |
259 |
- esetup.py "${targets[@]}" |
260 |
- fi |
261 |
- |
262 |
- systemd_dotmpfilesd "${FILESDIR}"/portage-ccache.conf |
263 |
- |
264 |
- # Due to distutils/python-exec limitations |
265 |
- # these must be installed to /usr/bin. |
266 |
- local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld' |
267 |
- einfo "Moving admin scripts to the correct directory" |
268 |
- dodir /usr/sbin |
269 |
- for target in ${sbin_relocations}; do |
270 |
- einfo "Moving /usr/bin/${target} to /usr/sbin/${target}" |
271 |
- mv "${ED}usr/bin/${target}" "${ED}usr/sbin/${target}" || die "sbin scripts move failed!" |
272 |
- done |
273 |
-} |
274 |
- |
275 |
-pkg_preinst() { |
276 |
- # comment out sanity test until it is fixed to work |
277 |
- # with the new PORTAGE_PYM_PATH |
278 |
- #if [[ $ROOT == / ]] ; then |
279 |
- ## Run some minimal tests as a sanity check. |
280 |
- #local test_runner=$(find "${ED}" -name runTests) |
281 |
- #if [[ -n $test_runner && -x $test_runner ]] ; then |
282 |
- #einfo "Running preinst sanity tests..." |
283 |
- #"$test_runner" || die "preinst sanity tests failed" |
284 |
- #fi |
285 |
- #fi |
286 |
- |
287 |
- # elog dir must exist to avoid logrotate error for bug #415911. |
288 |
- # This code runs in preinst in order to bypass the mapping of |
289 |
- # portage:portage to root:root which happens after src_install. |
290 |
- keepdir /var/log/portage/elog |
291 |
- # This is allowed to fail if the user/group are invalid for prefix users. |
292 |
- if chown portage:portage "${ED}"var/log/portage{,/elog} 2>/dev/null ; then |
293 |
- chmod g+s,ug+rwx "${ED}"var/log/portage{,/elog} |
294 |
- fi |
295 |
-} |
296 |
|
297 |
diff --git a/sys-apps/portage/portage-2.3.68-r1.ebuild b/sys-apps/portage/portage-2.3.68-r1.ebuild |
298 |
deleted file mode 100644 |
299 |
index 951420b89ea..00000000000 |
300 |
--- a/sys-apps/portage/portage-2.3.68-r1.ebuild |
301 |
+++ /dev/null |
302 |
@@ -1,263 +0,0 @@ |
303 |
-# Copyright 1999-2019 Gentoo Authors |
304 |
-# Distributed under the terms of the GNU General Public License v2 |
305 |
- |
306 |
-EAPI=5 |
307 |
- |
308 |
-PYTHON_COMPAT=( |
309 |
- pypy |
310 |
- python3_5 python3_6 python3_7 |
311 |
- python2_7 |
312 |
-) |
313 |
-PYTHON_REQ_USE='bzip2(+),threads(+)' |
314 |
- |
315 |
-inherit distutils-r1 linux-info systemd prefix |
316 |
- |
317 |
-DESCRIPTION="Portage is the package management and distribution system for Gentoo" |
318 |
-HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage" |
319 |
- |
320 |
-LICENSE="GPL-2" |
321 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-fbsd" |
322 |
-SLOT="0" |
323 |
-IUSE="build doc epydoc gentoo-dev +ipc +native-extensions +rsync-verify selinux xattr" |
324 |
- |
325 |
-DEPEND="!build? ( $(python_gen_impl_dep 'ssl(+)') ) |
326 |
- >=app-arch/tar-1.27 |
327 |
- dev-lang/python-exec:2 |
328 |
- >=sys-apps/sed-4.0.5 sys-devel/patch |
329 |
- doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 ) |
330 |
- epydoc? ( >=dev-python/epydoc-2.0[$(python_gen_usedep 'python2*')] )" |
331 |
-# Require sandbox-2.2 for bug #288863. |
332 |
-# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's |
333 |
-# quite slow, so it's not considered in the dependencies as an alternative to |
334 |
-# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so |
335 |
-# for now, don't pull in xattr deps for other kernels. |
336 |
-# For whirlpool hash, require python[ssl] (bug #425046). |
337 |
-# For compgen, require bash[readline] (bug #445576). |
338 |
-# app-portage/gemato goes without PYTHON_USEDEP since we're calling |
339 |
-# the executable. |
340 |
-RDEPEND=" |
341 |
- >=app-arch/tar-1.27 |
342 |
- dev-lang/python-exec:2 |
343 |
- !build? ( |
344 |
- >=sys-apps/sed-4.0.5 |
345 |
- app-shells/bash:0[readline] |
346 |
- >=app-admin/eselect-1.2 |
347 |
- $(python_gen_cond_dep 'dev-python/pyblake2[${PYTHON_USEDEP}]' \ |
348 |
- python{2_7,3_5} pypy) |
349 |
- rsync-verify? ( |
350 |
- >=app-portage/gemato-14[${PYTHON_USEDEP}] |
351 |
- >=app-crypt/openpgp-keys-gentoo-release-20180706 |
352 |
- >=app-crypt/gnupg-2.2.4-r2[ssl(-)] |
353 |
- ) |
354 |
- ) |
355 |
- elibc_FreeBSD? ( sys-freebsd/freebsd-bin ) |
356 |
- elibc_glibc? ( >=sys-apps/sandbox-2.2 ) |
357 |
- elibc_musl? ( >=sys-apps/sandbox-2.2 ) |
358 |
- elibc_uclibc? ( >=sys-apps/sandbox-2.2 ) |
359 |
- kernel_linux? ( sys-apps/util-linux ) |
360 |
- >=app-misc/pax-utils-0.1.17 |
361 |
- selinux? ( >=sys-libs/libselinux-2.0.94[python,${PYTHON_USEDEP}] ) |
362 |
- xattr? ( kernel_linux? ( |
363 |
- >=sys-apps/install-xattr-0.3 |
364 |
- $(python_gen_cond_dep 'dev-python/pyxattr[${PYTHON_USEDEP}]' \ |
365 |
- python2_7 pypy) |
366 |
- ) ) |
367 |
- !<app-admin/logrotate-3.8.0 |
368 |
- !<app-portage/repoman-2.3.10" |
369 |
-PDEPEND=" |
370 |
- !build? ( |
371 |
- >=net-misc/rsync-2.6.4 |
372 |
- userland_GNU? ( >=sys-apps/coreutils-6.4 ) |
373 |
- )" |
374 |
-# coreutils-6.4 rdep is for date format in emerge-webrsync #164532 |
375 |
-# NOTE: FEATURES=installsources requires debugedit and rsync |
376 |
- |
377 |
-REQUIRED_USE="epydoc? ( $(python_gen_useflags 'python2*') )" |
378 |
- |
379 |
-SRC_ARCHIVES="https://dev.gentoo.org/~zmedico/portage/archives" |
380 |
- |
381 |
-prefix_src_archives() { |
382 |
- local x y |
383 |
- for x in ${@}; do |
384 |
- for y in ${SRC_ARCHIVES}; do |
385 |
- echo ${y}/${x} |
386 |
- done |
387 |
- done |
388 |
-} |
389 |
- |
390 |
-TARBALL_PV=${PV} |
391 |
-SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2 |
392 |
- $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)" |
393 |
- |
394 |
-pkg_pretend() { |
395 |
- local CONFIG_CHECK="~IPC_NS ~PID_NS ~NET_NS" |
396 |
- |
397 |
- check_extra_config |
398 |
-} |
399 |
- |
400 |
-pkg_setup() { |
401 |
- use epydoc && DISTUTILS_ALL_SUBPHASE_IMPLS=( python2.7 ) |
402 |
-} |
403 |
- |
404 |
-python_prepare_all() { |
405 |
- distutils-r1_python_prepare_all |
406 |
- |
407 |
- # apply f4aa49bc1ba2 |
408 |
- sed -e 's|^export -n -f ___in_portage_iuse$|declare -F ___in_portage_iuse >/dev/null \&\& \0|' \ |
409 |
- -i bin/ebuild.sh || die |
410 |
- |
411 |
- if use gentoo-dev; then |
412 |
- einfo "Disabling --dynamic-deps by default for gentoo-dev..." |
413 |
- sed -e 's:\("--dynamic-deps", \)\("y"\):\1"n":' \ |
414 |
- -i lib/_emerge/create_depgraph_params.py || \ |
415 |
- die "failed to patch create_depgraph_params.py" |
416 |
- |
417 |
- einfo "Enabling additional FEATURES for gentoo-dev..." |
418 |
- echo 'FEATURES="${FEATURES} ipc-sandbox network-sandbox strict-keepdir"' \ |
419 |
- >> cnf/make.globals || die |
420 |
- fi |
421 |
- |
422 |
- if use native-extensions; then |
423 |
- printf "[build_ext]\nportage-ext-modules=true\n" >> \ |
424 |
- setup.cfg || die |
425 |
- fi |
426 |
- |
427 |
- if ! use ipc ; then |
428 |
- einfo "Disabling ipc..." |
429 |
- sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \ |
430 |
- -i lib/_emerge/AbstractEbuildProcess.py || \ |
431 |
- die "failed to patch AbstractEbuildProcess.py" |
432 |
- fi |
433 |
- |
434 |
- if use xattr && use kernel_linux ; then |
435 |
- einfo "Adding FEATURES=xattr to make.globals ..." |
436 |
- echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \ |
437 |
- || die "failed to append to make.globals" |
438 |
- fi |
439 |
- |
440 |
- if use build || ! use rsync-verify; then |
441 |
- sed -e '/^sync-rsync-verify-metamanifest/s|yes|no|' \ |
442 |
- -i cnf/repos.conf || die "sed failed" |
443 |
- fi |
444 |
- |
445 |
- if [[ -n ${EPREFIX} ]] ; then |
446 |
- einfo "Setting portage.const.EPREFIX ..." |
447 |
- hprefixify -e "s|^(EPREFIX[[:space:]]*=[[:space:]]*\").*|\1${EPREFIX}\"|" \ |
448 |
- -w "/_BINARY/" lib/portage/const.py |
449 |
- |
450 |
- einfo "Prefixing shebangs ..." |
451 |
- while read -r -d $'\0' ; do |
452 |
- local shebang=$(head -n1 "$REPLY") |
453 |
- if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then |
454 |
- sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \ |
455 |
- die "sed failed" |
456 |
- fi |
457 |
- done < <(find . -type f ! -name etc-update -print0) |
458 |
- |
459 |
- einfo "Adjusting make.globals, repos.conf and etc-update ..." |
460 |
- hprefixify cnf/{make.globals,repos.conf} bin/etc-update |
461 |
- |
462 |
- if use prefix-guest ; then |
463 |
- sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \ |
464 |
- -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \ |
465 |
- -e "s|^\(sync-uri = \).*|\\1rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix|" \ |
466 |
- -i cnf/repos.conf || die "sed failed" |
467 |
- fi |
468 |
- |
469 |
- einfo "Adding FEATURES=force-prefix to make.globals ..." |
470 |
- echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \ |
471 |
- || die "failed to append to make.globals" |
472 |
- fi |
473 |
- |
474 |
- cd "${S}/cnf" || die |
475 |
- if [ -f "make.conf.example.${ARCH}".diff ]; then |
476 |
- patch make.conf.example "make.conf.example.${ARCH}".diff || \ |
477 |
- die "Failed to patch make.conf.example" |
478 |
- else |
479 |
- eerror "" |
480 |
- eerror "Portage does not have an arch-specific configuration for this arch." |
481 |
- eerror "Please notify the arch maintainer about this issue. Using generic." |
482 |
- eerror "" |
483 |
- fi |
484 |
-} |
485 |
- |
486 |
-python_compile_all() { |
487 |
- local targets=() |
488 |
- use doc && targets+=( docbook ) |
489 |
- use epydoc && targets+=( epydoc ) |
490 |
- |
491 |
- if [[ ${targets[@]} ]]; then |
492 |
- esetup.py "${targets[@]}" |
493 |
- fi |
494 |
-} |
495 |
- |
496 |
-python_test() { |
497 |
- esetup.py test |
498 |
-} |
499 |
- |
500 |
-python_install() { |
501 |
- # Install sbin scripts to bindir for python-exec linking |
502 |
- # they will be relocated in pkg_preinst() |
503 |
- distutils-r1_python_install \ |
504 |
- --system-prefix="${EPREFIX}/usr" \ |
505 |
- --bindir="$(python_get_scriptdir)" \ |
506 |
- --docdir="${EPREFIX}/usr/share/doc/${PF}" \ |
507 |
- --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \ |
508 |
- --portage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" \ |
509 |
- --sbindir="$(python_get_scriptdir)" \ |
510 |
- --sysconfdir="${EPREFIX}/etc" \ |
511 |
- "${@}" |
512 |
-} |
513 |
- |
514 |
-python_install_all() { |
515 |
- distutils-r1_python_install_all |
516 |
- |
517 |
- local targets=() |
518 |
- use doc && targets+=( |
519 |
- install_docbook |
520 |
- --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" |
521 |
- ) |
522 |
- use epydoc && targets+=( |
523 |
- install_epydoc |
524 |
- --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" |
525 |
- ) |
526 |
- |
527 |
- # install docs |
528 |
- if [[ ${targets[@]} ]]; then |
529 |
- esetup.py "${targets[@]}" |
530 |
- fi |
531 |
- |
532 |
- systemd_dotmpfilesd "${FILESDIR}"/portage-ccache.conf |
533 |
- |
534 |
- # Due to distutils/python-exec limitations |
535 |
- # these must be installed to /usr/bin. |
536 |
- local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld' |
537 |
- einfo "Moving admin scripts to the correct directory" |
538 |
- dodir /usr/sbin |
539 |
- for target in ${sbin_relocations}; do |
540 |
- einfo "Moving /usr/bin/${target} to /usr/sbin/${target}" |
541 |
- mv "${ED}usr/bin/${target}" "${ED}usr/sbin/${target}" || die "sbin scripts move failed!" |
542 |
- done |
543 |
-} |
544 |
- |
545 |
-pkg_preinst() { |
546 |
- python_setup |
547 |
- python_export PYTHON_SITEDIR |
548 |
- [[ -d ${D%/}${PYTHON_SITEDIR} ]] || die "${D%/}${PYTHON_SITEDIR}: No such directory" |
549 |
- env -u DISTDIR \ |
550 |
- -u PORTAGE_OVERRIDE_EPREFIX \ |
551 |
- -u PORTAGE_REPOSITORIES \ |
552 |
- -u PORTDIR \ |
553 |
- -u PORTDIR_OVERLAY \ |
554 |
- PYTHONPATH="${D%/}${PYTHON_SITEDIR}${PYTHONPATH:+:${PYTHONPATH}}" \ |
555 |
- "${PYTHON}" -m portage._compat_upgrade.default_locations || die |
556 |
- |
557 |
- # elog dir must exist to avoid logrotate error for bug #415911. |
558 |
- # This code runs in preinst in order to bypass the mapping of |
559 |
- # portage:portage to root:root which happens after src_install. |
560 |
- keepdir /var/log/portage/elog |
561 |
- # This is allowed to fail if the user/group are invalid for prefix users. |
562 |
- if chown portage:portage "${ED}"var/log/portage{,/elog} 2>/dev/null ; then |
563 |
- chmod g+s,ug+rwx "${ED}"var/log/portage{,/elog} |
564 |
- fi |
565 |
-} |