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