poldek: poldek/cli/ls.c - bugfix: don't treat all available updates as secu...
megabajt
megabajt at pld-linux.org
Tue Jun 3 21:29:44 CEST 2008
Author: megabajt Date: Tue Jun 3 19:29:44 2008 GMT
Module: poldek Tag: HEAD
---- Log message:
- bugfix: don't treat all available updates as security updates
---- Files affected:
poldek/poldek/cli:
ls.c (1.29 -> 1.30)
---- Diffs:
================================================================
Index: poldek/poldek/cli/ls.c
diff -u poldek/poldek/cli/ls.c:1.29 poldek/poldek/cli/ls.c:1.30
--- poldek/poldek/cli/ls.c:1.29 Mon May 26 10:05:55 2008
+++ poldek/poldek/cli/ls.c Tue Jun 3 21:29:38 2008
@@ -204,13 +204,12 @@
static tn_array *do_upgradeable(struct cmdctx *cmdctx, tn_array *ls_ents,
tn_array *evrs)
{
- int found, compare_ver = 0, i, lls_mode;
+ int found, compare_ver = 0, i;
tn_array *ls_ents2, *cmpto_pkgs = NULL, *srcpkgs = NULL;
char *cmpto_path;
n_assert(cmdctx->_flags & OPT_LS_UPGRADEABLE);
-
- lls_mode = cmdctx->_flags & OPT_LS_UPGRADEABLE_SEC;
+
compare_ver = cmdctx->_flags & OPT_LS_UPGRADEABLE_VER;
cmpto_path = POCLIDEK_INSTALLEDDIR;
@@ -251,36 +250,38 @@
if (!found || cmprc >= 0)
continue;
- if (lls_mode && (spkg = pkg_srcfilename_s(rpkg))) {
- if (n_array_bsearch(srcpkgs, spkg)) /* parent included, so me too */
+ if (cmdctx->_flags & OPT_LS_UPGRADEABLE_SEC) {
+ spkg = pkg_srcfilename_s(rpkg);
+
+ if (spkg && n_array_bsearch(srcpkgs, spkg)) { /* parent included, so me too */
found = 1;
-
- } else if (lls_mode) {
- struct pkg *ipkg, *upkg;
- struct pkguinf *inf;
-
- ipkg = rpkg;
- upkg = ent->pkg_dent_pkg;
- if (cmdctx->_flags & OPT_LS_INSTALLED) {
- upkg = rpkg;
- ipkg = ent->pkg_dent_pkg;
- }
+ } else {
+ struct pkg *ipkg, *upkg;
+ struct pkguinf *inf;
+
+ ipkg = rpkg;
+ upkg = ent->pkg_dent_pkg;
+ if (cmdctx->_flags & OPT_LS_INSTALLED) {
+ upkg = rpkg;
+ ipkg = ent->pkg_dent_pkg;
+ }
- found = 0;
- if ((inf = pkg_uinf(upkg)) == NULL)
- continue;
-
- if (pkguinf_changelog_with_security_fixes(inf, ipkg->btime)) {
- char *sp;
- if ((sp = pkg_srcfilename_s(rpkg))) {
- n_array_push(srcpkgs, n_strdup(sp));
- n_array_sort(srcpkgs);
- DBGF_F("%s\n", sp);
+ found = 0;
+ if ((inf = pkg_uinf(upkg)) == NULL)
+ continue;
+
+ if (pkguinf_changelog_with_security_fixes(inf, ipkg->btime)) {
+ char *sp;
+ if ((sp = pkg_srcfilename_s(rpkg))) {
+ n_array_push(srcpkgs, n_strdup(sp));
+ n_array_sort(srcpkgs);
+ DBGF_F("%s\n", sp);
+ }
+ found = 1;
}
- found = 1;
- }
- pkguinf_free(inf);
+ pkguinf_free(inf);
+ }
}
if (!found)
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/poldek/poldek/cli/ls.c?r1=1.29&r2=1.30&f=u
More information about the pld-cvs-commit
mailing list