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