The following commit has been merged in the master branch:
commit 6b7ea85f6c109b241febc5ff3c2bdcad55f9fb4e
Author: Guillem Jover <[email protected]>
Date:   Sat Jan 29 06:10:22 2011 +0100

    libdpkg: Rename pigp/pifp to db_pkg/db_pkgbin in parsedb()
    
    The names better match reality, and describe this is package information
    coming from the database. The previous usage was slightly confusing.

diff --git a/lib/dpkg/parse.c b/lib/dpkg/parse.c
index b2bc6ca..7bddaa3 100644
--- a/lib/dpkg/parse.c
+++ b/lib/dpkg/parse.c
@@ -300,8 +300,8 @@ int parsedb(const char *filename, enum parsedbflags flags,
             struct pkginfo **donep)
 {
   static int fd;
-  struct pkginfo newpig, *pigp;
-  struct pkgbin *newpifp, *pifp;
+  struct pkginfo newpig, *db_pkg;
+  struct pkgbin *newpifp, *db_pkgbin;
   int pdone;
   char *data, *dataptr, *endptr;
   struct stat st;
@@ -426,16 +426,20 @@ int parsedb(const char *filename, enum parsedbflags flags,
 
     pkg_parse_verify(&ps, &newpig, newpifp);
 
-    pigp = pkg_db_find(newpig.name);
-    pifp= (flags & pdb_recordavailable) ? &pigp->available : &pigp->installed;
+    db_pkg = pkg_db_find(newpig.name);
+    if (flags & pdb_recordavailable)
+      db_pkgbin = &db_pkg->available;
+    else
+      db_pkgbin = &db_pkg->installed;
 
     if ((flags & pdb_ignoreolder) &&
-       versioncompare(&newpifp->version, &pifp->version) < 0)
+        versioncompare(&newpifp->version, &db_pkgbin->version) < 0)
       continue;
 
-    pkg_parse_copy(&ps, pigp, pifp, &newpig, newpifp);
+    pkg_parse_copy(&ps, db_pkg, db_pkgbin, &newpig, newpifp);
 
-    if (donep) *donep= pigp;
+    if (donep)
+      *donep = db_pkg;
     pdone++;
     if (EOF_mmap(dataptr, endptr)) break;
     if (c == '\n')

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to