1 |
zmedico 11/01/18 02:03:54 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: portage-2.1.9.33.ebuild |
5 |
portage-2.2.0_alpha17.ebuild |
6 |
Removed: portage-2.1.9.32.ebuild |
7 |
portage-2.2.0_alpha16.ebuild |
8 |
Log: |
9 |
*portage-2.2.0_alpha17 (18 Jan 2011) |
10 |
|
11 |
18 Jan 2011; Zac Medico <zmedico@g.o> -portage-2.2.0_alpha16.ebuild, |
12 |
+portage-2.2.0_alpha17.ebuild: |
13 |
2.2.0_alpha17 version bump. This includes all of the fixes in |
14 |
portage-2.1.9.33. Bug #210077 tracks all bugs fixed since portage-2.1.x. |
15 |
|
16 |
*portage-2.1.9.33 (18 Jan 2011) |
17 |
|
18 |
18 Jan 2011; Zac Medico <zmedico@g.o> -portage-2.1.9.32.ebuild, |
19 |
+portage-2.1.9.33.ebuild: |
20 |
2.1.9.33 version bump. This completes the fix for bug #351505 (Ensure $A is |
21 |
defined for pkg_nofetch) which was only partially fixed in the previous |
22 |
release. Bug #349307 tracks all bugs fixed since 2.1.9.25. |
23 |
|
24 |
(Portage version: 2.2.0_alpha17/cvs/Linux i686) |
25 |
|
26 |
Revision Changes Path |
27 |
1.791 sys-apps/portage/ChangeLog |
28 |
|
29 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?rev=1.791&view=markup |
30 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?rev=1.791&content-type=text/plain |
31 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?r1=1.790&r2=1.791 |
32 |
|
33 |
Index: ChangeLog |
34 |
=================================================================== |
35 |
RCS file: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v |
36 |
retrieving revision 1.790 |
37 |
retrieving revision 1.791 |
38 |
diff -u -r1.790 -r1.791 |
39 |
--- ChangeLog 18 Jan 2011 01:26:25 -0000 1.790 |
40 |
+++ ChangeLog 18 Jan 2011 02:03:54 -0000 1.791 |
41 |
@@ -1,6 +1,21 @@ |
42 |
# ChangeLog for sys-apps/portage |
43 |
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 |
44 |
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.790 2011/01/18 01:26:25 zmedico Exp $ |
45 |
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.791 2011/01/18 02:03:54 zmedico Exp $ |
46 |
+ |
47 |
+*portage-2.2.0_alpha17 (18 Jan 2011) |
48 |
+ |
49 |
+ 18 Jan 2011; Zac Medico <zmedico@g.o> -portage-2.2.0_alpha16.ebuild, |
50 |
+ +portage-2.2.0_alpha17.ebuild: |
51 |
+ 2.2.0_alpha17 version bump. This includes all of the fixes in |
52 |
+ portage-2.1.9.33. Bug #210077 tracks all bugs fixed since portage-2.1.x. |
53 |
+ |
54 |
+*portage-2.1.9.33 (18 Jan 2011) |
55 |
+ |
56 |
+ 18 Jan 2011; Zac Medico <zmedico@g.o> -portage-2.1.9.32.ebuild, |
57 |
+ +portage-2.1.9.33.ebuild: |
58 |
+ 2.1.9.33 version bump. This completes the fix for bug #351505 (Ensure $A is |
59 |
+ defined for pkg_nofetch) which was only partially fixed in the previous |
60 |
+ release. Bug #349307 tracks all bugs fixed since 2.1.9.25. |
61 |
|
62 |
*portage-2.2.0_alpha16 (18 Jan 2011) |
63 |
|
64 |
|
65 |
|
66 |
|
67 |
1.1 sys-apps/portage/portage-2.1.9.33.ebuild |
68 |
|
69 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.1.9.33.ebuild?rev=1.1&view=markup |
70 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.1.9.33.ebuild?rev=1.1&content-type=text/plain |
71 |
|
72 |
Index: portage-2.1.9.33.ebuild |
73 |
=================================================================== |
74 |
# Copyright 1999-2011 Gentoo Foundation |
75 |
# Distributed under the terms of the GNU General Public License v2 |
76 |
# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.1.9.33.ebuild,v 1.1 2011/01/18 02:03:54 zmedico Exp $ |
77 |
|
78 |
# Require EAPI 2 since we now require at least python-2.6 (for python 3 |
79 |
# syntax support) which also requires EAPI 2. |
80 |
EAPI=2 |
81 |
inherit eutils multilib python |
82 |
|
83 |
DESCRIPTION="Portage is the package management and distribution system for Gentoo" |
84 |
HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml" |
85 |
LICENSE="GPL-2" |
86 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" |
87 |
PROVIDE="virtual/portage" |
88 |
SLOT="0" |
89 |
IUSE="build doc epydoc +ipc linguas_pl python3 selinux" |
90 |
|
91 |
python_dep="python3? ( =dev-lang/python-3* ) |
92 |
!python3? ( |
93 |
build? ( || ( dev-lang/python:2.8 dev-lang/python:2.7 dev-lang/python:2.6 ) ) |
94 |
!build? ( || ( dev-lang/python:2.8 dev-lang/python:2.7 dev-lang/python:2.6 >=dev-lang/python-3 ) ) |
95 |
)" |
96 |
|
97 |
# The pysqlite blocker is for bug #282760. |
98 |
DEPEND="${python_dep} |
99 |
!build? ( >=sys-apps/sed-4.0.5 ) |
100 |
doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 ) |
101 |
epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )" |
102 |
|
103 |
RDEPEND="${python_dep} |
104 |
!build? ( >=sys-apps/sed-4.0.5 |
105 |
>=app-shells/bash-3.2_p17 |
106 |
>=app-admin/eselect-1.2 ) |
107 |
elibc_FreeBSD? ( sys-freebsd/freebsd-bin ) |
108 |
elibc_glibc? ( >=sys-apps/sandbox-1.6 ) |
109 |
elibc_uclibc? ( >=sys-apps/sandbox-1.6 ) |
110 |
>=app-misc/pax-utils-0.1.17 |
111 |
selinux? ( sys-libs/libselinux ) |
112 |
!<app-shells/bash-3.2_p17" |
113 |
PDEPEND=" |
114 |
!build? ( |
115 |
>=net-misc/rsync-2.6.4 |
116 |
userland_GNU? ( >=sys-apps/coreutils-6.4 ) |
117 |
)" |
118 |
# coreutils-6.4 rdep is for date format in emerge-webrsync #164532 |
119 |
# rsync-2.6.4 rdep is for the --filter option #167668 |
120 |
|
121 |
SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives" |
122 |
|
123 |
prefix_src_archives() { |
124 |
local x y |
125 |
for x in ${@}; do |
126 |
for y in ${SRC_ARCHIVES}; do |
127 |
echo ${y}/${x} |
128 |
done |
129 |
done |
130 |
} |
131 |
|
132 |
PV_PL="2.1.2" |
133 |
PATCHVER_PL="" |
134 |
TARBALL_PV=$PV |
135 |
SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2 |
136 |
$(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2) |
137 |
linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2 |
138 |
$(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )" |
139 |
|
140 |
PATCHVER= |
141 |
[[ $TARBALL_PV = $PV ]] || PATCHVER=$PV |
142 |
if [ -n "${PATCHVER}" ]; then |
143 |
SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2 |
144 |
$(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)" |
145 |
fi |
146 |
|
147 |
S="${WORKDIR}"/${PN}-${TARBALL_PV} |
148 |
S_PL="${WORKDIR}"/${PN}-${PV_PL} |
149 |
|
150 |
compatible_python_is_selected() { |
151 |
[[ $(/usr/bin/python -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') = good ]] |
152 |
} |
153 |
|
154 |
pkg_setup() { |
155 |
if ! use python3 && ! compatible_python_is_selected ; then |
156 |
ewarn "Attempting to select a compatible default python interpreter" |
157 |
local x success=0 |
158 |
for x in /usr/bin/python2.* ; do |
159 |
x=${x#/usr/bin/python2.} |
160 |
if [[ $x -ge 6 ]] 2>/dev/null ; then |
161 |
eselect python set python2.$x |
162 |
if compatible_python_is_selected ; then |
163 |
elog "Default python interpreter is now set to python-2.$x" |
164 |
success=1 |
165 |
break |
166 |
fi |
167 |
fi |
168 |
done |
169 |
if [ $success != 1 ] ; then |
170 |
eerror "Unable to select a compatible default python interpreter!" |
171 |
die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)." |
172 |
fi |
173 |
fi |
174 |
|
175 |
if use python3; then |
176 |
python_set_active_version 3 |
177 |
fi |
178 |
} |
179 |
|
180 |
src_prepare() { |
181 |
if [ -n "${PATCHVER}" ] ; then |
182 |
if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then |
183 |
rm "$S/bin/ebuild-helpers/portageq" \ |
184 |
|| die "failed to remove portageq helper symlink" |
185 |
fi |
186 |
epatch "${WORKDIR}/${PN}-${PATCHVER}.patch" |
187 |
fi |
188 |
einfo "Setting portage.VERSION to ${PVR} ..." |
189 |
sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \ |
190 |
die "Failed to patch portage.VERSION" |
191 |
sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \ |
192 |
die "Failed to patch VERSION in doc/fragment/version" |
193 |
sed -e "1s/VERSION/${PVR}/" -i man/* || \ |
194 |
die "Failed to patch VERSION in man page headers" |
195 |
|
196 |
if ! use ipc ; then |
197 |
einfo "Disabling ipc..." |
198 |
sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \ |
199 |
-i pym/_emerge/AbstractEbuildProcess.py || \ |
200 |
die "failed to patch AbstractEbuildProcess.py" |
201 |
fi |
202 |
|
203 |
if use python3; then |
204 |
einfo "Converting shebangs for python3..." |
205 |
python_convert_shebangs -r 3 . |
206 |
fi |
207 |
} |
208 |
|
209 |
src_compile() { |
210 |
if use doc; then |
211 |
cd "${S}"/doc |
212 |
touch fragment/date |
213 |
make xhtml xhtml-nochunks || die "failed to make docs" |
214 |
fi |
215 |
|
216 |
if use epydoc; then |
217 |
einfo "Generating api docs" |
218 |
mkdir "${WORKDIR}"/api |
219 |
local my_modules epydoc_opts="" |
220 |
my_modules="$(find "${S}/pym" -name "*.py" \ |
221 |
| sed -e 's:/__init__.py$::' -e 's:\.py$::' -e "s:^${S}/pym/::" \ |
222 |
-e 's:/:.:g' | sort)" || die "error listing modules" |
223 |
# workaround for bug 282760 |
224 |
> "$S/pym/pysqlite2.py" |
225 |
PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \ |
226 |
epydoc -o "${WORKDIR}"/api \ |
227 |
-qqqqq --no-frames --show-imports $epydoc_opts \ |
228 |
--name "${PN}" --url "${HOMEPAGE}" \ |
229 |
${my_modules} || die "epydoc failed" |
230 |
rm "$S/pym/pysqlite2.py" |
231 |
fi |
232 |
} |
233 |
|
234 |
src_test() { |
235 |
# make files executable, in case they were created by patch |
236 |
find bin -type f | xargs chmod +x |
237 |
PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \ |
238 |
./pym/portage/tests/runTests || die "test(s) failed" |
239 |
} |
240 |
|
241 |
src_install() { |
242 |
local libdir=$(get_libdir) |
243 |
local portage_base="/usr/${libdir}/portage" |
244 |
local portage_share_config=/usr/share/portage/config |
245 |
|
246 |
cd "${S}"/cnf |
247 |
insinto /etc |
248 |
doins etc-update.conf dispatch-conf.conf || die |
249 |
|
250 |
insinto "$portage_share_config" |
251 |
doins "$S/cnf/make.globals" || die |
252 |
if [ -f "make.conf.${ARCH}".diff ]; then |
253 |
patch make.conf "make.conf.${ARCH}".diff || \ |
254 |
die "Failed to patch make.conf.example" |
255 |
newins make.conf make.conf.example || die |
256 |
else |
257 |
eerror "" |
258 |
eerror "Portage does not have an arch-specific configuration for this arch." |
259 |
eerror "Please notify the arch maintainer about this issue. Using generic." |
260 |
eerror "" |
261 |
newins make.conf make.conf.example || die |
262 |
fi |
263 |
|
264 |
dosym ..${portage_share_config}/make.globals /etc/make.globals |
265 |
|
266 |
insinto /etc/logrotate.d |
267 |
doins "${S}"/cnf/logrotate.d/elog-save-summary || die |
268 |
|
269 |
# BSD and OSX need a sed wrapper so that find/xargs work properly |
270 |
if use userland_GNU; then |
271 |
rm "${S}"/bin/ebuild-helpers/sed || die "Failed to remove sed wrapper" |
272 |
fi |
273 |
|
274 |
local x symlinks |
275 |
|
276 |
cd "$S" || die "cd failed" |
277 |
for x in $(find bin -type d) ; do |
278 |
exeinto $portage_base/$x || die "exeinto failed" |
279 |
cd "$S"/$x || die "cd failed" |
280 |
doexe $(find . -mindepth 1 -maxdepth 1 -type f ! -type l) || \ |
281 |
die "doexe failed" |
282 |
symlinks=$(find . -mindepth 1 -maxdepth 1 -type l) |
283 |
if [ -n "$symlinks" ] ; then |
284 |
cp -P $symlinks "$D$portage_base/$x" || die "cp failed" |
285 |
fi |
286 |
done |
287 |
|
288 |
cd "$S" || die "cd failed" |
289 |
for x in $(find pym/* -type d) ; do |
290 |
insinto $portage_base/$x || die "insinto failed" |
291 |
cd "$S"/$x || die "cd failed" |
292 |
# __pycache__ directories contain no py files |
293 |
[[ "*.py" != $(echo *.py) ]] || continue |
294 |
doins *.py || die "doins failed" |
295 |
symlinks=$(find . -mindepth 1 -maxdepth 1 -type l) |
296 |
if [ -n "$symlinks" ] ; then |
297 |
cp -P $symlinks "$D$portage_base/$x" || die "cp failed" |
298 |
fi |
299 |
done |
300 |
|
301 |
# Symlinks to directories cause up/downgrade issues and the use of these |
302 |
# modules outside of portage is probably negligible. |
303 |
for x in "${D}${portage_base}/pym/"{cache,elog_modules} ; do |
304 |
[ ! -L "${x}" ] && continue |
305 |
die "symlink to directory will cause upgrade/downgrade issues: '${x}'" |
306 |
done |
307 |
|
308 |
exeinto ${portage_base}/pym/portage/tests |
309 |
doexe "${S}"/pym/portage/tests/runTests |
310 |
|
311 |
doman "${S}"/man/*.[0-9] |
312 |
if use linguas_pl; then |
313 |
doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] |
314 |
doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] |
315 |
fi |
316 |
|
317 |
dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} |
318 |
use doc && dohtml -r "${S}"/doc/* |
319 |
use epydoc && dohtml -r "${WORKDIR}"/api |
320 |
|
321 |
dodir /usr/bin |
322 |
for x in ebuild egencache emerge portageq quickpkg repoman ; do |
323 |
dosym ../${libdir}/portage/bin/${x} /usr/bin/${x} |
324 |
done |
325 |
|
326 |
dodir /usr/sbin |
327 |
local my_syms="archive-conf |
328 |
dispatch-conf |
329 |
emaint |
330 |
emerge-webrsync |
331 |
env-update |
332 |
etc-update |
333 |
fixpackages |
334 |
regenworld" |
335 |
local x |
336 |
for x in ${my_syms}; do |
337 |
dosym ../${libdir}/portage/bin/${x} /usr/sbin/${x} |
338 |
done |
339 |
dosym env-update /usr/sbin/update-env |
340 |
dosym etc-update /usr/sbin/update-etc |
341 |
|
342 |
dodir /etc/portage |
343 |
keepdir /etc/portage |
344 |
} |
345 |
|
346 |
pkg_preinst() { |
347 |
if ! use build && ! has_version dev-python/pycrypto && \ |
348 |
! has_version '>=dev-lang/python-2.6[ssl]' ; then |
349 |
ewarn "If you are an ebuild developer and you plan to commit ebuilds" |
350 |
ewarn "with this system then please install dev-python/pycrypto or" |
351 |
ewarn "enable the ssl USE flag for >=dev-lang/python-2.6 in order" |
352 |
ewarn "to enable RMD160 hash support." |
353 |
ewarn "See bug #198398 for more information." |
354 |
fi |
355 |
if [ -f "${ROOT}/etc/make.globals" ]; then |
356 |
rm "${ROOT}/etc/make.globals" |
357 |
fi |
358 |
|
359 |
[[ -n $PORTDIR_OVERLAY ]] && has_version "<${CATEGORY}/${PN}-2.1.6.12" |
360 |
REPO_LAYOUT_CONF_WARN=$? |
361 |
} |
362 |
|
363 |
pkg_postinst() { |
364 |
# Compile all source files recursively. Any orphans |
365 |
# will be identified and removed in postrm. |
366 |
python_mod_optimize /usr/$(get_libdir)/portage/pym |
367 |
|
368 |
if [ $REPO_LAYOUT_CONF_WARN = 0 ] ; then |
369 |
ewarn |
370 |
echo "If you want overlay eclasses to override eclasses from" \ |
371 |
"other repos then see the portage(5) man page" \ |
372 |
"for information about the new layout.conf and repos.conf" \ |
373 |
"configuration files." \ |
374 |
| fmt -w 75 | while read -r ; do ewarn "$REPLY" ; done |
375 |
ewarn |
376 |
fi |
377 |
|
378 |
einfo |
379 |
einfo "For help with using portage please consult the Gentoo Handbook" |
380 |
einfo "at http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3" |
381 |
einfo |
382 |
} |
383 |
|
384 |
pkg_postrm() { |
385 |
python_mod_cleanup /usr/$(get_libdir)/portage/pym |
386 |
} |
387 |
|
388 |
|
389 |
|
390 |
1.1 sys-apps/portage/portage-2.2.0_alpha17.ebuild |
391 |
|
392 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.2.0_alpha17.ebuild?rev=1.1&view=markup |
393 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.2.0_alpha17.ebuild?rev=1.1&content-type=text/plain |
394 |
|
395 |
Index: portage-2.2.0_alpha17.ebuild |
396 |
=================================================================== |
397 |
# Copyright 1999-2011 Gentoo Foundation |
398 |
# Distributed under the terms of the GNU General Public License v2 |
399 |
# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.2.0_alpha17.ebuild,v 1.1 2011/01/18 02:03:54 zmedico Exp $ |
400 |
|
401 |
# Require EAPI 2 since we now require at least python-2.6 (for python 3 |
402 |
# syntax support) which also requires EAPI 2. |
403 |
EAPI=2 |
404 |
inherit eutils multilib python |
405 |
|
406 |
DESCRIPTION="Portage is the package management and distribution system for Gentoo" |
407 |
HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml" |
408 |
LICENSE="GPL-2" |
409 |
KEYWORDS="~sparc-fbsd ~x86-fbsd" |
410 |
PROVIDE="virtual/portage" |
411 |
SLOT="0" |
412 |
IUSE="build doc epydoc +ipc linguas_pl python3 selinux" |
413 |
|
414 |
python_dep="python3? ( =dev-lang/python-3* ) |
415 |
!python3? ( |
416 |
build? ( || ( dev-lang/python:2.8 dev-lang/python:2.7 dev-lang/python:2.6 ) ) |
417 |
!build? ( || ( dev-lang/python:2.8 dev-lang/python:2.7 dev-lang/python:2.6 >=dev-lang/python-3 ) ) |
418 |
)" |
419 |
|
420 |
# The pysqlite blocker is for bug #282760. |
421 |
DEPEND="${python_dep} |
422 |
!build? ( >=sys-apps/sed-4.0.5 ) |
423 |
doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 ) |
424 |
epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )" |
425 |
# Require sandbox-2.2 for bug #288863. |
426 |
RDEPEND="${python_dep} |
427 |
!build? ( >=sys-apps/sed-4.0.5 |
428 |
>=app-shells/bash-3.2_p17 |
429 |
>=app-admin/eselect-1.2 ) |
430 |
elibc_FreeBSD? ( sys-freebsd/freebsd-bin ) |
431 |
elibc_glibc? ( >=sys-apps/sandbox-2.2 ) |
432 |
elibc_uclibc? ( >=sys-apps/sandbox-2.2 ) |
433 |
>=app-misc/pax-utils-0.1.17 |
434 |
selinux? ( sys-libs/libselinux ) |
435 |
!<app-shells/bash-3.2_p17" |
436 |
PDEPEND=" |
437 |
!build? ( |
438 |
>=net-misc/rsync-2.6.4 |
439 |
userland_GNU? ( >=sys-apps/coreutils-6.4 ) |
440 |
)" |
441 |
# coreutils-6.4 rdep is for date format in emerge-webrsync #164532 |
442 |
# rsync-2.6.4 rdep is for the --filter option #167668 |
443 |
|
444 |
SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives" |
445 |
|
446 |
prefix_src_archives() { |
447 |
local x y |
448 |
for x in ${@}; do |
449 |
for y in ${SRC_ARCHIVES}; do |
450 |
echo ${y}/${x} |
451 |
done |
452 |
done |
453 |
} |
454 |
|
455 |
PV_PL="2.1.2" |
456 |
PATCHVER_PL="" |
457 |
TARBALL_PV=2.2.0_alpha14 |
458 |
SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2 |
459 |
$(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2) |
460 |
linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2 |
461 |
$(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )" |
462 |
|
463 |
PATCHVER= |
464 |
[[ $TARBALL_PV = $PV ]] || PATCHVER=$PV |
465 |
if [ -n "${PATCHVER}" ]; then |
466 |
SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2 |
467 |
$(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)" |
468 |
fi |
469 |
|
470 |
S="${WORKDIR}"/${PN}-${TARBALL_PV} |
471 |
S_PL="${WORKDIR}"/${PN}-${PV_PL} |
472 |
|
473 |
compatible_python_is_selected() { |
474 |
[[ $(/usr/bin/python -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') = good ]] |
475 |
} |
476 |
|
477 |
pkg_setup() { |
478 |
if ! use python3 && ! compatible_python_is_selected ; then |
479 |
ewarn "Attempting to select a compatible default python interpreter" |
480 |
local x success=0 |
481 |
for x in /usr/bin/python2.* ; do |
482 |
x=${x#/usr/bin/python2.} |
483 |
if [[ $x -ge 6 ]] 2>/dev/null ; then |
484 |
eselect python set python2.$x |
485 |
if compatible_python_is_selected ; then |
486 |
elog "Default python interpreter is now set to python-2.$x" |
487 |
success=1 |
488 |
break |
489 |
fi |
490 |
fi |
491 |
done |
492 |
if [ $success != 1 ] ; then |
493 |
eerror "Unable to select a compatible default python interpreter!" |
494 |
die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)." |
495 |
fi |
496 |
fi |
497 |
|
498 |
if use python3; then |
499 |
python_set_active_version 3 |
500 |
fi |
501 |
} |
502 |
|
503 |
src_prepare() { |
504 |
if [ -n "${PATCHVER}" ] ; then |
505 |
if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then |
506 |
rm "$S/bin/ebuild-helpers/portageq" \ |
507 |
|| die "failed to remove portageq helper symlink" |
508 |
fi |
509 |
epatch "${WORKDIR}/${PN}-${PATCHVER}.patch" |
510 |
fi |
511 |
einfo "Setting portage.VERSION to ${PVR} ..." |
512 |
sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \ |
513 |
die "Failed to patch portage.VERSION" |
514 |
sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \ |
515 |
die "Failed to patch VERSION in doc/fragment/version" |
516 |
sed -e "1s/VERSION/${PVR}/" -i man/* || \ |
517 |
die "Failed to patch VERSION in man page headers" |
518 |
|
519 |
if ! use ipc ; then |
520 |
einfo "Disabling ipc..." |
521 |
sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \ |
522 |
-i pym/_emerge/AbstractEbuildProcess.py || \ |
523 |
die "failed to patch AbstractEbuildProcess.py" |
524 |
fi |
525 |
|
526 |
if use python3; then |
527 |
einfo "Converting shebangs for python3..." |
528 |
python_convert_shebangs -r 3 . |
529 |
fi |
530 |
} |
531 |
|
532 |
src_compile() { |
533 |
if use doc; then |
534 |
cd "${S}"/doc |
535 |
touch fragment/date |
536 |
make xhtml xhtml-nochunks || die "failed to make docs" |
537 |
fi |
538 |
|
539 |
if use epydoc; then |
540 |
einfo "Generating api docs" |
541 |
mkdir "${WORKDIR}"/api |
542 |
local my_modules epydoc_opts="" |
543 |
my_modules="$(find "${S}/pym" -name "*.py" \ |
544 |
| sed -e 's:/__init__.py$::' -e 's:\.py$::' -e "s:^${S}/pym/::" \ |
545 |
-e 's:/:.:g' | sort)" || die "error listing modules" |
546 |
# workaround for bug 282760 |
547 |
> "$S/pym/pysqlite2.py" |
548 |
PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \ |
549 |
epydoc -o "${WORKDIR}"/api \ |
550 |
-qqqqq --no-frames --show-imports $epydoc_opts \ |
551 |
--name "${PN}" --url "${HOMEPAGE}" \ |
552 |
${my_modules} || die "epydoc failed" |
553 |
rm "$S/pym/pysqlite2.py" |
554 |
fi |
555 |
} |
556 |
|
557 |
src_test() { |
558 |
# make files executable, in case they were created by patch |
559 |
find bin -type f | xargs chmod +x |
560 |
PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \ |
561 |
./pym/portage/tests/runTests || die "test(s) failed" |
562 |
} |
563 |
|
564 |
src_install() { |
565 |
local libdir=$(get_libdir) |
566 |
local portage_base="/usr/${libdir}/portage" |
567 |
local portage_share_config=/usr/share/portage/config |
568 |
|
569 |
cd "${S}"/cnf |
570 |
insinto /etc |
571 |
doins etc-update.conf dispatch-conf.conf || die |
572 |
|
573 |
insinto "$portage_share_config/sets" |
574 |
doins "$S"/cnf/sets/*.conf || die |
575 |
insinto "$portage_share_config" |
576 |
doins "$S/cnf/make.globals" || die |
577 |
if [ -f "make.conf.${ARCH}".diff ]; then |
578 |
patch make.conf "make.conf.${ARCH}".diff || \ |
579 |
die "Failed to patch make.conf.example" |
580 |
newins make.conf make.conf.example || die |
581 |
else |
582 |
eerror "" |
583 |
eerror "Portage does not have an arch-specific configuration for this arch." |
584 |
eerror "Please notify the arch maintainer about this issue. Using generic." |
585 |
eerror "" |
586 |
newins make.conf make.conf.example || die |
587 |
fi |
588 |
|
589 |
dosym ..${portage_share_config}/make.globals /etc/make.globals |
590 |
|
591 |
insinto /etc/logrotate.d |
592 |
doins "${S}"/cnf/logrotate.d/elog-save-summary || die |
593 |
|
594 |
# BSD and OSX need a sed wrapper so that find/xargs work properly |
595 |
if use userland_GNU; then |
596 |
rm "${S}"/bin/ebuild-helpers/sed || die "Failed to remove sed wrapper" |
597 |
fi |
598 |
|
599 |
local x symlinks |
600 |
|
601 |
cd "$S" || die "cd failed" |
602 |
for x in $(find bin -type d) ; do |
603 |
exeinto $portage_base/$x || die "exeinto failed" |
604 |
cd "$S"/$x || die "cd failed" |
605 |
doexe $(find . -mindepth 1 -maxdepth 1 -type f ! -type l) || \ |
606 |
die "doexe failed" |
607 |
symlinks=$(find . -mindepth 1 -maxdepth 1 -type l) |
608 |
if [ -n "$symlinks" ] ; then |
609 |
cp -P $symlinks "$D$portage_base/$x" || die "cp failed" |
610 |
fi |
611 |
done |
612 |
|
613 |
cd "$S" || die "cd failed" |
614 |
for x in $(find pym/* -type d) ; do |
615 |
insinto $portage_base/$x || die "insinto failed" |
616 |
cd "$S"/$x || die "cd failed" |
617 |
# __pycache__ directories contain no py files |
618 |
[[ "*.py" != $(echo *.py) ]] || continue |
619 |
doins *.py || die "doins failed" |
620 |
symlinks=$(find . -mindepth 1 -maxdepth 1 -type l) |
621 |
if [ -n "$symlinks" ] ; then |
622 |
cp -P $symlinks "$D$portage_base/$x" || die "cp failed" |
623 |
fi |
624 |
done |
625 |
|
626 |
# Symlinks to directories cause up/downgrade issues and the use of these |
627 |
# modules outside of portage is probably negligible. |
628 |
for x in "${D}${portage_base}/pym/"{cache,elog_modules} ; do |
629 |
[ ! -L "${x}" ] && continue |
630 |
die "symlink to directory will cause upgrade/downgrade issues: '${x}'" |
631 |
done |
632 |
|
633 |
exeinto ${portage_base}/pym/portage/tests |
634 |
doexe "${S}"/pym/portage/tests/runTests |
635 |
|
636 |
doman "${S}"/man/*.[0-9] |
637 |
if use linguas_pl; then |
638 |
doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] |
639 |
doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] |
640 |
fi |
641 |
|
642 |
dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} |
643 |
use doc && dohtml -r "${S}"/doc/* |
644 |
use epydoc && dohtml -r "${WORKDIR}"/api |
645 |
|
646 |
dodir /usr/bin |
647 |
for x in ebuild egencache emerge portageq quickpkg repoman ; do |
648 |
dosym ../${libdir}/portage/bin/${x} /usr/bin/${x} |
649 |
done |
650 |
|
651 |
dodir /usr/sbin |
652 |
local my_syms="archive-conf |
653 |
dispatch-conf |
654 |
emaint |
655 |
emerge-webrsync |
656 |
env-update |
657 |
etc-update |
658 |
fixpackages |
659 |
regenworld" |
660 |
local x |
661 |
for x in ${my_syms}; do |
662 |
dosym ../${libdir}/portage/bin/${x} /usr/sbin/${x} |
663 |
done |
664 |
dosym env-update /usr/sbin/update-env |
665 |
dosym etc-update /usr/sbin/update-etc |
666 |
|
667 |
dodir /etc/portage |
668 |
keepdir /etc/portage |
669 |
} |
670 |
|
671 |
pkg_preinst() { |
672 |
if ! use build && ! has_version dev-python/pycrypto && \ |
673 |
! has_version '>=dev-lang/python-2.6[ssl]' ; then |
674 |
ewarn "If you are an ebuild developer and you plan to commit ebuilds" |
675 |
ewarn "with this system then please install dev-python/pycrypto or" |
676 |
ewarn "enable the ssl USE flag for >=dev-lang/python-2.6 in order" |
677 |
ewarn "to enable RMD160 hash support." |
678 |
ewarn "See bug #198398 for more information." |
679 |
fi |
680 |
if [ -f "${ROOT}/etc/make.globals" ]; then |
681 |
rm "${ROOT}/etc/make.globals" |
682 |
fi |
683 |
|
684 |
has_version "<${CATEGORY}/${PN}-2.2_alpha" |
685 |
MINOR_UPGRADE=$? |
686 |
|
687 |
has_version "<=${CATEGORY}/${PN}-2.2_pre5" |
688 |
WORLD_MIGRATION_UPGRADE=$? |
689 |
|
690 |
# If portage-2.1.6 is installed and the preserved_libs_registry exists, |
691 |
# assume that the NEEDED.ELF.2 files have already been generated. |
692 |
has_version "<=${CATEGORY}/${PN}-2.2_pre7" && \ |
693 |
! ( [ -e "$ROOT"var/lib/portage/preserved_libs_registry ] && \ |
694 |
has_version ">=${CATEGORY}/${PN}-2.1.6_rc" ) |
695 |
NEEDED_REBUILD_UPGRADE=$? |
696 |
|
697 |
[[ -n $PORTDIR_OVERLAY ]] && has_version "<${CATEGORY}/${PN}-2.1.6.12" |
698 |
REPO_LAYOUT_CONF_WARN=$? |
699 |
} |
700 |
|
701 |
pkg_postinst() { |
702 |
# Compile all source files recursively. Any orphans |
703 |
# will be identified and removed in postrm. |
704 |
python_mod_optimize /usr/$(get_libdir)/portage/pym |
705 |
|
706 |
if [ $WORLD_MIGRATION_UPGRADE = 0 ] ; then |
707 |
einfo "moving set references from the worldfile into world_sets" |
708 |
cd "${ROOT}/var/lib/portage/" |
709 |
grep "^@" world >> world_sets |
710 |
sed -i -e '/^@/d' world |
711 |
fi |
712 |
|
713 |
if [ $NEEDED_REBUILD_UPGRADE = 0 ] ; then |
714 |
einfo "rebuilding NEEDED.ELF.2 files" |
715 |
for cpv in "${ROOT}/var/db/pkg"/*/*; do |
716 |
if [ -f "${cpv}/NEEDED" ]; then |
717 |
rm -f "${cpv}/NEEDED.ELF.2" |
718 |
while read line; do |
719 |
filename=${line% *} |
720 |
needed=${line#* } |
721 |
needed=${needed//+/++} |
722 |
needed=${needed//#/##} |
723 |
needed=${needed//%/%%} |
724 |
newline=$(scanelf -BF "%a;%F;%S;%r;${needed}" $filename) |
725 |
newline=${newline// - } |
726 |
echo "${newline:3}" >> "${cpv}/NEEDED.ELF.2" |
727 |
done < "${cpv}/NEEDED" |
728 |
fi |
729 |
done |
730 |
fi |
731 |
|
732 |
if [ $REPO_LAYOUT_CONF_WARN = 0 ] ; then |
733 |
ewarn |
734 |
echo "If you want overlay eclasses to override eclasses from" \ |
735 |
"other repos then see the portage(5) man page" \ |
736 |
"for information about the new layout.conf and repos.conf" \ |
737 |
"configuration files." \ |
738 |
| fmt -w 75 | while read -r ; do ewarn "$REPLY" ; done |
739 |
ewarn |
740 |
fi |
741 |
|
742 |
einfo |
743 |
einfo "For help with using portage please consult the Gentoo Handbook" |
744 |
einfo "at http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3" |
745 |
einfo |
746 |
|
747 |
if [ $MINOR_UPGRADE = 0 ] ; then |
748 |
elog "If you're upgrading from a pre-2.2 version of portage you might" |
749 |
elog "want to remerge world (emerge -e world) to take full advantage" |
750 |
elog "of some of the new features in 2.2." |
751 |
elog "This is not required however for portage to function properly." |
752 |
elog |
753 |
fi |
754 |
|
755 |
if [ -z "${PV/*_alpha*}" ]; then |
756 |
elog "If you always want to use the latest development version of portage" |
757 |
elog "please read http://www.gentoo.org/proj/en/portage/doc/testing.xml" |
758 |
elog |
759 |
fi |
760 |
} |
761 |
|
762 |
pkg_postrm() { |
763 |
python_mod_cleanup /usr/$(get_libdir)/portage/pym |
764 |
} |