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