1 |
zmedico 13/03/05 02:23:46 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: portage-2.2.0_alpha166.ebuild |
5 |
Log: |
6 |
2.2.0_alpha166 version bump. This includes all of the fixes in 2.1.11.55. |
7 |
Bug #210077 tracks all bugs fixed since portage-2.1.x. |
8 |
|
9 |
(Portage version: 2.2.0_alpha166/cvs/Linux i686, signed Manifest commit with key 0xFDE8EF85AE5719A3) |
10 |
|
11 |
Revision Changes Path |
12 |
1.1221 sys-apps/portage/ChangeLog |
13 |
|
14 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?rev=1.1221&view=markup |
15 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?rev=1.1221&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?r1=1.1220&r2=1.1221 |
17 |
|
18 |
Index: ChangeLog |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v |
21 |
retrieving revision 1.1220 |
22 |
retrieving revision 1.1221 |
23 |
diff -u -r1.1220 -r1.1221 |
24 |
--- ChangeLog 5 Mar 2013 02:22:52 -0000 1.1220 |
25 |
+++ ChangeLog 5 Mar 2013 02:23:46 -0000 1.1221 |
26 |
@@ -1,6 +1,12 @@ |
27 |
# ChangeLog for sys-apps/portage |
28 |
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 |
29 |
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.1220 2013/03/05 02:22:52 zmedico Exp $ |
30 |
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.1221 2013/03/05 02:23:46 zmedico Exp $ |
31 |
+ |
32 |
+*portage-2.2.0_alpha166 (05 Mar 2013) |
33 |
+ |
34 |
+ 05 Mar 2013; Zac Medico <zmedico@g.o> +portage-2.2.0_alpha166.ebuild: |
35 |
+ 2.2.0_alpha166 version bump. This includes all of the fixes in 2.1.11.55. Bug |
36 |
+ #210077 tracks all bugs fixed since portage-2.1.x. |
37 |
|
38 |
*portage-2.1.11.55 (05 Mar 2013) |
39 |
|
40 |
|
41 |
|
42 |
|
43 |
1.1 sys-apps/portage/portage-2.2.0_alpha166.ebuild |
44 |
|
45 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.2.0_alpha166.ebuild?rev=1.1&view=markup |
46 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.2.0_alpha166.ebuild?rev=1.1&content-type=text/plain |
47 |
|
48 |
Index: portage-2.2.0_alpha166.ebuild |
49 |
=================================================================== |
50 |
# Copyright 1999-2013 Gentoo Foundation |
51 |
# Distributed under the terms of the GNU General Public License v2 |
52 |
# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.2.0_alpha166.ebuild,v 1.1 2013/03/05 02:23:46 zmedico Exp $ |
53 |
|
54 |
# Require EAPI 2 since we now require at least python-2.6 (for python 3 |
55 |
# syntax support) which also requires EAPI 2. |
56 |
EAPI=3 |
57 |
inherit eutils python |
58 |
|
59 |
DESCRIPTION="Portage is the package management and distribution system for Gentoo" |
60 |
HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml" |
61 |
LICENSE="GPL-2" |
62 |
KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd" |
63 |
SLOT="0" |
64 |
IUSE="build doc epydoc +ipc linguas_pl linguas_ru pypy2_0 python2 python3 selinux xattr" |
65 |
|
66 |
# Import of the io module in python-2.6 raises ImportError for the |
67 |
# thread module if threading is disabled. |
68 |
python_dep_ssl="python3? ( =dev-lang/python-3*[ssl] ) |
69 |
!pypy2_0? ( !python2? ( !python3? ( |
70 |
|| ( >=dev-lang/python-2.7[ssl] dev-lang/python:2.6[threads,ssl] ) |
71 |
) ) ) |
72 |
pypy2_0? ( !python2? ( !python3? ( dev-python/pypy:2.0[bzip2,ssl] ) ) ) |
73 |
python2? ( !python3? ( || ( dev-lang/python:2.7[ssl] dev-lang/python:2.6[ssl,threads] ) ) )" |
74 |
python_dep="${python_dep_ssl//\[ssl\]}" |
75 |
python_dep="${python_dep//,ssl}" |
76 |
python_dep="${python_dep//ssl,}" |
77 |
|
78 |
# The pysqlite blocker is for bug #282760. |
79 |
# make-3.82 is for bug #455858 |
80 |
DEPEND="${python_dep} |
81 |
>=sys-devel/make-3.82 |
82 |
>=sys-apps/sed-4.0.5 sys-devel/patch |
83 |
doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 ) |
84 |
epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )" |
85 |
# Require sandbox-2.2 for bug #288863. |
86 |
# For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's |
87 |
# quite slow, so it's not considered in the dependencies as an alternative to |
88 |
# to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so |
89 |
# for now, don't pull in xattr deps for other kernels. |
90 |
# For whirlpool hash, require python[ssl] or python-mhash (bug #425046). |
91 |
# For compgen, require bash[readline] (bug #445576). |
92 |
RDEPEND="${python_dep} |
93 |
!build? ( >=sys-apps/sed-4.0.5 |
94 |
|| ( >=app-shells/bash-4.2_p37[readline] ( <app-shells/bash-4.2_p37 >=app-shells/bash-3.2_p17 ) ) |
95 |
>=app-admin/eselect-1.2 |
96 |
|| ( ${python_dep_ssl} dev-python/python-mhash ) |
97 |
) |
98 |
elibc_FreeBSD? ( sys-freebsd/freebsd-bin ) |
99 |
elibc_glibc? ( >=sys-apps/sandbox-2.2 ) |
100 |
elibc_uclibc? ( >=sys-apps/sandbox-2.2 ) |
101 |
>=app-misc/pax-utils-0.1.17 |
102 |
xattr? ( kernel_linux? ( || ( >=dev-lang/python-3.3_pre20110902 dev-python/pyxattr ) ) ) |
103 |
selinux? ( || ( >=sys-libs/libselinux-2.0.94[python] <sys-libs/libselinux-2.0.94 ) ) |
104 |
!<app-shells/bash-3.2_p17 |
105 |
!<app-admin/logrotate-3.8.0" |
106 |
PDEPEND=" |
107 |
!build? ( |
108 |
>=net-misc/rsync-2.6.4 |
109 |
userland_GNU? ( >=sys-apps/coreutils-6.4 ) |
110 |
)" |
111 |
# coreutils-6.4 rdep is for date format in emerge-webrsync #164532 |
112 |
# NOTE: FEATURES=installsources requires debugedit and rsync |
113 |
|
114 |
SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives" |
115 |
|
116 |
prefix_src_archives() { |
117 |
local x y |
118 |
for x in ${@}; do |
119 |
for y in ${SRC_ARCHIVES}; do |
120 |
echo ${y}/${x} |
121 |
done |
122 |
done |
123 |
} |
124 |
|
125 |
PV_PL="2.1.2" |
126 |
PATCHVER_PL="" |
127 |
TARBALL_PV=2.2.0_alpha166 |
128 |
SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2 |
129 |
$(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2) |
130 |
linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2 |
131 |
$(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )" |
132 |
|
133 |
PATCHVER= |
134 |
[[ $TARBALL_PV = $PV ]] || PATCHVER=$PV |
135 |
if [ -n "${PATCHVER}" ]; then |
136 |
SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2 |
137 |
$(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)" |
138 |
fi |
139 |
|
140 |
S="${WORKDIR}"/${PN}-${TARBALL_PV} |
141 |
S_PL="${WORKDIR}"/${PN}-${PV_PL} |
142 |
|
143 |
compatible_python_is_selected() { |
144 |
[[ $("${EPREFIX}/usr/bin/python" -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') = good ]] |
145 |
} |
146 |
|
147 |
current_python_has_xattr() { |
148 |
[[ $("${EPREFIX}/usr/bin/python" -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x3030000 and "yes" or "no")') = yes ]] || \ |
149 |
"${EPREFIX}/usr/bin/python" -c 'import xattr' 2>/dev/null |
150 |
} |
151 |
|
152 |
pkg_setup() { |
153 |
if use python2 && use python3 ; then |
154 |
ewarn "Both python2 and python3 USE flags are enabled, but only one" |
155 |
ewarn "can be in the shebangs. Using python3." |
156 |
fi |
157 |
if use pypy2_0 && use python3 ; then |
158 |
ewarn "Both pypy2_0 and python3 USE flags are enabled, but only one" |
159 |
ewarn "can be in the shebangs. Using python3." |
160 |
fi |
161 |
if use pypy2_0 && use python2 ; then |
162 |
ewarn "Both pypy2_0 and python2 USE flags are enabled, but only one" |
163 |
ewarn "can be in the shebangs. Using python2" |
164 |
fi |
165 |
if ! use pypy2_0 && ! use python2 && ! use python3 && \ |
166 |
! compatible_python_is_selected ; then |
167 |
ewarn "Attempting to select a compatible default python interpreter" |
168 |
local x success=0 |
169 |
for x in /usr/bin/python2.* ; do |
170 |
x=${x#/usr/bin/python2.} |
171 |
if [[ $x -ge 6 ]] 2>/dev/null ; then |
172 |
eselect python set python2.$x |
173 |
if compatible_python_is_selected ; then |
174 |
elog "Default python interpreter is now set to python-2.$x" |
175 |
success=1 |
176 |
break |
177 |
fi |
178 |
fi |
179 |
done |
180 |
if [ $success != 1 ] ; then |
181 |
eerror "Unable to select a compatible default python interpreter!" |
182 |
die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)." |
183 |
fi |
184 |
fi |
185 |
|
186 |
if use python3; then |
187 |
python_set_active_version 3 |
188 |
elif use python2; then |
189 |
python_set_active_version 2 |
190 |
elif use pypy2_0; then |
191 |
python_set_active_version 2.7-pypy-2.0 |
192 |
fi |
193 |
} |
194 |
|
195 |
src_prepare() { |
196 |
if [ -n "${PATCHVER}" ] ; then |
197 |
if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then |
198 |
rm "$S/bin/ebuild-helpers/portageq" \ |
199 |
|| die "failed to remove portageq helper symlink" |
200 |
fi |
201 |
epatch "${WORKDIR}/${PN}-${PATCHVER}.patch" |
202 |
fi |
203 |
einfo "Setting portage.VERSION to ${PVR} ..." |
204 |
sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \ |
205 |
die "Failed to patch portage.VERSION" |
206 |
sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \ |
207 |
die "Failed to patch VERSION in doc/fragment/version" |
208 |
sed -e "1s/VERSION/${PVR}/" -i $(find man -type f) || \ |
209 |
die "Failed to patch VERSION in man page headers" |
210 |
|
211 |
if ! use ipc ; then |
212 |
einfo "Disabling ipc..." |
213 |
sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \ |
214 |
-i pym/_emerge/AbstractEbuildProcess.py || \ |
215 |
die "failed to patch AbstractEbuildProcess.py" |
216 |
fi |
217 |
|
218 |
if use xattr && use kernel_linux ; then |
219 |
einfo "Adding FEATURES=xattr to make.globals ..." |
220 |
echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \ |
221 |
|| die "failed to append to make.globals" |
222 |
fi |
223 |
|
224 |
if use python3; then |
225 |
einfo "Converting shebangs for python3..." |
226 |
python_convert_shebangs -r 3 . |
227 |
elif use python2; then |
228 |
einfo "Converting shebangs for python2..." |
229 |
python_convert_shebangs -r 2 . |
230 |
elif use pypy2_0; then |
231 |
einfo "Converting shebangs for pypy-c2.0..." |
232 |
python_convert_shebangs -r 2.7-pypy-2.0 . |
233 |
fi |
234 |
|
235 |
if [[ -n ${EPREFIX} ]] ; then |
236 |
einfo "Setting portage.const.EPREFIX ..." |
237 |
sed -e "s|^\(SANDBOX_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/sandbox\"\)|\\1${EPREFIX}\\2|" \ |
238 |
-e "s|^\(FAKEROOT_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/fakeroot\"\)|\\1${EPREFIX}\\2|" \ |
239 |
-e "s|^\(BASH_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/bash\"\)|\\1${EPREFIX}\\2|" \ |
240 |
-e "s|^\(MOVE_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/mv\"\)|\\1${EPREFIX}\\2|" \ |
241 |
-e "s|^\(PRELINK_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/sbin/prelink\"\)|\\1${EPREFIX}\\2|" \ |
242 |
-e "s|^\(EPREFIX[[:space:]]*=[[:space:]]*\"\).*|\\1${EPREFIX}\"|" \ |
243 |
-i pym/portage/const.py || \ |
244 |
die "Failed to patch portage.const.EPREFIX" |
245 |
|
246 |
einfo "Prefixing shebangs ..." |
247 |
find . -type f -print0 | \ |
248 |
while read -r -d $'\0' ; do |
249 |
local shebang=$(head -n1 "$REPLY") |
250 |
if [[ ${shebang} == "#!"* && ! ${shebang} == "#!${EPREFIX}/"* ]] ; then |
251 |
sed -i -e "1s:.*:#!${EPREFIX}${shebang:2}:" "$REPLY" || \ |
252 |
die "sed failed" |
253 |
fi |
254 |
done |
255 |
|
256 |
einfo "Adjusting make.globals ..." |
257 |
sed -e 's|^SYNC=.*|SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix"|' \ |
258 |
-e "s|^\(PORTDIR=\)\(/usr/portage\)|\\1\"${EPREFIX}\\2\"|" \ |
259 |
-e "s|^\(PORTAGE_TMPDIR=\)\(/var/tmp\)|\\1\"${EPREFIX}\\2\"|" \ |
260 |
-i cnf/make.globals || die "sed failed" |
261 |
|
262 |
einfo "Adding FEATURES=force-prefix to make.globals ..." |
263 |
echo -e '\nFEATURES="${FEATURES} force-prefix"' >> cnf/make.globals \ |
264 |
|| die "failed to append to make.globals" |
265 |
fi |
266 |
|
267 |
echo -e '\nFEATURES="${FEATURES} preserve-libs"' >> cnf/make.globals \ |
268 |
|| die "failed to append to make.globals" |
269 |
|
270 |
cd "${S}/cnf" || die |
271 |
if [ -f "make.conf.${ARCH}".diff ]; then |
272 |
patch make.conf "make.conf.${ARCH}".diff || \ |
273 |
die "Failed to patch make.conf.example" |
274 |
else |
275 |
eerror "" |
276 |
eerror "Portage does not have an arch-specific configuration for this arch." |
277 |
eerror "Please notify the arch maintainer about this issue. Using generic." |
278 |
eerror "" |
279 |
fi |
280 |
} |
281 |
|
282 |
src_compile() { |
283 |
if use doc; then |
284 |
emake docbook || die |
285 |
fi |
286 |
|
287 |
if use epydoc; then |
288 |
einfo "Generating api docs" |
289 |
emake epydoc || die |
290 |
fi |
291 |
} |
292 |
|
293 |
src_test() { |
294 |
# make files executable, in case they were created by patch |
295 |
find bin -type f | xargs chmod +x |
296 |
emake test || die |
297 |
} |
298 |
|
299 |
src_install() { |
300 |
emake DESTDIR="${D}" \ |
301 |
sysconfdir="${EPREFIX}/etc" \ |
302 |
prefix="${EPREFIX}/usr" \ |
303 |
install || die |
304 |
|
305 |
# Use dodoc for compression, since the Makefile doesn't do that. |
306 |
dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} || die |
307 |
|
308 |
if use linguas_pl; then |
309 |
doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] || die |
310 |
doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] || die |
311 |
fi |
312 |
|
313 |
# Set PYTHONPATH for portage API consumers. This way we don't have |
314 |
# to rely on patched python having the correct path, since it has |
315 |
# been known to incorrectly add /usr/libx32/portage/pym to sys.path. |
316 |
echo "PYTHONPATH=\"${EPREFIX}/usr/lib/portage/pym\"" > \ |
317 |
"${T}/05portage" || die |
318 |
doenvd "${T}/05portage" || die |
319 |
} |
320 |
|
321 |
pkg_preinst() { |
322 |
if [[ $ROOT == / ]] ; then |
323 |
# Run some minimal tests as a sanity check. |
324 |
local test_runner=$(find "$ED" -name runTests) |
325 |
if [[ -n $test_runner && -x $test_runner ]] ; then |
326 |
einfo "Running preinst sanity tests..." |
327 |
"$test_runner" || die "preinst sanity tests failed" |
328 |
fi |
329 |
fi |
330 |
|
331 |
if use xattr && ! current_python_has_xattr ; then |
332 |
ewarn "For optimal performance in xattr handling, install" |
333 |
ewarn "dev-python/pyxattr, or install >=dev-lang/python-3.3 and" |
334 |
ewarn "enable USE=python3 for $CATEGORY/$PN." |
335 |
fi |
336 |
|
337 |
has_version "<=${CATEGORY}/${PN}-2.2_pre5" \ |
338 |
&& WORLD_MIGRATION_UPGRADE=true || WORLD_MIGRATION_UPGRADE=false |
339 |
|
340 |
# If portage-2.1.6 is installed and the preserved_libs_registry exists, |
341 |
# assume that the NEEDED.ELF.2 files have already been generated. |
342 |
has_version "<=${CATEGORY}/${PN}-2.2_pre7" && \ |
343 |
! ( [ -e "${EROOT}"var/lib/portage/preserved_libs_registry ] && \ |
344 |
has_version ">=${CATEGORY}/${PN}-2.1.6_rc" ) \ |
345 |
&& NEEDED_REBUILD_UPGRADE=true || NEEDED_REBUILD_UPGRADE=false |
346 |
} |
347 |
|
348 |
pkg_postinst() { |
349 |
# Compile all source files recursively. Any orphans |
350 |
# will be identified and removed in postrm. |
351 |
python_mod_optimize /usr/lib/portage/pym |
352 |
|
353 |
if $WORLD_MIGRATION_UPGRADE && \ |
354 |
grep -q "^@" "${EROOT}/var/lib/portage/world"; then |
355 |
einfo "moving set references from the worldfile into world_sets" |
356 |
cd "${EROOT}/var/lib/portage/" |
357 |
grep "^@" world >> world_sets |
358 |
sed -i -e '/^@/d' world |
359 |
fi |
360 |
|
361 |
if $NEEDED_REBUILD_UPGRADE ; then |
362 |
einfo "rebuilding NEEDED.ELF.2 files" |
363 |
for cpv in "${EROOT}/var/db/pkg"/*/*; do |
364 |
if [ -f "${cpv}/NEEDED" ]; then |
365 |
rm -f "${cpv}/NEEDED.ELF.2" |
366 |
while read line; do |
367 |
filename=${line% *} |
368 |
needed=${line#* } |
369 |
needed=${needed//+/++} |
370 |
needed=${needed//#/##} |
371 |
needed=${needed//%/%%} |
372 |
newline=$(scanelf -BF "%a;%F;%S;%r;${needed}" $filename) |
373 |
newline=${newline// - } |
374 |
echo "${newline:3}" >> "${cpv}/NEEDED.ELF.2" |
375 |
done < "${cpv}/NEEDED" |
376 |
fi |
377 |
done |
378 |
fi |
379 |
} |
380 |
|
381 |
pkg_postrm() { |
382 |
python_mod_cleanup /usr/lib/portage/pym |
383 |
} |