summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-cache.cc2
-rw-r--r--cmdline/apt-cdrom.cc2
-rw-r--r--cmdline/apt-config.cc2
-rw-r--r--cmdline/apt-dump-solver.cc2
-rw-r--r--cmdline/apt-extracttemplates.cc2
-rw-r--r--cmdline/apt-get.cc55
-rw-r--r--cmdline/apt-internal-solver.cc2
-rw-r--r--cmdline/apt-mark.cc2
-rw-r--r--cmdline/apt-sortpkgs.cc2
-rw-r--r--cmdline/makefile33
10 files changed, 56 insertions, 48 deletions
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc
index 94654ffd4..ce869581b 100644
--- a/cmdline/apt-cache.cc
+++ b/cmdline/apt-cache.cc
@@ -1676,7 +1676,7 @@ bool GenCaches(CommandLine &Cmd)
/* */
bool ShowHelp(CommandLine &Cmd)
{
- ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION,
+ ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
COMMON_ARCH,__DATE__,__TIME__);
if (_config->FindB("version") == true)
diff --git a/cmdline/apt-cdrom.cc b/cmdline/apt-cdrom.cc
index 0017d954e..2551f4916 100644
--- a/cmdline/apt-cdrom.cc
+++ b/cmdline/apt-cdrom.cc
@@ -195,7 +195,7 @@ bool DoIdent(CommandLine &)
/* */
int ShowHelp()
{
- ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION,
+ ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
COMMON_ARCH,__DATE__,__TIME__);
if (_config->FindB("version") == true)
return 0;
diff --git a/cmdline/apt-config.cc b/cmdline/apt-config.cc
index 47bedfe3f..79ae944df 100644
--- a/cmdline/apt-config.cc
+++ b/cmdline/apt-config.cc
@@ -72,7 +72,7 @@ bool DoDump(CommandLine &CmdL)
/* */
int ShowHelp()
{
- ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION,
+ ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
COMMON_ARCH,__DATE__,__TIME__);
if (_config->FindB("version") == true)
return 0;
diff --git a/cmdline/apt-dump-solver.cc b/cmdline/apt-dump-solver.cc
index e82e15c6e..aa16b1271 100644
--- a/cmdline/apt-dump-solver.cc
+++ b/cmdline/apt-dump-solver.cc
@@ -21,7 +21,7 @@
bool ShowHelp() {
std::cout <<
- PACKAGE " " VERSION " for " COMMON_ARCH " compiled on " __DATE__ " " __TIME__ << std::endl <<
+ PACKAGE " " PACKAGE_VERSION " for " COMMON_ARCH " compiled on " __DATE__ " " __TIME__ << std::endl <<
"Usage: apt-dump-resolver\n"
"\n"
"apt-dump-resolver is a dummy solver who just dumps its input to the\n"
diff --git a/cmdline/apt-extracttemplates.cc b/cmdline/apt-extracttemplates.cc
index dc4c110a1..60efafba5 100644
--- a/cmdline/apt-extracttemplates.cc
+++ b/cmdline/apt-extracttemplates.cc
@@ -224,7 +224,7 @@ bool DebFile::ParseInfo()
/* */
int ShowHelp(void)
{
- ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION,
+ ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
COMMON_ARCH,__DATE__,__TIME__);
if (_config->FindB("version") == true)
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index f4ad75d1c..dd9313bff 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -1415,7 +1415,7 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true,
"all files have been overwritten by other packages:",
"The following packages disappeared from your system as\n"
"all files have been overwritten by other packages:", disappearedPkgs.size()), disappear, "");
- c0out << _("Note: This is done automatic and on purpose by dpkg.") << std::endl;
+ c0out << _("Note: This is done automatically and on purpose by dpkg.") << std::endl;
return true;
}
@@ -1679,10 +1679,13 @@ bool DoUpdate(CommandLine &CmdL)
ListUpdate(Stat, *List);
// Rebuild the cache.
- pkgCacheFile::RemoveCaches();
- if (Cache.BuildCaches() == false)
- return false;
-
+ if (_config->FindB("pkgCacheFile::Generate", true) == true)
+ {
+ pkgCacheFile::RemoveCaches();
+ if (Cache.BuildCaches() == false)
+ return false;
+ }
+
return true;
}
/*}}}*/
@@ -1711,12 +1714,13 @@ bool DoAutomaticRemove(CacheFile &Cache)
bool smallList = (hideAutoRemove == false &&
strcasecmp(_config->Find("APT::Get::HideAutoRemove","").c_str(),"small") == 0);
- string autoremovelist, autoremoveversions;
unsigned long autoRemoveCount = 0;
APT::PackageSet tooMuch;
+ APT::PackageList autoRemoveList;
// look over the cache to see what can be removed
- for (pkgCache::PkgIterator Pkg = Cache->PkgBegin(); ! Pkg.end(); ++Pkg)
+ for (unsigned J = 0; J < Cache->Head().PackageCount; ++J)
{
+ pkgCache::PkgIterator Pkg(Cache,Cache.List[J]);
if (Cache[Pkg].Garbage)
{
if(Pkg.CurrentVer() != 0 || Cache[Pkg].Install())
@@ -1733,6 +1737,8 @@ bool DoAutomaticRemove(CacheFile &Cache)
}
else
{
+ if (hideAutoRemove == false && Cache[Pkg].Delete() == false)
+ autoRemoveList.insert(Pkg);
// if the package is a new install and already garbage we don't need to
// install it in the first place, so nuke it instead of show it
if (Cache[Pkg].Install() == true && Pkg.CurrentVer() == 0)
@@ -1742,16 +1748,8 @@ bool DoAutomaticRemove(CacheFile &Cache)
Cache->MarkDelete(Pkg, false);
}
// only show stuff in the list that is not yet marked for removal
- else if(hideAutoRemove == false && Cache[Pkg].Delete() == false)
- {
+ else if(hideAutoRemove == false && Cache[Pkg].Delete() == false)
++autoRemoveCount;
- // we don't need to fill the strings if we don't need them
- if (smallList == false)
- {
- autoremovelist += Pkg.FullName(true) + " ";
- autoremoveversions += string(Cache[Pkg].CandVersion) + "\n";
- }
- }
}
}
}
@@ -1786,14 +1784,7 @@ bool DoAutomaticRemove(CacheFile &Cache)
std::clog << "Save " << Pkg << " as another installed garbage package depends on it" << std::endl;
Cache->MarkInstall(Pkg, false);
if (hideAutoRemove == false)
- {
++autoRemoveCount;
- if (smallList == false)
- {
- autoremovelist += Pkg.FullName(true) + " ";
- autoremoveversions += string(Cache[Pkg].CandVersion) + "\n";
- }
- }
tooMuch.erase(Pkg);
Changed = true;
break;
@@ -1803,6 +1794,18 @@ bool DoAutomaticRemove(CacheFile &Cache)
} while (Changed == true);
}
+ std::string autoremovelist, autoremoveversions;
+ if (smallList == false && autoRemoveCount != 0)
+ {
+ for (APT::PackageList::const_iterator Pkg = autoRemoveList.begin(); Pkg != autoRemoveList.end(); ++Pkg)
+ {
+ if (Cache[Pkg].Garbage == false)
+ continue;
+ autoremovelist += Pkg.FullName(true) + " ";
+ autoremoveversions += string(Cache[Pkg].CandVersion) + "\n";
+ }
+ }
+
// Now see if we had destroyed anything (if we had done anything)
if (Cache->BrokenCount() != 0)
{
@@ -1826,7 +1829,7 @@ bool DoAutomaticRemove(CacheFile &Cache)
else
ioprintf(c1out, P_("%lu package was automatically installed and is no longer required.\n",
"%lu packages were automatically installed and are no longer required.\n", autoRemoveCount), autoRemoveCount);
- c1out << _("Use 'apt-get autoremove' to remove them.") << std::endl;
+ c1out << P_("Use 'apt-get autoremove' to remove it.", "Use 'apt-get autoremove' to remove them.", autoRemoveCount) << std::endl;
}
return true;
}
@@ -2864,7 +2867,7 @@ bool DoBuildDep(CommandLine &CmdL)
pkgCache::PkgIterator Pkg;
// Cross-Building?
- if (StripMultiArch == false)
+ if (StripMultiArch == false && D->Type != pkgSrcRecords::Parser::BuildDependIndep)
{
size_t const colon = D->Package.find(":");
if (colon != string::npos &&
@@ -3295,7 +3298,7 @@ bool DoMoo(CommandLine &CmdL)
/* */
bool ShowHelp(CommandLine &CmdL)
{
- ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION,
+ ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
COMMON_ARCH,__DATE__,__TIME__);
if (_config->FindB("version") == true)
diff --git a/cmdline/apt-internal-solver.cc b/cmdline/apt-internal-solver.cc
index 1b636e4d5..25ecb7af1 100644
--- a/cmdline/apt-internal-solver.cc
+++ b/cmdline/apt-internal-solver.cc
@@ -29,7 +29,7 @@
// ---------------------------------------------------------------------
/* */
bool ShowHelp(CommandLine &CmdL) {
- ioprintf(std::cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION,
+ ioprintf(std::cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
COMMON_ARCH,__DATE__,__TIME__);
std::cout <<
diff --git a/cmdline/apt-mark.cc b/cmdline/apt-mark.cc
index ef4331714..2d5eed29d 100644
--- a/cmdline/apt-mark.cc
+++ b/cmdline/apt-mark.cc
@@ -360,7 +360,7 @@ bool ShowHold(CommandLine &CmdL)
/* */
bool ShowHelp(CommandLine &CmdL)
{
- ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION,
+ ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
COMMON_ARCH,__DATE__,__TIME__);
cout <<
diff --git a/cmdline/apt-sortpkgs.cc b/cmdline/apt-sortpkgs.cc
index 20ae14f2a..46989044e 100644
--- a/cmdline/apt-sortpkgs.cc
+++ b/cmdline/apt-sortpkgs.cc
@@ -144,7 +144,7 @@ bool DoIt(string InFile)
/* */
int ShowHelp()
{
- ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION,
+ ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
COMMON_ARCH,__DATE__,__TIME__);
if (_config->FindB("version") == true)
return 0;
diff --git a/cmdline/makefile b/cmdline/makefile
index 07e9eb8ca..f3712232a 100644
--- a/cmdline/makefile
+++ b/cmdline/makefile
@@ -33,20 +33,6 @@ LIB_MAKES = apt-pkg/makefile
SOURCE = apt-cdrom.cc
include $(PROGRAM_H)
-# The apt-sortpkgs program
-PROGRAM=apt-sortpkgs
-SLIBS = -lapt-pkg $(INTLLIBS)
-LIB_MAKES = apt-pkg/makefile
-SOURCE = apt-sortpkgs.cc
-include $(PROGRAM_H)
-
-# The apt-extracttemplates program
-PROGRAM=apt-extracttemplates
-SLIBS = -lapt-pkg -lapt-inst $(INTLLIBS)
-LIB_MAKES = apt-pkg/makefile
-SOURCE = apt-extracttemplates.cc
-include $(PROGRAM_H)
-
# The apt-key program
SOURCE=apt-key
TO=$(BIN)
@@ -66,6 +52,25 @@ include $(PROGRAM_H)
#TARGET=program
#include $(COPY_H)
+#
+# the following programs are shipped in apt-utils
+#
+APT_DOMAIN:=apt-utils
+
+# The apt-sortpkgs program
+PROGRAM=apt-sortpkgs
+SLIBS = -lapt-pkg $(INTLLIBS)
+LIB_MAKES = apt-pkg/makefile
+SOURCE = apt-sortpkgs.cc
+include $(PROGRAM_H)
+
+# The apt-extracttemplates program
+PROGRAM=apt-extracttemplates
+SLIBS = -lapt-pkg -lapt-inst $(INTLLIBS)
+LIB_MAKES = apt-pkg/makefile
+SOURCE = apt-extracttemplates.cc
+include $(PROGRAM_H)
+
# The internal solver acting as an external
PROGRAM=apt-internal-solver
SLIBS = -lapt-pkg $(INTLLIBS)