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: portage-2.1.10.43.ebuild ChangeLog portage-2.1.10.42.ebuild
Date: Sat, 24 Dec 2011 12:34:11
Message-Id: 20111224123357.311A22004B@flycatcher.gentoo.org
1 zmedico 11/12/24 12:33:57
2
3 Modified: ChangeLog
4 Added: portage-2.1.10.43.ebuild
5 Removed: portage-2.1.10.42.ebuild
6 Log:
7 2.1.10.43 version bump. This fixes bug #395877 (false positive results in
8 CFLAGS ignorance check) and bug #395879 (emerge AttributeError triggered by
9 ambiguous atom argument, a regression in portage-2.1.10.42 and
10 2.2.0_alpha82). Also included is a new config-protect-if-modified FEATURES
11 setting (see the make.conf man page). Bug #395831 tracks all bugs fixed since
12 portage-2.1.10.41.
13
14 (Portage version: 2.2.0_alpha83/cvs/Linux i686)
15
16 Revision Changes Path
17 1.940 sys-apps/portage/ChangeLog
18
19 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?rev=1.940&view=markup
20 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?rev=1.940&content-type=text/plain
21 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?r1=1.939&r2=1.940
22
23 Index: ChangeLog
24 ===================================================================
25 RCS file: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v
26 retrieving revision 1.939
27 retrieving revision 1.940
28 diff -u -r1.939 -r1.940
29 --- ChangeLog 23 Dec 2011 18:55:59 -0000 1.939
30 +++ ChangeLog 24 Dec 2011 12:33:56 -0000 1.940
31 @@ -1,6 +1,17 @@
32 # ChangeLog for sys-apps/portage
33 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
34 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.939 2011/12/23 18:55:59 zmedico Exp $
35 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.940 2011/12/24 12:33:56 zmedico Exp $
36 +
37 +*portage-2.1.10.43 (24 Dec 2011)
38 +
39 + 24 Dec 2011; Zac Medico <zmedico@g.o> +portage-2.1.10.43.ebuild,
40 + -portage-2.1.10.42.ebuild:
41 + 2.1.10.43 version bump. This fixes bug #395877 (false positive results in
42 + CFLAGS ignorance check) and bug #395879 (emerge AttributeError triggered by
43 + ambiguous atom argument, a regression in portage-2.1.10.42 and 2.2.0_alpha82).
44 + Also included is a new config-protect-if-modified FEATURES setting (see the
45 + make.conf man page). Bug #395831 tracks all bugs fixed since
46 + portage-2.1.10.41.
47
48 *portage-2.2.0_alpha82 (23 Dec 2011)
49
50
51
52
53 1.1 sys-apps/portage/portage-2.1.10.43.ebuild
54
55 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.1.10.43.ebuild?rev=1.1&view=markup
56 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.1.10.43.ebuild?rev=1.1&content-type=text/plain
57
58 Index: portage-2.1.10.43.ebuild
59 ===================================================================
60 # Copyright 1999-2011 Gentoo Foundation
61 # Distributed under the terms of the GNU General Public License v2
62 # $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.1.10.43.ebuild,v 1.1 2011/12/24 12:33:56 zmedico Exp $
63
64 # Require EAPI 2 since we now require at least python-2.6 (for python 3
65 # syntax support) which also requires EAPI 2.
66 EAPI=2
67 inherit eutils multilib python
68
69 DESCRIPTION="Portage is the package management and distribution system for Gentoo"
70 HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml"
71 LICENSE="GPL-2"
72 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
73 SLOT="0"
74 IUSE="build doc epydoc +ipc linguas_pl python2 python3 selinux"
75
76 # Import of the io module in python-2.6 raises ImportError for the
77 # thread module if threading is disabled.
78 python_dep="python3? ( =dev-lang/python-3* )
79 !python2? ( !python3? (
80 build? ( || ( dev-lang/python:2.7 dev-lang/python:2.6[threads] ) )
81 !build? ( || ( dev-lang/python:2.7 dev-lang/python:2.6[threads] >=dev-lang/python-3 ) )
82 ) )
83 python2? ( !python3? ( || ( dev-lang/python:2.7 dev-lang/python:2.6[threads] ) ) )"
84
85 # The pysqlite blocker is for bug #282760.
86 DEPEND="${python_dep}
87 !build? ( >=sys-apps/sed-4.0.5 )
88 doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
89 epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )"
90 # Require sandbox-2.2 for bug #288863.
91 RDEPEND="${python_dep}
92 !build? ( >=sys-apps/sed-4.0.5
93 >=app-shells/bash-3.2_p17
94 >=app-admin/eselect-1.2 )
95 elibc_FreeBSD? ( sys-freebsd/freebsd-bin )
96 elibc_glibc? ( >=sys-apps/sandbox-2.2 )
97 elibc_uclibc? ( >=sys-apps/sandbox-2.2 )
98 >=app-misc/pax-utils-0.1.17
99 selinux? ( || ( >=sys-libs/libselinux-2.0.94[python] <sys-libs/libselinux-2.0.94 ) )
100 !<app-shells/bash-3.2_p17
101 !<app-admin/logrotate-3.8.0"
102 PDEPEND="
103 !build? (
104 >=net-misc/rsync-2.6.4
105 userland_GNU? ( >=sys-apps/coreutils-6.4 )
106 )"
107 # coreutils-6.4 rdep is for date format in emerge-webrsync #164532
108 # NOTE: FEATURES=install-sources requires debugedit and rsync
109
110 SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives"
111
112 prefix_src_archives() {
113 local x y
114 for x in ${@}; do
115 for y in ${SRC_ARCHIVES}; do
116 echo ${y}/${x}
117 done
118 done
119 }
120
121 PV_PL="2.1.2"
122 PATCHVER_PL=""
123 TARBALL_PV=$PV
124 SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
125 $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)
126 linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2
127 $(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )"
128
129 PATCHVER=
130 [[ $TARBALL_PV = $PV ]] || PATCHVER=$PV
131 if [ -n "${PATCHVER}" ]; then
132 SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2
133 $(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)"
134 fi
135
136 S="${WORKDIR}"/${PN}-${TARBALL_PV}
137 S_PL="${WORKDIR}"/${PN}-${PV_PL}
138
139 compatible_python_is_selected() {
140 [[ $(/usr/bin/python -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') = good ]]
141 }
142
143 pkg_setup() {
144 # Bug #359731 - Die early if get_libdir fails.
145 [[ -z $(get_libdir) ]] && \
146 die "get_libdir returned an empty string"
147
148 if use python2 && use python3 ; then
149 ewarn "Both python2 and python3 USE flags are enabled, but only one"
150 ewarn "can be in the shebangs. Using python3."
151 fi
152 if ! use python2 && ! use python3 && ! compatible_python_is_selected ; then
153 ewarn "Attempting to select a compatible default python interpreter"
154 local x success=0
155 for x in /usr/bin/python2.* ; do
156 x=${x#/usr/bin/python2.}
157 if [[ $x -ge 6 ]] 2>/dev/null ; then
158 eselect python set python2.$x
159 if compatible_python_is_selected ; then
160 elog "Default python interpreter is now set to python-2.$x"
161 success=1
162 break
163 fi
164 fi
165 done
166 if [ $success != 1 ] ; then
167 eerror "Unable to select a compatible default python interpreter!"
168 die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)."
169 fi
170 fi
171
172 if use python3; then
173 python_set_active_version 3
174 elif use python2; then
175 python_set_active_version 2
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 elif use python2; then
206 einfo "Converting shebangs for python2..."
207 python_convert_shebangs -r 2 .
208 fi
209 }
210
211 src_compile() {
212 if use doc; then
213 cd "${S}"/doc
214 touch fragment/date
215 make xhtml xhtml-nochunks || die "failed to make docs"
216 fi
217
218 if use epydoc; then
219 einfo "Generating api docs"
220 mkdir "${WORKDIR}"/api
221 local my_modules epydoc_opts=""
222 my_modules="$(find "${S}/pym" -name "*.py" \
223 | sed -e 's:/__init__.py$::' -e 's:\.py$::' -e "s:^${S}/pym/::" \
224 -e 's:/:.:g' | sort)" || die "error listing modules"
225 # workaround for bug 282760
226 > "$S/pym/pysqlite2.py"
227 PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \
228 epydoc -o "${WORKDIR}"/api \
229 -qqqqq --no-frames --show-imports $epydoc_opts \
230 --name "${PN}" --url "${HOMEPAGE}" \
231 ${my_modules} || die "epydoc failed"
232 rm "$S/pym/pysqlite2.py"
233 fi
234 }
235
236 src_test() {
237 # make files executable, in case they were created by patch
238 find bin -type f | xargs chmod +x
239 ./pym/portage/tests/runTests || die "test(s) failed"
240 }
241
242 src_install() {
243 local libdir=$(get_libdir)
244 local portage_base="/usr/${libdir}/portage"
245 local portage_share_config=/usr/share/portage/config
246
247 cd "${S}"/cnf
248 insinto /etc
249 doins etc-update.conf dispatch-conf.conf || die
250
251 insinto "$portage_share_config"
252 doins "$S/cnf/make.globals" || die
253 if [ -f "make.conf.${ARCH}".diff ]; then
254 patch make.conf "make.conf.${ARCH}".diff || \
255 die "Failed to patch make.conf.example"
256 newins make.conf make.conf.example || die
257 else
258 eerror ""
259 eerror "Portage does not have an arch-specific configuration for this arch."
260 eerror "Please notify the arch maintainer about this issue. Using generic."
261 eerror ""
262 newins make.conf make.conf.example || die
263 fi
264
265 dosym ..${portage_share_config}/make.globals /etc/make.globals
266
267 insinto /etc/logrotate.d
268 doins "${S}"/cnf/logrotate.d/elog-save-summary || die
269
270 # BSD and OSX need a sed wrapper so that find/xargs work properly
271 if use userland_GNU; then
272 rm "${S}"/bin/ebuild-helpers/sed || die "Failed to remove sed wrapper"
273 fi
274
275 local x symlinks files
276
277 cd "$S" || die "cd failed"
278 for x in $(find bin -type d) ; do
279 exeinto $portage_base/$x || die "exeinto failed"
280 cd "$S"/$x || die "cd failed"
281 files=$(find . -mindepth 1 -maxdepth 1 -type f ! -type l)
282 if [ -n "$files" ] ; then
283 doexe $files || die "doexe failed"
284 fi
285 symlinks=$(find . -mindepth 1 -maxdepth 1 -type l)
286 if [ -n "$symlinks" ] ; then
287 cp -P $symlinks "$D$portage_base/$x" || die "cp failed"
288 fi
289 done
290
291 cd "$S" || die "cd failed"
292 for x in $(find pym/* -type d ! -path "pym/portage/tests*") ; do
293 insinto $portage_base/$x || die "insinto failed"
294 cd "$S"/$x || die "cd failed"
295 # __pycache__ directories contain no py files
296 [[ "*.py" != $(echo *.py) ]] || continue
297 doins *.py || die "doins failed"
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 # We install some minimal tests for use as a preinst sanity check.
305 # These tests must be able to run without a full source tree and
306 # without relying on a previous portage instance being installed.
307 cd "$S" || die "cd failed"
308 exeinto $portage_base/pym/portage/tests || die
309 doexe pym/portage/tests/runTests || die
310 insinto $portage_base/pym/portage/tests || die
311 doins pym/portage/tests/*.py || die
312 insinto $portage_base/pym/portage/tests/lint || die
313 doins pym/portage/tests/lint/*.py || die
314 doins pym/portage/tests/lint/__test__ || die
315
316 # Symlinks to directories cause up/downgrade issues and the use of these
317 # modules outside of portage is probably negligible.
318 for x in "${D}${portage_base}/pym/"{cache,elog_modules} ; do
319 [ ! -L "${x}" ] && continue
320 die "symlink to directory will cause upgrade/downgrade issues: '${x}'"
321 done
322
323 doman "${S}"/man/*.[0-9]
324 if use linguas_pl; then
325 doman -i18n=pl "${S_PL}"/man/pl/*.[0-9]
326 doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9]
327 fi
328
329 dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES}
330 use doc && dohtml -r "${S}"/doc/*
331 use epydoc && dohtml -r "${WORKDIR}"/api
332
333 dodir /usr/bin
334 for x in ebuild egencache emerge portageq quickpkg repoman ; do
335 dosym ../${libdir}/portage/bin/${x} /usr/bin/${x}
336 done
337
338 dodir /usr/sbin
339 local my_syms="archive-conf
340 dispatch-conf
341 emaint
342 emerge-webrsync
343 env-update
344 etc-update
345 fixpackages
346 regenworld"
347 local x
348 for x in ${my_syms}; do
349 dosym ../${libdir}/portage/bin/${x} /usr/sbin/${x}
350 done
351 dosym env-update /usr/sbin/update-env
352 dosym etc-update /usr/sbin/update-etc
353
354 dodir /etc/portage
355 keepdir /etc/portage
356 }
357
358 pkg_preinst() {
359 if [[ $ROOT == / ]] ; then
360 # Run some minimal tests as a sanity check.
361 local test_runner=$(find "$D" -name runTests)
362 if [[ -n $test_runner && -x $test_runner ]] ; then
363 einfo "Running preinst sanity tests..."
364 "$test_runner" || die "preinst sanity tests failed"
365 fi
366 fi
367
368 if ! use build && ! has_version dev-python/pycrypto && \
369 ! has_version '>=dev-lang/python-2.6[ssl]' ; then
370 ewarn "If you are an ebuild developer and you plan to commit ebuilds"
371 ewarn "with this system then please install dev-python/pycrypto or"
372 ewarn "enable the ssl USE flag for >=dev-lang/python-2.6 in order"
373 ewarn "to enable RMD160 hash support."
374 ewarn "See bug #198398 for more information."
375 fi
376 if [ -f "${ROOT}/etc/make.globals" ]; then
377 rm "${ROOT}/etc/make.globals"
378 fi
379
380 if [[ -d ${ROOT}var/log/portage && \
381 $(ls -ld "${ROOT}var/log/portage") != *" portage portage "* ]] && \
382 has_version '<sys-apps/portage-2.1.10.11' ; then
383 # Initialize permissions for bug #378451 and bug #377177, since older
384 # portage does not create /var/log/portage with the desired default
385 # permissions.
386 einfo "Applying portage group permission to ${ROOT}var/log/portage for bug #378451"
387 chown portage:portage "${ROOT}var/log/portage"
388 chmod g+ws "${ROOT}var/log/portage"
389 fi
390
391 [[ -n $PORTDIR_OVERLAY ]] && has_version "<${CATEGORY}/${PN}-2.1.6.12" \
392 && REPO_LAYOUT_CONF_WARN=true || REPO_LAYOUT_CONF_WARN=false
393 }
394
395 pkg_postinst() {
396 # Compile all source files recursively. Any orphans
397 # will be identified and removed in postrm.
398 python_mod_optimize /usr/$(get_libdir)/portage/pym
399
400 if $REPO_LAYOUT_CONF_WARN ; then
401 ewarn
402 echo "If you want overlay eclasses to override eclasses from" \
403 "other repos then see the portage(5) man page" \
404 "for information about the new layout.conf and repos.conf" \
405 "configuration files." \
406 | fmt -w 75 | while read -r ; do ewarn "$REPLY" ; done
407 ewarn
408 fi
409 }
410
411 pkg_postrm() {
412 python_mod_cleanup /usr/$(get_libdir)/portage/pym
413 }