+++ /dev/null
-Index: install3/requirements.c
-===================================================================
-RCS file: /cvsroot/poldek/poldek/install3/requirements.c,v
-retrieving revision 1.6
-diff -u -r1.6 requirements.c
---- install3/requirements.c 24 Feb 2008 22:10:41 -0000 1.6
-+++ install3/requirements.c 2 Mar 2008 23:03:26 -0000
-@@ -430,7 +430,6 @@
-
- i3pkg->flags &= ~I3PKG_CROSSROAD;
- if (candidates) {
-- n_assert(n_array_size(candidates) > 1);
- if (number_of_non_blacks(ictx, candidates) > 1) {
- /* mark current package as crossroad and propagate mark down */
- i3pkg->flags |= I3PKG_CROSSROAD;
-Index: install3/ictx.c
-===================================================================
-RCS file: /cvsroot/poldek/poldek/install3/ictx.c,v
-retrieving revision 1.3
-diff -u -r1.3 ictx.c
---- install3/ictx.c 30 Jan 2008 22:13:42 -0000 1.3
-+++ install3/ictx.c 2 Mar 2008 23:27:03 -0000
-@@ -208,6 +208,7 @@
- ictx->ts = NULL;
- ictx->ps = NULL;
- pkgmark_set_free(ictx->processed);
-+ n_hash_free(ictx->errors);
- memset(ictx, 0, sizeof(*ictx));
- }
-
-@@ -223,7 +224,8 @@
-
- pkgmark_set_free(ictx->processed);
- ictx->processed = pkgmark_set_new(0, PKGMARK_SET_IDPTR);
--
-+
-+ n_hash_clean(ictx->errors);
- ictx->abort = 0;
- }
-
+++ /dev/null
-Index: cli/cli.c
-===================================================================
-RCS file: /cvsroot/poldek/poldek/cli/cli.c,v
-retrieving revision 1.44
-diff -u -r1.44 cli/cli.c
---- cli/cli.c 3 Feb 2008 18:01:59 -0000 1.44
-+++ cli/cli.c 20 Apr 2008 11:41:01 -0000
-@@ -731,9 +731,12 @@
- const char *cmdline, struct cmd_pipe *cmd_pipe)
- {
- tn_array *cmd_chain;
-- int rc = 0, i;
-+ int rc = 0, i, _verbose;
-
- DBGF("%s\n", cmdline);
-+
-+ /* keep verbose setting as it changes when '-q' option is used */
-+ _verbose = poldek_verbose ();
-
- cmd_chain = poclidek_prepare_cmdline(cctx, cmdline);
- if (cmd_chain == NULL)
-@@ -753,7 +756,10 @@
- else
- rc = poclidek_exec_cmd_ent(cctx, ts, ent, NULL);
- }
--
-+
-+ /* restore verbose setting */
-+ poldek_set_verbose (_verbose);
-+
- n_array_free(cmd_chain);
- return rc;
- }
-Index: cli/shell.c
-===================================================================
-RCS file: /cvsroot/poldek/poldek/cli/shell.c,v
-retrieving revision 1.34
-diff -u -r1.34 cli/shell.c
---- cli/shell.c 3 Feb 2008 18:01:59 -0000 1.34
-+++ cli/shell.c 20 Apr 2008 11:41:02 -0000
-@@ -405,8 +405,6 @@
-
- s = n_str_strip_ws(line);
- if (*s) {
-- int _verbose = poldek_verbose();
--
- shInCmd = 1;
- DBGF("(%s)\n", s);
-
-@@ -417,8 +415,6 @@
- sigint_reset();
- shDone = 0;
- shInCmd = 0;
--
-- poldek_set_verbose(_verbose);
- }
- free(line);
-
+++ /dev/null
-diff -urN poldek-0.30-cvs20080225.00/libpoldek.sym poldek-0.30-cvs20080225.00.new2/libpoldek.sym
---- poldek-0.30-cvs20080225.00/libpoldek.sym 2008-02-02 15:57:54.000000000 +0100
-+++ poldek-0.30-cvs20080225.00.new2/libpoldek.sym 2008-04-08 19:25:12.000000000 +0200
-@@ -176,6 +176,7 @@
- pkguinf_set
- pm_dbmtime
- pm_dbpath
-+pm_verify_signature
- poldek_BANNER
- poldek_BUG_MAILADDR
- poldek_VERBOSE
-@@ -259,6 +260,7 @@
- rpmlog
- sigint_destroy
- sigint_init
-+sigint_enable
- sigint_pop
- sigint_push
- sigint_reached
+++ /dev/null
-with --noorder rpm might run upgrade as erase+install not install+erase, which
-causes %config files being saved as .rpmsave and new file not being installed:
-
- 104:ConsoleKit ########################################### [ 86%]
-Run "/sbin/service ConsoleKit start" to start ConsoleKit service.
-warning: /etc/vim/vimrc saved as /etc/vim/vimrc.rpmsave
-Adding group polkituser GID=220.
-Adding user polkituser UID=220.
- 105:PolicyKit ########################################### [ 87%]
- 106:openssh-clients ########################################### [ 88%]
- 107:openssh-server ########################################### [ 88%]
-Reloading OpenSSH service..........................................[ DONE ]
- 108:sudo warning: /etc/sudoers created as /etc/sudoers.rpmnew
-########################################### [ 89%]
-Adding group messagebus GID=122.
-Adding user messagebus UID=122.
- 109:dbus ########################################### [ 90%]
- 110:bind ########################################### [ 91%]
-Stopping Named service.............................................[ DONE ]
-Starting Named service.............................................[ DONE ]
- 111:mysql ########################################### [ 92%]
-Stopping MySQL /var/lib/mysql service..............................[ DONE ]
-Starting MySQL /var/lib/mysql service..............................[ BUSY ]
-Waiting for MySQL to start.........................................[ DONE ]
- 112:syslog-ng ########################################### [ 93%]
-Stopping syslog-ng service.........................................[ DONE ]
-Starting syslog-ng service.........................................[ DONE ]
- 113:man ########################################### [ 93%]
- 114:rpm-build ########################################### [ 94%]
- 115:tzdata ########################################### [ 95%]
-Setting time zone information (Europe, Warsaw).....................[ DONE ]
- 116:linux-libc-headers ########################################### [ 96%]
-You should run MySQL upgrade scripts for all MySQL clusters.
-Thus, you should invoke:
-# mysql_upgrade --datadir=/var/lib/mysql/mysqldb/db
-You should run MySQL upgrade scripts for all MySQL clusters.
-Thus, you should invoke:
-# mysql_upgrade --datadir=/var/lib/mysql/mysqldb/db
- 117:vim ########################################### [ 97%]
-
-
---- poldek-0.21-cvs20070703.00/pm/rpm/rpminstall.c~ 2008-03-19 21:28:45.000000000 +0200
-+++ poldek-0.21-cvs20070703.00/pm/rpm/rpminstall.c 2008-03-19 21:29:42.010639258 +0200
-@@ -374,8 +374,6 @@
- argv[nargs++] = (char*)ts->rootdir;
- }
-
-- argv[nargs++] = "--noorder"; /* packages always ordered by me */
--
- if (ts->rpmacros)
- for (i=0; i<n_array_size(ts->rpmacros); i++) {
- argv[nargs++] = "--define";
+++ /dev/null
-diff -urN poldek-0.30-cvs20080225.00/pkgu.c poldek-0.30-cvs20080225.00.new/pkgu.c
---- poldek-0.30-cvs20080225.00/pkgu.c 2008-02-24 23:14:08.000000000 +0100
-+++ poldek-0.30-cvs20080225.00.new/pkgu.c 2008-04-03 18:05:23.000000000 +0200
-@@ -493,9 +493,6 @@
- case PKGUINF_DISTRO:
- set_member(pkgu, &pkgu->distro, val, len);
- break;
--
-- default:
-- n_assert(0);
- }
- }
- }
+++ /dev/null
-diff -urN poldek-0.30-cvs20080225.00/cli/desc.c poldek-0.30-cvs20080225.00.new/cli/desc.c
---- poldek-0.30-cvs20080225.00/cli/desc.c 2008-02-02 22:16:26.000000000 +0100
-+++ poldek-0.30-cvs20080225.00.new/cli/desc.c 2008-04-04 20:40:45.000000000 +0200
-@@ -882,6 +882,11 @@
- cmdctx_printf(cmdctx, "%s\n", pkg_pkgdirpath(pkg));
- }
-
-+ if (pkgu && (s = pkguinf_get(pkgu, PKGUINF_SOURCERPM))) {
-+ cmdctx_printf_c(cmdctx, PRCOLOR_CYAN, "%-16s", "Source RPM:");
-+ cmdctx_printf(cmdctx, "%s\n", s);
-+ }
-+
- if ((fn = pkg_filename(pkg, fnbuf, sizeof(fnbuf)))) {
- cmdctx_printf_c(cmdctx, PRCOLOR_CYAN, "%-16s", "File:");
- cmdctx_printf(cmdctx, "%s\n", fn);
-diff -urN poldek-0.30-cvs20080225.00/pkgu.c poldek-0.30-cvs20080225.00.new/pkgu.c
---- poldek-0.30-cvs20080225.00/pkgu.c 2008-04-04 20:12:55.000000000 +0200
-+++ poldek-0.30-cvs20080225.00.new/pkgu.c 2008-04-04 20:37:34.000000000 +0200
-@@ -51,6 +51,7 @@
- char *vendor;
- char *buildhost;
- char *distro;
-+ char *sourcerpm;
-
- tn_hash *_ht;
- tn_array *_langs;
-@@ -113,6 +114,7 @@
- pkgu->_description = NULL;
- pkgu->vendor = NULL;
- pkgu->buildhost = NULL;
-+ pkgu->sourcerpm = NULL;
-
- pkgu->_ht = NULL;
- pkgu->_langs = NULL;
-@@ -347,6 +349,7 @@
- pkgu->url = cp_tag(pkgu->_na, h, RPMTAG_URL);
- pkgu->distro = cp_tag(pkgu->_na, h, RPMTAG_DISTRIBUTION);
- pkgu->buildhost = cp_tag(pkgu->_na, h, RPMTAG_BUILDHOST);
-+ pkgu->sourcerpm = cp_tag(pkgu->_na, h, RPMTAG_SOURCERPM);
-
- return pkgu;
- }
-@@ -404,7 +407,14 @@
- n_buf_puts(nbuf, pkgu->distro);
- n_buf_putc(nbuf, '\0');
- }
--
-+
-+ if (pkgu->sourcerpm) {
-+ n_buf_putc(nbuf, PKGUINF_SOURCERPM);
-+ n_buf_putc(nbuf, '\0');
-+ n_buf_puts(nbuf, pkgu->sourcerpm);
-+ n_buf_putc(nbuf, '\0');
-+ }
-+
- n_buf_putc(nbuf, PKGUINF_TAG_ENDCMN);
- n_buf_putc(nbuf, '\0');
- }
-@@ -493,6 +503,10 @@
- case PKGUINF_DISTRO:
- set_member(pkgu, &pkgu->distro, val, len);
- break;
-+
-+ case PKGUINF_SOURCERPM:
-+ set_member(pkgu, &pkgu->sourcerpm, val, len);
-+ break;
- }
- }
- }
-@@ -556,6 +570,9 @@
-
- case PKGUINF_DISTRO:
- return pkgu->distro;
-+
-+ case PKGUINF_SOURCERPM:
-+ return pkgu->sourcerpm;
-
- case PKGUINF_SUMMARY:
- val = (char**)&pkgu->_summary;
-@@ -625,6 +642,10 @@
- set_member(pkgu, &pkgu->distro, val, len);
- break;
-
-+ case PKGUINF_SOURCERPM:
-+ set_member(pkgu, &pkgu->distro, val, len);
-+ break;
-+
- case PKGUINF_SUMMARY:
- case PKGUINF_DESCRIPTION:
- {
-diff -urN poldek-0.30-cvs20080225.00/pkgu.h poldek-0.30-cvs20080225.00.new/pkgu.h
---- poldek-0.30-cvs20080225.00/pkgu.h 2008-02-02 22:38:24.000000000 +0100
-+++ poldek-0.30-cvs20080225.00.new/pkgu.h 2008-04-04 20:37:56.000000000 +0200
-@@ -14,6 +14,7 @@
- #define PKGUINF_VENDOR 'v'
- #define PKGUINF_BUILDHOST 'b'
- #define PKGUINF_DISTRO 'D'
-+#define PKGUINF_SOURCERPM 'S'
-
- struct pkguinf;
-
+++ /dev/null
-diff -urN poldek-0.30-cvs20080225.00/libpoldek.sym poldek-0.30-cvs20080225.00.new/libpoldek.sym
---- poldek-0.30-cvs20080225.00/libpoldek.sym 2008-04-08 19:25:12.000000000 +0200
-+++ poldek-0.30-cvs20080225.00.new/libpoldek.sym 2008-04-08 19:26:26.000000000 +0200
-@@ -261,6 +261,7 @@
- sigint_destroy
- sigint_init
- sigint_enable
-+sigint_emit
- sigint_pop
- sigint_push
- sigint_reached
-diff -urN poldek-0.30-cvs20080225.00/sigint/sigint.c poldek-0.30-cvs20080225.00.new/sigint/sigint.c
---- poldek-0.30-cvs20080225.00/sigint/sigint.c 2008-02-02 22:49:05.000000000 +0100
-+++ poldek-0.30-cvs20080225.00.new/sigint/sigint.c 2008-04-08 19:12:37.000000000 +0200
-@@ -48,6 +48,21 @@
- orig_sighandler(sig);
- }
-
-+void sigint_emit (void)
-+{
-+ int i;
-+
-+ if (enabled == 0)
-+ return;
-+
-+ interrupted = 1;
-+
-+ for (i = 0; i < n_array_size (cb_stack); i++) {
-+ void (*cb)(void) = n_array_nth (cb_stack, i);
-+
-+ cb ();
-+ }
-+}
-
- void sigint_enable(int v)
- {
-diff -urN poldek-0.30-cvs20080225.00/sigint/sigint.h poldek-0.30-cvs20080225.00.new/sigint/sigint.h
---- poldek-0.30-cvs20080225.00/sigint/sigint.h 2008-02-02 22:38:26.000000000 +0100
-+++ poldek-0.30-cvs20080225.00.new/sigint/sigint.h 2008-04-08 19:22:41.000000000 +0200
-@@ -6,7 +6,12 @@
- void sigint_destroy(void);
- void sigint_reset(void);
-
--void sigint_reset(void);
-+/*
-+ * emit sigint. Can be used in some external applications
-+ * using libpoldek to interrupt given action (eg. searching,
-+ * processing dependencies and others)
-+ */
-+void sigint_emit(void);
-
- void sigint_push(void (*cb)(void));
- void *sigint_pop(void);
+++ /dev/null
-Index: uninstall.c
-===================================================================
-RCS file: /cvsroot/poldek/poldek/uninstall.c,v
-retrieving revision 1.47
-retrieving revision 1.48
-diff -u -r1.47 -r1.48
---- uninstall.c 2 Feb 2008 21:49:04 -0000 1.47
-+++ uninstall.c 2 Mar 2008 20:05:56 -0000 1.48
-@@ -11,7 +11,7 @@
- */
-
- /*
-- $Id$
-+ $Id$
- */
-
- #include <errno.h>
-@@ -122,17 +122,22 @@
- static int pkg_leave_orphans(struct uninstall_ctx *uctx, struct pkg *pkg)
- {
- struct capreq *selfcap;
-+ tn_array *exclude;
- int i;
-
-+ exclude = n_array_dup(uctx->unpkgs, (tn_fn_dup)pkg_link);
-+ /* yep, there are packages which requires themselves */
-+ n_array_push(exclude, pkg_link(pkg));
-+
- capreq_new_name_a(pkg->name, selfcap);
-- if (pkgdb_q_is_required(uctx->db, selfcap, uctx->unpkgs))
-- return 1;
-+ if (pkgdb_q_is_required(uctx->db, selfcap, exclude))
-+ goto l_yes;
-
- if (pkg->caps)
- for (i=0; i < n_array_size(pkg->caps); i++) {
- struct capreq *cap = n_array_nth(pkg->caps, i);
-- if (pkgdb_q_is_required(uctx->db, cap, uctx->unpkgs))
-- return 1;
-+ if (pkgdb_q_is_required(uctx->db, cap, exclude))
-+ goto l_yes;
- }
-
- if (pkg->fl) {
-@@ -143,13 +148,20 @@
- while ((path = pkgfl_it_get(&it, NULL))) {
- struct capreq *cap;
- capreq_new_name_a(path, cap);
-- if (pkgdb_q_is_required(uctx->db, cap, uctx->unpkgs))
-- return 1;
-+ if (pkgdb_q_is_required(uctx->db, cap, exclude))
-+ goto l_yes;
- }
- }
-+
-
-+ n_array_free(exclude);
- return 0;
-+
-+l_yes:
-+ n_array_free(exclude);
-+ return 1;
- }
-+
-
-
- /*
-@@ -194,6 +206,8 @@
- pkg_set_mf(uctx->pms, dbpkg, DBPKG_REV_ORPHANED);
- pkg_dep_mark(uctx->ts->pms, dbpkg);
- n_array_push(uctx->unpkgs, pkg_link(dbpkg));
-+ uctx->ndep++;
-+
- if (uctx->rev_orphans_deep > deep)
- process_pkg_rev_orphans(indent + 2, uctx, dbpkg, deep + 1);
- }