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