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