summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2007-06-18 14:19:13 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2007-06-18 14:19:13 +0200
commitf2125ef16eeacb3c029db59ff2f677cfd9703392 (patch)
tree0bbdd58cb24e78366ab5c945541e6f35d7aa5e3a
parent3bb98bee11b38df0264099f3c9e858880759999d (diff)
parent3238423f4d0bebf02c02fa6e5ca5b6db4fca56c5 (diff)
* cmdline/apt-get.cc:
- merged http://people.ubuntu.com/~mvo/bzr/apt/xs-vcs-bzr/ this will warn when Vcs- headers are found on apt-get source (Fixes LP:#115959)
-rw-r--r--cmdline/apt-get.cc22
-rw-r--r--debian/changelog4
2 files changed, 26 insertions, 0 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 554677f39..51bcfde12 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -2114,6 +2114,28 @@ bool DoSource(CommandLine &CmdL)
if (Last == 0)
return _error->Error(_("Unable to find a source package for %s"),Src.c_str());
+ string srec = Last->AsStr();
+ string::size_type pos = srec.find("\nVcs-");
+ if (pos != string::npos )
+ {
+ pos += strlen("\nVcs-");
+ string vcs = srec.substr(pos,srec.find(":",pos)-pos);
+ pos += vcs.length()+2;
+ string::size_type epos = srec.find("\n", pos);
+ string uri = srec.substr(pos,epos-pos).c_str();
+ ioprintf(c1out, _("WARNING: '%s' is maintained in "
+ "the '%s' version control system at:\n"
+ "'%s'\n"),
+ Src.c_str(), vcs.c_str(), uri.c_str());
+ if(vcs == "Bzr")
+ ioprintf(c1out,_("Please use: 'bzr get %s'\n"
+ "to modify the package.\n"),
+ uri.c_str());
+ ioprintf(c1out, "Are you sure you want to continue [yN]? ");
+ if(!YnPrompt(false))
+ return _error->Error(_("Abort."));
+ }
+
// Back track
vector<pkgSrcRecords::File> Lst;
if (Last->Files(Lst) == false)
diff --git a/debian/changelog b/debian/changelog
index c86f8abbc..0482dff3c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,10 @@ apt (0.7.2ubuntu1) gutsy; urgency=low
* apt-pkg/deb/dpkgpm.cc:
- apport integration added, this means that a apport
report is written on dpkg failures
+ * cmdline/apt-get.cc:
+ - merged http://people.ubuntu.com/~mvo/bzr/apt/xs-vcs-bzr/
+ this will warn when Vcs- headers are found on apt-get source
+ (Fixes LP:#115959)
* merged from debian/unstable, remaining changes:
- maintainer field changed