1 |
zmedico 11/11/27 21:39:40 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: portage-2.2.0_alpha79.ebuild |
5 |
Log: |
6 |
2.2.0_alpha79 version bump. This includes all of the fixes in |
7 |
portage-2.1.10.39. Bug #210077 tracks all bugs fixed since portage-2.1.x. |
8 |
|
9 |
(Portage version: 2.2.0_alpha79/cvs/Linux i686) |
10 |
|
11 |
Revision Changes Path |
12 |
1.919 sys-apps/portage/ChangeLog |
13 |
|
14 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?rev=1.919&view=markup |
15 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?rev=1.919&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?r1=1.918&r2=1.919 |
17 |
|
18 |
Index: ChangeLog |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v |
21 |
retrieving revision 1.918 |
22 |
retrieving revision 1.919 |
23 |
diff -u -r1.918 -r1.919 |
24 |
--- ChangeLog 27 Nov 2011 21:38:49 -0000 1.918 |
25 |
+++ ChangeLog 27 Nov 2011 21:39:39 -0000 1.919 |
26 |
@@ -1,6 +1,12 @@ |
27 |
# ChangeLog for sys-apps/portage |
28 |
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 |
29 |
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.918 2011/11/27 21:38:49 zmedico Exp $ |
30 |
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.919 2011/11/27 21:39:39 zmedico Exp $ |
31 |
+ |
32 |
+*portage-2.2.0_alpha79 (27 Nov 2011) |
33 |
+ |
34 |
+ 27 Nov 2011; Zac Medico <zmedico@g.o> +portage-2.2.0_alpha79.ebuild: |
35 |
+ 2.2.0_alpha79 version bump. This includes all of the fixes in |
36 |
+ portage-2.1.10.39. Bug #210077 tracks all bugs fixed since portage-2.1.x. |
37 |
|
38 |
*portage-2.1.10.39 (27 Nov 2011) |
39 |
|
40 |
|
41 |
|
42 |
|
43 |
1.1 sys-apps/portage/portage-2.2.0_alpha79.ebuild |
44 |
|
45 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.2.0_alpha79.ebuild?rev=1.1&view=markup |
46 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.2.0_alpha79.ebuild?rev=1.1&content-type=text/plain |
47 |
|
48 |
Index: portage-2.2.0_alpha79.ebuild |
49 |
=================================================================== |
50 |
# Copyright 1999-2011 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_alpha79.ebuild,v 1.1 2011/11/27 21:39:39 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=2 |
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="~sparc-fbsd ~x86-fbsd" |
63 |
SLOT="0" |
64 |
IUSE="build doc epydoc +ipc linguas_pl python2 python3 selinux" |
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 |
!python2? ( !python3? ( |
70 |
build? ( || ( dev-lang/python:2.7 dev-lang/python:2.6[threads] ) ) |
71 |
!build? ( || ( dev-lang/python:2.7 dev-lang/python:2.6[threads] >=dev-lang/python-3 ) ) |
72 |
) ) |
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 |
RDEPEND="${python_dep} |
82 |
!build? ( >=sys-apps/sed-4.0.5 |
83 |
>=app-shells/bash-3.2_p17 |
84 |
>=app-admin/eselect-1.2 ) |
85 |
elibc_FreeBSD? ( sys-freebsd/freebsd-bin ) |
86 |
elibc_glibc? ( >=sys-apps/sandbox-2.2 ) |
87 |
elibc_uclibc? ( >=sys-apps/sandbox-2.2 ) |
88 |
>=app-misc/pax-utils-0.1.17 |
89 |
selinux? ( || ( >=sys-libs/libselinux-2.0.94[python] <sys-libs/libselinux-2.0.94 ) ) |
90 |
!<app-shells/bash-3.2_p17 |
91 |
!<app-admin/logrotate-3.8.0" |
92 |
PDEPEND=" |
93 |
!build? ( |
94 |
>=net-misc/rsync-2.6.4 |
95 |
userland_GNU? ( >=sys-apps/coreutils-6.4 ) |
96 |
)" |
97 |
# coreutils-6.4 rdep is for date format in emerge-webrsync #164532 |
98 |
# NOTE: FEATURES=install-sources requires debugedit and rsync |
99 |
|
100 |
SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives" |
101 |
|
102 |
prefix_src_archives() { |
103 |
local x y |
104 |
for x in ${@}; do |
105 |
for y in ${SRC_ARCHIVES}; do |
106 |
echo ${y}/${x} |
107 |
done |
108 |
done |
109 |
} |
110 |
|
111 |
PV_PL="2.1.2" |
112 |
PATCHVER_PL="" |
113 |
TARBALL_PV=2.2.0_alpha78 |
114 |
SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2 |
115 |
$(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2) |
116 |
linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2 |
117 |
$(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )" |
118 |
|
119 |
PATCHVER= |
120 |
[[ $TARBALL_PV = $PV ]] || PATCHVER=$PV |
121 |
if [ -n "${PATCHVER}" ]; then |
122 |
SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2 |
123 |
$(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)" |
124 |
fi |
125 |
|
126 |
S="${WORKDIR}"/${PN}-${TARBALL_PV} |
127 |
S_PL="${WORKDIR}"/${PN}-${PV_PL} |
128 |
|
129 |
compatible_python_is_selected() { |
130 |
[[ $(/usr/bin/python -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') = good ]] |
131 |
} |
132 |
|
133 |
pkg_setup() { |
134 |
# Bug #359731 - Die early if get_libdir fails. |
135 |
[[ -z $(get_libdir) ]] && \ |
136 |
die "get_libdir returned an empty string" |
137 |
|
138 |
if use python2 && use python3 ; then |
139 |
ewarn "Both python2 and python3 USE flags are enabled, but only one" |
140 |
ewarn "can be in the shebangs. Using python3." |
141 |
fi |
142 |
if ! use python2 && ! use python3 && ! compatible_python_is_selected ; then |
143 |
ewarn "Attempting to select a compatible default python interpreter" |
144 |
local x success=0 |
145 |
for x in /usr/bin/python2.* ; do |
146 |
x=${x#/usr/bin/python2.} |
147 |
if [[ $x -ge 6 ]] 2>/dev/null ; then |
148 |
eselect python set python2.$x |
149 |
if compatible_python_is_selected ; then |
150 |
elog "Default python interpreter is now set to python-2.$x" |
151 |
success=1 |
152 |
break |
153 |
fi |
154 |
fi |
155 |
done |
156 |
if [ $success != 1 ] ; then |
157 |
eerror "Unable to select a compatible default python interpreter!" |
158 |
die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)." |
159 |
fi |
160 |
fi |
161 |
|
162 |
if use python3; then |
163 |
python_set_active_version 3 |
164 |
elif use python2; then |
165 |
python_set_active_version 2 |
166 |
fi |
167 |
} |
168 |
|
169 |
src_prepare() { |
170 |
if [ -n "${PATCHVER}" ] ; then |
171 |
if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then |
172 |
rm "$S/bin/ebuild-helpers/portageq" \ |
173 |
|| die "failed to remove portageq helper symlink" |
174 |
fi |
175 |
epatch "${WORKDIR}/${PN}-${PATCHVER}.patch" |
176 |
fi |
177 |
einfo "Setting portage.VERSION to ${PVR} ..." |
178 |
sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \ |
179 |
die "Failed to patch portage.VERSION" |
180 |
sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \ |
181 |
die "Failed to patch VERSION in doc/fragment/version" |
182 |
sed -e "1s/VERSION/${PVR}/" -i man/* || \ |
183 |
die "Failed to patch VERSION in man page headers" |
184 |
|
185 |
if ! use ipc ; then |
186 |
einfo "Disabling ipc..." |
187 |
sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \ |
188 |
-i pym/_emerge/AbstractEbuildProcess.py || \ |
189 |
die "failed to patch AbstractEbuildProcess.py" |
190 |
fi |
191 |
|
192 |
if use python3; then |
193 |
einfo "Converting shebangs for python3..." |
194 |
python_convert_shebangs -r 3 . |
195 |
elif use python2; then |
196 |
einfo "Converting shebangs for python2..." |
197 |
python_convert_shebangs -r 2 . |
198 |
fi |
199 |
} |
200 |
|
201 |
src_compile() { |
202 |
if use doc; then |
203 |
cd "${S}"/doc |
204 |
touch fragment/date |
205 |
make xhtml xhtml-nochunks || die "failed to make docs" |
206 |
fi |
207 |
|
208 |
if use epydoc; then |
209 |
einfo "Generating api docs" |
210 |
mkdir "${WORKDIR}"/api |
211 |
local my_modules epydoc_opts="" |
212 |
my_modules="$(find "${S}/pym" -name "*.py" \ |
213 |
| sed -e 's:/__init__.py$::' -e 's:\.py$::' -e "s:^${S}/pym/::" \ |
214 |
-e 's:/:.:g' | sort)" || die "error listing modules" |
215 |
# workaround for bug 282760 |
216 |
> "$S/pym/pysqlite2.py" |
217 |
PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \ |
218 |
epydoc -o "${WORKDIR}"/api \ |
219 |
-qqqqq --no-frames --show-imports $epydoc_opts \ |
220 |
--name "${PN}" --url "${HOMEPAGE}" \ |
221 |
${my_modules} || die "epydoc failed" |
222 |
rm "$S/pym/pysqlite2.py" |
223 |
fi |
224 |
} |
225 |
|
226 |
src_test() { |
227 |
# make files executable, in case they were created by patch |
228 |
find bin -type f | xargs chmod +x |
229 |
./pym/portage/tests/runTests || die "test(s) failed" |
230 |
} |
231 |
|
232 |
src_install() { |
233 |
local libdir=$(get_libdir) |
234 |
local portage_base="/usr/${libdir}/portage" |
235 |
local portage_share_config=/usr/share/portage/config |
236 |
|
237 |
cd "${S}"/cnf |
238 |
insinto /etc |
239 |
doins etc-update.conf dispatch-conf.conf || die |
240 |
|
241 |
insinto "$portage_share_config/sets" |
242 |
doins "$S"/cnf/sets/*.conf || die |
243 |
insinto "$portage_share_config" |
244 |
doins "$S/cnf/make.globals" || die |
245 |
if [ -f "make.conf.${ARCH}".diff ]; then |
246 |
patch make.conf "make.conf.${ARCH}".diff || \ |
247 |
die "Failed to patch make.conf.example" |
248 |
newins make.conf make.conf.example || die |
249 |
else |
250 |
eerror "" |
251 |
eerror "Portage does not have an arch-specific configuration for this arch." |
252 |
eerror "Please notify the arch maintainer about this issue. Using generic." |
253 |
eerror "" |
254 |
newins make.conf make.conf.example || die |
255 |
fi |
256 |
|
257 |
dosym ..${portage_share_config}/make.globals /etc/make.globals |
258 |
|
259 |
insinto /etc/logrotate.d |
260 |
doins "${S}"/cnf/logrotate.d/elog-save-summary || die |
261 |
|
262 |
# BSD and OSX need a sed wrapper so that find/xargs work properly |
263 |
if use userland_GNU; then |
264 |
rm "${S}"/bin/ebuild-helpers/sed || die "Failed to remove sed wrapper" |
265 |
fi |
266 |
|
267 |
local x symlinks files |
268 |
|
269 |
cd "$S" || die "cd failed" |
270 |
for x in $(find bin -type d) ; do |
271 |
exeinto $portage_base/$x || die "exeinto failed" |
272 |
cd "$S"/$x || die "cd failed" |
273 |
files=$(find . -mindepth 1 -maxdepth 1 -type f ! -type l) |
274 |
if [ -n "$files" ] ; then |
275 |
doexe $files || die "doexe failed" |
276 |
fi |
277 |
symlinks=$(find . -mindepth 1 -maxdepth 1 -type l) |
278 |
if [ -n "$symlinks" ] ; then |
279 |
cp -P $symlinks "$D$portage_base/$x" || die "cp failed" |
280 |
fi |
281 |
done |
282 |
|
283 |
cd "$S" || die "cd failed" |
284 |
for x in $(find pym/* -type d ! -path "pym/portage/tests*") ; do |
285 |
insinto $portage_base/$x || die "insinto failed" |
286 |
cd "$S"/$x || die "cd failed" |
287 |
# __pycache__ directories contain no py files |
288 |
[[ "*.py" != $(echo *.py) ]] || continue |
289 |
doins *.py || die "doins failed" |
290 |
symlinks=$(find . -mindepth 1 -maxdepth 1 -type l) |
291 |
if [ -n "$symlinks" ] ; then |
292 |
cp -P $symlinks "$D$portage_base/$x" || die "cp failed" |
293 |
fi |
294 |
done |
295 |
|
296 |
# We install some minimal tests for use as a preinst sanity check. |
297 |
# These tests must be able to run without a full source tree and |
298 |
# without relying on a previous portage instance being installed. |
299 |
cd "$S" || die "cd failed" |
300 |
exeinto $portage_base/pym/portage/tests || die |
301 |
doexe pym/portage/tests/runTests || die |
302 |
insinto $portage_base/pym/portage/tests || die |
303 |
doins pym/portage/tests/*.py || die |
304 |
insinto $portage_base/pym/portage/tests/lint || die |
305 |
doins pym/portage/tests/lint/*.py || die |
306 |
doins pym/portage/tests/lint/__test__ || die |
307 |
|
308 |
# Symlinks to directories cause up/downgrade issues and the use of these |
309 |
# modules outside of portage is probably negligible. |
310 |
for x in "${D}${portage_base}/pym/"{cache,elog_modules} ; do |
311 |
[ ! -L "${x}" ] && continue |
312 |
die "symlink to directory will cause upgrade/downgrade issues: '${x}'" |
313 |
done |
314 |
|
315 |
doman "${S}"/man/*.[0-9] |
316 |
if use linguas_pl; then |
317 |
doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] |
318 |
doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] |
319 |
fi |
320 |
|
321 |
dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} |
322 |
use doc && dohtml -r "${S}"/doc/* |
323 |
use epydoc && dohtml -r "${WORKDIR}"/api |
324 |
|
325 |
dodir /usr/bin |
326 |
for x in ebuild egencache emerge portageq quickpkg repoman ; do |
327 |
dosym ../${libdir}/portage/bin/${x} /usr/bin/${x} |
328 |
done |
329 |
|
330 |
dodir /usr/sbin |
331 |
local my_syms="archive-conf |
332 |
dispatch-conf |
333 |
emaint |
334 |
emerge-webrsync |
335 |
env-update |
336 |
etc-update |
337 |
fixpackages |
338 |
regenworld" |
339 |
local x |
340 |
for x in ${my_syms}; do |
341 |
dosym ../${libdir}/portage/bin/${x} /usr/sbin/${x} |
342 |
done |
343 |
dosym env-update /usr/sbin/update-env |
344 |
dosym etc-update /usr/sbin/update-etc |
345 |
|
346 |
dodir /etc/portage |
347 |
keepdir /etc/portage |
348 |
} |
349 |
|
350 |
pkg_preinst() { |
351 |
if [[ $ROOT == / ]] ; then |
352 |
# Run some minimal tests as a sanity check. |
353 |
local test_runner=$(find "$D" -name runTests) |
354 |
if [[ -n $test_runner && -x $test_runner ]] ; then |
355 |
einfo "Running preinst sanity tests..." |
356 |
"$test_runner" || die "preinst sanity tests failed" |
357 |
fi |
358 |
fi |
359 |
|
360 |
if ! use build && ! has_version dev-python/pycrypto && \ |
361 |
! has_version '>=dev-lang/python-2.6[ssl]' ; then |
362 |
ewarn "If you are an ebuild developer and you plan to commit ebuilds" |
363 |
ewarn "with this system then please install dev-python/pycrypto or" |
364 |
ewarn "enable the ssl USE flag for >=dev-lang/python-2.6 in order" |
365 |
ewarn "to enable RMD160 hash support." |
366 |
ewarn "See bug #198398 for more information." |
367 |
fi |
368 |
if [ -f "${ROOT}/etc/make.globals" ]; then |
369 |
rm "${ROOT}/etc/make.globals" |
370 |
fi |
371 |
|
372 |
has_version "<${CATEGORY}/${PN}-2.2_alpha" \ |
373 |
&& MINOR_UPGRADE=true || MINOR_UPGRADE=false |
374 |
|
375 |
has_version "<=${CATEGORY}/${PN}-2.2_pre5" \ |
376 |
&& WORLD_MIGRATION_UPGRADE=true || WORLD_MIGRATION_UPGRADE=false |
377 |
|
378 |
# If portage-2.1.6 is installed and the preserved_libs_registry exists, |
379 |
# assume that the NEEDED.ELF.2 files have already been generated. |
380 |
has_version "<=${CATEGORY}/${PN}-2.2_pre7" && \ |
381 |
! ( [ -e "${EROOT}"var/lib/portage/preserved_libs_registry ] && \ |
382 |
has_version ">=${CATEGORY}/${PN}-2.1.6_rc" ) \ |
383 |
&& NEEDED_REBUILD_UPGRADE=true || NEEDED_REBUILD_UPGRADE=false |
384 |
|
385 |
[[ -n $PORTDIR_OVERLAY ]] && has_version "<${CATEGORY}/${PN}-2.1.6.12" \ |
386 |
&& REPO_LAYOUT_CONF_WARN=true || REPO_LAYOUT_CONF_WARN=false |
387 |
} |
388 |
|
389 |
pkg_postinst() { |
390 |
# Compile all source files recursively. Any orphans |
391 |
# will be identified and removed in postrm. |
392 |
python_mod_optimize /usr/$(get_libdir)/portage/pym |
393 |
|
394 |
if $WORLD_MIGRATION_UPGRADE ; then |
395 |
einfo "moving set references from the worldfile into world_sets" |
396 |
cd "${ROOT}/var/lib/portage/" |
397 |
grep "^@" world >> world_sets |
398 |
sed -i -e '/^@/d' world |
399 |
fi |
400 |
|
401 |
if $NEEDED_REBUILD_UPGRADE ; then |
402 |
einfo "rebuilding NEEDED.ELF.2 files" |
403 |
for cpv in "${ROOT}/var/db/pkg"/*/*; do |
404 |
if [ -f "${cpv}/NEEDED" ]; then |
405 |
rm -f "${cpv}/NEEDED.ELF.2" |
406 |
while read line; do |
407 |
filename=${line% *} |
408 |
needed=${line#* } |
409 |
needed=${needed//+/++} |
410 |
needed=${needed//#/##} |
411 |
needed=${needed//%/%%} |
412 |
newline=$(scanelf -BF "%a;%F;%S;%r;${needed}" $filename) |
413 |
newline=${newline// - } |
414 |
echo "${newline:3}" >> "${cpv}/NEEDED.ELF.2" |
415 |
done < "${cpv}/NEEDED" |
416 |
fi |
417 |
done |
418 |
fi |
419 |
|
420 |
if $REPO_LAYOUT_CONF_WARN ; then |
421 |
ewarn |
422 |
echo "If you want overlay eclasses to override eclasses from" \ |
423 |
"other repos then see the portage(5) man page" \ |
424 |
"for information about the new layout.conf and repos.conf" \ |
425 |
"configuration files." \ |
426 |
| fmt -w 75 | while read -r ; do ewarn "$REPLY" ; done |
427 |
ewarn |
428 |
fi |
429 |
|
430 |
if $MINOR_UPGRADE ; then |
431 |
elog "If you're upgrading from a pre-2.2 version of portage you might" |
432 |
elog "want to remerge world (emerge -e world) to take full advantage" |
433 |
elog "of some of the new features in 2.2." |
434 |
elog "This is not required however for portage to function properly." |
435 |
elog |
436 |
fi |
437 |
} |
438 |
|
439 |
pkg_postrm() { |
440 |
python_mod_cleanup /usr/$(get_libdir)/portage/pym |
441 |
} |