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_rc70.ebuild
Date: Sat, 28 Aug 2010 03:52:12
Message-Id: 20100828035205.99DDD2004C@flycatcher.gentoo.org
1 zmedico 10/08/28 03:52:05
2
3 Modified: ChangeLog
4 Added: portage-2.2_rc70.ebuild
5 Log:
6 2.2_rc70 version bump.
7
8 (Portage version: 2.2_rc70/cvs/Linux i686)
9
10 Revision Changes Path
11 1.712 sys-apps/portage/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?rev=1.712&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?rev=1.712&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/ChangeLog?r1=1.711&r2=1.712
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v
20 retrieving revision 1.711
21 retrieving revision 1.712
22 diff -u -r1.711 -r1.712
23 --- ChangeLog 24 Aug 2010 21:03:37 -0000 1.711
24 +++ ChangeLog 28 Aug 2010 03:52:05 -0000 1.712
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.711 2010/08/24 21:03:37 zmedico Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.712 2010/08/28 03:52:05 zmedico Exp $
30 +
31 +*portage-2.2_rc70 (28 Aug 2010)
32 +
33 + 28 Aug 2010; Zac Medico <zmedico@g.o> +portage-2.2_rc70.ebuild:
34 + 2.2_rc70 version bump. This fixes bug #334365 (depclean removes
35 + dependencies of package with invalid dependencies), and bug #334817
36 + (EISDIR exception for make.conf). Bug #210077 tracks all bugs fixed
37 + since 2.1.8.3 and 2.2_rc67.
38
39 *portage-2.2_rc69 (24 Aug 2010)
40
41
42
43
44 1.1 sys-apps/portage/portage-2.2_rc70.ebuild
45
46 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.2_rc70.ebuild?rev=1.1&view=markup
47 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/portage/portage-2.2_rc70.ebuild?rev=1.1&content-type=text/plain
48
49 Index: portage-2.2_rc70.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_rc70.ebuild,v 1.1 2010/08/28 03:52:05 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 -i "s/^VERSION=.*/VERSION=\"${PVR}\"/" pym/portage/__init__.py || \
165 die "Failed to patch portage.VERSION"
166
167 if use python3; then
168 python_convert_shebangs -r 3 .
169 fi
170 }
171
172 src_compile() {
173 if use doc; then
174 cd "${S}"/doc
175 touch fragment/date
176 make xhtml xhtml-nochunks || die "failed to make docs"
177 fi
178
179 if use epydoc; then
180 einfo "Generating api docs"
181 mkdir "${WORKDIR}"/api
182 local my_modules epydoc_opts=""
183 my_modules="$(find "${S}/pym" -name "*.py" \
184 | sed -e 's:/__init__.py$::' -e 's:\.py$::' -e "s:^${S}/pym/::" \
185 -e 's:/:.:g' | sort)" || die "error listing modules"
186 # workaround for bug 282760
187 > "$S/pym/pysqlite2.py"
188 PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \
189 epydoc -o "${WORKDIR}"/api \
190 -qqqqq --no-frames --show-imports $epydoc_opts \
191 --name "${PN}" --url "${HOMEPAGE}" \
192 ${my_modules} || die "epydoc failed"
193 rm "$S/pym/pysqlite2.py"
194 fi
195 }
196
197 src_test() {
198 # make files executable, in case they were created by patch
199 find bin -type f | xargs chmod +x
200 PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \
201 ./pym/portage/tests/runTests || die "test(s) failed"
202 }
203
204 src_install() {
205 local libdir=$(get_libdir)
206 local portage_base="/usr/${libdir}/portage"
207 local portage_share_config=/usr/share/portage/config
208
209 cd "${S}"/cnf
210 insinto /etc
211 doins etc-update.conf dispatch-conf.conf || die
212
213 # This allows config file updates that are applied for package
214 # moves to take effect immediately.
215 echo 'CONFIG_PROTECT_MASK="/etc/portage"' > "$T"/50portage \
216 || die "failed to create 50portage"
217 doenvd "$T"/50portage || die "doenvd 50portage failed"
218 rm "$T"/50portage
219
220 insinto "$portage_share_config/sets"
221 doins "$S"/cnf/sets/*.conf || die
222 insinto "$portage_share_config"
223 doins "$S/cnf/make.globals" || die
224 if [ -f "make.conf.${ARCH}".diff ]; then
225 patch make.conf "make.conf.${ARCH}".diff || \
226 die "Failed to patch make.conf.example"
227 newins make.conf make.conf.example || die
228 else
229 eerror ""
230 eerror "Portage does not have an arch-specific configuration for this arch."
231 eerror "Please notify the arch maintainer about this issue. Using generic."
232 eerror ""
233 newins make.conf make.conf.example || die
234 fi
235
236 dosym ..${portage_share_config}/make.globals /etc/make.globals
237
238 insinto /etc/logrotate.d
239 doins "${S}"/cnf/logrotate.d/elog-save-summary || die
240
241 # BSD and OSX need a sed wrapper so that find/xargs work properly
242 if use userland_GNU; then
243 rm "${S}"/bin/ebuild-helpers/sed || die "Failed to remove sed wrapper"
244 fi
245
246 local x symlinks
247
248 cd "$S" || die "cd failed"
249 for x in $(find bin -type d) ; do
250 exeinto $portage_base/$x || die "exeinto failed"
251 cd "$S"/$x || die "cd failed"
252 doexe $(find . -mindepth 1 -maxdepth 1 -type f ! -type l) || \
253 die "doexe failed"
254 symlinks=$(find . -mindepth 1 -maxdepth 1 -type l)
255 if [ -n "$symlinks" ] ; then
256 cp -P $symlinks "$D$portage_base/$x" || die "cp failed"
257 fi
258 done
259
260 cd "$S" || die "cd failed"
261 for x in $(find pym/* -type d) ; do
262 insinto $portage_base/$x || die "insinto failed"
263 cd "$S"/$x || die "cd failed"
264 doins *.py || die "doins 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 # Symlinks to directories cause up/downgrade issues and the use of these
272 # modules outside of portage is probably negligible.
273 for x in "${D}${portage_base}/pym/"{cache,elog_modules} ; do
274 [ ! -L "${x}" ] && continue
275 die "symlink to directory will cause upgrade/downgrade issues: '${x}'"
276 done
277
278 exeinto ${portage_base}/pym/portage/tests
279 doexe "${S}"/pym/portage/tests/runTests
280
281 doman "${S}"/man/*.[0-9]
282 if use linguas_pl; then
283 doman -i18n=pl "${S_PL}"/man/pl/*.[0-9]
284 doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9]
285 fi
286
287 dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES}
288 use doc && dohtml -r "${S}"/doc/*
289 use epydoc && dohtml -r "${WORKDIR}"/api
290
291 dodir /usr/bin
292 for x in ebuild egencache emerge portageq repoman ; do
293 dosym ../${libdir}/portage/bin/${x} /usr/bin/${x}
294 done
295
296 dodir /usr/sbin
297 local my_syms="archive-conf
298 dispatch-conf
299 emaint
300 emerge-webrsync
301 env-update
302 etc-update
303 fixpackages
304 quickpkg
305 regenworld"
306 local x
307 for x in ${my_syms}; do
308 dosym ../${libdir}/portage/bin/${x} /usr/sbin/${x}
309 done
310 dosym env-update /usr/sbin/update-env
311 dosym etc-update /usr/sbin/update-etc
312
313 dodir /etc/portage
314 keepdir /etc/portage
315 }
316
317 pkg_preinst() {
318 if ! use build && ! has_version dev-python/pycrypto && \
319 ! has_version '>=dev-lang/python-2.6[ssl]' ; then
320 ewarn "If you are an ebuild developer and you plan to commit ebuilds"
321 ewarn "with this system then please install dev-python/pycrypto or"
322 ewarn "enable the ssl USE flag for >=dev-lang/python-2.6 in order"
323 ewarn "to enable RMD160 hash support."
324 ewarn "See bug #198398 for more information."
325 fi
326 if [ -f "${ROOT}/etc/make.globals" ]; then
327 rm "${ROOT}/etc/make.globals"
328 fi
329
330 has_version "<${CATEGORY}/${PN}-2.2_alpha"
331 MINOR_UPGRADE=$?
332
333 has_version "<=${CATEGORY}/${PN}-2.2_pre5"
334 WORLD_MIGRATION_UPGRADE=$?
335
336 # If portage-2.1.6 is installed and the preserved_libs_registry exists,
337 # assume that the NEEDED.ELF.2 files have already been generated.
338 has_version "<=${CATEGORY}/${PN}-2.2_pre7" && \
339 ! ( [ -e "$ROOT"var/lib/portage/preserved_libs_registry ] && \
340 has_version ">=${CATEGORY}/${PN}-2.1.6_rc" )
341 NEEDED_REBUILD_UPGRADE=$?
342
343 [[ -n $PORTDIR_OVERLAY ]] && has_version "<${CATEGORY}/${PN}-2.1.6.12"
344 REPO_LAYOUT_CONF_WARN=$?
345 }
346
347 pkg_postinst() {
348 # Compile all source files recursively. Any orphans
349 # will be identified and removed in postrm.
350 python_mod_optimize /usr/$(get_libdir)/portage/pym
351
352 if [ $WORLD_MIGRATION_UPGRADE = 0 ] ; then
353 einfo "moving set references from the worldfile into world_sets"
354 cd "${ROOT}/var/lib/portage/"
355 grep "^@" world >> world_sets
356 sed -i -e '/^@/d' world
357 fi
358
359 if [ $NEEDED_REBUILD_UPGRADE = 0 ] ; then
360 einfo "rebuilding NEEDED.ELF.2 files"
361 for cpv in "${ROOT}/var/db/pkg"/*/*; do
362 if [ -f "${cpv}/NEEDED" ]; then
363 rm -f "${cpv}/NEEDED.ELF.2"
364 while read line; do
365 filename=${line% *}
366 needed=${line#* }
367 needed=${needed//+/++}
368 needed=${needed//#/##}
369 needed=${needed//%/%%}
370 newline=$(scanelf -BF "%a;%F;%S;%r;${needed}" $filename)
371 newline=${newline// - }
372 echo "${newline:3}" >> "${cpv}/NEEDED.ELF.2"
373 done < "${cpv}/NEEDED"
374 fi
375 done
376 fi
377
378 if [ $REPO_LAYOUT_CONF_WARN = 0 ] ; then
379 ewarn
380 echo "If you want overlay eclasses to override eclasses from" \
381 "other repos then see the portage(5) man page" \
382 "for information about the new layout.conf and repos.conf" \
383 "configuration files." \
384 | fmt -w 75 | while read -r ; do ewarn "$REPLY" ; done
385 ewarn
386 fi
387
388 einfo
389 einfo "For help with using portage please consult the Gentoo Handbook"
390 einfo "at http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3"
391 einfo
392
393 if [ $MINOR_UPGRADE = 0 ] ; then
394 elog "If you're upgrading from a pre-2.2 version of portage you might"
395 elog "want to remerge world (emerge -e world) to take full advantage"
396 elog "of some of the new features in 2.2."
397 elog "This is not required however for portage to function properly."
398 elog
399 fi
400
401 if [ -z "${PV/*_rc*}" ]; then
402 elog "If you always want to use the latest development version of portage"
403 elog "please read http://www.gentoo.org/proj/en/portage/doc/testing.xml"
404 elog
405 fi
406 }
407
408 pkg_postrm() {
409 python_mod_cleanup /usr/$(get_libdir)/portage/pym
410 }