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