1 |
zmedico 13/05/19 00:12:51 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: portage-2.1.12.1.ebuild |
5 |
Removed: portage-2.1.11.63.ebuild |
6 |
Log: |
7 |
2.1.12.1 version bump. This fixes bug #469332 (clarify RESTRICT=test build log message), |
8 |
bug #470002 (support PORTAGE_SSH_OPTS), |
9 |
bug #470152 (document ssh protocol usage for SYNC variable), bug #470154 (update docs to refer to metadata/md5-cache), |
10 |
bug #470224 (trigger QA notice for gcc -Wsizeof-pointer-memaccess warnings), |
11 |
bug #470238 (fix emerge --fetch interaction with --digest), and |
12 |
bug #470258 (fix tigetstr for pypy-2.0_beta2). |
13 |
Bug #468524 tracks all bugs fixed since portage-2.1.11.62. |
14 |
|
15 |
(Portage version: 2.1.12.1/cvs/Linux i686, signed Manifest commit with key 0xFDE8EF85AE5719A3) |
16 |
|
17 |
Revision Changes Path |
18 |
1.1268 sys-apps/portage/ChangeLog |
19 |
|
20 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?rev=1.1268&view=markup |
21 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?rev=1.1268&content-type=text/plain |
22 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?r1=1.1267&r2=1.1268 |
23 |
|
24 |
Index: ChangeLog |
25 |
=================================================================== |
26 |
RCS file: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v |
27 |
retrieving revision 1.1267 |
28 |
retrieving revision 1.1268 |
29 |
diff -u -r1.1267 -r1.1268 |
30 |
--- ChangeLog 16 May 2013 13:59:27 -0000 1.1267 |
31 |
+++ ChangeLog 19 May 2013 00:12:51 -0000 1.1268 |
32 |
@@ -1,6 +1,18 @@ |
33 |
# ChangeLog for sys-apps/portage |
34 |
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 |
35 |
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.1267 2013/05/16 13:59:27 zmedico Exp $ |
36 |
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.1268 2013/05/19 00:12:51 zmedico Exp $ |
37 |
+ |
38 |
+*portage-2.1.12.1 (19 May 2013) |
39 |
+ |
40 |
+ 19 May 2013; Zac Medico <zmedico@g.o> +portage-2.1.12.1.ebuild, |
41 |
+ -portage-2.1.11.63.ebuild: |
42 |
+ 2.1.12.1 version bump. This fixes bug #469332 (clarify RESTRICT=test build log |
43 |
+ message), bug #470002 (support PORTAGE_SSH_OPTS), bug #470152 (document ssh |
44 |
+ protocol usage for SYNC variable), bug #470154 (update docs to refer to |
45 |
+ metadata/md5-cache), bug #470224 (trigger QA notice for gcc -Wsizeof-pointer- |
46 |
+ memaccess warnings), bug #470238 (fix emerge --fetch interaction with |
47 |
+ --digest), and bug #470258 (fix tigetstr for pypy-2.0_beta2). Bug #468524 |
48 |
+ tracks all bugs fixed since portage-2.1.11.62. |
49 |
|
50 |
16 May 2013; Zac Medico <zmedico@g.o> portage-9999.ebuild: |
51 |
Eliminate subshell in boolean expression. |
52 |
|
53 |
|
54 |
|
55 |
1.1 sys-apps/portage/portage-2.1.12.1.ebuild |
56 |
|
57 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.1.12.1.ebuild?rev=1.1&view=markup |
58 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.1.12.1.ebuild?rev=1.1&content-type=text/plain |
59 |
|
60 |
Index: portage-2.1.12.1.ebuild |
61 |
=================================================================== |
62 |
# Copyright 1999-2013 Gentoo Foundation |
63 |
# Distributed under the terms of the GNU General Public License v2 |
64 |
# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.1.12.1.ebuild,v 1.1 2013/05/19 00:12:51 zmedico Exp $ |
65 |
|
66 |
# Require EAPI 2 since we now require at least python-2.6 (for python 3 |
67 |
# syntax support) which also requires EAPI 2. |
68 |
EAPI=2 |
69 |
PYTHON_COMPAT=( |
70 |
pypy1_9 pypy2_0 |
71 |
python3_1 python3_2 python3_3 python3_4 |
72 |
python2_6 python2_7 |
73 |
) |
74 |
inherit eutils multilib |
75 |
|
76 |
DESCRIPTION="Portage is the package management and distribution system for Gentoo" |
77 |
HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml" |
78 |
LICENSE="GPL-2" |
79 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" |
80 |
SLOT="0" |
81 |
IUSE="build doc epydoc +ipc linguas_pl linguas_ru pypy2_0 python2 python3 selinux xattr" |
82 |
|
83 |
for _pyimpl in ${PYTHON_COMPAT[@]} ; do |
84 |
IUSE+=" python_targets_${_pyimpl}" |
85 |
done |
86 |
unset _pyimpl |
87 |
|
88 |
# Import of the io module in python-2.6 raises ImportError for the |
89 |
# thread module if threading is disabled. |
90 |
python_dep_ssl="python3? ( =dev-lang/python-3*[ssl] ) |
91 |
!pypy2_0? ( !python2? ( !python3? ( |
92 |
|| ( >=dev-lang/python-2.7[ssl] dev-lang/python:2.6[threads,ssl] ) |
93 |
) ) ) |
94 |
pypy2_0? ( !python2? ( !python3? ( dev-python/pypy:2.0[bzip2,ssl] ) ) ) |
95 |
python2? ( !python3? ( || ( dev-lang/python:2.7[ssl] dev-lang/python:2.6[ssl,threads] ) ) )" |
96 |
python_dep="${python_dep_ssl//\[ssl\]}" |
97 |
python_dep="${python_dep//,ssl}" |
98 |
python_dep="${python_dep//ssl,}" |
99 |
|
100 |
python_dep="${python_dep} |
101 |
python_targets_pypy1_9? ( dev-python/pypy:1.9 ) |
102 |
python_targets_pypy2_0? ( dev-python/pypy:2.0 ) |
103 |
python_targets_python2_6? ( dev-lang/python:2.6 ) |
104 |
python_targets_python2_7? ( dev-lang/python:2.7 ) |
105 |
python_targets_python3_1? ( dev-lang/python:3.1 ) |
106 |
python_targets_python3_2? ( dev-lang/python:3.2 ) |
107 |
python_targets_python3_3? ( dev-lang/python:3.3 ) |
108 |
python_targets_python3_4? ( dev-lang/python:3.4 ) |
109 |
" |
110 |
|
111 |
# The pysqlite blocker is for bug #282760. |
112 |
# make-3.82 is for bug #455858 |
113 |
DEPEND="${python_dep} |
114 |
>=sys-devel/make-3.82 |
115 |
>=sys-apps/sed-4.0.5 sys-devel/patch |
116 |
doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 ) |
117 |
epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )" |
118 |
# Require sandbox-2.2 for bug #288863. |
119 |
# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's |
120 |
# quite slow, so it's not considered in the dependencies as an alternative to |
121 |
# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so |
122 |
# for now, don't pull in xattr deps for other kernels. |
123 |
# For whirlpool hash, require python[ssl] or python-mhash (bug #425046). |
124 |
# For compgen, require bash[readline] (bug #445576). |
125 |
RDEPEND="${python_dep} |
126 |
!build? ( >=sys-apps/sed-4.0.5 |
127 |
|| ( >=app-shells/bash-4.2_p37[readline] ( <app-shells/bash-4.2_p37 >=app-shells/bash-3.2_p17 ) ) |
128 |
>=app-admin/eselect-1.2 |
129 |
|| ( ${python_dep_ssl} dev-python/python-mhash ) |
130 |
) |
131 |
elibc_FreeBSD? ( sys-freebsd/freebsd-bin ) |
132 |
elibc_glibc? ( >=sys-apps/sandbox-2.2 ) |
133 |
elibc_uclibc? ( >=sys-apps/sandbox-2.2 ) |
134 |
>=app-misc/pax-utils-0.1.17 |
135 |
xattr? ( kernel_linux? ( || ( >=dev-lang/python-3.3_pre20110902 dev-python/pyxattr ) ) ) |
136 |
selinux? ( || ( >=sys-libs/libselinux-2.0.94[python] <sys-libs/libselinux-2.0.94 ) ) |
137 |
!<app-shells/bash-3.2_p17 |
138 |
!<app-admin/logrotate-3.8.0" |
139 |
PDEPEND=" |
140 |
!build? ( |
141 |
>=net-misc/rsync-2.6.4 |
142 |
userland_GNU? ( >=sys-apps/coreutils-6.4 ) |
143 |
)" |
144 |
# coreutils-6.4 rdep is for date format in emerge-webrsync #164532 |
145 |
# NOTE: FEATURES=installsources requires debugedit and rsync |
146 |
|
147 |
SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives" |
148 |
|
149 |
prefix_src_archives() { |
150 |
local x y |
151 |
for x in ${@}; do |
152 |
for y in ${SRC_ARCHIVES}; do |
153 |
echo ${y}/${x} |
154 |
done |
155 |
done |
156 |
} |
157 |
|
158 |
PV_PL="2.1.2" |
159 |
PATCHVER_PL="" |
160 |
TARBALL_PV=$PV |
161 |
SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2 |
162 |
$(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2) |
163 |
linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2 |
164 |
$(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )" |
165 |
|
166 |
PATCHVER= |
167 |
[[ $TARBALL_PV = $PV ]] || PATCHVER=$PV |
168 |
if [ -n "${PATCHVER}" ]; then |
169 |
SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2 |
170 |
$(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)" |
171 |
fi |
172 |
|
173 |
S="${WORKDIR}"/${PN}-${TARBALL_PV} |
174 |
S_PL="${WORKDIR}"/${PN}-${PV_PL} |
175 |
|
176 |
compatible_python_is_selected() { |
177 |
[[ $(/usr/bin/python -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') = good ]] |
178 |
} |
179 |
|
180 |
current_python_has_xattr() { |
181 |
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).' |
182 |
local PYTHON=/usr/bin/${EPYTHON} |
183 |
[[ $("${PYTHON}" -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x3030000 and "yes" or "no")') = yes ]] || \ |
184 |
"${PYTHON}" -c 'import xattr' 2>/dev/null |
185 |
} |
186 |
|
187 |
call_with_python_impl() { |
188 |
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).' |
189 |
env EPYTHON=${EPYTHON} "$@" |
190 |
} |
191 |
|
192 |
get_python_interpreter() { |
193 |
[ $# -eq 1 ] || die "expected 1 argument, got $#: $*" |
194 |
local impl=$1 python |
195 |
case "${impl}" in |
196 |
python*) |
197 |
python=${impl/_/.} |
198 |
;; |
199 |
pypy*) |
200 |
python=${impl/_/.} |
201 |
python=${python/pypy/pypy-c} |
202 |
;; |
203 |
*) |
204 |
die "Unrecognized python target: ${impl}" |
205 |
esac |
206 |
echo ${python} |
207 |
} |
208 |
|
209 |
get_python_sitedir() { |
210 |
[ $# -eq 1 ] || die "expected 1 argument, got $#: $*" |
211 |
local impl=$1 |
212 |
local site_dir=/usr/$(get_libdir)/${impl/_/.}/site-packages |
213 |
[[ -d ${ROOT}${site_dir} ]] || \ |
214 |
ewarn "site-packages dir missing for ${impl}: ${ROOT}${site_dir}" |
215 |
echo "${site_dir}" |
216 |
} |
217 |
|
218 |
python_compileall() { |
219 |
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).' |
220 |
local d=$1 PYTHON=/usr/bin/${EPYTHON} |
221 |
local d_image=${D}${d#/} |
222 |
[[ -d ${d_image} ]] || die "directory does not exist: ${d_image}" |
223 |
case "${EPYTHON}" in |
224 |
python*) |
225 |
"${PYTHON}" -m compileall -q -f -d "${d}" "${d_image}" || die |
226 |
# Note: Using -OO breaks emaint, since it requires __doc__, |
227 |
# and __doc__ is None when -OO is used. |
228 |
"${PYTHON}" -O -m compileall -q -f -d "${d}" "${d_image}" || die |
229 |
;; |
230 |
pypy*) |
231 |
"${PYTHON}" -m compileall -q -f -d "${d}" "${d_image}" || die |
232 |
;; |
233 |
*) |
234 |
die "Unrecognized EPYTHON value: ${EPYTHON}" |
235 |
esac |
236 |
} |
237 |
|
238 |
pkg_setup() { |
239 |
if use python2 && use python3 ; then |
240 |
ewarn "Both python2 and python3 USE flags are enabled, but only one" |
241 |
ewarn "can be in the shebangs. Using python3." |
242 |
fi |
243 |
if use pypy2_0 && use python3 ; then |
244 |
ewarn "Both pypy2_0 and python3 USE flags are enabled, but only one" |
245 |
ewarn "can be in the shebangs. Using python3." |
246 |
fi |
247 |
if use pypy2_0 && use python2 ; then |
248 |
ewarn "Both pypy2_0 and python2 USE flags are enabled, but only one" |
249 |
ewarn "can be in the shebangs. Using python2" |
250 |
fi |
251 |
if ! use pypy2_0 && ! use python2 && ! use python3 && \ |
252 |
! compatible_python_is_selected ; then |
253 |
ewarn "Attempting to select a compatible default python interpreter" |
254 |
local x success=0 |
255 |
for x in /usr/bin/python2.* ; do |
256 |
x=${x#/usr/bin/python2.} |
257 |
if [[ $x -ge 6 ]] 2>/dev/null ; then |
258 |
eselect python set python2.$x |
259 |
if compatible_python_is_selected ; then |
260 |
elog "Default python interpreter is now set to python-2.$x" |
261 |
success=1 |
262 |
break |
263 |
fi |
264 |
fi |
265 |
done |
266 |
if [ $success != 1 ] ; then |
267 |
eerror "Unable to select a compatible default python interpreter!" |
268 |
die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)." |
269 |
fi |
270 |
fi |
271 |
|
272 |
# We use EPYTHON to designate the active python interpreter, |
273 |
# but we only export when needed, via call_with_python_impl. |
274 |
EPYTHON=python |
275 |
export -n EPYTHON |
276 |
if use python3; then |
277 |
EPYTHON=python3 |
278 |
elif use python2; then |
279 |
EPYTHON=python2 |
280 |
elif use pypy2_0; then |
281 |
EPYTHON=pypy-c2.0 |
282 |
fi |
283 |
} |
284 |
|
285 |
src_prepare() { |
286 |
if [ -n "${PATCHVER}" ] ; then |
287 |
if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then |
288 |
rm "$S/bin/ebuild-helpers/portageq" \ |
289 |
|| die "failed to remove portageq helper symlink" |
290 |
fi |
291 |
epatch "${WORKDIR}/${PN}-${PATCHVER}.patch" |
292 |
fi |
293 |
einfo "Setting portage.VERSION to ${PVR} ..." |
294 |
sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \ |
295 |
die "Failed to patch portage.VERSION" |
296 |
sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \ |
297 |
die "Failed to patch VERSION in doc/fragment/version" |
298 |
sed -e "1s/VERSION/${PVR}/" -i $(find man -type f) || \ |
299 |
die "Failed to patch VERSION in man page headers" |
300 |
|
301 |
if ! use ipc ; then |
302 |
einfo "Disabling ipc..." |
303 |
sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \ |
304 |
-i pym/_emerge/AbstractEbuildProcess.py || \ |
305 |
die "failed to patch AbstractEbuildProcess.py" |
306 |
fi |
307 |
|
308 |
if use xattr && use kernel_linux ; then |
309 |
einfo "Adding FEATURES=xattr to make.globals ..." |
310 |
echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \ |
311 |
|| die "failed to append to make.globals" |
312 |
fi |
313 |
|
314 |
local set_shebang= |
315 |
if use python3; then |
316 |
set_shebang=python3 |
317 |
elif use python2; then |
318 |
set_shebang=python2 |
319 |
elif use pypy2_0; then |
320 |
set_shebang=pypy-c2.0 |
321 |
fi |
322 |
if [[ -n ${set_shebang} ]] ; then |
323 |
einfo "Converting shebangs for ${set_shebang}..." |
324 |
while read -r -d $'\0' ; do |
325 |
local shebang=$(head -n1 "$REPLY") |
326 |
if [[ ${shebang} == "#!/usr/bin/python"* ]] ; then |
327 |
sed -i -e "1s:python:${set_shebang}:" "$REPLY" || \ |
328 |
die "sed failed" |
329 |
fi |
330 |
done < <(find . -type f -print0) |
331 |
fi |
332 |
|
333 |
cd "${S}/cnf" || die |
334 |
if [ -f "make.conf.${ARCH}".diff ]; then |
335 |
patch make.conf "make.conf.${ARCH}".diff || \ |
336 |
die "Failed to patch make.conf.example" |
337 |
else |
338 |
eerror "" |
339 |
eerror "Portage does not have an arch-specific configuration for this arch." |
340 |
eerror "Please notify the arch maintainer about this issue. Using generic." |
341 |
eerror "" |
342 |
fi |
343 |
} |
344 |
|
345 |
src_compile() { |
346 |
if use doc; then |
347 |
call_with_python_impl \ |
348 |
emake docbook || die |
349 |
fi |
350 |
|
351 |
if use epydoc; then |
352 |
einfo "Generating api docs" |
353 |
call_with_python_impl \ |
354 |
emake epydoc || die |
355 |
fi |
356 |
} |
357 |
|
358 |
src_test() { |
359 |
call_with_python_impl \ |
360 |
emake test || die |
361 |
} |
362 |
|
363 |
src_install() { |
364 |
call_with_python_impl \ |
365 |
emake DESTDIR="${D}" \ |
366 |
sysconfdir="/etc" \ |
367 |
prefix="/usr" \ |
368 |
install || die |
369 |
|
370 |
# Extended set config is currently disabled in portage-2.1.x. |
371 |
rm -rf "${D}/usr/share/portage/config/sets" || die |
372 |
|
373 |
# Use dodoc for compression, since the Makefile doesn't do that. |
374 |
dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} || die |
375 |
|
376 |
if use linguas_pl; then |
377 |
doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] || die |
378 |
doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] || die |
379 |
fi |
380 |
|
381 |
# Allow external portage API consumers to import portage python modules |
382 |
# (this used to be done with PYTHONPATH setting in /etc/env.d). |
383 |
# For each of PYTHON_TARGETS, install a tree of *.py symlinks in |
384 |
# site-packages, and compile with the corresponding interpreter. |
385 |
local impl files mod_dir dest_mod_dir python relative_path x |
386 |
for impl in "${PYTHON_COMPAT[@]}" ; do |
387 |
use "python_targets_${impl}" || continue |
388 |
if use build && [[ ${ROOT} == / && |
389 |
! -x /usr/bin/$(get_python_interpreter ${impl}) ]] ; then |
390 |
# Tolerate --nodeps at beginning of stage1 for catalyst |
391 |
ewarn "skipping python_targets_${impl}, interpreter not found" |
392 |
continue |
393 |
fi |
394 |
while read -r mod_dir ; do |
395 |
cd "${D}/usr/lib/portage/pym/${mod_dir}" || die |
396 |
files=$(echo *.py) |
397 |
if [ -z "${files}" ] || [ "${files}" = "*.py" ]; then |
398 |
# __pycache__ directories contain no py files |
399 |
continue |
400 |
fi |
401 |
dest_mod_dir=$(get_python_sitedir ${impl})/${mod_dir} |
402 |
dodir "${dest_mod_dir}" || die |
403 |
relative_path=../../../lib/portage/pym/${mod_dir} |
404 |
x=/${mod_dir} |
405 |
while [ -n "${x}" ] ; do |
406 |
relative_path=../${relative_path} |
407 |
x=${x%/*} |
408 |
done |
409 |
for x in ${files} ; do |
410 |
dosym "${relative_path}/${x}" \ |
411 |
"${dest_mod_dir}/${x}" || die |
412 |
done |
413 |
done < <(cd "${D}"/usr/lib/portage/pym || die ; find * -type d ! -path "portage/tests*") |
414 |
cd "${S}" || die |
415 |
EPYTHON=$(get_python_interpreter ${impl}) \ |
416 |
python_compileall "$(get_python_sitedir ${impl})" |
417 |
done |
418 |
|
419 |
# Compile /usr/lib/portage/pym with the active interpreter, since portage |
420 |
# internal commands force this directory to the beginning of sys.path. |
421 |
python_compileall /usr/lib/portage/pym |
422 |
} |
423 |
|
424 |
pkg_preinst() { |
425 |
if [[ $ROOT == / ]] ; then |
426 |
# Run some minimal tests as a sanity check. |
427 |
local test_runner=$(find "$D" -name runTests) |
428 |
if [[ -n $test_runner && -x $test_runner ]] ; then |
429 |
einfo "Running preinst sanity tests..." |
430 |
"$test_runner" || die "preinst sanity tests failed" |
431 |
fi |
432 |
fi |
433 |
|
434 |
if use xattr && ! current_python_has_xattr ; then |
435 |
ewarn "For optimal performance in xattr handling, install" |
436 |
ewarn "dev-python/pyxattr, or install >=dev-lang/python-3.3 and" |
437 |
ewarn "enable USE=python3 for $CATEGORY/$PN." |
438 |
fi |
439 |
|
440 |
# elog dir must exist to avoid logrotate error for bug #415911. |
441 |
# This code runs in preinst in order to bypass the mapping of |
442 |
# portage:portage to root:root which happens after src_install. |
443 |
keepdir /var/log/portage/elog |
444 |
# This is allowed to fail if the user/group are invalid for prefix users. |
445 |
if chown portage:portage "${D}"var/log/portage{,/elog} 2>/dev/null ; then |
446 |
chmod g+s,ug+rwx "${D}"var/log/portage{,/elog} |
447 |
fi |
448 |
|
449 |
if [[ -d ${ROOT}var/log/portage && \ |
450 |
$(ls -ld "${ROOT}var/log/portage") != *" portage portage "* ]] && \ |
451 |
has_version '<sys-apps/portage-2.1.10.11' ; then |
452 |
# Initialize permissions for bug #378451 and bug #377177, since older |
453 |
# portage does not create /var/log/portage with the desired default |
454 |
# permissions. |
455 |
einfo "Applying portage group permission to ${ROOT}var/log/portage for bug #378451" |
456 |
chown portage:portage "${ROOT}var/log/portage" |
457 |
chmod g+ws "${ROOT}var/log/portage" |
458 |
fi |
459 |
|
460 |
if has_version '<sys-apps/portage-2.1.10.61' ; then |
461 |
ewarn "FEATURES=config-protect-if-modified is now enabled by default." |
462 |
ewarn "This causes the CONFIG_PROTECT behavior to be skipped for" |
463 |
ewarn "files that have not been modified since they were installed." |
464 |
fi |
465 |
|
466 |
# If portage-2.1.6 is installed and the preserved_libs_registry exists, |
467 |
# assume that the NEEDED.ELF.2 files have already been generated. |
468 |
has_version "<=${CATEGORY}/${PN}-2.2_pre7" && \ |
469 |
! { [ -e "${ROOT}"var/lib/portage/preserved_libs_registry ] && \ |
470 |
has_version ">=${CATEGORY}/${PN}-2.1.6_rc" ; } \ |
471 |
&& NEEDED_REBUILD_UPGRADE=true || NEEDED_REBUILD_UPGRADE=false |
472 |
} |
473 |
|
474 |
pkg_postinst() { |
475 |
if ${NEEDED_REBUILD_UPGRADE} ; then |
476 |
einfo "rebuilding NEEDED.ELF.2 files" |
477 |
local cpv filename line newline |
478 |
for cpv in "${ROOT}/var/db/pkg"/*/*; do |
479 |
[[ -f "${cpv}/NEEDED" && ! -f "${cpv}/NEEDED.ELF.2" ]] || continue |
480 |
while read -r line; do |
481 |
filename=${line% *} |
482 |
newline=$(scanelf -BF "%a;%F;%S;%r;%n" "${ROOT%/}${filename}") |
483 |
newline=${newline// - } |
484 |
[[ ${#ROOT} -gt 1 ]] && newline=${newline/${ROOT%/}} |
485 |
echo "${newline:3}" >> "${cpv}/NEEDED.ELF.2" |
486 |
done < "${cpv}/NEEDED" |
487 |
done |
488 |
fi |
489 |
} |