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 1R3Kge-0000Dl-Vi for garchives@archives.gentoo.org; Tue, 13 Sep 2011 04:33:33 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 700E821C045; Tue, 13 Sep 2011 04:33:25 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 314A321C045 for ; Tue, 13 Sep 2011 04:33:25 +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 AD74F1B400C for ; Tue, 13 Sep 2011 04:33:24 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id D406F80042 for ; Tue, 13 Sep 2011 04:33:23 +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: <48a2edbf0f0677cc97bae388cc391b563c8e4859.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/package/ebuild/doebuild.py X-VCS-Directories: pym/portage/package/ebuild/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 48a2edbf0f0677cc97bae388cc391b563c8e4859 Date: Tue, 13 Sep 2011 04:33:23 +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: 6da35fc570727e1df82c71a1c6f9f02f commit: 48a2edbf0f0677cc97bae388cc391b563c8e4859 Author: Zac Medico gentoo org> AuthorDate: Tue Sep 13 04:33:01 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Tue Sep 13 04:33:01 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D48a2edbf doebuild: support allow-missing and thin manifest --- pym/portage/package/ebuild/doebuild.py | 36 ++++++++++++++++++--------= ----- 1 files changed, 21 insertions(+), 15 deletions(-) diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package= /ebuild/doebuild.py index 51b2dbc..b8bcad2 100644 --- a/pym/portage/package/ebuild/doebuild.py +++ b/pym/portage/package/ebuild/doebuild.py @@ -50,7 +50,6 @@ from portage.exception import DigestException, FileNotF= ound, \ IncorrectParameter, InvalidDependString, PermissionDenied, \ UnsupportedAPIException from portage.localization import _ -from portage.manifest import Manifest from portage.output import style_to_ansi_code from portage.package.ebuild.prepare_build_dirs import prepare_build_dirs from portage.util import apply_recursive_permissions, \ @@ -483,21 +482,28 @@ def doebuild(myebuild, mydo, myroot, mysettings, de= bug=3D0, listonly=3D0, return 1 =20 global _doebuild_manifest_cache + pkgdir =3D os.path.dirname(myebuild) + manifest_path =3D os.path.join(pkgdir, "Manifest") + allow_missing_manifests =3D "allow-missing-manifests" in mysettings.fea= tures + if tree =3D=3D "porttree": + repo_config =3D mysettings.repositories.get_repo_for_location( + os.path.dirname(os.path.dirname(pkgdir))) + else: + repo_config =3D None mf =3D None if "strict" in features and \ "digest" not in features and \ tree =3D=3D "porttree" and \ + not repo_config.thin_manifest and \ mydo not in ("digest", "manifest", "help") and \ - not portage._doebuild_manifest_exempt_depend: + not portage._doebuild_manifest_exempt_depend and \ + not (allow_missing_manifests and not os.path.exists(manifest_path)): # Always verify the ebuild checksums before executing it. global _doebuild_broken_ebuilds =20 if myebuild in _doebuild_broken_ebuilds: return 1 =20 - pkgdir =3D os.path.dirname(myebuild) - manifest_path =3D os.path.join(pkgdir, "Manifest") - # Avoid checking the same Manifest several times in a row during a # regen with an empty cache. if _doebuild_manifest_cache is None or \ @@ -508,9 +514,7 @@ def doebuild(myebuild, mydo, myroot, mysettings, debu= g=3D0, listonly=3D0, out.eerror(_("Manifest not found for '%s'") % (myebuild,)) _doebuild_broken_ebuilds.add(myebuild) return 1 - mf =3D mysettings.repositories.get_repo_for_location( - os.path.dirname(os.path.dirname(pkgdir))) - mf =3D mf.load_manifest(pkgdir, mysettings["DISTDIR"]) + mf =3D repo_config.load_manifest(pkgdir, mysettings["DISTDIR"]) =20 else: mf =3D _doebuild_manifest_cache @@ -518,10 +522,12 @@ def doebuild(myebuild, mydo, myroot, mysettings, de= bug=3D0, listonly=3D0, try: mf.checkFileHashes("EBUILD", os.path.basename(myebuild)) except KeyError: - out =3D portage.output.EOutput() - out.eerror(_("Missing digest for '%s'") % (myebuild,)) - _doebuild_broken_ebuilds.add(myebuild) - return 1 + if not (allow_missing_manifests and + os.path.basename(myebuild) not in mf.fhashdict["EBUILD"]): + out =3D portage.output.EOutput() + out.eerror(_("Missing digest for '%s'") % (myebuild,)) + _doebuild_broken_ebuilds.add(myebuild) + return 1 except FileNotFound: out =3D portage.output.EOutput() out.eerror(_("A file listed in the Manifest " @@ -541,7 +547,7 @@ def doebuild(myebuild, mydo, myroot, mysettings, debu= g=3D0, listonly=3D0, if mf.getFullname() in _doebuild_broken_manifests: return 1 =20 - if mf is not _doebuild_manifest_cache: + if mf is not _doebuild_manifest_cache and not allow_missing_manifests: =20 # Make sure that all of the ebuilds are # actually listed in the Manifest. @@ -558,8 +564,8 @@ def doebuild(myebuild, mydo, myroot, mysettings, debu= g=3D0, listonly=3D0, _doebuild_broken_manifests.add(manifest_path) return 1 =20 - # Only cache it if the above stray files test succeeds. - _doebuild_manifest_cache =3D mf + # We cache it only after all above checks succeed. + _doebuild_manifest_cache =3D mf =20 logfile=3DNone builddir_lock =3D None