]> git.saurik.com Git - apt.git/commitdiff
[ABI break] Allow pinning by codename (closes: #97564)
authorMichael Vogt <michael.vogt@ubuntu.com>
Mon, 29 Jun 2009 14:44:46 +0000 (16:44 +0200)
committerMichael Vogt <michael.vogt@ubuntu.com>
Mon, 29 Jun 2009 14:44:46 +0000 (16:44 +0200)
1  2 
apt-pkg/deb/deblistparser.cc
apt-pkg/pkgcache.cc
apt-pkg/pkgcache.h
debian/changelog

index 74fa6fab452fcb0c9a5cbeec5e7ee508fead5af7,d8be66cba8c822aa8285eaff83528e59d3e35302..b2b8b8fb664faf3847fe4cf8caafd68b18ff9f4a
@@@ -109,8 -109,6 +109,8 @@@ bool debListParser::NewVersion(pkgCache
        return false;
     if (ParseDepends(Ver,"Replaces",pkgCache::Dep::Replaces) == false)
        return false;
 +   if (ParseDepends(Ver,"Enhances",pkgCache::Dep::Enhances) == false)
 +      return false;
  
     // Obsolete.
     if (ParseDepends(Ver,"Optional",pkgCache::Dep::Suggests) == false)
@@@ -639,6 -637,8 +639,8 @@@ bool debListParser::LoadReleaseInfo(pkg
        FileI->Version = WriteUniqString(Start,Stop - Start);
     if (Section.Find("Origin",Start,Stop) == true)
        FileI->Origin = WriteUniqString(Start,Stop - Start);
+    if (Section.Find("Codename",Start,Stop) == true)
+       FileI->Codename = WriteUniqString(Start,Stop - Start);
     if (Section.Find("Label",Start,Stop) == true)
        FileI->Label = WriteUniqString(Start,Stop - Start);
     if (Section.Find("Architecture",Start,Stop) == true)
diff --combined apt-pkg/pkgcache.cc
index 7a0d7376d9191ecb83308af2b31d45904498aca6,f5303682c974c8406ae22a749c0f47a5edbf6934..81a254483bb486243df7016f92ad8be5a71baae0
@@@ -49,7 -49,7 +49,7 @@@ pkgCache::Header::Header(
     
     /* Whenever the structures change the major version should be bumped,
        whenever the generator changes the minor version should be bumped. */
 -   MajorVersion = 7;
 +   MajorVersion = 8;
     MinorVersion = 0;
     Dirty = false;
     
@@@ -223,7 -223,7 +223,7 @@@ const char *pkgCache::DepType(unsigned 
  {
     const char *Types[] = {"",_("Depends"),_("PreDepends"),_("Suggests"),
                            _("Recommends"),_("Conflicts"),_("Replaces"),
 -                          _("Obsoletes"),_("Breaks")};
 +                          _("Obsoletes"),_("Breaks"), _("Enhances")};
     if (Type < sizeof(Types)/sizeof(*Types))
        return Types[Type];
     return "";
@@@ -607,6 -607,8 +607,8 @@@ string pkgCache::PkgFileIterator::RelSt
        Res = Res + (Res.empty() == true?"o=":",o=")  + Origin();
     if (Archive() != 0)
        Res = Res + (Res.empty() == true?"a=":",a=")  + Archive();
+    if (Codename() != 0)
+       Res = Res + (Res.empty() == true?"n=":",n=")  + Codename();
     if (Label() != 0)
        Res = Res + (Res.empty() == true?"l=":",l=")  + Label();
     if (Component() != 0)
diff --combined apt-pkg/pkgcache.h
index f2c032eb44ee44ad19d0c4307754920730d88aa7,af63443a6e3f098ee66b554bdf7b4123b8863312..e58515fb10ab5ec3b92906bf63f6d7d8ccdd0569
@@@ -70,7 -70,7 +70,7 @@@ class pkgCach
     struct Dep
     {
        enum DepType {Depends=1,PreDepends=2,Suggests=3,Recommends=4,
 -       Conflicts=5,Replaces=6,Obsoletes=7,DpkgBreaks=8};
 +       Conflicts=5,Replaces=6,Obsoletes=7,DpkgBreaks=8,Enhances=9};
        enum DepCompareOp {Or=0x10,NoOp=0,LessEq=0x1,GreaterEq=0x2,Less=0x3,
         Greater=0x4,Equals=0x5,NotEquals=0x6};
     };
@@@ -223,6 -223,7 +223,7 @@@ struct pkgCache::PackageFil
     // Names
     map_ptrloc FileName;        // Stringtable
     map_ptrloc Archive;         // Stringtable
+    map_ptrloc Codename;        // Stringtable
     map_ptrloc Component;       // Stringtable
     map_ptrloc Version;         // Stringtable
     map_ptrloc Origin;          // Stringtable
diff --combined debian/changelog
index ecba3f215885f23d8f79bfaa854c622d8d55969b,23416bd70edf0bab4afcc5c520fa0c0648dcdf9a..28bc54108113b88b7f569e4780341e6b615633d5
@@@ -1,30 -1,11 +1,31 @@@
  apt (0.7.22) UNRELEASED; urgency=low
  
 +  [ Christian Perrier ]
    * Documentation translations:
 -    - Fix a typo in apt-get(8 French translation. Closes: #525043
 +    - Fix a typo in apt-get(8) French translation. Closes: #525043
        Thanks to Guillaume Delacour for spotting it.
    * Translations:
      - fr.po
      - sk.po. Closes: #525857 
 +    - ru.po. Closes: #526816
 +    - eu.po. Closes: #528985
 +    - zh_CN.po. Closes: #531390
 +    - fr.po
 +    - it.po. Closes: #531758
 +    - ca.po. Closes: #531921
 +  * Added translations
 +    - ast.po (Asturian by Marcos Alvareez Costales).
 +      Closes: #529007, #529730
 +  
 +  [ David Kalnischkies ]
 +  * [ABI break] support '#' in apt.conf and /etc/apt/preferences
 +    (closes: #189866)
++  * [ABI break] Allow pinning by codename (closes: #97564)
 +
 +  [ Julian Andres Klode ]
 +  * apt-pkg/contrib/configuration.cc: Fix a small memory leak in
 +    ReadConfigFile.
 +  * Introduce support for the Enhances field. (Closes: #137583) 
  
   -- Christian Perrier <bubulle@debian.org>  Wed, 22 Apr 2009 10:13:54 +0200