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.11.11.ebuild ChangeLog
Date: Wed, 22 Aug 2012 23:36:29
Message-Id: 20120822233619.A6509203C3@flycatcher.gentoo.org
1 zmedico 12/08/22 23:36:19
2
3 Modified: ChangeLog
4 Added: portage-2.1.11.11.ebuild
5 Log:
6 2.1.11.11 version bump. This fixes bug #142202 (fix emerge-webrsync to handle
7 permissions when non-root users), bug #364105 (fix emerge-webrsync to use
8 PORTAGE_RSYNC_OPTS), bug #392565 (add warning in make.conf man page about
9 PORTAGE_TMPDIR under PORTDIR), bug #432024 (emerge poll loop optimizations),
10 and bug #432170 (add PORTAGE_CHECKSUM_FILTER variable that can be used to
11 skip whirlpool checksums on slow computers). Bug #431026 tracks all bugs
12 fixed since portage-2.1.11.9.
13
14 (Portage version: 2.2.0_alpha122/cvs/Linux i686)
15
16 Revision Changes Path
17 1.1075 sys-apps/portage/ChangeLog
18
19 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?rev=1.1075&view=markup
20 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?rev=1.1075&content-type=text/plain
21 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?r1=1.1074&r2=1.1075
22
23 Index: ChangeLog
24 ===================================================================
25 RCS file: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v
26 retrieving revision 1.1074
27 retrieving revision 1.1075
28 diff -u -r1.1074 -r1.1075
29 --- ChangeLog 11 Aug 2012 23:42:17 -0000 1.1074
30 +++ ChangeLog 22 Aug 2012 23:36:19 -0000 1.1075
31 @@ -1,6 +1,17 @@
32 # ChangeLog for sys-apps/portage
33 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
34 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.1074 2012/08/11 23:42:17 zmedico Exp $
35 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.1075 2012/08/22 23:36:19 zmedico Exp $
36 +
37 +*portage-2.1.11.11 (22 Aug 2012)
38 +
39 + 22 Aug 2012; Zac Medico <zmedico@g.o> +portage-2.1.11.11.ebuild:
40 + 2.1.11.11 version bump. This fixes bug #142202 (fix emerge-webrsync to handle
41 + permissions when non-root users), bug #364105 (fix emerge-webrsync to use
42 + PORTAGE_RSYNC_OPTS), bug #392565 (add warning in make.conf man page about
43 + PORTAGE_TMPDIR under PORTDIR), bug #432024 (emerge poll loop optimizations),
44 + and bug #432170 (add PORTAGE_CHECKSUM_FILTER variable that can be used to skip
45 + whirlpool checksums on slow computers). Bug #431026 tracks all bugs fixed
46 + since portage-2.1.11.9.
47
48 *portage-2.2.0_alpha121 (11 Aug 2012)
49
50
51
52
53 1.1 sys-apps/portage/portage-2.1.11.11.ebuild
54
55 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.1.11.11.ebuild?rev=1.1&view=markup
56 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.1.11.11.ebuild?rev=1.1&content-type=text/plain
57
58 Index: portage-2.1.11.11.ebuild
59 ===================================================================
60 # Copyright 1999-2012 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.11.11.ebuild,v 1.1 2012/08/22 23:36:19 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 pypy1_9 python2 python3 selinux xattr"
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_ssl="python3? ( =dev-lang/python-3*[ssl] )
79 !pypy1_9? ( !python2? ( !python3? (
80 || ( >=dev-lang/python-2.7[ssl] dev-lang/python:2.6[threads,ssl] )
81 ) ) )
82 pypy1_9? ( !python2? ( !python3? ( dev-python/pypy:1.9[bzip2,ssl] ) ) )
83 python2? ( !python3? ( || ( dev-lang/python:2.7[ssl] dev-lang/python:2.6[ssl,threads] ) ) )"
84 python_dep="${python_dep_ssl//\[ssl\]}"
85 python_dep="${python_dep//,ssl}"
86 python_dep="${python_dep//ssl,}"
87
88 # The pysqlite blocker is for bug #282760.
89 DEPEND="${python_dep}
90 >=sys-apps/sed-4.0.5 sys-devel/patch
91 doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 )
92 epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )"
93 # Require sandbox-2.2 for bug #288863.
94 # For xattr, we can spawn getfattr and setfattr from sys-apps/attr, but that's
95 # quite slow, so it's not considered in the dependencies as an alternative to
96 # to python-3.3 / pyxattr. Also, xattr support is only tested with Linux, so
97 # for now, don't pull in xattr deps for other kernels.
98 # For whirlpool hash, require python[ssl] or python-mhash (bug #425046).
99 RDEPEND="${python_dep}
100 !build? ( >=sys-apps/sed-4.0.5
101 >=app-shells/bash-3.2_p17
102 >=app-admin/eselect-1.2
103 || ( ${python_dep_ssl} dev-python/python-mhash )
104 )
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 xattr? ( kernel_linux? ( || ( >=dev-lang/python-3.3_pre20110902 dev-python/pyxattr ) ) )
110 selinux? ( || ( >=sys-libs/libselinux-2.0.94[python] <sys-libs/libselinux-2.0.94 ) )
111 !<app-shells/bash-3.2_p17
112 !<app-admin/logrotate-3.8.0"
113 PDEPEND="
114 !build? (
115 >=net-misc/rsync-2.6.4
116 userland_GNU? ( >=sys-apps/coreutils-6.4 )
117 )"
118 # coreutils-6.4 rdep is for date format in emerge-webrsync #164532
119 # NOTE: FEATURES=install-sources requires debugedit and rsync
120
121 SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives"
122
123 prefix_src_archives() {
124 local x y
125 for x in ${@}; do
126 for y in ${SRC_ARCHIVES}; do
127 echo ${y}/${x}
128 done
129 done
130 }
131
132 PV_PL="2.1.2"
133 PATCHVER_PL=""
134 TARBALL_PV=$PV
135 SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
136 $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)
137 linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2
138 $(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )"
139
140 PATCHVER=
141 [[ $TARBALL_PV = $PV ]] || PATCHVER=$PV
142 if [ -n "${PATCHVER}" ]; then
143 SRC_URI="${SRC_URI} mirror://gentoo/${PN}-${PATCHVER}.patch.bz2
144 $(prefix_src_archives ${PN}-${PATCHVER}.patch.bz2)"
145 fi
146
147 S="${WORKDIR}"/${PN}-${TARBALL_PV}
148 S_PL="${WORKDIR}"/${PN}-${PV_PL}
149
150 compatible_python_is_selected() {
151 [[ $(/usr/bin/python -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x2060000 and "good" or "bad")') = good ]]
152 }
153
154 current_python_has_xattr() {
155 [[ $(/usr/bin/python -c 'import sys ; sys.stdout.write(sys.hexversion >= 0x3030000 and "yes" or "no")') = yes ]] || \
156 /usr/bin/python -c 'import xattr' 2>/dev/null
157 }
158
159 pkg_setup() {
160 # Bug #359731 - Die early if get_libdir fails.
161 [[ -z $(get_libdir) ]] && \
162 die "get_libdir returned an empty string"
163
164 if use python2 && use python3 ; then
165 ewarn "Both python2 and python3 USE flags are enabled, but only one"
166 ewarn "can be in the shebangs. Using python3."
167 fi
168 if use pypy1_9 && use python3 ; then
169 ewarn "Both pypy1_9 and python3 USE flags are enabled, but only one"
170 ewarn "can be in the shebangs. Using python3."
171 fi
172 if use pypy1_9 && use python2 ; then
173 ewarn "Both pypy1_9 and python2 USE flags are enabled, but only one"
174 ewarn "can be in the shebangs. Using python2"
175 fi
176 if ! use pypy1_9 && ! use python2 && ! use python3 && \
177 ! compatible_python_is_selected ; then
178 ewarn "Attempting to select a compatible default python interpreter"
179 local x success=0
180 for x in /usr/bin/python2.* ; do
181 x=${x#/usr/bin/python2.}
182 if [[ $x -ge 6 ]] 2>/dev/null ; then
183 eselect python set python2.$x
184 if compatible_python_is_selected ; then
185 elog "Default python interpreter is now set to python-2.$x"
186 success=1
187 break
188 fi
189 fi
190 done
191 if [ $success != 1 ] ; then
192 eerror "Unable to select a compatible default python interpreter!"
193 die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)."
194 fi
195 fi
196
197 if use python3; then
198 python_set_active_version 3
199 elif use python2; then
200 python_set_active_version 2
201 elif use pypy1_9; then
202 python_set_active_version 2.7-pypy-1.9
203 fi
204 }
205
206 src_prepare() {
207 if [ -n "${PATCHVER}" ] ; then
208 if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then
209 rm "$S/bin/ebuild-helpers/portageq" \
210 || die "failed to remove portageq helper symlink"
211 fi
212 epatch "${WORKDIR}/${PN}-${PATCHVER}.patch"
213 fi
214 einfo "Setting portage.VERSION to ${PVR} ..."
215 sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \
216 die "Failed to patch portage.VERSION"
217 sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \
218 die "Failed to patch VERSION in doc/fragment/version"
219 sed -e "1s/VERSION/${PVR}/" -i man/* || \
220 die "Failed to patch VERSION in man page headers"
221
222 if ! use ipc ; then
223 einfo "Disabling ipc..."
224 sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
225 -i pym/_emerge/AbstractEbuildProcess.py || \
226 die "failed to patch AbstractEbuildProcess.py"
227 fi
228
229 if use xattr && use kernel_linux ; then
230 einfo "Adding FEATURES=xattr to make.globals ..."
231 echo -e '\nFEATURES="${FEATURES} xattr"' >> cnf/make.globals \
232 || die "failed to append to make.globals"
233 fi
234
235 if use python3; then
236 einfo "Converting shebangs for python3..."
237 python_convert_shebangs -r 3 .
238 elif use python2; then
239 einfo "Converting shebangs for python2..."
240 python_convert_shebangs -r 2 .
241 elif use pypy1_9; then
242 einfo "Converting shebangs for pypy-c1.9..."
243 python_convert_shebangs -r 2.7-pypy-1.9 .
244 fi
245
246 cd "${S}/cnf" || 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 else
251 eerror ""
252 eerror "Portage does not have an arch-specific configuration for this arch."
253 eerror "Please notify the arch maintainer about this issue. Using generic."
254 eerror ""
255 fi
256
257 # BSD and OSX need a sed wrapper so that find/xargs work properly
258 if use userland_GNU; then
259 rm -f "${S}"/bin/ebuild-helpers/sed || \
260 die "Failed to remove sed wrapper"
261 fi
262 }
263
264 src_compile() {
265 if use doc; then
266 emake docbook || die
267 fi
268
269 if use epydoc; then
270 einfo "Generating api docs"
271 emake epydoc || die
272 fi
273 }
274
275 src_test() {
276 emake test || die
277 }
278
279 src_install() {
280 emake DESTDIR="${D}" \
281 sysconfdir="/etc" \
282 prefix="/usr" \
283 libdir="/usr/$(get_libdir)" \
284 install || die
285
286 # Use dodoc for compression, since the Makefile doesn't do that.
287 dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} || die
288
289 if use linguas_pl; then
290 doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] || die
291 doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] || die
292 fi
293 }
294
295 pkg_preinst() {
296 if [[ $ROOT == / ]] ; then
297 # Run some minimal tests as a sanity check.
298 local test_runner=$(find "$D" -name runTests)
299 if [[ -n $test_runner && -x $test_runner ]] ; then
300 einfo "Running preinst sanity tests..."
301 "$test_runner" || die "preinst sanity tests failed"
302 fi
303 fi
304
305 if use xattr && ! current_python_has_xattr ; then
306 ewarn "For optimal performance in xattr handling, install"
307 ewarn "dev-python/pyxattr, or install >=dev-lang/python-3.3 and"
308 ewarn "enable USE=python3 for $CATEGORY/$PN."
309 fi
310
311 if ! use build && ! has_version dev-python/pycrypto && \
312 ! has_version '>=dev-lang/python-2.6[ssl]' ; then
313 ewarn "If you are an ebuild developer and you plan to commit ebuilds"
314 ewarn "with this system then please install dev-python/pycrypto or"
315 ewarn "enable the ssl USE flag for >=dev-lang/python-2.6 in order"
316 ewarn "to enable RMD160 hash support."
317 ewarn "See bug #198398 for more information."
318 fi
319
320 if [[ -d ${ROOT}var/log/portage && \
321 $(ls -ld "${ROOT}var/log/portage") != *" portage portage "* ]] && \
322 has_version '<sys-apps/portage-2.1.10.11' ; then
323 # Initialize permissions for bug #378451 and bug #377177, since older
324 # portage does not create /var/log/portage with the desired default
325 # permissions.
326 einfo "Applying portage group permission to ${ROOT}var/log/portage for bug #378451"
327 chown portage:portage "${ROOT}var/log/portage"
328 chmod g+ws "${ROOT}var/log/portage"
329 fi
330
331 if has_version '<sys-apps/portage-2.1.10.61' ; then
332 ewarn "FEATURES=config-protect-if-modified is now enabled by default."
333 ewarn "This causes the CONFIG_PROTECT behavior to be skipped for"
334 ewarn "files that have not been modified since they were installed."
335 fi
336 }
337
338 pkg_postinst() {
339 # Compile all source files recursively. Any orphans
340 # will be identified and removed in postrm.
341 python_mod_optimize /usr/$(get_libdir)/portage/pym
342 }
343
344 pkg_postrm() {
345 python_mod_cleanup /usr/$(get_libdir)/portage/pym
346 }