diff options
author | Michael Vogt <egon@bottom> | 2007-06-09 01:44:03 +0200 |
---|---|---|
committer | Michael Vogt <egon@bottom> | 2007-06-09 01:44:03 +0200 |
commit | f32484472374cb6c93fef0cd4ee9f71a7b80ec8a (patch) | |
tree | ce174fb35ed7266a2d123c7bf8883463ab04d603 /cmdline | |
parent | 256f68abcf71157df78ab1aee08e46ff1b4f2b66 (diff) | |
parent | fb2894d268d4821e0dd4f2b803ff2043b1ec3162 (diff) |
* merged from apt--mvo
Diffstat (limited to 'cmdline')
-rw-r--r-- | cmdline/apt-get.cc | 20 | ||||
-rwxr-xr-x | cmdline/apt-mark | 1 |
2 files changed, 16 insertions, 5 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 1dcbbfc5b..554677f39 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1535,7 +1535,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,BrokenFix,ExpectedInst); + res &= TryToInstall(Pkg,Cache,Fix,false,true,ExpectedInst); found = true; } @@ -1595,6 +1595,18 @@ bool DoInstall(CommandLine &CmdL) bool Remove = DefRemove; char *VerTag = 0; bool VerIsRel = false; + + // this is a task! + if (Length >= 1 && S[Length - 1] == '^') + { + S[--Length] = 0; + // tasks must always be confirmed + ExpectedInst += 1000; + // see if we can install it + TryInstallTask(Cache, Fix, BrokenFix, ExpectedInst, S); + continue; + } + while (Cache->FindPkg(S).end() == true) { // Handle an optional end tag indicating what to do @@ -1743,10 +1755,8 @@ bool DoInstall(CommandLine &CmdL) return _error->Error(_("Broken packages")); } } - if (_config->FindB("APT::Get::AutomaticRemove")) { - if (!DoAutomaticRemove(Cache)) - return false; - } + if (!DoAutomaticRemove(Cache)) + return false; /* Print out a list of packages that are going to be installed extra to what the user asked */ diff --git a/cmdline/apt-mark b/cmdline/apt-mark index dadc01366..fdc3e1856 100755 --- a/cmdline/apt-mark +++ b/cmdline/apt-mark @@ -62,3 +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) |