summaryrefslogtreecommitdiff
path: root/cmdline/apt-get.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-05-04 19:44:37 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-05-04 19:44:37 +0200
commit827d04d3b2ed62d4e666698e639af6fbb3199581 (patch)
treeead71d386cbcf398ed2d7c73aa4aea9f0ca50823 /cmdline/apt-get.cc
parenta101a93299d4a2795edb8495c117eb5095a26e2b (diff)
rerun dpkg-source in source if --fix-broken is given (Closes: #576752)
Diffstat (limited to 'cmdline/apt-get.cc')
-rw-r--r--cmdline/apt-get.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index b43164c2f..6a3c91a59 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -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"),