]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt-get.cc
merged from lp:~donkult/apt/sid
[apt.git] / cmdline / apt-get.cc
index 9894747f4210bd1e55c6b6af9bd2d952827b174f..0ada46c73b598c128e29a54c14454e95f45b74ee 100644 (file)
@@ -91,14 +91,14 @@ class CacheFile : public pkgCacheFile
    bool BuildCaches(bool WithLock = true)
    {
       OpTextProgress Prog(*_config);
-      if (pkgCacheFile::BuildCaches(Prog,WithLock) == false)
+      if (pkgCacheFile::BuildCaches(&Prog,WithLock) == false)
         return false;
       return true;
    }
    bool Open(bool WithLock = true) 
    {
       OpTextProgress Prog(*_config);
-      if (pkgCacheFile::Open(Prog,WithLock) == false)
+      if (pkgCacheFile::Open(&Prog,WithLock) == false)
         return false;
       Sort();
       
@@ -838,9 +838,9 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true,
       return false;
 
    // Display statistics
-   double FetchBytes = Fetcher.FetchNeeded();
-   double FetchPBytes = Fetcher.PartialPresent();
-   double DebBytes = Fetcher.TotalNeeded();
+   unsigned long long FetchBytes = Fetcher.FetchNeeded();
+   unsigned long long FetchPBytes = Fetcher.PartialPresent();
+   unsigned long long DebBytes = Fetcher.TotalNeeded();
    if (DebBytes != Cache->DebSize())
    {
       c0out << DebBytes << ',' << Cache->DebSize() << endl;
@@ -2280,6 +2280,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 (possibly unreleased) "
+                            "updates to the package.\n"),
+                    uri.c_str());
+        break;
+      }
+
       // Back track
       vector<pkgSrcRecords::File> Lst;
       if (Last->Files(Lst) == false)
@@ -2336,9 +2363,9 @@ bool DoSource(CommandLine &CmdL)
    }
    
    // Display statistics
-   double FetchBytes = Fetcher.FetchNeeded();
-   double FetchPBytes = Fetcher.PartialPresent();
-   double DebBytes = Fetcher.TotalNeeded();
+   unsigned long long FetchBytes = Fetcher.FetchNeeded();
+   unsigned long long FetchPBytes = Fetcher.PartialPresent();
+   unsigned long long DebBytes = Fetcher.TotalNeeded();
 
    // Check for enough free space
    struct statvfs Buf;
@@ -2942,7 +2969,6 @@ int main(int argc,const char *argv[])                                     /*{{{*/
                                    {"remove",&DoInstall},
                                    {"purge",&DoInstall},
                                   {"autoremove",&DoInstall},
-                                  {"purge",&DoInstall},
                                   {"markauto",&DoMarkAuto},
                                   {"unmarkauto",&DoMarkAuto},
                                    {"dist-upgrade",&DoDistUpgrade},