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 1R3hQ4-0007GO-8p for garchives@archives.gentoo.org; Wed, 14 Sep 2011 04:49:56 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7333721C062; Wed, 14 Sep 2011 04:49:42 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 2731721C062 for ; Wed, 14 Sep 2011 04:49:41 +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 72EB31B4019 for ; Wed, 14 Sep 2011 04:49:41 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 5AA0D80042 for ; Wed, 14 Sep 2011 04:49:40 +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: <05f5e7f26b92f534ffa0be28ec0a4ff58c0b0d6b.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/, bin/, pym/portage/ X-VCS-Repository: proj/portage X-VCS-Files: bin/ebuild pym/portage/manifest.py pym/portage/package/ebuild/digestgen.py X-VCS-Directories: pym/portage/package/ebuild/ bin/ pym/portage/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 05f5e7f26b92f534ffa0be28ec0a4ff58c0b0d6b Date: Wed, 14 Sep 2011 04:49:40 +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: 4e8c602b92b7602ba6612d4234eddf81 commit: 05f5e7f26b92f534ffa0be28ec0a4ff58c0b0d6b Author: Zac Medico gentoo org> AuthorDate: Wed Sep 14 04:49:23 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Wed Sep 14 04:49:23 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D05f5e7f2 Deprecate the manifest1_compat parameter. --- bin/ebuild | 2 +- pym/portage/manifest.py | 18 ++++++++++-------- pym/portage/package/ebuild/digestgen.py | 3 +-- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/bin/ebuild b/bin/ebuild index 95f4e15..f47975a 100755 --- a/bin/ebuild +++ b/bin/ebuild @@ -204,7 +204,7 @@ def discard_digests(myebuild, mysettings, mydbapi): mf =3D mysettings.repositories.get_repo_for_location( os.path.dirname(os.path.dirname(pkgdir))) mf =3D mf.load_manifest(pkgdir, mysettings["DISTDIR"], - fetchlist_dict=3Dfetchlist_dict, manifest1_compat=3DFalse) + fetchlist_dict=3Dfetchlist_dict) mf.create(requiredDistfiles=3DNone, assumeDistHashesSometimes=3DTrue, assumeDistHashesAlways=3DTrue) distfiles =3D fetchlist_dict[cpv] diff --git a/pym/portage/manifest.py b/pym/portage/manifest.py index 4fd44b0..3f0aa93 100644 --- a/pym/portage/manifest.py +++ b/pym/portage/manifest.py @@ -3,6 +3,7 @@ =20 import errno import io +import warnings =20 import portage portage.proxy.lazyimport.lazyimport(globals(), @@ -99,25 +100,26 @@ class Manifest2Entry(ManifestEntry): class Manifest(object): parsers =3D (parseManifest2,) def __init__(self, pkgdir, distdir, fetchlist_dict=3DNone, - manifest1_compat=3DFalse, from_scratch=3DFalse, thin=3DFalse): - """ create new Manifest instance for package in pkgdir - and add compability entries for old portage versions if manifest1_= compat =3D=3D True. + manifest1_compat=3DDeprecationWarning, from_scratch=3DFalse, thin=3DFa= lse): + """ Create new Manifest instance for package in pkgdir. Do not parse Manifest file if from_scratch =3D=3D True (only for i= nternal use) The fetchlist_dict parameter is required only for generation of a Manifest (not needed for parsing and checking sums). If thin is specified, then the manifest carries only info for distfiles.""" + + if manifest1_compat is not DeprecationWarning: + warnings.warn("The manifest1_compat parameter of the " + "portage.manifest.Manifest constructor is deprecated.", + DeprecationWarning, stacklevel=3D2) + self.pkgdir =3D _unicode_decode(pkgdir).rstrip(os.sep) + os.sep self.fhashdict =3D {} self.hashes =3D set() self.hashes.update(portage.const.MANIFEST2_HASH_FUNCTIONS) - if manifest1_compat: - raise NotImplementedError("manifest1 support has been removed") self.hashes.difference_update(hashname for hashname in \ list(self.hashes) if hashname not in hashfunc_map) self.hashes.add("size") - if manifest1_compat: - raise NotImplementedError("manifest1 support has been removed") self.hashes.add(portage.const.MANIFEST2_REQUIRED_HASH) for t in portage.const.MANIFEST2_IDENTIFIERS: self.fhashdict[t] =3D {} @@ -325,7 +327,7 @@ class Manifest(object): distfilehashes =3D {} self.__init__(self.pkgdir, self.distdir, fetchlist_dict=3Dself.fetchlist_dict, from_scratch=3DTrue, - manifest1_compat=3DFalse, thin=3Dself.thin) + thin=3Dself.thin) pn =3D os.path.basename(self.pkgdir.rstrip(os.path.sep)) cat =3D self._pkgdir_category() =20 diff --git a/pym/portage/package/ebuild/digestgen.py b/pym/portage/packag= e/ebuild/digestgen.py index 6051512..7b58972 100644 --- a/pym/portage/package/ebuild/digestgen.py +++ b/pym/portage/package/ebuild/digestgen.py @@ -52,10 +52,9 @@ def digestgen(myarchives=3DNone, mysettings=3DNone, my= portdb=3DNone): del e return 0 mytree =3D os.path.dirname(os.path.dirname(mysettings["O"])) - manifest1_compat =3D False mf =3D mysettings.repositories.get_repo_for_location(mytree) mf =3D mf.load_manifest(mysettings["O"], mysettings["DISTDIR"], - fetchlist_dict=3Dfetchlist_dict, manifest1_compat=3Dmanifest1_compat) + fetchlist_dict=3Dfetchlist_dict) # Don't require all hashes since that can trigger excessive # fetches when sufficient digests already exist. To ease transition # while Manifest 1 is being removed, only require hashes that will