summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-03-11 14:02:14 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2011-03-11 14:02:14 +0100
commitfee040cf50af1e9bb8e3c46e0d8738119d95f10e (patch)
tree50a1564bf228a291146dca642533c27fba8a142a
parent949a049861cd3da61b43b24fc24f157a920ea581 (diff)
parentd6cc7079e895e76ad9d086fcc6a40224dd41bb62 (diff)
merged from the mvo branch
-rw-r--r--debian/changelog9
-rw-r--r--methods/mirror.cc13
-rw-r--r--methods/rsh.cc3
3 files changed, 19 insertions, 6 deletions
diff --git a/debian/changelog b/debian/changelog
index 9747ddeb5..931fde577 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,16 @@
-apt (0.8.12ubuntu1) UNRELEASED; urgency=low
+apt (0.8.12ubuntu2) unstable; urgency=low
+ [ Thorsten Spindler ]
+ * methods/rsh.cc
+ - fix rsh/ssh option parsing (LP: #678080), thanks to
+ Ville Mattila
+
[ Michael Vogt ]
* apt-pkg/acquire-item.cc:
- mark pkgAcqIndexTrans as Index-File to avoid asking the
user to insert the CD on each apt-get update
+ * methods/mirror.cc:
+ - improve debug output and fix bug in TryNextMirror
-- Michael Vogt <michael.vogt@ubuntu.com> Thu, 10 Mar 2011 15:56:54 +0100
diff --git a/methods/mirror.cc b/methods/mirror.cc
index e8873d97b..d092cc657 100644
--- a/methods/mirror.cc
+++ b/methods/mirror.cc
@@ -125,20 +125,25 @@ bool MirrorMethod::Clean(string Dir)
bool MirrorMethod::DownloadMirrorFile(string mirror_uri_str)
{
- if(Debug)
- clog << "MirrorMethod::DownloadMirrorFile(): " << endl;
-
// not that great to use pkgAcquire here, but we do not have
// any other way right now
string fetch = BaseUri;
fetch.replace(0,strlen("mirror://"),"http://");
+ if(Debug)
+ clog << "MirrorMethod::DownloadMirrorFile(): '" << fetch << "'"
+ << " to " << MirrorFile << endl;
+
pkgAcquire Fetcher;
new pkgAcqFile(&Fetcher, fetch, "", 0, "", "", "", MirrorFile);
bool res = (Fetcher.Run() == pkgAcquire::Continue);
if(res)
DownloadedMirrorFile = true;
Fetcher.Shutdown();
+
+ if(Debug)
+ clog << "MirrorMethod::DownloadMirrorFile() success: " << res << endl;
+
return res;
}
@@ -176,7 +181,7 @@ bool MirrorMethod::TryNextMirror()
continue;
vector<string>::const_iterator nextmirror = mirror + 1;
- if (nextmirror != AllMirrors.end())
+ if (nextmirror == AllMirrors.end())
break;
Queue->Uri.replace(0, mirror->length(), *nextmirror);
if (Debug)
diff --git a/methods/rsh.cc b/methods/rsh.cc
index 97b4ef151..21f0d0a22 100644
--- a/methods/rsh.cc
+++ b/methods/rsh.cc
@@ -110,6 +110,8 @@ bool RSHConn::Connect(string Host, string User)
// Probably should do
// dup2(open("/dev/null",O_RDONLY),STDERR_FILENO);
+ Args[i++] = Prog;
+
// Insert user-supplied command line options
Configuration::Item const *Opts = RshOptions;
if (Opts != 0)
@@ -123,7 +125,6 @@ bool RSHConn::Connect(string Host, string User)
}
}
- Args[i++] = Prog;
if (User.empty() == false) {
Args[i++] = "-l";
Args[i++] = User.c_str();