diff options
Diffstat (limited to 'cmdline')
-rw-r--r-- | cmdline/apt-cache.cc | 4 | ||||
-rw-r--r-- | cmdline/apt-cdrom.cc | 4 | ||||
-rw-r--r-- | cmdline/apt-config.cc | 4 | ||||
-rw-r--r-- | cmdline/apt-extracttemplates.cc | 6 | ||||
-rw-r--r-- | cmdline/apt-get.cc | 25 | ||||
-rwxr-xr-x | cmdline/apt-key | 8 | ||||
-rwxr-xr-x | cmdline/apt-mark | 4 | ||||
-rw-r--r-- | cmdline/apt-sortpkgs.cc | 4 | ||||
-rw-r--r-- | cmdline/makefile | 2 |
9 files changed, 38 insertions, 23 deletions
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index cc4c1559e..c0655da40 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -1711,8 +1711,8 @@ bool GenCaches(CommandLine &Cmd) /* */ bool ShowHelp(CommandLine &Cmd) { - ioprintf(cout,_("%s %s for %s %s compiled on %s %s\n"),PACKAGE,VERSION, - COMMON_OS,COMMON_CPU,__DATE__,__TIME__); + ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION, + COMMON_ARCH,__DATE__,__TIME__); if (_config->FindB("version") == true) return true; diff --git a/cmdline/apt-cdrom.cc b/cmdline/apt-cdrom.cc index 7434a7225..379a433ea 100644 --- a/cmdline/apt-cdrom.cc +++ b/cmdline/apt-cdrom.cc @@ -135,8 +135,8 @@ bool DoIdent(CommandLine &) /* */ int ShowHelp() { - ioprintf(cout,_("%s %s for %s %s compiled on %s %s\n"),PACKAGE,VERSION, - COMMON_OS,COMMON_CPU,__DATE__,__TIME__); + ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),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 34365dc2e..63fa0867c 100644 --- a/cmdline/apt-config.cc +++ b/cmdline/apt-config.cc @@ -67,8 +67,8 @@ bool DoDump(CommandLine &CmdL) /* */ int ShowHelp() { - ioprintf(cout,_("%s %s for %s %s compiled on %s %s\n"),PACKAGE,VERSION, - COMMON_OS,COMMON_CPU,__DATE__,__TIME__); + ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION, + COMMON_ARCH,__DATE__,__TIME__); if (_config->FindB("version") == true) return 0; diff --git a/cmdline/apt-extracttemplates.cc b/cmdline/apt-extracttemplates.cc index c87b436ba..de22386b9 100644 --- a/cmdline/apt-extracttemplates.cc +++ b/cmdline/apt-extracttemplates.cc @@ -222,8 +222,8 @@ bool DebFile::ParseInfo() /* */ int ShowHelp(void) { - ioprintf(cout,_("%s %s for %s %s compiled on %s %s\n"),PACKAGE,VERSION, - COMMON_OS,COMMON_CPU,__DATE__,__TIME__); + ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION, + COMMON_ARCH,__DATE__,__TIME__); if (_config->FindB("version") == true) return 0; @@ -249,7 +249,7 @@ string WriteFile(const char *package, const char *prefix, const char *data) { char fn[512]; static int i; - char *tempdir = NULL; + const char *tempdir = NULL; tempdir = getenv("TMPDIR"); if (tempdir == NULL) diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 95600ff6d..efb618cb0 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -918,7 +918,7 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true, pkgAcquire::UriIterator I = Fetcher.UriBegin(); for (; I != Fetcher.UriEnd(); I++) cout << '\'' << I->URI << "' " << flNotDir(I->Owner->DestFile) << ' ' << - I->Owner->FileSize << ' ' << I->Owner->MD5Sum() << endl; + I->Owner->FileSize << ' ' << I->Owner->HashSum() << endl; return true; } @@ -1359,7 +1359,7 @@ bool DoUpdate(CommandLine &CmdL) pkgAcquire::UriIterator I = Fetcher.UriBegin(); for (; I != Fetcher.UriEnd(); I++) cout << '\'' << I->URI << "' " << flNotDir(I->Owner->DestFile) << ' ' << - I->Owner->FileSize << ' ' << I->Owner->MD5Sum() << endl; + I->Owner->FileSize << ' ' << I->Owner->HashSum() << endl; return true; } @@ -1507,7 +1507,8 @@ bool DoUpgrade(CommandLine &CmdL) bool TryInstallTask(pkgDepCache &Cache, pkgProblemResolver &Fix, bool BrokenFix, unsigned int& ExpectedInst, - const char *taskname) + const char *taskname, + bool Remove) { const char *start, *end; pkgCache::PkgIterator Pkg; @@ -1536,7 +1537,7 @@ bool TryInstallTask(pkgDepCache &Cache, pkgProblemResolver &Fix, buf[end-start] = 0x0; if (regexec(&Pattern,buf,0,0,0) != 0) continue; - res &= TryToInstall(Pkg,Cache,Fix,false,true,ExpectedInst); + res &= TryToInstall(Pkg,Cache,Fix,Remove,true,ExpectedInst); found = true; } @@ -1604,7 +1605,7 @@ bool DoInstall(CommandLine &CmdL) // tasks must always be confirmed ExpectedInst += 1000; // see if we can install it - TryInstallTask(Cache, Fix, BrokenFix, ExpectedInst, S); + TryInstallTask(Cache, Fix, BrokenFix, ExpectedInst, S, Remove); continue; } @@ -1707,7 +1708,8 @@ bool DoInstall(CommandLine &CmdL) // where foo is marked automatic if(!Remove && Cache[Pkg].Install() == false && - (Cache[Pkg].Flags & pkgCache::Flag::Auto)) + (Cache[Pkg].Flags & pkgCache::Flag::Auto) && + _config->FindB("APT::Get::ReInstall",false) == false) { ioprintf(c1out,_("%s set to manual installed.\n"), Pkg.Name()); @@ -2210,7 +2212,7 @@ bool DoSource(CommandLine &CmdL) pkgAcquire::UriIterator I = Fetcher.UriBegin(); for (; I != Fetcher.UriEnd(); I++) cout << '\'' << I->URI << "' " << flNotDir(I->Owner->DestFile) << ' ' << - I->Owner->FileSize << ' ' << I->Owner->MD5Sum() << endl; + I->Owner->FileSize << ' ' << I->Owner->HashSum() << endl; return true; } @@ -2470,6 +2472,7 @@ bool DoBuildDep(CommandLine &CmdL) break; } if (CV.end() == true) + { if (hasAlternatives) { continue; @@ -2482,6 +2485,7 @@ bool DoBuildDep(CommandLine &CmdL) Last->BuildDepType((*D).Type),Src.c_str(), (*D).Package.c_str()); } + } } else { @@ -2581,8 +2585,8 @@ bool DoMoo(CommandLine &CmdL) /* */ bool ShowHelp(CommandLine &CmdL) { - ioprintf(cout,_("%s %s for %s %s compiled on %s %s\n"),PACKAGE,VERSION, - COMMON_OS,COMMON_CPU,__DATE__,__TIME__); + ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION, + COMMON_ARCH,__DATE__,__TIME__); if (_config->FindB("version") == true) { @@ -2640,6 +2644,7 @@ bool ShowHelp(CommandLine &CmdL) " upgrade - Perform an upgrade\n" " install - Install new packages (pkg is libc6 not libc6.deb)\n" " remove - Remove packages\n" + " autoremove - Remove all automatic unused packages\n" " purge - Remove and purge packages\n" " source - Download source archives\n" " build-dep - Configure build-dependencies for source packages\n" @@ -2750,7 +2755,9 @@ int main(int argc,const char *argv[]) {"upgrade",&DoUpgrade}, {"install",&DoInstall}, {"remove",&DoInstall}, + {"purge",&DoInstall}, {"autoremove",&DoInstall}, + {"purge",&DoInstall}, {"dist-upgrade",&DoDistUpgrade}, {"dselect-upgrade",&DoDSelectUpgrade}, {"build-dep",&DoBuildDep}, diff --git a/cmdline/apt-key b/cmdline/apt-key index 90ecae2cf..3bd1a92d9 100755 --- a/cmdline/apt-key +++ b/cmdline/apt-key @@ -39,6 +39,8 @@ usage() { echo echo " apt-key add <file> - add the key contained in <file> ('-' for stdin)" echo " apt-key del <keyid> - remove the key <keyid>" + echo " apt-key export <keyid> - output the key <keyid>" + echo " apt-key exportall - output all trusted keys" echo " apt-key update - update keys using the keyring package" echo " apt-key list - list keys" echo @@ -75,6 +77,12 @@ case "$command" in finger*) $GPG --batch --fingerprint ;; + export) + $GPG --armor --export "$1" + ;; + exportall) + $GPG --armor --export + ;; adv*) echo "Executing: $GPG $*" $GPG $* diff --git a/cmdline/apt-mark b/cmdline/apt-mark index fdc3e1856..f6e749eb5 100755 --- a/cmdline/apt-mark +++ b/cmdline/apt-mark @@ -40,7 +40,7 @@ if __name__ == "__main__": if not options.filename: STATE_FILE = apt_pkg.Config.FindDir("Dir::State") + "extended_states" else: - STATE_FILE=options.state_file + STATE_FILE=options.filename # open the statefile if os.path.exists(STATE_FILE): @@ -62,4 +62,4 @@ if __name__ == "__main__": # all done, rename the tmpfile os.chmod(outfile.name, 0644) os.rename(outfile.name, STATE_FILE) - os.chmod(outfile.name, 0644) + os.chmod(STATE_FILE, 0644) diff --git a/cmdline/apt-sortpkgs.cc b/cmdline/apt-sortpkgs.cc index 8909c3826..7b2a74aed 100644 --- a/cmdline/apt-sortpkgs.cc +++ b/cmdline/apt-sortpkgs.cc @@ -141,8 +141,8 @@ bool DoIt(string InFile) /* */ int ShowHelp() { - ioprintf(cout,_("%s %s for %s %s compiled on %s %s\n"),PACKAGE,VERSION, - COMMON_OS,COMMON_CPU,__DATE__,__TIME__); + ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION, + COMMON_ARCH,__DATE__,__TIME__); if (_config->FindB("version") == true) return 0; diff --git a/cmdline/makefile b/cmdline/makefile index 49035be44..5820c2e0f 100644 --- a/cmdline/makefile +++ b/cmdline/makefile @@ -14,7 +14,7 @@ include $(PROGRAM_H) # The apt-get program PROGRAM=apt-get -SLIBS = -lapt-pkg +SLIBS = -lapt-pkg -lutil LIB_MAKES = apt-pkg/makefile SOURCE = apt-get.cc acqprogress.cc include $(PROGRAM_H) |