poldek: poldek/cli/uninstall.c - rollback poclidek_resolve_package...

mis mis at pld-linux.org
Tue Jun 19 14:36:42 CEST 2007


Author: mis                          Date: Tue Jun 19 12:36:42 2007 GMT
Module: poldek                        Tag: HEAD
---- Log message:
- rollback poclidek_resolve_packages() usage (blah)

---- Files affected:
poldek/poldek/cli:
   uninstall.c (1.28 -> 1.29) 

---- Diffs:

================================================================
Index: poldek/poldek/cli/uninstall.c
diff -u poldek/poldek/cli/uninstall.c:1.28 poldek/poldek/cli/uninstall.c:1.29
--- poldek/poldek/cli/uninstall.c:1.28	Sat Jun 16 16:44:37 2007
+++ poldek/poldek/cli/uninstall.c	Tue Jun 19 14:36:37 2007
@@ -228,7 +228,8 @@
     struct poclidek_ctx  *cctx;
     struct poldek_ts     *ts;
     struct poldek_iinf   iinf, *iinfp;
-    int                  err = 0;
+    tn_array             *pkgs;
+    int                  i, err = 0;
     
     cctx = cmdctx->cctx;
     ts = cmdctx->ts;
@@ -244,6 +245,20 @@
         return 0;
     }
 
+    /* must be resolved here to allow globbing, RPM doesn't support globs AFAIK */
+    pkgs = poclidek_resolve_packages(POCLIDEK_INSTALLEDDIR, cctx, ts, 1);
+    if (pkgs == NULL) {
+        err++;
+        goto l_end;
+    }
+    
+    poldek_ts_clean_args(ts);
+    for (i=0; i < n_array_size(pkgs); i++) {
+        DBGF_F("%s\n", pkg_id(n_array_nth(pkgs, i)));
+        poldek_ts_add_pkg(ts, n_array_nth(pkgs, i));
+    }
+    n_array_free(pkgs);
+
     if (ts->getop_v(ts, POLDEK_OP_TEST, POLDEK_OP_RPMTEST, 0))
         iinfp = NULL;
     else
@@ -258,6 +273,7 @@
         poldek_iinf_destroy(iinfp);
     }
     
+l_end:
     return err == 0;
 }
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/poldek/poldek/cli/uninstall.c?r1=1.28&r2=1.29&f=u



More information about the pld-cvs-commit mailing list