From 8a3a2e994e0e49fb5b610dba0f810b67f0ab229e Mon Sep 17 00:00:00 2001
From: Michael Vogt <michael.vogt@ubuntu.com>
Date: Wed, 14 Mar 2007 14:07:51 +0100
Subject: * apt-pkg/depcache.cc:   - always chmod extended_states to 0644

---
 cmdline/apt-mark | 1 +
 1 file changed, 1 insertion(+)

(limited to 'cmdline')

diff --git a/cmdline/apt-mark b/cmdline/apt-mark
index 533ed8715..728f083dc 100755
--- a/cmdline/apt-mark
+++ b/cmdline/apt-mark
@@ -61,3 +61,4 @@ if __name__ == "__main__":
                 outfile.write(str(tagfile.Section)+"\n")
         # all done, rename the tmpfile
         os.rename(outfile.name, STATE_FILE)
+        os.chmod(outfile.name, 0644)
-- 
cgit v1.2.3


From 54eda6ae969cd66d06fe82f7175f753a74d2b7dc Mon Sep 17 00:00:00 2001
From: Michael Vogt <egon@tas>
Date: Wed, 14 Mar 2007 17:11:31 +0100
Subject: cmdline/apt-mark: fix chmod()/rename() ordering

---
 cmdline/apt-mark | 1 +
 1 file changed, 1 insertion(+)

(limited to 'cmdline')

diff --git a/cmdline/apt-mark b/cmdline/apt-mark
index 533ed8715..dadc01366 100755
--- a/cmdline/apt-mark
+++ b/cmdline/apt-mark
@@ -60,4 +60,5 @@ if __name__ == "__main__":
             else:
                 outfile.write(str(tagfile.Section)+"\n")
         # all done, rename the tmpfile
+        os.chmod(outfile.name, 0644)
         os.rename(outfile.name, STATE_FILE)
-- 
cgit v1.2.3


From e47c7d16435822f40149cd831ff6ba0a143ded85 Mon Sep 17 00:00:00 2001
From: Michael Vogt <michael.vogt@ubuntu.com>
Date: Fri, 8 Jun 2007 22:21:42 +0200
Subject: * add "purge" commandline argument, closes: #133421)   (thanks to
 Julien Danjou for the patch)

---
 cmdline/apt-get.cc | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

(limited to 'cmdline')

diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 64882e3e8..c79c1559e 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -1428,7 +1428,11 @@ bool DoInstall(CommandLine &CmdL)
    bool DefRemove = false;
    if (strcasecmp(CmdL.FileList[0],"remove") == 0)
       DefRemove = true;
-
+   else if (strcasecmp(CmdL.FileList[0], "purge") == 0)
+   {
+      _config->Set("APT::Get::Purge", true);
+      DefRemove = true;
+   }
    for (const char **I = CmdL.FileList + 1; *I != 0; I++)
    {
       // Duplicate the string
@@ -2443,6 +2447,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"
+      "   purge - Remove and purge packages\n"
       "   source - Download source archives\n"
       "   build-dep - Configure build-dependencies for source packages\n"
       "   dist-upgrade - Distribution upgrade, see apt-get(8)\n"
-- 
cgit v1.2.3


From 152ab79e05f077440d76c1c423b013eaeb3fe2ff Mon Sep 17 00:00:00 2001
From: Michael Vogt <michael.vogt@ubuntu.com>
Date: Fri, 8 Jun 2007 23:04:36 +0200
Subject: * fix FTBFS with gcc 4.3, closes: #417090   (thanks to Martin
 Michlmayr for the patch)

---
 cmdline/apt-sortpkgs.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'cmdline')

diff --git a/cmdline/apt-sortpkgs.cc b/cmdline/apt-sortpkgs.cc
index e6a6b9a56..8909c3826 100644
--- a/cmdline/apt-sortpkgs.cc
+++ b/cmdline/apt-sortpkgs.cc
@@ -162,7 +162,7 @@ int ShowHelp()
 }
 									/*}}}*/
 
-int main(unsigned int argc,const char *argv[])
+int main(int argc,const char *argv[])
 {
    CommandLine::Args Args[] = {
       {'h',"help","help",0},
-- 
cgit v1.2.3


From 1979e742ad5e2a0b6e547fbe3f4c4066b5a9bd2e Mon Sep 17 00:00:00 2001
From: Michael Vogt <michael.vogt@ubuntu.com>
Date: Fri, 8 Jun 2007 23:06:54 +0200
Subject: * add --dsc-only option, thanks to K. Richard Pixley

---
 cmdline/apt-get.cc | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

(limited to 'cmdline')

diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index c79c1559e..6bbc40242 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -1954,6 +1954,11 @@ bool DoSource(CommandLine &CmdL)
 	     I->Type != "tar")
 	    continue;
 
+	 // Dsc only mode only fetches .dsc files
+	 if (_config->FindB("APT::Get::Dsc-Only",false) == true &&
+	     I->Type != "dsc")
+	    continue;
+
 	 // don't download the same uri twice (should this be moved to
 	 // the fetcher interface itself?)
 	 if(queued.find(Last->Index().ArchiveURI(I->Path)) != queued.end())
@@ -2536,7 +2541,8 @@ int main(int argc,const char *argv[])
       {0,"force-yes","APT::Get::force-yes",0},
       {0,"print-uris","APT::Get::Print-URIs",0},
       {0,"diff-only","APT::Get::Diff-Only",0},
-      {0,"tar-only","APT::Get::tar-Only",0},
+      {0,"tar-only","APT::Get::Tar-Only",0},
+      {0,"dsc-only","APT::Get::Dsc-Only",0},
       {0,"purge","APT::Get::Purge",0},
       {0,"list-cleanup","APT::Get::List-Cleanup",0},
       {0,"reinstall","APT::Get::ReInstall",0},
-- 
cgit v1.2.3


From 5a68ea79e4828bb5615b1d490fe811c18d04a8e1 Mon Sep 17 00:00:00 2001
From: Michael Vogt <michael.vogt@ubuntu.com>
Date: Sat, 9 Jun 2007 01:22:45 +0200
Subject: * cmdline/apt-get.cc:   - revert task-install feature   - show
 auto-removal information

---
 cmdline/apt-get.cc | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

(limited to 'cmdline')

diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index e4632cc6c..e9b619787 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -1596,6 +1596,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
@@ -1744,10 +1756,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 */
-- 
cgit v1.2.3