poldek: poldek/pkgset.c, poldek/pkgset.h - pm_get_pmcaps() killed ...
mis
mis at pld-linux.org
Sat Jul 14 00:36:18 CEST 2007
Author: mis Date: Fri Jul 13 22:36:18 2007 GMT
Module: poldek Tag: HEAD
---- Log message:
- pm_get_pmcaps() killed by pm_satisfies()
---- Files affected:
poldek/poldek:
pkgset.c (1.100 -> 1.101) , pkgset.h (1.62 -> 1.63)
---- Diffs:
================================================================
Index: poldek/poldek/pkgset.c
diff -u poldek/poldek/pkgset.c:1.100 poldek/poldek/pkgset.c:1.101
--- poldek/poldek/pkgset.c:1.100 Thu Jul 12 23:29:26 2007
+++ poldek/poldek/pkgset.c Sat Jul 14 00:36:13 2007
@@ -68,10 +68,9 @@
ps->pkgdirs = n_array_new(4, (tn_fn_free)pkgdir_free, NULL);
ps->flags = 0;
- if (pmctx) {
- ps->pmcaps = pm_get_pmcaps(pmctx);
+ if (pmctx)
ps->pmctx = pmctx;
- }
+
return ps;
}
@@ -93,28 +92,17 @@
file_index_free(ps->file_idx);
ps->flags &= (unsigned)~_PKGSET_INDEXES_INIT;
}
-
- if (ps->_vrfy_unreqs) {
- n_hash_free(ps->_vrfy_unreqs);
- ps->_vrfy_unreqs = NULL;
- }
-
- if (ps->_vrfy_file_conflicts)
- n_array_cfree(&ps->_vrfy_file_conflicts);
-
- n_array_cfree(&ps->pkgs);
- if (ps->ordered_pkgs)
- n_array_cfree(&ps->ordered_pkgs);
+ if (ps->_vrfy_unreqs)
+ n_hash_free(ps->_vrfy_unreqs);
- if (ps->depdirs)
- n_array_cfree(&ps->depdirs);
+ n_array_cfree(&ps->_vrfy_file_conflicts);
- if (ps->pkgdirs)
- n_array_cfree(&ps->pkgdirs);
+ n_array_cfree(&ps->pkgs);
+ n_array_cfree(&ps->ordered_pkgs);
+ n_array_cfree(&ps->depdirs);
+ n_array_cfree(&ps->pkgdirs);
- if (ps->pmcaps)
- n_array_cfree(&ps->pmcaps);
memset(ps, 0, sizeof(*ps));
free(ps);
@@ -123,21 +111,6 @@
int pkgset_pm_satisfies(const struct pkgset *ps, const struct capreq *req)
{
- struct capreq *cap;
-
- if (ps->pmcaps == NULL)
- return 0; /* no caps -> assume NO */
-
- /* internal caps have names like name(feature) */
- if (!capreq_is_rpmlib(req) && strstr(capreq_name(req), "(") == NULL)
- return 0;
-
- cap = n_array_bsearch_ex(ps->pmcaps, req,
- (tn_fn_cmp)capreq_cmp_name);
-
- if (cap && cap_match_req(cap, req, 1))
- return 1;
-
if (ps->pmctx)
return pm_satisfies(ps->pmctx, req);
================================================================
Index: poldek/poldek/pkgset.h
diff -u poldek/poldek/pkgset.h:1.62 poldek/poldek/pkgset.h:1.63
--- poldek/poldek/pkgset.h:1.62 Tue Jun 19 16:16:39 2007
+++ poldek/poldek/pkgset.h Sat Jul 14 00:36:13 2007
@@ -23,7 +23,6 @@
tn_array *depdirs; /* char* [] */
int nerrors;
- tn_array *pmcaps; /* capreq* [] */
struct pm_ctx *pmctx;
tn_hash *_vrfy_unreqs;
================================================================
---- CVS-web:
http://cvs.pld-linux.org/poldek/poldek/pkgset.c?r1=1.100&r2=1.101&f=u
http://cvs.pld-linux.org/poldek/poldek/pkgset.h?r1=1.62&r2=1.63&f=u
More information about the pld-cvs-commit
mailing list