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