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