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