Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-apps/portage: ChangeLog portage-2.2.0_alpha42.ebuild
Date: Fri, 01 Jul 2011 05:00:16
Message-Id: 20110701050004.6AD7220054@flycatcher.gentoo.org
1 zmedico 11/07/01 05:00:04
2
3 Modified: ChangeLog
4 Added: portage-2.2.0_alpha42.ebuild
5 Log:
6 2.2.0_alpha42 version bump. This fixes bug #355283 (fix distcc and ccache
7 features to use the default ABI dir), bug #365033 (make.conf parser behaves
8 like echo -e though it shouldn't), bug #370693 (extended repo-level config
9 file support), bug #371767 (emerge KeyError triggered by --exclude in some
10 cases), bug #371909 (unnecessary ccache messages triggered by pkg_info),
11 bug #371987 (make repoman handle EACCESS when generating Manifest),
12 bug #372183 (make PORTAGE_COMPRESS_FLAGS handle -k correctly), bug #372193
13 (portageq all_best_visible IndexError), bug #372789 (make repoman trigger
14 dependency.unknown for unknown packages in || deps), bug #373301 (remove
15 FEATURES=severe docs since it's not implemented), and bug #373341 (always
16 use ldconfig -X, to avoid interference with FEATURES=preserve-libs when
17 downgrading libraries). Bug #210077 tracks all bugs fixed since
18 portage-2.1.x.
19
20 (Portage version: 2.2.0_alpha42/cvs/Linux i686)
21
22 Revision Changes Path
23 1.841 sys-apps/portage/ChangeLog
24
25 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?rev=1.841&view=markup
26 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?rev=1.841&content-type=text/plain
27 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?r1=1.840&r2=1.841
28
29 Index: ChangeLog
30 ===================================================================
31 RCS file: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v
32 retrieving revision 1.840
33 retrieving revision 1.841
34 diff -u -r1.840 -r1.841
35 --- ChangeLog 28 Jun 2011 10:03:46 -0000 1.840
36 +++ ChangeLog 1 Jul 2011 05:00:04 -0000 1.841
37 @@ -1,6 +1,23 @@
38 # ChangeLog for sys-apps/portage
39 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
40 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.840 2011/06/28 10:03:46 zmedico Exp $
41 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.841 2011/07/01 05:00:04 zmedico Exp $
42 +
43 +*portage-2.2.0_alpha42 (01 Jul 2011)
44 +
45 + 01 Jul 2011; Zac Medico <zmedico@g.o> +portage-2.2.0_alpha42.ebuild:
46 + 2.2.0_alpha42 version bump. This fixes bug #355283 (fix distcc and ccache
47 + features to use the default ABI dir), bug #365033 (make.conf parser behaves
48 + like echo -e though it shouldn't), bug #370693 (extended repo-level config
49 + file support), bug #371767 (emerge KeyError triggered by --exclude in some
50 + cases), bug #371909 (unnecessary ccache messages triggered by pkg_info),
51 + bug #371987 (make repoman handle EACCESS when generating Manifest),
52 + bug #372183 (make PORTAGE_COMPRESS_FLAGS handle -k correctly), bug #372193
53 + (portageq all_best_visible IndexError), bug #372789 (make repoman trigger
54 + dependency.unknown for unknown packages in || deps), bug #373301 (remove
55 + FEATURES=severe docs since it's not implemented), and bug #373341 (always
56 + use ldconfig -X, to avoid interference with FEATURES=preserve-libs when
57 + downgrading libraries). Bug #210077 tracks all bugs fixed since
58 + portage-2.1.x.
59
60 28 Jun 2011; Zac Medico <zmedico@g.o> portage-2.1.10.3.ebuild,
61 portage-2.2.0_alpha41.ebuild, portage-9999.ebuild:
62
63
64
65 1.1 sys-apps/portage/portage-2.2.0_alpha42.ebuild
66
67 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.2.0_alpha42.ebuild?rev=1.1&view=markup
68 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.2.0_alpha42.ebuild?rev=1.1&content-type=text/plain
69
70 Index: portage-2.2.0_alpha42.ebuild
71 ===================================================================
72 # Copyright 1999-2011 Gentoo Foundation
73 # Distributed under the terms of the GNU General Public License v2
74 # $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.2.0_alpha42.ebuild,v 1.1 2011/07/01 05:00:04 zmedico Exp $
75
76 # Require EAPI 2 since we now require at least python-2.6 (for python 3
77 # syntax support) which also requires EAPI 2.
78 EAPI=2
79 inherit eutils multilib python
80
81 DESCRIPTION="Portage is the package management and distribution system for Gentoo"
82 HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml"
83 LICENSE="GPL-2"
84 KEYWORDS="~sparc-fbsd ~x86-fbsd"
85 SLOT="0"
86 IUSE="build doc epydoc +ipc +less linguas_pl python2 python3 selinux"
87
88 python_dep="python3? ( =dev-lang/python-3* )
89 !python2? ( !python3? (
90 build? ( || ( dev-lang/python:2.7 dev-lang/python:2.6 ) )
91 !build? ( || ( dev-lang/python:2.7 dev-lang/python:2.6 >=dev-lang/python-3 ) )
92 ) )
93 python2? ( !python3? ( || ( dev-lang/python:2.7 dev-lang/python:2.6 ) ) )"
94
95 # The pysqlite blocker is for bug #282760.
96 DEPEND="${python_dep}
97 !build? ( >=sys-apps/sed-4.0.5 )
98 doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
99 epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )"
100 # Require sandbox-2.2 for bug #288863.
101 RDEPEND="${python_dep}
102 !build? ( >=sys-apps/sed-4.0.5
103 >=app-shells/bash-3.2_p17
104 >=app-admin/eselect-1.2 )
105 elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
106 elibc_glibc? ( >=sys-apps/sandbox-2.2 )
107 elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
108 >=app-misc/pax-utils-0.1.17
109 selinux? ( || ( >=sys-libs/libselinux-2.0.94[python] <sys-libs/libselinux-2.0.94 ) )
110 !<app-shells/bash-3.2_p17"
111 PDEPEND="
112 !build? (
113 less? ( sys-apps/less )
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 # NOTE: FEATURES=install-sources requires debugedit and rsync
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=2.2.0_alpha41
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 # Bug #359731 - Die early if get_libdir fails.
155 [[ -z $(get_libdir) ]] && \
156 die "get_libdir returned an empty string"
157
158 if use python2 && use python3 ; then
159 ewarn "Both python2 and python3 USE flags are enabled, but only one"
160 ewarn "can be in the shebangs. Using python3."
161 fi
162 if ! use python2 && ! use python3 && ! compatible_python_is_selected ; then
163 ewarn "Attempting to select a compatible default python interpreter"
164 local x success=0
165 for x in /usr/bin/python2.* ; do
166 x=${x#/usr/bin/python2.}
167 if [[ $x -ge 6 ]] 2>/dev/null ; then
168 eselect python set python2.$x
169 if compatible_python_is_selected ; then
170 elog "Default python interpreter is now set to python-2.$x"
171 success=1
172 break
173 fi
174 fi
175 done
176 if [ $success != 1 ] ; then
177 eerror "Unable to select a compatible default python interpreter!"
178 die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)."
179 fi
180 fi
181
182 if use python3; then
183 python_set_active_version 3
184 elif use python2; then
185 python_set_active_version 2
186 fi
187 }
188
189 src_prepare() {
190 if [ -n "${PATCHVER}" ] ; then
191 if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then
192 rm "$S/bin/ebuild-helpers/portageq" \
193 || die "failed to remove portageq helper symlink"
194 fi
195 epatch "${WORKDIR}/${PN}-${PATCHVER}.patch"
196 fi
197 einfo "Setting portage.VERSION to ${PVR} ..."
198 sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \
199 die "Failed to patch portage.VERSION"
200 sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \
201 die "Failed to patch VERSION in doc/fragment/version"
202 sed -e "1s/VERSION/${PVR}/" -i man/* || \
203 die "Failed to patch VERSION in man page headers"
204
205 if ! use ipc ; then
206 einfo "Disabling ipc..."
207 sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
208 -i pym/_emerge/AbstractEbuildProcess.py || \
209 die "failed to patch AbstractEbuildProcess.py"
210 fi
211
212 if use python3; then
213 einfo "Converting shebangs for python3..."
214 python_convert_shebangs -r 3 .
215 elif use python2; then
216 einfo "Converting shebangs for python2..."
217 python_convert_shebangs -r 2 .
218 fi
219 }
220
221 src_compile() {
222 if use doc; then
223 cd "${S}"/doc
224 touch fragment/date
225 make xhtml xhtml-nochunks || die "failed to make docs"
226 fi
227
228 if use epydoc; then
229 einfo "Generating api docs"
230 mkdir "${WORKDIR}"/api
231 local my_modules epydoc_opts=""
232 my_modules="$(find "${S}/pym" -name "*.py" \
233 | sed -e 's:/__init__.py$::' -e 's:\.py$::' -e "s:^${S}/pym/::" \
234 -e 's:/:.:g' | sort)" || die "error listing modules"
235 # workaround for bug 282760
236 > "$S/pym/pysqlite2.py"
237 PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \
238 epydoc -o "${WORKDIR}"/api \
239 -qqqqq --no-frames --show-imports $epydoc_opts \
240 --name "${PN}" --url "${HOMEPAGE}" \
241 ${my_modules} || die "epydoc failed"
242 rm "$S/pym/pysqlite2.py"
243 fi
244 }
245
246 src_test() {
247 # make files executable, in case they were created by patch
248 find bin -type f | xargs chmod +x
249 PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \
250 ./pym/portage/tests/runTests || die "test(s) failed"
251 }
252
253 src_install() {
254 local libdir=$(get_libdir)
255 local portage_base="/usr/${libdir}/portage"
256 local portage_share_config=/usr/share/portage/config
257
258 cd "${S}"/cnf
259 insinto /etc
260 doins etc-update.conf dispatch-conf.conf || die
261
262 insinto "$portage_share_config/sets"
263 doins "$S"/cnf/sets/*.conf || die
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 files
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 files=$(find . -mindepth 1 -maxdepth 1 -type f ! -type l)
295 if [ -n "$files" ] ; then
296 doexe $files || die "doexe failed"
297 fi
298 symlinks=$(find . -mindepth 1 -maxdepth 1 -type l)
299 if [ -n "$symlinks" ] ; then
300 cp -P $symlinks "$D$portage_base/$x" || die "cp failed"
301 fi
302 done
303
304 cd "$S" || die "cd failed"
305 for x in $(find pym/* -type d ! -path "pym/portage/tests*") ; do
306 insinto $portage_base/$x || die "insinto failed"
307 cd "$S"/$x || die "cd failed"
308 # __pycache__ directories contain no py files
309 [[ "*.py" != $(echo *.py) ]] || continue
310 doins *.py || die "doins failed"
311 symlinks=$(find . -mindepth 1 -maxdepth 1 -type l)
312 if [ -n "$symlinks" ] ; then
313 cp -P $symlinks "$D$portage_base/$x" || die "cp failed"
314 fi
315 done
316
317 # Symlinks to directories cause up/downgrade issues and the use of these
318 # modules outside of portage is probably negligible.
319 for x in "${D}${portage_base}/pym/"{cache,elog_modules} ; do
320 [ ! -L "${x}" ] && continue
321 die "symlink to directory will cause upgrade/downgrade issues: '${x}'"
322 done
323
324 doman "${S}"/man/*.[0-9]
325 if use linguas_pl; then
326 doman -i18n=pl "${S_PL}"/man/pl/*.[0-9]
327 doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9]
328 fi
329
330 dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES}
331 use doc && dohtml -r "${S}"/doc/*
332 use epydoc && dohtml -r "${WORKDIR}"/api
333
334 dodir /usr/bin
335 for x in ebuild egencache emerge portageq quickpkg repoman ; do
336 dosym ../${libdir}/portage/bin/${x} /usr/bin/${x}
337 done
338
339 dodir /usr/sbin
340 local my_syms="archive-conf
341 dispatch-conf
342 emaint
343 emerge-webrsync
344 env-update
345 etc-update
346 fixpackages
347 regenworld"
348 local x
349 for x in ${my_syms}; do
350 dosym ../${libdir}/portage/bin/${x} /usr/sbin/${x}
351 done
352 dosym env-update /usr/sbin/update-env
353 dosym etc-update /usr/sbin/update-etc
354
355 dodir /etc/portage
356 keepdir /etc/portage
357 }
358
359 pkg_preinst() {
360 if ! use build && ! has_version dev-python/pycrypto && \
361 ! has_version '>=dev-lang/python-2.6[ssl]' ; then
362 ewarn "If you are an ebuild developer and you plan to commit ebuilds"
363 ewarn "with this system then please install dev-python/pycrypto or"
364 ewarn "enable the ssl USE flag for >=dev-lang/python-2.6 in order"
365 ewarn "to enable RMD160 hash support."
366 ewarn "See bug #198398 for more information."
367 fi
368 if [ -f "${ROOT}/etc/make.globals" ]; then
369 rm "${ROOT}/etc/make.globals"
370 fi
371
372 has_version "<${CATEGORY}/${PN}-2.2_alpha"
373 MINOR_UPGRADE=$?
374
375 has_version "<=${CATEGORY}/${PN}-2.2_pre5"
376 WORLD_MIGRATION_UPGRADE=$?
377
378 # If portage-2.1.6 is installed and the preserved_libs_registry exists,
379 # assume that the NEEDED.ELF.2 files have already been generated.
380 has_version "<=${CATEGORY}/${PN}-2.2_pre7" && \
381 ! ( [ -e "$ROOT"var/lib/portage/preserved_libs_registry ] && \
382 has_version ">=${CATEGORY}/${PN}-2.1.6_rc" )
383 NEEDED_REBUILD_UPGRADE=$?
384
385 [[ -n $PORTDIR_OVERLAY ]] && has_version "<${CATEGORY}/${PN}-2.1.6.12"
386 REPO_LAYOUT_CONF_WARN=$?
387 }
388
389 pkg_postinst() {
390 # Compile all source files recursively. Any orphans
391 # will be identified and removed in postrm.
392 python_mod_optimize /usr/$(get_libdir)/portage/pym
393
394 if [ $WORLD_MIGRATION_UPGRADE = 0 ] ; then
395 einfo "moving set references from the worldfile into world_sets"
396 cd "${ROOT}/var/lib/portage/"
397 grep "^@" world >> world_sets
398 sed -i -e '/^@/d' world
399 fi
400
401 if [ $NEEDED_REBUILD_UPGRADE = 0 ] ; then
402 einfo "rebuilding NEEDED.ELF.2 files"
403 for cpv in "${ROOT}/var/db/pkg"/*/*; do
404 if [ -f "${cpv}/NEEDED" ]; then
405 rm -f "${cpv}/NEEDED.ELF.2"
406 while read line; do
407 filename=${line% *}
408 needed=${line#* }
409 needed=${needed//+/++}
410 needed=${needed//#/##}
411 needed=${needed//%/%%}
412 newline=$(scanelf -BF "%a;%F;%S;%r;${needed}" $filename)
413 newline=${newline// - }
414 echo "${newline:3}" >> "${cpv}/NEEDED.ELF.2"
415 done < "${cpv}/NEEDED"
416 fi
417 done
418 fi
419
420 if [ $REPO_LAYOUT_CONF_WARN = 0 ] ; then
421 ewarn
422 echo "If you want overlay eclasses to override eclasses from" \
423 "other repos then see the portage(5) man page" \
424 "for information about the new layout.conf and repos.conf" \
425 "configuration files." \
426 | fmt -w 75 | while read -r ; do ewarn "$REPLY" ; done
427 ewarn
428 fi
429
430 einfo
431 einfo "For help with using portage please consult the Gentoo Handbook"
432 einfo "at http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3"
433 einfo
434
435 if [ $MINOR_UPGRADE = 0 ] ; then
436 elog "If you're upgrading from a pre-2.2 version of portage you might"
437 elog "want to remerge world (emerge -e world) to take full advantage"
438 elog "of some of the new features in 2.2."
439 elog "This is not required however for portage to function properly."
440 elog
441 fi
442
443 if [ -z "${PV/*_alpha*}" ]; then
444 elog "If you always want to use the latest development version of portage"
445 elog "please read http://www.gentoo.org/proj/en/portage/doc/testing.xml"
446 elog
447 fi
448 }
449
450 pkg_postrm() {
451 python_mod_cleanup /usr/$(get_libdir)/portage/pym
452 }