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_alpha5.ebuild
Date: Thu, 25 Nov 2010 06:05:36
Message-Id: 20101125060520.20E2520051@flycatcher.gentoo.org
1 zmedico 10/11/25 06:05:19
2
3 Modified: ChangeLog
4 Added: portage-2.2.0_alpha5.ebuild
5 Log:
6 2.2.0_alpha5 version bump. This fixes bug #344845 (regenworld
7 AttributeError), bug #345097 (slot conflict display shows malformed
8 atoms), bug #345289 (^C traceback), bug #345979 (broken handling of USE
9 deps for masked USE flags), and bug #346349 (accept 'y' for emerge options
10 that accept 'n). Bug #210077 tracks all bugs fixed since 2.1.x.
11
12 (Portage version: 2.2.0_alpha5/cvs/Linux i686)
13
14 Revision Changes Path
15 1.766 sys-apps/portage/ChangeLog
16
17 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?rev=1.766&view=markup
18 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?rev=1.766&content-type=text/plain
19 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?r1=1.765&r2=1.766
20
21 Index: ChangeLog
22 ===================================================================
23 RCS file: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v
24 retrieving revision 1.765
25 retrieving revision 1.766
26 diff -u -r1.765 -r1.766
27 --- ChangeLog 5 Nov 2010 21:04:06 -0000 1.765
28 +++ ChangeLog 25 Nov 2010 06:05:19 -0000 1.766
29 @@ -1,6 +1,15 @@
30 # ChangeLog for sys-apps/portage
31 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
32 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.765 2010/11/05 21:04:06 zmedico Exp $
33 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.766 2010/11/25 06:05:19 zmedico Exp $
34 +
35 +*portage-2.2.0_alpha5 (25 Nov 2010)
36 +
37 + 25 Nov 2010; Zac Medico <zmedico@g.o> +portage-2.2.0_alpha5.ebuild:
38 + 2.2.0_alpha5 version bump. This fixes bug #344845 (regenworld
39 + AttributeError), bug #345097 (slot conflict display shows malformed
40 + atoms), bug #345289 (^C traceback), bug #345979 (broken handling of USE
41 + deps for masked USE flags), and bug #346349 (accept 'y' for emerge options
42 + that accept 'n). Bug #210077 tracks all bugs fixed since 2.1.x.
43
44 *portage-2.2.0_alpha4 (05 Nov 2010)
45
46
47
48
49 1.1 sys-apps/portage/portage-2.2.0_alpha5.ebuild
50
51 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.2.0_alpha5.ebuild?rev=1.1&view=markup
52 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.2.0_alpha5.ebuild?rev=1.1&content-type=text/plain
53
54 Index: portage-2.2.0_alpha5.ebuild
55 ===================================================================
56 # Copyright 1999-2010 Gentoo Foundation
57 # Distributed under the terms of the GNU General Public License v2
58 # $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.2.0_alpha5.ebuild,v 1.1 2010/11/25 06:05:19 zmedico Exp $
59
60 # Require EAPI 2 since we now require at least python-2.6 (for python 3
61 # syntax support) which also requires EAPI 2.
62 EAPI=2
63 inherit eutils multilib python
64
65 DESCRIPTION="Portage is the package management and distribution system for Gentoo"
66 HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml"
67 LICENSE="GPL-2"
68 KEYWORDS="~sparc-fbsd ~x86-fbsd"
69 PROVIDE="virtual/portage"
70 SLOT="0"
71 IUSE="build doc epydoc +ipc linguas_pl python3 selinux"
72
73 python_dep="python3? ( =dev-lang/python-3* )
74 !python3? (
75 build? ( || ( dev-lang/python:2.8 dev-lang/python:2.7 dev-lang/python:2.6 ) )
76 !build? ( || ( dev-lang/python:2.8 dev-lang/python:2.7 dev-lang/python:2.6 >=dev-lang/python-3 ) )
77 )"
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 )
94 !<app-shells/bash-3.2_p17"
95 PDEPEND="
96 !build? (
97 >=net-misc/rsync-2.6.4
98 userland_GNU? ( >=sys-apps/coreutils-6.4 )
99 )"
100 # coreutils-6.4 rdep is for date format in emerge-webrsync #164532
101 # rsync-2.6.4 rdep is for the --filter option #167668
102
103 SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives"
104
105 prefix_src_archives() {
106 local x y
107 for x in ${@}; do
108 for y in ${SRC_ARCHIVES}; do
109 echo ${y}/${x}
110 done
111 done
112 }
113
114 PV_PL="2.1.2"
115 PATCHVER_PL=""
116 TARBALL_PV=2.2.0_alpha5
117 SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
118 $(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)
119 linguas_pl? ( mirror://gentoo/${PN}-man-pl-${PV_PL}.tar.bz2
120 $(prefix_src_archives ${PN}-man-pl-${PV_PL}.tar.bz2) )"
121
122 PATCHVER=
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 if ! use python3 && ! compatible_python_is_selected ; then
137 ewarn "Attempting to select a compatible default python interpreter"
138 local x success=0
139 for x in /usr/bin/python2.* ; do
140 x=${x#/usr/bin/python2.}
141 if [[ $x -ge 6 ]] 2>/dev/null ; then
142 eselect python set python2.$x
143 if compatible_python_is_selected ; then
144 elog "Default python interpreter is now set to python-2.$x"
145 success=1
146 break
147 fi
148 fi
149 done
150 if [ $success != 1 ] ; then
151 eerror "Unable to select a compatible default python interpreter!"
152 die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)."
153 fi
154 fi
155
156 if use python3; then
157 python_set_active_version 3
158 fi
159 }
160
161 src_prepare() {
162 if [ -n "${PATCHVER}" ] ; then
163 if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then
164 rm "$S/bin/ebuild-helpers/portageq" \
165 || die "failed to remove portageq helper symlink"
166 fi
167 epatch "${WORKDIR}/${PN}-${PATCHVER}.patch"
168 fi
169 einfo "Setting portage.VERSION to ${PVR} ..."
170 sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \
171 die "Failed to patch portage.VERSION"
172 sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \
173 die "Failed to patch VERSION in doc/fragment/version"
174 sed -e "1s/VERSION/${PVR}/" -i man/* || \
175 die "Failed to patch VERSION in man page headers"
176
177 if ! use ipc ; then
178 einfo "Disabling ipc..."
179 sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \
180 -i pym/_emerge/AbstractEbuildProcess.py || \
181 die "failed to patch AbstractEbuildProcess.py"
182 fi
183
184 if use python3; then
185 einfo "Converting shebangs for python3..."
186 python_convert_shebangs -r 3 .
187 fi
188 }
189
190 src_compile() {
191 if use doc; then
192 cd "${S}"/doc
193 touch fragment/date
194 make xhtml xhtml-nochunks || die "failed to make docs"
195 fi
196
197 if use epydoc; then
198 einfo "Generating api docs"
199 mkdir "${WORKDIR}"/api
200 local my_modules epydoc_opts=""
201 my_modules="$(find "${S}/pym" -name "*.py" \
202 | sed -e 's:/__init__.py$::' -e 's:\.py$::' -e "s:^${S}/pym/::" \
203 -e 's:/:.:g' | sort)" || die "error listing modules"
204 # workaround for bug 282760
205 > "$S/pym/pysqlite2.py"
206 PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \
207 epydoc -o "${WORKDIR}"/api \
208 -qqqqq --no-frames --show-imports $epydoc_opts \
209 --name "${PN}" --url "${HOMEPAGE}" \
210 ${my_modules} || die "epydoc failed"
211 rm "$S/pym/pysqlite2.py"
212 fi
213 }
214
215 src_test() {
216 # make files executable, in case they were created by patch
217 find bin -type f | xargs chmod +x
218 PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \
219 ./pym/portage/tests/runTests || die "test(s) failed"
220 }
221
222 src_install() {
223 local libdir=$(get_libdir)
224 local portage_base="/usr/${libdir}/portage"
225 local portage_share_config=/usr/share/portage/config
226
227 cd "${S}"/cnf
228 insinto /etc
229 doins etc-update.conf dispatch-conf.conf || die
230
231 insinto "$portage_share_config/sets"
232 doins "$S"/cnf/sets/*.conf || die
233 insinto "$portage_share_config"
234 doins "$S/cnf/make.globals" || die
235 if [ -f "make.conf.${ARCH}".diff ]; then
236 patch make.conf "make.conf.${ARCH}".diff || \
237 die "Failed to patch make.conf.example"
238 newins make.conf make.conf.example || die
239 else
240 eerror ""
241 eerror "Portage does not have an arch-specific configuration for this arch."
242 eerror "Please notify the arch maintainer about this issue. Using generic."
243 eerror ""
244 newins make.conf make.conf.example || die
245 fi
246
247 dosym ..${portage_share_config}/make.globals /etc/make.globals
248
249 insinto /etc/logrotate.d
250 doins "${S}"/cnf/logrotate.d/elog-save-summary || die
251
252 # BSD and OSX need a sed wrapper so that find/xargs work properly
253 if use userland_GNU; then
254 rm "${S}"/bin/ebuild-helpers/sed || die "Failed to remove sed wrapper"
255 fi
256
257 local x symlinks
258
259 cd "$S" || die "cd failed"
260 for x in $(find bin -type d) ; do
261 exeinto $portage_base/$x || die "exeinto failed"
262 cd "$S"/$x || die "cd failed"
263 doexe $(find . -mindepth 1 -maxdepth 1 -type f ! -type l) || \
264 die "doexe failed"
265 symlinks=$(find . -mindepth 1 -maxdepth 1 -type l)
266 if [ -n "$symlinks" ] ; then
267 cp -P $symlinks "$D$portage_base/$x" || die "cp failed"
268 fi
269 done
270
271 cd "$S" || die "cd failed"
272 for x in $(find pym/* -type d) ; do
273 insinto $portage_base/$x || die "insinto failed"
274 cd "$S"/$x || die "cd failed"
275 # __pycache__ directories contain no py files
276 [[ "*.py" != $(echo *.py) ]] || continue
277 doins *.py || die "doins failed"
278 symlinks=$(find . -mindepth 1 -maxdepth 1 -type l)
279 if [ -n "$symlinks" ] ; then
280 cp -P $symlinks "$D$portage_base/$x" || die "cp failed"
281 fi
282 done
283
284 # Symlinks to directories cause up/downgrade issues and the use of these
285 # modules outside of portage is probably negligible.
286 for x in "${D}${portage_base}/pym/"{cache,elog_modules} ; do
287 [ ! -L "${x}" ] && continue
288 die "symlink to directory will cause upgrade/downgrade issues: '${x}'"
289 done
290
291 exeinto ${portage_base}/pym/portage/tests
292 doexe "${S}"/pym/portage/tests/runTests
293
294 doman "${S}"/man/*.[0-9]
295 if use linguas_pl; then
296 doman -i18n=pl "${S_PL}"/man/pl/*.[0-9]
297 doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9]
298 fi
299
300 dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES}
301 use doc && dohtml -r "${S}"/doc/*
302 use epydoc && dohtml -r "${WORKDIR}"/api
303
304 dodir /usr/bin
305 for x in ebuild egencache emerge portageq quickpkg repoman ; do
306 dosym ../${libdir}/portage/bin/${x} /usr/bin/${x}
307 done
308
309 dodir /usr/sbin
310 local my_syms="archive-conf
311 dispatch-conf
312 emaint
313 emerge-webrsync
314 env-update
315 etc-update
316 fixpackages
317 regenworld"
318 local x
319 for x in ${my_syms}; do
320 dosym ../${libdir}/portage/bin/${x} /usr/sbin/${x}
321 done
322 dosym env-update /usr/sbin/update-env
323 dosym etc-update /usr/sbin/update-etc
324
325 dodir /etc/portage
326 keepdir /etc/portage
327 }
328
329 pkg_preinst() {
330 if ! use build && ! has_version dev-python/pycrypto && \
331 ! has_version '>=dev-lang/python-2.6[ssl]' ; then
332 ewarn "If you are an ebuild developer and you plan to commit ebuilds"
333 ewarn "with this system then please install dev-python/pycrypto or"
334 ewarn "enable the ssl USE flag for >=dev-lang/python-2.6 in order"
335 ewarn "to enable RMD160 hash support."
336 ewarn "See bug #198398 for more information."
337 fi
338 if [ -f "${ROOT}/etc/make.globals" ]; then
339 rm "${ROOT}/etc/make.globals"
340 fi
341
342 has_version "<${CATEGORY}/${PN}-2.2_alpha"
343 MINOR_UPGRADE=$?
344
345 has_version "<=${CATEGORY}/${PN}-2.2_pre5"
346 WORLD_MIGRATION_UPGRADE=$?
347
348 # If portage-2.1.6 is installed and the preserved_libs_registry exists,
349 # assume that the NEEDED.ELF.2 files have already been generated.
350 has_version "<=${CATEGORY}/${PN}-2.2_pre7" && \
351 ! ( [ -e "$ROOT"var/lib/portage/preserved_libs_registry ] && \
352 has_version ">=${CATEGORY}/${PN}-2.1.6_rc" )
353 NEEDED_REBUILD_UPGRADE=$?
354
355 [[ -n $PORTDIR_OVERLAY ]] && has_version "<${CATEGORY}/${PN}-2.1.6.12"
356 REPO_LAYOUT_CONF_WARN=$?
357 }
358
359 pkg_postinst() {
360 # Compile all source files recursively. Any orphans
361 # will be identified and removed in postrm.
362 python_mod_optimize /usr/$(get_libdir)/portage/pym
363
364 if [ $WORLD_MIGRATION_UPGRADE = 0 ] ; then
365 einfo "moving set references from the worldfile into world_sets"
366 cd "${ROOT}/var/lib/portage/"
367 grep "^@" world >> world_sets
368 sed -i -e '/^@/d' world
369 fi
370
371 if [ $NEEDED_REBUILD_UPGRADE = 0 ] ; then
372 einfo "rebuilding NEEDED.ELF.2 files"
373 for cpv in "${ROOT}/var/db/pkg"/*/*; do
374 if [ -f "${cpv}/NEEDED" ]; then
375 rm -f "${cpv}/NEEDED.ELF.2"
376 while read line; do
377 filename=${line% *}
378 needed=${line#* }
379 needed=${needed//+/++}
380 needed=${needed//#/##}
381 needed=${needed//%/%%}
382 newline=$(scanelf -BF "%a;%F;%S;%r;${needed}" $filename)
383 newline=${newline// - }
384 echo "${newline:3}" >> "${cpv}/NEEDED.ELF.2"
385 done < "${cpv}/NEEDED"
386 fi
387 done
388 fi
389
390 if [ $REPO_LAYOUT_CONF_WARN = 0 ] ; then
391 ewarn
392 echo "If you want overlay eclasses to override eclasses from" \
393 "other repos then see the portage(5) man page" \
394 "for information about the new layout.conf and repos.conf" \
395 "configuration files." \
396 | fmt -w 75 | while read -r ; do ewarn "$REPLY" ; done
397 ewarn
398 fi
399
400 einfo
401 einfo "For help with using portage please consult the Gentoo Handbook"
402 einfo "at http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3"
403 einfo
404
405 if [ $MINOR_UPGRADE = 0 ] ; then
406 elog "If you're upgrading from a pre-2.2 version of portage you might"
407 elog "want to remerge world (emerge -e world) to take full advantage"
408 elog "of some of the new features in 2.2."
409 elog "This is not required however for portage to function properly."
410 elog
411 fi
412
413 if [ -z "${PV/*_alpha*}" ]; then
414 elog "If you always want to use the latest development version of portage"
415 elog "please read http://www.gentoo.org/proj/en/portage/doc/testing.xml"
416 elog
417 fi
418 }
419
420 pkg_postrm() {
421 python_mod_cleanup /usr/$(get_libdir)/portage/pym
422 }