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