summaryrefslogtreecommitdiff
path: root/cmdline/apt-get.cc
diff options
context:
space:
mode:
Diffstat (limited to 'cmdline/apt-get.cc')
-rw-r--r--cmdline/apt-get.cc29
1 files changed, 27 insertions, 2 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 028f371b5..adb1c9214 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -1301,7 +1301,6 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
while ((Parse = SrcRecs.Find(Src.c_str(), MatchSrcOnly)) != 0)
{
string Ver = Parse->Version();
-
// show name mismatches
if (IsMatch == true && Parse->Package() != Src)
ioprintf(c1out, _("No source package '%s' picking '%s' instead\n"), Parse->Package().c_str(), Src.c_str());
@@ -2104,6 +2103,33 @@ 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-");
+ while (pos != string::npos)
+ {
+ pos += strlen("\nVcs-");
+ string vcs = srec.substr(pos,srec.find(":",pos)-pos);
+ if(vcs == "Browser")
+ {
+ pos = srec.find("\nVcs-", pos);
+ continue;
+ }
+ pos += vcs.length()+2;
+ string::size_type epos = srec.find("\n", pos);
+ string uri = srec.substr(pos,epos-pos).c_str();
+ ioprintf(c1out, _("NOTICE: '%s' packaging 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:\n"
+ "bzr get %s\n"
+ "to retrieve the latest (possible unreleased) "
+ "updates to the package.\n"),
+ uri.c_str());
+ break;
+ }
+
// Back track
vector<pkgSrcRecords::File> Lst;
if (Last->Files(Lst) == false)
@@ -2751,7 +2777,6 @@ int main(int argc,const char *argv[])
{"remove",&DoInstall},
{"purge",&DoInstall},
{"autoremove",&DoInstall},
- {"purge",&DoInstall},
{"dist-upgrade",&DoDistUpgrade},
{"dselect-upgrade",&DoDSelectUpgrade},
{"build-dep",&DoBuildDep},