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