poldek: poldek/pm/rpm/rpmdb_it.c - PMTAG_DIRNAME iterator tag

mis mis at pld-linux.org
Tue Jan 22 10:09:29 CET 2008


Author: mis                          Date: Tue Jan 22 09:09:29 2008 GMT
Module: poldek                        Tag: HEAD
---- Log message:
- PMTAG_DIRNAME iterator tag

---- Files affected:
poldek/poldek/pm/rpm:
   rpmdb_it.c (1.4 -> 1.5) 

---- Diffs:

================================================================
Index: poldek/poldek/pm/rpm/rpmdb_it.c
diff -u poldek/poldek/pm/rpm/rpmdb_it.c:1.4 poldek/poldek/pm/rpm/rpmdb_it.c:1.5
--- poldek/poldek/pm/rpm/rpmdb_it.c:1.4	Sun Jun 24 22:38:13 2007
+++ poldek/poldek/pm/rpm/rpmdb_it.c	Tue Jan 22 10:09:24 2008
@@ -54,6 +54,7 @@
 int rpmdb_it_init(rpmdb db, struct rpmdb_it *it, int tag, const char *arg)
 {
     int rpmtag = 0, argsize = 0;
+    char path[PATH_MAX];
     
     switch (tag) {
         case PMTAG_RECNO:
@@ -71,6 +72,12 @@
             rpmtag = RPMTAG_BASENAMES;
             break;
 
+        case PMTAG_DIRNAME:
+            rpmtag = RPMTAG_DIRNAMES;
+            n_snprintf(path, sizeof(path), "%s/", arg);
+            arg = path;
+            break;
+            
         case PMTAG_CAP:
             rpmtag = RPMTAG_PROVIDENAME;
             break;
@@ -130,6 +137,7 @@
             break;
             
         case PMTAG_FILE:
+        case PMTAG_DIRNAME:
             rc = rpmdbFindByFile(db, arg, &it->matches);
             break;
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/poldek/poldek/pm/rpm/rpmdb_it.c?r1=1.4&r2=1.5&f=u



More information about the pld-cvs-commit mailing list