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