From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QW7Of-0004Z5-AX for garchives@archives.gentoo.org; Mon, 13 Jun 2011 13:41:41 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DC3051C02B; Mon, 13 Jun 2011 13:41:32 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 96B321C02B for ; Mon, 13 Jun 2011 13:41:32 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 175AE1BC00A for ; Mon, 13 Jun 2011 13:41:32 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id EBC198003C for ; Mon, 13 Jun 2011 13:41:30 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/package/ebuild/digestgen.py X-VCS-Directories: pym/portage/package/ebuild/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: f5a31e2578699f0a0bb91269388702c90cbeab38 Date: Mon, 13 Jun 2011 13:41:30 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 455d709785cdacc5971d95bc4918ebef commit: f5a31e2578699f0a0bb91269388702c90cbeab38 Author: Zac Medico gentoo org> AuthorDate: Mon Jun 13 13:40:39 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Mon Jun 13 13:40:39 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Df5a31e25 digestgen: always allow fetch from mirror:// This fixes repoman and ebuild(1) to fetch from mirror:// URIs even though RESTRICT=3Dfetch is set (this behavior already works for emerge since it does not call fetch() via digestgen). --- pym/portage/package/ebuild/digestgen.py | 24 ++++++++++++++++-------- 1 files changed, 16 insertions(+), 8 deletions(-) diff --git a/pym/portage/package/ebuild/digestgen.py b/pym/portage/packag= e/ebuild/digestgen.py index 9408b14..2b9361d 100644 --- a/pym/portage/package/ebuild/digestgen.py +++ b/pym/portage/package/ebuild/digestgen.py @@ -1,4 +1,4 @@ -# Copyright 2010 Gentoo Foundation +# Copyright 2010-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 =20 __all__ =3D ['digestgen'] @@ -106,6 +106,7 @@ def digestgen(myarchives=3DNone, mysettings=3DNone, m= yportdb=3DNone): os.path.dirname(mysettings["O"]))) for myfile in missing_files: uris =3D set() + all_restrict =3D set() for cpv in distfiles_map[myfile]: uris.update(myportdb.getFetchMap( cpv, mytree=3Dmytree)[myfile]) @@ -115,9 +116,19 @@ def digestgen(myarchives=3DNone, mysettings=3DNone, = myportdb=3DNone): # they don't apply unconditionally. Assume such # conditionals only apply on the client side where # digestgen() does not need to be called. - restrict =3D use_reduce(restrict, - flat=3DTrue, matchnone=3DTrue) - restrict_fetch =3D 'fetch' in restrict + all_restrict.update(use_reduce(restrict, + flat=3DTrue, matchnone=3DTrue)) + + # fetch() uses CATEGORY and PF to display a message + # when fetch restriction is triggered. + cat, pf =3D catsplit(cpv) + mysettings["CATEGORY"] =3D cat + mysettings["PF"] =3D pf + + # fetch() uses PORTAGE_RESTRICT to control fetch + # restriction, which is only applied to files that + # are not fetchable via a mirror:// URI. + mysettings["PORTAGE_RESTRICT"] =3D " ".join(all_restrict) =20 try: st =3D os.stat(os.path.join( @@ -125,12 +136,9 @@ def digestgen(myarchives=3DNone, mysettings=3DNone, = myportdb=3DNone): except OSError: st =3D None =20 - if restrict_fetch or \ - not fetch({myfile : uris}, mysettings): + if not fetch({myfile : uris}, mysettings): myebuild =3D os.path.join(mysettings["O"], catsplit(cpv)[1] + ".ebuild") - spawn_nofetch(myportdb, myebuild, - settings=3Dmysettings) writemsg(_("!!! Fetch failed for %s, can't update " "Manifest\n") % myfile, noiselevel=3D-1) if myfile in dist_hashes and \