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