Bug #225285 - Add a --skip-manifest option that disables all interaction
authorZac Medico <zmedico@gentoo.org>
Thu, 19 Jun 2008 03:38:09 +0000 (03:38 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 19 Jun 2008 03:38:09 +0000 (03:38 -0000)
with the manifest.

svn path=/main/branches/2.1.2/; revision=10719

bin/ebuild
pym/portage.py

index 622a6eb91aaf8f090745b0df6cddb16915b8418c..8ea9f017d4e18e49bf0f93c6dac2ed67dd77668d 100755 (executable)
@@ -17,7 +17,10 @@ force_help = "When used together with the digest or manifest " + \
        "that do not already exist in ${DISTDIR} will be automatically fetched."
 
 parser.add_option("--force", help=force_help, action="store_true", dest="force")
-parser.add_option("--debug", help="show debug output", action="store_true", dest="debug")
+parser.add_option("--debug", help="show debug output",
+       action="store_true", dest="debug")
+parser.add_option("--skip-manifest", help="skip all manifest checks",
+       action="store_true", dest="skip_manifest")
 
 opts, pargs = parser.parse_args(args=sys.argv[1:])
 
@@ -153,6 +156,11 @@ if "test" in pargs:
                tmpsettings["FEATURES"] = " ".join(tmpsettings.features)
                tmpsettings.backup_changes("FEATURES")
 
+if opts.skip_manifest:
+       tmpsettings["EBUILD_SKIP_MANIFEST"] = "1"
+       tmpsettings.backup_changes("EBUILD_SKIP_MANIFEST")
+       portage._doebuild_manifest_exempt_depend += 1
+
 build_dir_phases = set(["setup", "unpack", "compile",
        "test", "install", "package", "rpm"])
 
index 77ce475bd9e07833451b88396728aa46aed9d68d..dc0acecbae9d8d99d86f749f031927d4e0a6cae8 100644 (file)
@@ -3309,8 +3309,9 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks",
                if try_mirrors:
                        mymirrors += [x.rstrip("/") for x in mysettings["GENTOO_MIRRORS"].split() if x]
 
+       skip_manifest = mysettings.get("EBUILD_SKIP_MANIFEST") == "1"
        pkgdir = mysettings.get("O")
-       if pkgdir is not None:
+       if not (pkgdir is None or skip_manifest):
                mydigests = Manifest(
                        pkgdir, mysettings["DISTDIR"]).getTypeDigests("DIST")
        else:
@@ -4076,6 +4077,8 @@ def digestcheck(myfiles, mysettings, strict=0, justmanifest=0):
        """Verifies checksums.  Assumes all files have been downloaded.
        DEPRECATED: this is now only a compability wrapper for 
                    portage_manifest.Manifest()."""
+       if mysettings.get("EBUILD_SKIP_MANIFEST") == "1":
+               return 1
        pkgdir = mysettings["O"]
        manifest_path = os.path.join(pkgdir, "Manifest")
        if not os.path.exists(manifest_path):