From 92b9551f03035f5a875a44588a318773f652da6a Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 14 Mar 2007 11:45:33 +0100 Subject: * apt-pkg/depcache.cc: - added APT::Never-MarkAuto-Section variable - that will consider dependencies of packages in this section manual --- apt-pkg/depcache.cc | 17 ++++++- doc/examples/configure-index | 2 + po/apt-all.pot | 112 ++++++++++++++++++++++--------------------- 3 files changed, 76 insertions(+), 55 deletions(-) diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 3dc9bda35..f5673dd5d 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -907,7 +907,22 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, std::clog << "Installing " << InstPkg.Name() << " as dep of " << Pkg.Name() << std::endl; - MarkInstall(InstPkg, true, Depth + 1, false); + // now check if we should consider it a automatic dependency or not + string sec = _config->Find("APT::Never-MarkAuto-Section",""); + if(Pkg.Section() && (string(Pkg.Section()) == sec)) + { + if(_config->FindB("Debug::pkgDepCache::AutoInstall",false) == true) + std::clog << "Setting NOT as auto-installed because its a direct dep of a package in section " << sec << std::endl; + MarkInstall(InstPkg,true,Depth + 1, true); + } + else + { + // mark automatic dependency + MarkInstall(InstPkg,true,Depth + 1, false); + // Set the autoflag, after MarkInstall because MarkInstall unsets it + if (P->CurrentVer == 0) + PkgState[InstPkg->ID].Flags |= Flag::Auto; + } } continue; } diff --git a/doc/examples/configure-index b/doc/examples/configure-index index 1911d091b..32b7168a0 100644 --- a/doc/examples/configure-index +++ b/doc/examples/configure-index @@ -94,6 +94,8 @@ APT Cache-Limit "4194304"; Default-Release ""; + // consider dependencies of packages in this section manual + Never-MarkAuto-Section "metapackages"; // Write progress messages on this fd (for stuff like base-config) Status-Fd "-1"; diff --git a/po/apt-all.pot b/po/apt-all.pot index 0a7a30629..0dc932d47 100644 --- a/po/apt-all.pot +++ b/po/apt-all.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2006-09-06 18:58+0200\n" +"POT-Creation-Date: 2007-03-14 11:44+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -148,7 +148,7 @@ msgstr "" #: cmdline/apt-cache.cc:1652 cmdline/apt-cdrom.cc:138 cmdline/apt-config.cc:70 #: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:550 -#: cmdline/apt-get.cc:2455 cmdline/apt-sortpkgs.cc:144 +#: cmdline/apt-get.cc:2463 cmdline/apt-sortpkgs.cc:144 #, c-format msgid "%s %s for %s %s compiled on %s %s\n" msgstr "" @@ -546,7 +546,7 @@ msgstr "" msgid "Y" msgstr "" -#: cmdline/apt-get.cc:143 cmdline/apt-get.cc:1569 +#: cmdline/apt-get.cc:143 cmdline/apt-get.cc:1577 #, c-format msgid "Regex compilation error - %s" msgstr "" @@ -705,11 +705,11 @@ msgstr "" msgid "Internal error, Ordering didn't finish" msgstr "" -#: cmdline/apt-get.cc:792 cmdline/apt-get.cc:1886 cmdline/apt-get.cc:1919 +#: cmdline/apt-get.cc:792 cmdline/apt-get.cc:1894 cmdline/apt-get.cc:1927 msgid "Unable to lock the download directory" msgstr "" -#: cmdline/apt-get.cc:802 cmdline/apt-get.cc:1967 cmdline/apt-get.cc:2203 +#: cmdline/apt-get.cc:802 cmdline/apt-get.cc:1975 cmdline/apt-get.cc:2211 #: apt-pkg/cachefile.cc:67 msgid "The list of sources could not be read." msgstr "" @@ -738,7 +738,7 @@ msgstr "" msgid "After unpacking %sB disk space will be freed.\n" msgstr "" -#: cmdline/apt-get.cc:847 cmdline/apt-get.cc:2057 +#: cmdline/apt-get.cc:847 cmdline/apt-get.cc:2065 #, c-format msgid "Couldn't determine free space in %s" msgstr "" @@ -772,7 +772,7 @@ msgstr "" msgid "Do you want to continue [Y/n]? " msgstr "" -#: cmdline/apt-get.cc:962 cmdline/apt-get.cc:1366 cmdline/apt-get.cc:2100 +#: cmdline/apt-get.cc:962 cmdline/apt-get.cc:1366 cmdline/apt-get.cc:2108 #, c-format msgid "Failed to fetch %s %s\n" msgstr "" @@ -781,7 +781,7 @@ msgstr "" msgid "Some files failed to download" msgstr "" -#: cmdline/apt-get.cc:981 cmdline/apt-get.cc:2109 +#: cmdline/apt-get.cc:981 cmdline/apt-get.cc:2117 msgid "Download complete and in download only mode" msgstr "" @@ -887,55 +887,59 @@ msgid "" "used instead." msgstr "" -#: cmdline/apt-get.cc:1402 +#: cmdline/apt-get.cc:1406 msgid "We are not supposed to delete stuff, can't start AutoRemover" msgstr "" -#: cmdline/apt-get.cc:1427 +#: cmdline/apt-get.cc:1433 msgid "" -"The following packages where automatically installed and are no longer " +"The following packages were automatically installed and are no longer " "required:" msgstr "" -#: cmdline/apt-get.cc:1432 +#: cmdline/apt-get.cc:1435 +msgid "Use 'apt-get autoremove' to remove them." +msgstr "" + +#: cmdline/apt-get.cc:1440 msgid "" "Hmm, seems like the AutoRemover destroyed something which really\n" "shouldn't happen. Please file a bug report against apt." msgstr "" -#: cmdline/apt-get.cc:1435 cmdline/apt-get.cc:1637 +#: cmdline/apt-get.cc:1443 cmdline/apt-get.cc:1645 msgid "The following information may help to resolve the situation:" msgstr "" -#: cmdline/apt-get.cc:1439 +#: cmdline/apt-get.cc:1447 msgid "Internal Error, AutoRemover broke stuff" msgstr "" -#: cmdline/apt-get.cc:1458 +#: cmdline/apt-get.cc:1466 msgid "Internal error, AllUpgrade broke stuff" msgstr "" -#: cmdline/apt-get.cc:1556 cmdline/apt-get.cc:1592 +#: cmdline/apt-get.cc:1564 cmdline/apt-get.cc:1600 #, c-format msgid "Couldn't find package %s" msgstr "" -#: cmdline/apt-get.cc:1579 +#: cmdline/apt-get.cc:1587 #, c-format msgid "Note, selecting %s for regex '%s'\n" msgstr "" -#: cmdline/apt-get.cc:1609 +#: cmdline/apt-get.cc:1617 msgid "You might want to run `apt-get -f install' to correct these:" msgstr "" -#: cmdline/apt-get.cc:1612 +#: cmdline/apt-get.cc:1620 msgid "" "Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a " "solution)." msgstr "" -#: cmdline/apt-get.cc:1624 +#: cmdline/apt-get.cc:1632 msgid "" "Some packages could not be installed. This may mean that you have\n" "requested an impossible situation or if you are using the unstable\n" @@ -943,159 +947,159 @@ msgid "" "or been moved out of Incoming." msgstr "" -#: cmdline/apt-get.cc:1632 +#: cmdline/apt-get.cc:1640 msgid "" "Since you only requested a single operation it is extremely likely that\n" "the package is simply not installable and a bug report against\n" "that package should be filed." msgstr "" -#: cmdline/apt-get.cc:1640 +#: cmdline/apt-get.cc:1648 msgid "Broken packages" msgstr "" -#: cmdline/apt-get.cc:1669 +#: cmdline/apt-get.cc:1677 msgid "The following extra packages will be installed:" msgstr "" -#: cmdline/apt-get.cc:1758 +#: cmdline/apt-get.cc:1766 msgid "Suggested packages:" msgstr "" -#: cmdline/apt-get.cc:1759 +#: cmdline/apt-get.cc:1767 msgid "Recommended packages:" msgstr "" -#: cmdline/apt-get.cc:1779 +#: cmdline/apt-get.cc:1787 msgid "Calculating upgrade... " msgstr "" -#: cmdline/apt-get.cc:1782 methods/ftp.cc:702 methods/connect.cc:101 +#: cmdline/apt-get.cc:1790 methods/ftp.cc:702 methods/connect.cc:101 msgid "Failed" msgstr "" -#: cmdline/apt-get.cc:1787 +#: cmdline/apt-get.cc:1795 msgid "Done" msgstr "" -#: cmdline/apt-get.cc:1854 cmdline/apt-get.cc:1862 +#: cmdline/apt-get.cc:1862 cmdline/apt-get.cc:1870 msgid "Internal error, problem resolver broke stuff" msgstr "" -#: cmdline/apt-get.cc:1962 +#: cmdline/apt-get.cc:1970 msgid "Must specify at least one package to fetch source for" msgstr "" -#: cmdline/apt-get.cc:1992 cmdline/apt-get.cc:2221 +#: cmdline/apt-get.cc:2000 cmdline/apt-get.cc:2229 #, c-format msgid "Unable to find a source package for %s" msgstr "" -#: cmdline/apt-get.cc:2036 +#: cmdline/apt-get.cc:2044 #, c-format msgid "Skipping already downloaded file '%s'\n" msgstr "" -#: cmdline/apt-get.cc:2060 +#: cmdline/apt-get.cc:2068 #, c-format msgid "You don't have enough free space in %s" msgstr "" -#: cmdline/apt-get.cc:2065 +#: cmdline/apt-get.cc:2073 #, c-format msgid "Need to get %sB/%sB of source archives.\n" msgstr "" -#: cmdline/apt-get.cc:2068 +#: cmdline/apt-get.cc:2076 #, c-format msgid "Need to get %sB of source archives.\n" msgstr "" -#: cmdline/apt-get.cc:2074 +#: cmdline/apt-get.cc:2082 #, c-format msgid "Fetch source %s\n" msgstr "" -#: cmdline/apt-get.cc:2105 +#: cmdline/apt-get.cc:2113 msgid "Failed to fetch some archives." msgstr "" -#: cmdline/apt-get.cc:2133 +#: cmdline/apt-get.cc:2141 #, c-format msgid "Skipping unpack of already unpacked source in %s\n" msgstr "" -#: cmdline/apt-get.cc:2145 +#: cmdline/apt-get.cc:2153 #, c-format msgid "Unpack command '%s' failed.\n" msgstr "" -#: cmdline/apt-get.cc:2146 +#: cmdline/apt-get.cc:2154 #, c-format msgid "Check if the 'dpkg-dev' package is installed.\n" msgstr "" -#: cmdline/apt-get.cc:2163 +#: cmdline/apt-get.cc:2171 #, c-format msgid "Build command '%s' failed.\n" msgstr "" -#: cmdline/apt-get.cc:2182 +#: cmdline/apt-get.cc:2190 msgid "Child process failed" msgstr "" -#: cmdline/apt-get.cc:2198 +#: cmdline/apt-get.cc:2206 msgid "Must specify at least one package to check builddeps for" msgstr "" -#: cmdline/apt-get.cc:2226 +#: cmdline/apt-get.cc:2234 #, c-format msgid "Unable to get build-dependency information for %s" msgstr "" -#: cmdline/apt-get.cc:2246 +#: cmdline/apt-get.cc:2254 #, c-format msgid "%s has no build depends.\n" msgstr "" -#: cmdline/apt-get.cc:2298 +#: cmdline/apt-get.cc:2306 #, c-format msgid "" "%s dependency for %s cannot be satisfied because the package %s cannot be " "found" msgstr "" -#: cmdline/apt-get.cc:2350 +#: cmdline/apt-get.cc:2358 #, c-format msgid "" "%s dependency for %s cannot be satisfied because no available versions of " "package %s can satisfy version requirements" msgstr "" -#: cmdline/apt-get.cc:2385 +#: cmdline/apt-get.cc:2393 #, c-format msgid "Failed to satisfy %s dependency for %s: Installed package %s is too new" msgstr "" -#: cmdline/apt-get.cc:2410 +#: cmdline/apt-get.cc:2418 #, c-format msgid "Failed to satisfy %s dependency for %s: %s" msgstr "" -#: cmdline/apt-get.cc:2424 +#: cmdline/apt-get.cc:2432 #, c-format msgid "Build-dependencies for %s could not be satisfied." msgstr "" -#: cmdline/apt-get.cc:2428 +#: cmdline/apt-get.cc:2436 msgid "Failed to process build dependencies" msgstr "" -#: cmdline/apt-get.cc:2460 +#: cmdline/apt-get.cc:2468 msgid "Supported modules:" msgstr "" -#: cmdline/apt-get.cc:2501 +#: cmdline/apt-get.cc:2509 msgid "" "Usage: apt-get [options] command\n" " apt-get [options] install|remove pkg1 [pkg2 ...]\n" @@ -2206,7 +2210,7 @@ msgstr "" msgid "Malformed line %u in source list %s (vendor id)" msgstr "" -#: apt-pkg/packagemanager.cc:402 +#: apt-pkg/packagemanager.cc:403 #, c-format msgid "" "This installation run will require temporarily removing the essential " -- cgit v1.2.3