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