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