]> git.saurik.com Git - apt.git/commitdiff
merged from lp:~mvo/apt/mvo
authorMichael Vogt <michael.vogt@ubuntu.com>
Tue, 28 Jun 2011 14:51:33 +0000 (15:51 +0100)
committerMichael Vogt <michael.vogt@ubuntu.com>
Tue, 28 Jun 2011 14:51:33 +0000 (15:51 +0100)
1  2 
apt-pkg/deb/deblistparser.cc
apt-pkg/deb/dpkgpm.cc
debian/changelog

index 4a9e94c855a2d8a24303f50e0f4005eabc2e1eb7,ff6de2d9f44d173deb0de11e28227ece6de1865e..9ae1065a4047f72bb57b213b833a7b482b6e9b94
@@@ -201,7 -201,7 +201,7 @@@ string debListParser::DescriptionLangua
     if (Section.FindS("Description").empty() == false)
        return "";
  
-    std::vector<string> const lang = APT::Configuration::getLanguages();
+    std::vector<string> const lang = APT::Configuration::getLanguages(true);
     for (std::vector<string>::const_iterator l = lang.begin();
        l != lang.end(); l++)
        if (Section.FindS(string("Description-").append(*l).c_str()).empty() == false)
@@@ -284,18 -284,18 +284,18 @@@ unsigned short debListParser::VersionHa
        /* Strip out any spaces from the text, this undoes dpkgs reformatting
           of certain fields. dpkg also has the rather interesting notion of
           reformatting depends operators < -> <= */
 -      char *I = S;
 +      char *J = S;
        for (; Start != End; Start++)
        {
         if (isspace(*Start) == 0)
 -          *I++ = tolower_ascii(*Start);
 +          *J++ = tolower_ascii(*Start);
         if (*Start == '<' && Start[1] != '<' && Start[1] != '=')
 -          *I++ = '=';
 +          *J++ = '=';
         if (*Start == '>' && Start[1] != '>' && Start[1] != '=')
 -          *I++ = '=';
 +          *J++ = '=';
        }
  
 -      Result = AddCRC16(Result,S,I - S);
 +      Result = AddCRC16(Result,S,J - S);
     }
     
     return Result;
diff --combined apt-pkg/deb/dpkgpm.cc
index 5ddcd47e99d908f0a8374e17f6e49124d9fecba6,ca544e778f7e5fbedbdc8a5cef6c04cab1771e28..5fbd1801a4de8b34ef0a7b3483694437dbca67f1
@@@ -14,8 -14,8 +14,8 @@@
  #include <apt-pkg/depcache.h>
  #include <apt-pkg/pkgrecords.h>
  #include <apt-pkg/strutl.h>
 -#include <apti18n.h>
  #include <apt-pkg/fileutl.h>
 +#include <apt-pkg/cachefile.h>
  
  #include <unistd.h>
  #include <stdlib.h>
@@@ -32,6 -32,8 +32,8 @@@
  #include <algorithm>
  #include <sstream>
  #include <map>
+ #include <pwd.h>
+ #include <grp.h>
  
  #include <termios.h>
  #include <unistd.h>
@@@ -667,7 -669,13 +669,13 @@@ bool pkgDPkgPM::OpenLog(
         return _error->WarningE("OpenLog", _("Could not open file '%s'"), logfile_name.c_str());
        setvbuf(term_out, NULL, _IONBF, 0);
        SetCloseExec(fileno(term_out), true);
-       chmod(logfile_name.c_str(), 0600);
+       struct passwd *pw;
+       struct group *gr;
+       pw = getpwnam("root");
+       gr = getgrnam("adm");
+       if (pw != NULL && gr != NULL)
+         chown(logfile_name.c_str(), pw->pw_uid, gr->gr_gid);
+       chmod(logfile_name.c_str(), 0644);
        fprintf(term_out, "\nLog started: %s\n", timestr);
     }
  
         return _error->WarningE("OpenLog", _("Could not open file '%s'"), history_name.c_str());
        chmod(history_name.c_str(), 0644);
        fprintf(history_out, "\nStart-Date: %s\n", timestr);
 -      string remove, purge, install, upgrade, downgrade;
 +      string remove, purge, install, reinstall, upgrade, downgrade;
        for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++)
        {
 -       if (Cache[I].NewInstall())
 -       {
 -          install += I.FullName(false) + string(" (") + Cache[I].CandVersion;
 -          if (Cache[I].Flags & pkgCache::Flag::Auto)
 -             install+= ", automatic";
 -          install += string("), ");
 -       }
 -       else if (Cache[I].Upgrade())
 -          upgrade += I.FullName(false) + string(" (") + Cache[I].CurVersion + string(", ") + Cache[I].CandVersion + string("), ");
 -       else if (Cache[I].Downgrade())
 -          downgrade += I.FullName(false) + string(" (") + Cache[I].CurVersion + string(", ") + Cache[I].CandVersion + string("), ");
 -       else if (Cache[I].Delete())
 -       {
 -          if ((Cache[I].iFlags & pkgDepCache::Purge) == pkgDepCache::Purge)
 -             purge += I.FullName(false) + string(" (") + Cache[I].CurVersion + string("), ");     
 -          else
 -             remove += I.FullName(false) + string(" (") + Cache[I].CurVersion + string("), ");            
 +       enum { CANDIDATE, CANDIDATE_AUTO, CURRENT_CANDIDATE, CURRENT } infostring;
 +       string *line = NULL;
 +       #define HISTORYINFO(X, Y) { line = &X; infostring = Y; }
 +       if (Cache[I].NewInstall() == true)
 +          HISTORYINFO(install, CANDIDATE_AUTO)
 +       else if (Cache[I].ReInstall() == true)
 +          HISTORYINFO(reinstall, CANDIDATE)
 +       else if (Cache[I].Upgrade() == true)
 +          HISTORYINFO(upgrade, CURRENT_CANDIDATE)
 +       else if (Cache[I].Downgrade() == true)
 +          HISTORYINFO(downgrade, CURRENT_CANDIDATE)
 +       else if (Cache[I].Delete() == true)
 +          HISTORYINFO((Cache[I].Purge() ? purge : remove), CURRENT)
 +       else
 +          continue;
 +       #undef HISTORYINFO
 +       line->append(I.FullName(false)).append(" (");
 +       switch (infostring) {
 +       case CANDIDATE: line->append(Cache[I].CandVersion); break;
 +       case CANDIDATE_AUTO:
 +          line->append(Cache[I].CandVersion);
 +          if ((Cache[I].Flags & pkgCache::Flag::Auto) == pkgCache::Flag::Auto)
 +             line->append(", automatic");
 +          break;
 +       case CURRENT_CANDIDATE: line->append(Cache[I].CurVersion).append(", ").append(Cache[I].CandVersion); break;
 +       case CURRENT: line->append(Cache[I].CurVersion); break;
         }
 +       line->append("), ");
        }
        if (_config->Exists("Commandline::AsString") == true)
         WriteHistoryTag("Commandline", _config->Find("Commandline::AsString"));
        WriteHistoryTag("Install", install);
 +      WriteHistoryTag("Reinstall", reinstall);
        WriteHistoryTag("Upgrade", upgrade);
        WriteHistoryTag("Downgrade",downgrade);
        WriteHistoryTag("Remove",remove);
@@@ -1280,23 -1277,6 +1288,23 @@@ bool pkgDPkgPM::Go(int OutStatusFd
     if (RunScripts("DPkg::Post-Invoke") == false)
        return false;
  
 +   if (_config->FindB("Debug::pkgDPkgPM",false) == false)
 +   {
 +      std::string const oldpkgcache = _config->FindFile("Dir::cache::pkgcache");
 +      if (oldpkgcache.empty() == false && RealFileExists(oldpkgcache) == true &&
 +        unlink(oldpkgcache.c_str()) == 0)
 +      {
 +       std::string const srcpkgcache = _config->FindFile("Dir::cache::srcpkgcache");
 +       if (srcpkgcache.empty() == false && RealFileExists(srcpkgcache) == true)
 +       {
 +          _error->PushToStack();
 +          pkgCacheFile CacheFile;
 +          CacheFile.BuildCaches(NULL, true);
 +          _error->RevertToStack();
 +       }
 +      }
 +   }
 +
     Cache.writeStateFile(NULL);
     return true;
  }
diff --combined debian/changelog
index c8a4f44770788a8b65fe773a92cce76bcf0aefdc,16c0990d9d81825e35e11463d1fa226822c3cca4..6ba17d067b6bfe03c5044e60e808dc67e0befd26
@@@ -1,4 -1,4 +1,4 @@@
 -apt (0.8.15) UNRELEASED; urgency=low
 +apt (0.8.14.2) UNRELEASED; urgency=low
  
    [ Julian Andres Klode ]
    * apt-pkg/depcache.cc:
@@@ -17,8 -17,6 +17,8 @@@
    [ Christian Perrier ]
    * Galician translation update (Miguel Anxo Bouzada). Closes: #626505
    * Italian translation update (Milo Casagrande). Closes: #627834
 +  * German documentation translation update (Chris Leick). Closes: #629949
 +  * Catalan translation update (Jordi Mallach). Closes: #630657
  
    [ David Kalnischkies ]
    * fix a bunch of cppcheck warnings/errors based on a patch by
@@@ -35,8 -33,6 +35,8 @@@
      - let VisitRProvides report if the calls were successful
    * apt-pkg/deb/dpkgpm.cc:
      - replace obsolete usleep with nanosleep
 +    - remove invalid pkgcache.bin and rebuild it if possible
 +    - log reinstall commands in history.log
    * debian/apt{,-utils}.symbols:
      - update both experimental symbol-files to reflect 0.8.14 state
    * debian/rules:
    * apt-pkg/packagemanager.cc:
      - ensure for Multi-Arch:same packages that they are unpacked in
        lock step even in immediate configuration (Closes: #618288)
 -  
 +  * apt-pkg/init.cc:
 +    - don't set deprecated APT::Acquire::Translation, thanks Jörg Sommer!
 +  * cmdline/apt-config.cc:
 +    - show Acquire::Languages and APT::Architectures settings
 +      in 'dump' (Closes: 626739)
 +  * apt-pkg/orderlist.cc:
 +    - ensure that an old version of a package with a provides can
 +      never satisfy a dependency of a newer version of this package
 +
+   [ Michael Vogt ]
+   * methods/mirror.cc:
+     - ignore lines starting with "#" in the mirror file
+     - ignore non http urls in the mirrors
+     - append the dist (e.g. sid, wheezy) as a query string when
+       asking for a suitable mirror 
+   * apt-pkg/deb/deblistparser.cc:
+     - include all known languages when building the apt cache
+       (LP: #794907)
+   * apt-pkg/deb/debindexfile.cc:
+     - remove some no longer valid checks for "TranslationsAvailable()"
+   [ Kenneth Solbø Andersen ]
+   * apt-pkg/deb/dpkgpm.cc:
+     - set permissions of term.log to root.adm and 644 (LP: #404724)
 - -- Michael Vogt <mvo@debian.org>  Mon, 16 May 2011 14:57:52 +0200
 + -- David Kalnischkies <kalnischkies@gmail.com>  Sat, 28 May 2011 10:54:23 +0200
  
  apt (0.8.14.1) unstable; urgency=low