poldek: poldek/Makefile.am, poldek/arg_packages.c, poldek/arg_pack...
mis
mis at pld-linux.org
Sat Jun 16 17:20:09 CEST 2007
Author: mis Date: Sat Jun 16 15:20:09 2007 GMT
Module: poldek Tag: HEAD
---- Log message:
- multilib support improvements
- code cleanups
- removed old dep engine (pkgset-install.c)
---- Files affected:
poldek/poldek:
Makefile.am (1.93 -> 1.94) , arg_packages.c (1.25 -> 1.26) , arg_packages.h (1.9 -> 1.10) , lib_init.c (1.76 -> 1.77) , pkgcmp.c (1.6 -> 1.7) , pkgmisc.h (1.14 -> 1.15) , poldek_ts.c (1.60 -> 1.61) , upgrade-dist.c (1.2 -> 1.3) , pkgset-install.c (1.151 -> NONE) (REMOVED)
poldek/poldek/install:
conflicts.c (1.2 -> 1.3) , obsoletes.c (1.6 -> 1.7)
poldek/poldek/po:
POTFILES.in (1.31 -> 1.32)
---- Diffs:
================================================================
Index: poldek/poldek/Makefile.am
diff -u poldek/poldek/Makefile.am:1.93 poldek/poldek/Makefile.am:1.94
--- poldek/poldek/Makefile.am:1.93 Sat Nov 5 18:47:55 2005
+++ poldek/poldek/Makefile.am Sat Jun 16 17:20:04 2007
@@ -40,7 +40,6 @@
pkgset.c pkgset.h \
pkgset-req.c pkgset-req.h \
pkgset-order.c \
- pkgset-install.c \
dbdep.c dbdep.h \
arg_packages.c arg_packages.h \
conf.c conf.h conf_intern.h conf_sections.c \
================================================================
Index: poldek/poldek/arg_packages.c
diff -u poldek/poldek/arg_packages.c:1.25 poldek/poldek/arg_packages.c:1.26
--- poldek/poldek/arg_packages.c:1.25 Sun Apr 2 21:10:36 2006
+++ poldek/poldek/arg_packages.c Sat Jun 16 17:20:04 2007
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000 - 2005 Pawel A. Gajda <mis at k2.net.pl>
+ Copyright (C) 2000 - 2007 Pawel A. Gajda <mis at pld-linux.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2 as
================================================================
Index: poldek/poldek/arg_packages.h
diff -u poldek/poldek/arg_packages.h:1.9 poldek/poldek/arg_packages.h:1.10
--- poldek/poldek/arg_packages.h:1.9 Sun Apr 2 21:10:36 2006
+++ poldek/poldek/arg_packages.h Sat Jun 16 17:20:04 2007
@@ -37,7 +37,7 @@
int arg_packages_resolve(struct arg_packages *aps,
tn_array *avpkgs,
- struct pkgset *ps,
+ struct pkgset *ps,/* =NULL, needed by RESOLV_CAPS only */
unsigned flags);
tn_hash *arg_packages_get_resolved_caps(struct arg_packages *aps);
================================================================
Index: poldek/poldek/lib_init.c
diff -u poldek/poldek/lib_init.c:1.76 poldek/poldek/lib_init.c:1.77
--- poldek/poldek/lib_init.c:1.76 Mon Aug 21 17:40:54 2006
+++ poldek/poldek/lib_init.c Sat Jun 16 17:20:04 2007
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000 - 2005 Pawel A. Gajda <mis at k2.net.pl>
+ Copyright (C) 2000 - 2007 Pawel A. Gajda <mis at pld-linux.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2 as
@@ -56,7 +56,7 @@
const char poldek_BUG_MAILADDR[] = "<mis at pld-linux.org>";
const char poldek_VERSION_BANNER[] = PACKAGE " " VERSION " (" VERSION_STATUS ")";
const char poldek_BANNER[] = PACKAGE " " VERSION " (" VERSION_STATUS ")\n"
-"Copyright (C) 2000-2006 Pawel A. Gajda <mis at pld-linux.org>\n"
+"Copyright (C) 2000-2007 Pawel A. Gajda <mis at pld-linux.org>\n"
"This program may be freely redistributed under the terms of the GNU GPL v2";
static const char *poldek_logprefix = "poldek";
@@ -1394,7 +1394,8 @@
{
struct default_op_map_ent *ent, tmp;
char scolor[64];
- int color, multilib = 2;
+ int color;
+ int multilib = 2; /* 'auto' */
if (!pm_conf_get(ctx->pmctx, "%{_transaction_color}", scolor, sizeof(scolor)))
@@ -1429,14 +1430,12 @@
ent->defaultv = 1;
if (color)
- msgn(2, "Enabling multilib mode, rpm's transaction color = %d",
- color);
+ msgn(2, "Enabling multilib mode, transaction color = %d", color);
DBGF("multilib(auto) = %d\n", ent->defaultv);
poldek_ts_xsetop(ctx->ts, ent->op, ent->defaultv, 0);
}
}
-
/* */
================================================================
Index: poldek/poldek/pkgcmp.c
diff -u poldek/poldek/pkgcmp.c:1.6 poldek/poldek/pkgcmp.c:1.7
--- poldek/poldek/pkgcmp.c:1.6 Thu Oct 20 17:48:27 2005
+++ poldek/poldek/pkgcmp.c Sat Jun 16 17:20:04 2007
@@ -269,6 +269,9 @@
if ((rc = pkg_cmp_arch(p1, p2)))
return rc;
+ if ((rc = p1->color - p2->color))
+ return rc;
+
if ((rc = p1->btime - p2->btime))
return rc;
================================================================
Index: poldek/poldek/pkgmisc.h
diff -u poldek/poldek/pkgmisc.h:1.14 poldek/poldek/pkgmisc.h:1.15
--- poldek/poldek/pkgmisc.h:1.14 Thu Oct 20 22:40:42 2005
+++ poldek/poldek/pkgmisc.h Sat Jun 16 17:20:04 2007
@@ -119,6 +119,7 @@
struct pkgset;
int packages_verify_dependecies(tn_array *pkgs, struct pkgset *ps);
-
+int packages_dot_dependency_graph(tn_array *pkgs, struct pkgset *ps,
+ const char *dotfile);
#endif
================================================================
Index: poldek/poldek/poldek_ts.c
diff -u poldek/poldek/poldek_ts.c:1.60 poldek/poldek/poldek_ts.c:1.61
--- poldek/poldek/poldek_ts.c:1.60 Sun May 20 23:44:28 2007
+++ poldek/poldek/poldek_ts.c Sat Jun 16 17:20:04 2007
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000 - 2005 Pawel A. Gajda <mis at pld.org.pl>
+ Copyright (C) 2000 - 2007 Pawel A. Gajda <mis at pld-linux.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2 as
@@ -61,8 +61,6 @@
extern
int do_poldek_ts_upgrade_dist(struct poldek_ts *ts);
extern
-int do_poldek_ts_install(struct poldek_ts *ts, struct poldek_iinf *iinf);
-extern
int do_poldek_ts_uninstall(struct poldek_ts *ts, struct poldek_iinf *iinf);
@@ -617,16 +615,19 @@
int poldek_ts_add_pkgmask(struct poldek_ts *ts, const char *mask)
{
+ DBGF("%s\n", mask);
return arg_packages_add_pkgmask(ts->aps, mask);
}
int poldek_ts_add_pkglist(struct poldek_ts *ts, const char *path)
{
+ DBGF("%s\n", path);
return arg_packages_add_pkglist(ts->aps, path);
}
int poldek_ts_add_pkgfile(struct poldek_ts *ts, const char *path)
{
+ DBGF("%s\n", path);
return arg_packages_add_pkgfile(ts->aps, path);
}
@@ -767,30 +768,10 @@
if (ts->_iflags & TS_CONFIG_LATER)
poldek__ts_postconf(ts->ctx, ts);
-
-#if 0 /* preserve && restore global confs or propagate it to ctx? */
- int op, v;
- /* poldek_conf_PROMOTE_EPOCH tricks */
- op = POLDEK_OP_PROMOTEPOCH;
- /* preserve value */
- if (poldek_conf_PROMOTE_EPOCH)
- bitvect_set(ts->_opvect_preserve, op);
- else
- bitvect_clr(ts->_opvect_preserve, op);
- /* re-set (setop sets poldek_conf_PROMOTE_EPOCH) */
- ts->setop(ts, op, ts->getop(ts, op));
-#endif
return 1;
}
-#if 0
-static int ts_postrun0(struct poldek_ts *ts)
-{
- return 1;
-}
-#endif
-
static int ts_prerun(struct poldek_ts *ts, struct poldek_iinf *iinf)
{
int rc = 1;
@@ -1047,13 +1028,13 @@
pkgdb_tx_begin(ts->db);
DBGF("0 arg_packages_size=%d\n", arg_packages_size(ts->aps));
- if (poldek_conf_MULTILIB || ts->ctx->_depengine == 2) {
- msgn(5, "Running poldek2 dependency engine...");
- rc = in_do_poldek_ts_install(ts, iinf);
-
+ if (ts->ctx->_depengine == 3) { /* hope, soon */
+ msgn(5, "Running poldek3 dependency engine...");
+ //rc = in_do_poldek_ts_install(ts, iinf);
+ n_die("Not implemented yet");
+
} else {
- msgn(5, "Running poldek1 dependency engine...");
- rc = do_poldek_ts_install(ts, iinf);
+ rc = in_do_poldek_ts_install(ts, iinf);
}
if (rc && !ts->getop(ts, POLDEK_OP_RPMTEST))
@@ -1196,7 +1177,7 @@
if (!ts_prerun0(ts))
return 0;
-
+
n_assert(ts_run);
if (ts_run->flags & TS_RUN_NEEDAVSET)
poldek_load_sources(ts->ctx);
================================================================
Index: poldek/poldek/upgrade-dist.c
diff -u poldek/poldek/upgrade-dist.c:1.2 poldek/poldek/upgrade-dist.c:1.3
--- poldek/poldek/upgrade-dist.c:1.2 Sun Jul 10 14:26:55 2005
+++ poldek/poldek/upgrade-dist.c Sat Jun 16 17:20:04 2007
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000 - 2005 Pawel A. Gajda <mis at k2.net.pl>
+ Copyright (C) 2000 - 2007 Pawel A. Gajda <mis at pld-linux.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2 as
@@ -44,9 +44,7 @@
#include "poldek.h"
#include "poldek_intern.h"
#include "pm/pm.h"
-
-extern
-int do_poldek_ts_install(struct poldek_ts *ts, struct poldek_iinf *iinf);
+#include "install/install.h"
struct map_s {
tn_array *avpkgs;
@@ -141,6 +139,6 @@
else if (map_s.nmarked == 0)
msgn(1, _("Nothing to do"));
-
- return do_poldek_ts_install(ts, NULL);
+
+ return in_do_poldek_ts_install(ts, NULL);
}
================================================================
Index: poldek/poldek/install/conflicts.c
diff -u poldek/poldek/install/conflicts.c:1.2 poldek/poldek/install/conflicts.c:1.3
--- poldek/poldek/install/conflicts.c:1.2 Thu Nov 3 01:21:05 2005
+++ poldek/poldek/install/conflicts.c Sat Jun 16 17:20:04 2007
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000 - 2005 Pawel A. Gajda <mis at k2.net.pl>
+ Copyright (C) 2000 - 2007 Pawel A. Gajda <mis at pld-linux.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2 as
@@ -189,7 +189,10 @@
if (ht && n_hash_exists(ht, dbpkg->name))
continue;
-
+
+ if (poldek_conf_MULTILIB && !pkg_is_colored_like(pkg, dbpkg))
+ continue;
+
if (pkg_match_req(dbpkg, cnfl, 1)) {
if (!in_resolve_conflict(indent, ictx, pkg, cnfl, dbpkg)) {
logn(LOGERR, _("%s (cnfl %s) conflicts with installed %s"),
================================================================
Index: poldek/poldek/install/obsoletes.c
diff -u poldek/poldek/install/obsoletes.c:1.6 poldek/poldek/install/obsoletes.c:1.7
--- poldek/poldek/install/obsoletes.c:1.6 Mon Oct 24 17:28:37 2005
+++ poldek/poldek/install/obsoletes.c Sat Jun 16 17:20:04 2007
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000 - 2005 Pawel A. Gajda <mis at k2.net.pl>
+ Copyright (C) 2000 - 2007 Pawel A. Gajda <mis at pld-linux.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2 as
@@ -245,7 +245,11 @@
if (arch)
pkg_set_arch(&dbpkg, arch);
-
+
+ DBGF("%s.%s:%d colored like %s:%d => %d\n", pkg_evr_snprintf_s(&dbpkg),
+ arch, dbpkg.color,
+ pkg_id(pkg), pkg->color, pkg_is_colored_like(&dbpkg, pkg));
+
if (pkg_is_colored_like(&dbpkg, pkg))
return 1;
================================================================
Index: poldek/poldek/po/POTFILES.in
diff -u poldek/poldek/po/POTFILES.in:1.31 poldek/poldek/po/POTFILES.in:1.32
--- poldek/poldek/po/POTFILES.in:1.31 Mon Jan 8 18:22:23 2007
+++ poldek/poldek/po/POTFILES.in Sat Jun 16 17:20:04 2007
@@ -22,6 +22,7 @@
cli/op_source.c
cli/op_split.c
cli/op_verify.c
+cli/poclidek_demo.c
cli/rcmd.c
cli/reload.c
cli/search.c
@@ -85,7 +86,6 @@
pkgmisc.c
pkgroup.c
pkgscore.c
-pkgset-install.c
pkgset-load.c
pkgset-order.c
pkgset-req.c
================================================================
---- CVS-web:
http://cvs.pld-linux.org/poldek/poldek/Makefile.am?r1=1.93&r2=1.94&f=u
http://cvs.pld-linux.org/poldek/poldek/arg_packages.c?r1=1.25&r2=1.26&f=u
http://cvs.pld-linux.org/poldek/poldek/arg_packages.h?r1=1.9&r2=1.10&f=u
http://cvs.pld-linux.org/poldek/poldek/lib_init.c?r1=1.76&r2=1.77&f=u
http://cvs.pld-linux.org/poldek/poldek/pkgcmp.c?r1=1.6&r2=1.7&f=u
http://cvs.pld-linux.org/poldek/poldek/pkgmisc.h?r1=1.14&r2=1.15&f=u
http://cvs.pld-linux.org/poldek/poldek/poldek_ts.c?r1=1.60&r2=1.61&f=u
http://cvs.pld-linux.org/poldek/poldek/upgrade-dist.c?r1=1.2&r2=1.3&f=u
http://cvs.pld-linux.org/poldek/poldek/install/conflicts.c?r1=1.2&r2=1.3&f=u
http://cvs.pld-linux.org/poldek/poldek/install/obsoletes.c?r1=1.6&r2=1.7&f=u
http://cvs.pld-linux.org/poldek/poldek/po/POTFILES.in?r1=1.31&r2=1.32&f=u
More information about the pld-cvs-commit
mailing list