rerun dpkg-source in source if --fix-broken is given (Closes: #576752)
authorDavid Kalnischkies <kalnischkies@gmail.com>
Tue, 4 May 2010 17:44:37 +0000 (19:44 +0200)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Tue, 4 May 2010 17:44:37 +0000 (19:44 +0200)
cmdline/apt-get.cc
debian/changelog

index b43164c..6a3c91a 100644 (file)
@@ -2380,6 +2380,7 @@ bool DoSource(CommandLine &CmdL)
    
    if (Process == 0)
    {
+      bool const fixBroken = _config->FindB("APT::Get::Fix-Broken", false);
       for (unsigned I = 0; I != J; I++)
       {
         string Dir = Dsc[I].Package + '-' + Cache->VS().UpstreamVersion(Dsc[I].Version.c_str());
@@ -2392,7 +2393,7 @@ bool DoSource(CommandLine &CmdL)
 
         // See if the package is already unpacked
         struct stat Stat;
-        if (stat(Dir.c_str(),&Stat) == 0 &&
+        if (fixBroken == false && stat(Dir.c_str(),&Stat) == 0 &&
             S_ISDIR(Stat.st_mode) != 0)
         {
            ioprintf(c0out ,_("Skipping unpack of already unpacked source in %s\n"),
index 9875e0c..2a28ce3 100644 (file)
@@ -33,6 +33,7 @@ apt (0.7.26~exp4) UNRELEASED; urgency=low
     - regex for package names executed on Grp- not PkgIterator
     - show non-candidates as fallback for virtual packages (Closes: #578385)
     - set also "all" to this version for pseudo packages in TryToChangeVer
+    - rerun dpkg-source in source if --fix-broken is given (Closes: #576752)
   * apt-pkg/deb/dpkgpm.cc:
     - remove Chroot-Directory from files passed to install commands.
       Thanks to Kel Modderman for report & patch! (Closes: #577226)