]> git.saurik.com Git - apt.git/commitdiff
* merged with apt--mvo--0 and apt--ddtp--0
authorMichael Vogt <mvo@debian.org>
Sun, 23 Oct 2005 10:08:41 +0000 (10:08 +0000)
committerMichael Vogt <mvo@debian.org>
Sun, 23 Oct 2005 10:08:41 +0000 (10:08 +0000)
Patches applied:

 * michael.vogt@ubuntu.com--2005/apt--ddtp--0--patch-19
   * ABI/API change: add "VerIterator::TranslatedDescription()" method to make the life of the api user easier

 * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-78
   * fix a incorrect example

 * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-79
   * revert patch from patch-59, causes all sorts of trouble

 * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-80
   * fix changelog

 * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-81
   * be extra carefull in cmdline/apt-get.cc:FindSrc() and check VF.File() for NULL

apt-pkg/cacheiterators.h
apt-pkg/pkgcache.cc
apt-pkg/pkgrecords.cc
apt-pkg/pkgrecords.h
cmdline/apt-cache.cc
cmdline/apt-get.cc
configure.in
debian/changelog
doc/apt_preferences.5.xml

index f0aafb52df1b7092b36a8544a166958c058c19be..64fa4636ea27fedf612e5f1acba3f1a1eb1d43c8 100644 (file)
@@ -129,6 +129,7 @@ class pkgCache::VerIterator
    inline const char *Arch() const {return Ver->Arch == 0?0:Owner->StrP + Ver->Arch;};
    inline PkgIterator ParentPkg() const {return PkgIterator(*Owner,Owner->PkgP + Ver->ParentPkg);};
    inline DescIterator DescriptionList() const;
+   DescIterator TranslatedDescription() const;
    inline DepIterator DependsList() const;
    inline PrvIterator ProvidesList() const;
    inline VerFileIterator FileList() const;
index f76afb9357acc94e034f5002f539473b0084fcad..4452079a2ee62cd4f067180010bee3a7a8287f4e 100644 (file)
@@ -26,6 +26,7 @@
 #endif 
 
 #include <apt-pkg/pkgcache.h>
+#include <apt-pkg/indexfile.h>
 #include <apt-pkg/version.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/strutl.h>
@@ -43,6 +44,7 @@
 
 using std::string;
 
+
 // Cache::Header::Header - Constructor                                 /*{{{*/
 // ---------------------------------------------------------------------
 /* Simply initialize the header */
@@ -608,3 +610,20 @@ string pkgCache::PkgFileIterator::RelStr()
    return Res;
 }
                                                                        /*}}}*/
+// VerIterator::TranslatedDescription - Return the a DescIter for locale/*{{{*/
+// ---------------------------------------------------------------------
+/* return a DescIter for the current locale or the default if none is 
+ * found
+ */
+pkgCache::DescIterator pkgCache::VerIterator::TranslatedDescription() const
+{
+   pkgCache::DescIterator DescDefault = DescriptionList();
+   pkgCache::DescIterator Desc = DescDefault;
+   for (; Desc.end() == false; Desc++)
+      if (pkgIndexFile::LanguageCode() == Desc.LanguageCode())
+        break;
+   if (Desc.end() == true) Desc = DescDefault;
+   return Desc;
+};
+
+                                                                       /*}}}*/
index f62f945b5b03cb8c14e9072bb6901498ca37ef91..b22f3e73fc80ccf6ffe2943529f17aaa30561102 100644 (file)
@@ -42,9 +42,6 @@ pkgRecords::pkgRecords(pkgCache &Cache) : Cache(Cache), Files(0)
       if (Files[I->ID] == 0)
         return;
    }   
-   // We store that to make sure that the destructor won't segfault,
-   // even if the Cache object was destructed before this instance.
-   PackageFileCount = Cache.HeaderP->PackageFileCount;
 }
                                                                        /*}}}*/
 // Records::~pkgRecords - Destructor                                   /*{{{*/
@@ -52,7 +49,7 @@ pkgRecords::pkgRecords(pkgCache &Cache) : Cache(Cache), Files(0)
 /* */
 pkgRecords::~pkgRecords()
 {
-   for (unsigned I = 0; I != PackageFileCount; I++)
+   for (unsigned I = 0; I != Cache.HeaderP->PackageFileCount; I++)
       delete Files[I];
    delete [] Files;
 }
index ece91680e518e3daf3b86cd912ded17c35bc7128..31c444dbf9c82becf1cdde4fbf94be5eea74d890 100644 (file)
@@ -33,7 +33,6 @@ class pkgRecords
    
    pkgCache &Cache;
    Parser **Files;
-   int PackageFileCount;
       
    public:
 
index 810dbe7b021d8d07747a739372c74442ba226ce7..cb1aeb514f4184ffb55479765bc89e62da27c8c9 100644 (file)
@@ -1237,13 +1237,7 @@ bool DisplayRecord(pkgCache::VerIterator V)
 
    // Show the right description
    pkgRecords Recs(*GCache);
-   pkgCache::DescIterator DescDefault = V.DescriptionList();
-   pkgCache::DescIterator Desc = DescDefault;
-   for (; Desc.end() == false; Desc++)
-      if (pkgIndexFile::LanguageCode() == Desc.LanguageCode())
-        break;
-   if (Desc.end() == true) Desc = DescDefault;
-
+   pkgCache::DescIterator Desc = V.TranslatedDescription();
    pkgRecords::Parser &P = Recs.Lookup(Desc.FileList());
    cout << "Description" << ( (strcmp(Desc.LanguageCode(),"") != 0) ? "-" : "" ) << Desc.LanguageCode() << ": " << P.LongDesc();
 
index 3475d79aed757f9f1dfd71e5ff344c982c22e46d..040f670b1f051aff0953fec6fb3be40571fafc4c 100644 (file)
@@ -1200,7 +1200,7 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
       VerTag = string(TmpSrc.begin() + Slash + 1,TmpSrc.end());
       TmpSrc = string(TmpSrc.begin(),TmpSrc.begin() + Slash);
    } 
-   else  if(DefRel.empty() == false) 
+   else  if(DefRel.empty() == false)
    {
       // we have a default release, try to locate the pkg. we do it like
       // this because GetCandidateVer() will not "downgrade", that means
@@ -1211,6 +1211,10 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
         for (pkgCache::VerFileIterator VF = Ver.FileList(); VF.end() == false;
              VF++)
         {
+           // extra paranioa
+           if(VF.File() == NULL)
+              continue;
+
            /* If this is the status file, and the current version is not the
               version in the status file (ie it is not installed, or somesuch)
               then it is not a candidate for installation, ever. This weeds
index 084c9edd0d75718258fed548b74babdfe9f0305e..758727f2f21a0a342f0d896ff26db8c7a443afcc 100644 (file)
@@ -18,7 +18,7 @@ AC_CONFIG_AUX_DIR(buildlib)
 AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in)
 
 dnl -- SET THIS TO THE RELEASE VERSION --
-AC_DEFINE_UNQUOTED(VERSION,"0.6.42.0exp1")
+AC_DEFINE_UNQUOTED(VERSION,"0.6.42.1")
 PACKAGE="apt"
 AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
 AC_SUBST(PACKAGE)
index 2b100e0403b10992c621e1bbfcd755911aeadef8..b854d174198dd8e0846069c9c72cc5d6f081fa7f 100644 (file)
@@ -1,4 +1,4 @@
-apt (0.6.42.0exp1) experimental; urgency=low
+apt (0.6.42.1exp1) experimental; urgency=low
 
   * added support for package index diffs 
   * added support for i18n of the package descriptions
@@ -8,6 +8,18 @@ apt (0.6.42.0exp1) experimental; urgency=low
 
  -- Michael Vogt <mvo@debian.org>  Wed, 19 Oct 2005 22:12:13 +0200
 
+apt (0.6.42.1) unstable; urgency=low
+
+  * fix a incorrect example in the apt_prefrences man page
+    (thanks to Filipus Klutiero, closes: #282918)
+  * apt-pkg/pkgrecords.cc:
+    - revert patch from last version, it causes trouble on alpha 
+      and ia64 (closes: #335102, #335103)
+  * cmdline/apt-get.cc:
+    - be extra carefull in FindSrc (closes: #335213)
+
+ -- Michael Vogt <mvo@debian.org>  Sat, 22 Oct 2005 23:44:35 +0200
+
 apt (0.6.42) unstable; urgency=low
 
   * apt-pkg/cdrom.cc:
index 12b03196a80c0247c9e7fe0689dec00d519310df..3e50bef8c1696c1a07aad1344b196d95b33fbc96 100644 (file)
@@ -183,7 +183,7 @@ belonging to any distribution whose Archive name is "<literal>unstable</literal>
 <programlisting>
 Package: *
 Pin: release a=unstable
-Pin-Priority: 500
+Pin-Priority: 50
 </programlisting>
 
 <simpara>The following record assigns a high priority to all package versions