* make pinning on component work again (we just use the section, as apt-0.6 don't...
authorMichael Vogt <michael.vogt@ubuntu.com>
Tue, 10 May 2005 12:28:16 +0000 (12:28 +0000)
committerMichael Vogt <michael.vogt@ubuntu.com>
Tue, 10 May 2005 12:28:16 +0000 (12:28 +0000)
apt-pkg/deb/debindexfile.cc
apt-pkg/deb/deblistparser.cc
apt-pkg/deb/deblistparser.h
configure.in
debian/changelog
po/apt-all.pot

index f26265f..ff8bce8 100644 (file)
@@ -24,7 +24,7 @@
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/acquire-item.h>
 #include <apt-pkg/debmetaindex.h>
-    
+
 #include <sys/stat.h>
                                                                        /*}}}*/
 
@@ -290,7 +290,7 @@ bool debPackagesIndex::Merge(pkgCacheGenerator &Gen,OpProgress &Prog) const
       FileFd Rel(ReleaseFile,FileFd::ReadOnly);
       if (_error->PendingError() == true)
         return false;
-      Parser.LoadReleaseInfo(File,Rel);
+      Parser.LoadReleaseInfo(File,Rel,Section);
    }
    
    return true;
index 96a8058..25b5337 100644 (file)
@@ -564,13 +564,20 @@ bool debListParser::Step()
 // ---------------------------------------------------------------------
 /* */
 bool debListParser::LoadReleaseInfo(pkgCache::PkgFileIterator FileI,
-                                   FileFd &File)
+                                   FileFd &File, string component)
 {
    pkgTagFile Tags(&File, File.Size() + 256); // XXX
    pkgTagSection Section;
    if (Tags.Step(Section) == false)
       return false;
 
+   //mvo: I don't think we need to fill that in (it's unused since apt-0.6)
+   //FileI->Architecture = WriteUniqString(Arch);
+   
+   // apt-secure does no longer download individual (per-section) Release
+   // file. to provide Component pinning we use the section name now
+   FileI->Component = WriteUniqString(component);
+
    const char *Start;
    const char *Stop;
    if (Section.Find("Suite",Start,Stop) == true)
@@ -589,7 +596,7 @@ bool debListParser::LoadReleaseInfo(pkgCache::PkgFileIterator FileI,
    if (Section.FindFlag("NotAutomatic",FileI->Flags,
                        pkgCache::Flag::NotAutomatic) == false)
       _error->Warning("Bad NotAutomatic flag");
-   
+
    return !_error->PendingError();
 }
                                                                        /*}}}*/
index 9f30521..3a0e042 100644 (file)
@@ -55,7 +55,8 @@ class debListParser : public pkgCacheGenerator::ListParser
 
    virtual bool Step();
    
-   bool LoadReleaseInfo(pkgCache::PkgFileIterator FileI,FileFd &File);
+   bool LoadReleaseInfo(pkgCache::PkgFileIterator FileI,FileFd &File,
+                       string section);
    
    static const char *ParseDepends(const char *Start,const char *Stop,
                            string &Package,string &Ver,unsigned int &Op,
index e17a126..12d3eca 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.35ubuntu1")
+AC_DEFINE_UNQUOTED(VERSION,"0.6.36")
 PACKAGE="apt"
 AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
 AC_SUBST(PACKAGE)
index 6b5bd2f..42470ea 100644 (file)
@@ -2,6 +2,8 @@ apt (0.6.37) experimental; urgency=low
 
   * apt-cache show <virtualpkg> shows the available packages providing 
     the virtual pkg (thanks to otavio)
+  * make pinning on the "component" work again (using the section of the 
+    archive, we don't use per-section Release files anymore with apt-0.6)
 
  --
 
index b9232ca..a38db53 100644 (file)
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-04-06 13:03+0200\n"
+"POT-Creation-Date: 2005-05-10 12:37+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -22,7 +22,7 @@ msgstr ""
 
 #: cmdline/apt-cache.cc:175 cmdline/apt-cache.cc:527 cmdline/apt-cache.cc:615
 #: cmdline/apt-cache.cc:771 cmdline/apt-cache.cc:989 cmdline/apt-cache.cc:1357
-#: cmdline/apt-cache.cc:1508
+#: cmdline/apt-cache.cc:1522
 #, c-format
 msgid "Unable to locate package %s"
 msgstr ""
@@ -92,68 +92,77 @@ msgstr ""
 msgid "You must give exactly one pattern"
 msgstr ""
 
-#: cmdline/apt-cache.cc:1385
+#: cmdline/apt-cache.cc:1366 cmdline/apt-get.cc:1065
+#, c-format
+msgid "Package %s is a virtual package provided by:\n"
+msgstr ""
+
+#: cmdline/apt-cache.cc:1372
+msgid "You should explicitly select one to show."
+msgstr ""
+
+#: cmdline/apt-cache.cc:1399
 msgid "No packages found"
 msgstr ""
 
-#: cmdline/apt-cache.cc:1462
+#: cmdline/apt-cache.cc:1476
 msgid "Package files:"
 msgstr ""
 
-#: cmdline/apt-cache.cc:1469 cmdline/apt-cache.cc:1555
+#: cmdline/apt-cache.cc:1483 cmdline/apt-cache.cc:1569
 msgid "Cache is out of sync, can't x-ref a package file"
 msgstr ""
 
-#: cmdline/apt-cache.cc:1470
+#: cmdline/apt-cache.cc:1484
 #, c-format
 msgid "%4i %s\n"
 msgstr ""
 
 #. Show any packages have explicit pins
-#: cmdline/apt-cache.cc:1482
+#: cmdline/apt-cache.cc:1496
 msgid "Pinned packages:"
 msgstr ""
 
-#: cmdline/apt-cache.cc:1494 cmdline/apt-cache.cc:1535
+#: cmdline/apt-cache.cc:1508 cmdline/apt-cache.cc:1549
 msgid "(not found)"
 msgstr ""
 
 #. Installed version
-#: cmdline/apt-cache.cc:1515
+#: cmdline/apt-cache.cc:1529
 msgid "  Installed: "
 msgstr ""
 
-#: cmdline/apt-cache.cc:1517 cmdline/apt-cache.cc:1525
+#: cmdline/apt-cache.cc:1531 cmdline/apt-cache.cc:1539
 msgid "(none)"
 msgstr ""
 
 #. Candidate Version
-#: cmdline/apt-cache.cc:1522
+#: cmdline/apt-cache.cc:1536
 msgid "  Candidate: "
 msgstr ""
 
-#: cmdline/apt-cache.cc:1532
+#: cmdline/apt-cache.cc:1546
 msgid "  Package pin: "
 msgstr ""
 
 #. Show the priority tables
-#: cmdline/apt-cache.cc:1541
+#: cmdline/apt-cache.cc:1555
 msgid "  Version table:"
 msgstr ""
 
-#: cmdline/apt-cache.cc:1556
+#: cmdline/apt-cache.cc:1570
 #, c-format
 msgid "       %4i %s\n"
 msgstr ""
 
-#: cmdline/apt-cache.cc:1651 cmdline/apt-cdrom.cc:138 cmdline/apt-config.cc:70
+#: cmdline/apt-cache.cc:1665 cmdline/apt-cdrom.cc:138 cmdline/apt-config.cc:70
 #: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:545
 #: cmdline/apt-get.cc:2313 cmdline/apt-sortpkgs.cc:144
 #, c-format
 msgid "%s %s for %s %s compiled on %s %s\n"
 msgstr ""
 
-#: cmdline/apt-cache.cc:1658
+#: cmdline/apt-cache.cc:1672
 msgid ""
 "Usage: apt-cache [options] command\n"
 "       apt-cache [options] add file1 [file2 ...]\n"
@@ -774,11 +783,6 @@ msgstr ""
 msgid "Package %s is not installed, so not removed\n"
 msgstr ""
 
-#: cmdline/apt-get.cc:1065
-#, c-format
-msgid "Package %s is a virtual package provided by:\n"
-msgstr ""
-
 #: cmdline/apt-get.cc:1077
 msgid " [Installed]"
 msgstr ""