up2date functional on rpm-python-4.1 bindings.
authorjbj <devnull@localhost>
Thu, 18 Jul 2002 21:42:18 +0000 (21:42 +0000)
committerjbj <devnull@localhost>
Thu, 18 Jul 2002 21:42:18 +0000 (21:42 +0000)
CVS patchset: 5558
CVS date: 2002/07/18 21:42:18

40 files changed:
CHANGES
doc/rpmcache.8
lib/rpmts.c
lib/transaction.c
macros.in
po/cs.po
po/da.po
po/de.po
po/en_RN.po
po/es.po
po/eu_ES.po
po/fi.po
po/fr.po
po/gl.po
po/hu.po
po/id.po
po/is.po
po/it.po
po/ja.po
po/ko.po
po/no.po
po/pl.po
po/pt.po
po/pt_BR.po
po/ro.po
po/rpm.pot
po/ru.po
po/sk.po
po/sl.po
po/sr.po
po/sv.po
po/tr.po
po/uk.po
po/wa.po
po/zh.po
po/zh_CN.GB2312.po
python/rpmts-py.c
python/rpmts-py.h
rpm.spec.in
rpmrc.in

diff --git a/CHANGES b/CHANGES
index 250163b..a85319c 100644 (file)
--- a/CHANGES
+++ b/CHANGES
        - popt: mingw32 portability configure check (#67911).
        - teach gendiff about unreadable files (#42666).
        - python: sanity check fixes on rpmts/rpmte methods.
+       - have rpmdb-redhat autoconfigure rpm to use %%_solve_dbpath.
 
 4.0.3 -> 4.0.4:
        - solaris: translate i86pc to i386 (#57182).
index a705e40..3f0381f 100644 (file)
@@ -79,7 +79,7 @@ macro should be configured in either
 \fI/etc/rpm/macros\fR or
 \fI~/.rpmmacros\fR:
 .TP
-\fB%_sdbpath\fR
+\fB%_solve_dbpath\fR
 The location of the database that is used to provide
 suggested dependency resolutions.
 .PP
@@ -87,7 +87,7 @@ suggested dependency resolutions.
 .PP
 .nf
 %_cache_dbpath  /var/spool/up2date/cache
-%_sdbpath       %{_cache_dbpath}
+%_solve_dbpath  %{_cache_dbpath}
 %_bhpath        file://localhost/mnt/redhat/beehive/comps/dist
 %_bhcoll        7.3
 %_bhN           @(basesystem|bash|filesystem|glibc-common|glibc|ldconfig|libtermcap|mktemp|setup|termcap)
@@ -98,7 +98,7 @@ suggested dependency resolutions.
 .PP
 .nf
 %_cache_dbpath  /var/spool/up2date/cache
-%_sdbpath       %{_cache_dbpath}
+%_solve_dbpath  %{_cache_dbpath}
 %_bhpath        ftp://localhost/mnt/dist
 %_bhcoll        @(7.3|7.2|7.1|7.0|6.2|6.1|6.0|5.2|5.1|5.0)
 %_bhN           @(%{_arch})
index 82d7267..f51aea2 100644 (file)
@@ -175,13 +175,13 @@ static int rpmtsOpenSDB(rpmts ts)
        return 0;
 
     if (has_sdbpath < 0)
-       has_sdbpath = rpmExpandNumeric("%{?_sdbpath:1}");
+       has_sdbpath = rpmExpandNumeric("%{?_solve_dbpath:1}");
 
     /* If not configured, don't try to open. */
     if (has_sdbpath <= 0)
        return 1;
 
-    addMacro(NULL, "_dbpath", NULL, "%{_sdbpath}", RMIL_DEFAULT);
+    addMacro(NULL, "_dbpath", NULL, "%{_solve_dbpath}", RMIL_DEFAULT);
     rc = rpmdbOpen(ts->rootDir, &ts->sdb, O_RDONLY, 0644);
     if (rc) {
        const char * dn;
index 726c468..5202288 100644 (file)
@@ -1015,6 +1015,8 @@ int rpmtsRun(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet)
      * For packages being removed:
      * - count files.
      */
+
+rpmMessage(RPMMESS_DEBUG, _("sanity checking %d elments\n"), rpmtsNElements(ts));
     ps = rpmtsProblems(ts);
     /* The ordering doesn't matter here */
     pi = rpmtsiInit(ts);
@@ -1095,6 +1097,7 @@ int rpmtsRun(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet)
      * calling fpLookupList only once. I'm not sure that the speedup is
      * worth the trouble though.
      */
+rpmMessage(RPMMESS_DEBUG, _("computing %d file fingerprints\n"), totalFileCount);
     pi = rpmtsiInit(ts);
     while ((p = rpmtsiNext(pi, 0)) != NULL) {
        int fc;
@@ -1171,6 +1174,7 @@ int rpmtsRun(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet)
     /* ===============================================
      * Compute file disposition for each package in transaction set.
      */
+rpmMessage(RPMMESS_DEBUG, _("computing file dispositions\n"));
     ps = rpmtsProblems(ts);
     pi = rpmtsiInit(ts);
     while ((p = rpmtsiNext(pi, 0)) != NULL) {
@@ -1336,6 +1340,7 @@ int rpmtsRun(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet)
     /* ===============================================
      * Save removed files before erasing.
      */
+rpmMessage(RPMMESS_DEBUG, _("repackage about-to-be-erased packages\n"));
     if (rpmtsFlags(ts) & (RPMTRANS_FLAG_DIRSTASH | RPMTRANS_FLAG_REPACKAGE)) {
        pi = rpmtsiInit(ts);
        while ((p = rpmtsiNext(pi, 0)) != NULL) {
@@ -1361,6 +1366,7 @@ int rpmtsRun(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet)
     /* ===============================================
      * Install and remove packages.
      */
+rpmMessage(RPMMESS_DEBUG, _("install/erase %d elements\n"), rpmtsNElements(ts));
     lastKey = (alKey)-2;       /* erased packages have -1 */
     pi = rpmtsiInit(ts);
     /*@-branchstate@*/ /* FIX: fi reload needs work */
index 62167b5..9677e3c 100644 (file)
--- a/macros.in
+++ b/macros.in
@@ -1,7 +1,7 @@
 #/*! \page config_macros Default configuration: /usr/lib/rpm/macros
 # \verbatim
 #
-# $Id: macros.in,v 1.108 2002/07/05 16:51:57 jbj Exp $
+# $Id: macros.in,v 1.109 2002/07/18 21:42:19 jbj Exp $
 #
 # This is a global RPM configuration file. All changes made here will
 # be lost when the rpm package is upgraded. Any per-system configuration
 %_build_name_fmt       %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
 
 #      The path to the dependency universe database. The default value
-#      is the rpmdb-redhat location.
-%_sdbpath      /usr/lib/rpmdb/%{_arch}-%{_vendor}-%{_os}/redhat
+#      is the rpmdb-redhat location. The macro is usually defined in
+#      /etc/rpm/macros.solve, installed with the rpmdb-redhat package.
+#%_solve_dbpath        /usr/lib/rpmdb/%{_arch}-%{_vendor}-%{_os}/redhat
 
 #      The output binary package file name template used when suggesting
-#      binary packages that solve a dependency.
+#      binary packages that solve a dependency. The macro is usually defined
+#      in /etc/rpm/macros.solve, installed with the rpmdb-redhat package.
 #
 # XXX  Note: escaped %% for use in headerSprintf()
-%_solve_name_fmt       %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
+#%_solve_name_fmt      %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
 
 #      The output binary package file name template used when repackaging
 #      erased packages.
index b91c529..a42f07d 100644 (file)
--- a/po/cs.po
+++ b/po/cs.po
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-07-14 17:19-0400\n"
+"POT-Creation-Date: 2002-07-15 10:05-0400\n"
 "PO-Revision-Date: 2001-07-24 10:02+0100\n"
 "Last-Translator: Milan Kerslager <kerslage@linux.cz>\n"
 "Language-Team: Czech <cs@li.org>\n"
index 43a48fc..ee4f795 100644 (file)
--- a/po/da.po
+++ b/po/da.po
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-07-14 17:19-0400\n"
+"POT-Creation-Date: 2002-07-15 10:05-0400\n"
 "PO-Revision-Date: 2001-04-05 23:03GMT\n"
 "Last-Translator: Claus Hindsgaul <claus_h@image.dk>\n"
 "Language-Team: Danish <dansk@klid.dk>\n"
index 9f652d7..0c3a0e5 100644 (file)
--- a/po/de.po
+++ b/po/de.po
@@ -37,7 +37,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-07-14 17:19-0400\n"
+"POT-Creation-Date: 2002-07-15 10:05-0400\n"
 "PO-Revision-Date: 1998-08-03 18:02+02:00\n"
 "Last-Translator: Karl Eichwalder <ke@SuSE.DE>\n"
 "Language-Team: German <de@li.org>\n"
index 328c9ba..c9774ea 100644 (file)
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-07-14 17:19-0400\n"
+"POT-Creation-Date: 2002-07-15 10:05-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index 328c9ba..c9774ea 100644 (file)
--- a/po/es.po
+++ b/po/es.po
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-07-14 17:19-0400\n"
+"POT-Creation-Date: 2002-07-15 10:05-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index 328c9ba..c9774ea 100644 (file)
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-07-14 17:19-0400\n"
+"POT-Creation-Date: 2002-07-15 10:05-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index ab5f9f6..28b43fb 100644 (file)
--- a/po/fi.po
+++ b/po/fi.po
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-07-14 17:19-0400\n"
+"POT-Creation-Date: 2002-07-15 10:05-0400\n"
 "Last-Translator: Raimo Koski <rkoski@pp.weppi.fi>\n"
 "Language-Team: Finnish <linux@sot.com>\n"
 "Content-Type: text/plain; charset=\n"
index c255246..f2ef52a 100644 (file)
--- a/po/fr.po
+++ b/po/fr.po
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-07-14 17:19-0400\n"
+"POT-Creation-Date: 2002-07-15 10:05-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index 6b837a8..b46a159 100644 (file)
--- a/po/gl.po
+++ b/po/gl.po
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.1\n"
-"POT-Creation-Date: 2002-07-14 17:19-0400\n"
+"POT-Creation-Date: 2002-07-15 10:05-0400\n"
 "PO-Revision-Date: 2001-01-13 22:31+0100\n"
 "Last-Translator: Jesús Bravo Álvarez <jba@pobox.com>\n"
 "Language-Team: Galician <trasno@ceu.fi.udc.es>\n"
index 328c9ba..c9774ea 100644 (file)
--- a/po/hu.po
+++ b/po/hu.po
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-07-14 17:19-0400\n"
+"POT-Creation-Date: 2002-07-15 10:05-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index 328c9ba..c9774ea 100644 (file)
--- a/po/id.po
+++ b/po/id.po
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-07-14 17:19-0400\n"
+"POT-Creation-Date: 2002-07-15 10:05-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index ac88e1f..a9a2f37 100644 (file)
--- a/po/is.po
+++ b/po/is.po
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-07-14 17:19-0400\n"
+"POT-Creation-Date: 2002-07-15 10:05-0400\n"
 "PO-Revision-Date: 2001-07-12 13:25+0000\n"
 "Last-Translator: Richard Allen <ra@hp.is>\n"
 "Language-Team: is <kde-isl@mmedia.is>\n"
index 328c9ba..c9774ea 100644 (file)
--- a/po/it.po
+++ b/po/it.po
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-07-14 17:19-0400\n"
+"POT-Creation-Date: 2002-07-15 10:05-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index 33e8289..f16452e 100644 (file)
--- a/po/ja.po
+++ b/po/ja.po
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-07-14 17:19-0400\n"
+"POT-Creation-Date: 2002-07-15 10:05-0400\n"
 "PO-Revision-Date: 1999-12-01 22:49 +JST\n"
 "Last-Translator: Kanda Mitsuru <kanda@nn.iij4u.or.jp>\n"
 "Language-Team: JRPM <jrpm@linux.or.jp>\n"
index 7ea327e..d24ea11 100644 (file)
--- a/po/ko.po
+++ b/po/ko.po
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.4\n"
-"POT-Creation-Date: 2002-07-14 17:19-0400\n"
+"POT-Creation-Date: 2002-07-15 10:05-0400\n"
 "PO-Revision-Date: 2002-03-04 17:17+0900\n"
 "Last-Translator: Jong-Hoon Ryu <redhat4u@netian.com>\n"
 "Language-Team: GNU Translation project <ko@li.org>\n"
index e7a8424..f45d207 100644 (file)
--- a/po/no.po
+++ b/po/no.po
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-07-14 17:19-0400\n"
+"POT-Creation-Date: 2002-07-15 10:05-0400\n"
 "PO-Revision-Date: 2001-06-27 12:24+0200\n"
 "Last-Translator: Kjartan Maraas <kmaraas@gnome.org>\n"
 "Language-Team: Norwegian <no@li.org>\n"
index c7e20b0..ba9f5a7 100644 (file)
--- a/po/pl.po
+++ b/po/pl.po
@@ -8,7 +8,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-07-14 17:19-0400\n"
+"POT-Creation-Date: 2002-07-15 10:05-0400\n"
 "PO-Revision-Date: 1999-05-25 17:00+0100\n"
 "Last-Translator: Pawe³ Dziekoñski <pdziekonski@mml.ch.pwr.wroc.pl>\n"
 "Language-Team: Polish <pl@li.org>\n"
index 62b2d36..05e5be7 100644 (file)
--- a/po/pt.po
+++ b/po/pt.po
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm\n"
-"POT-Creation-Date: 2002-07-14 17:19-0400\n"
+"POT-Creation-Date: 2002-07-15 10:05-0400\n"
 "PO-Revision-Date: 2002-02-14 10:51+0000\n"
 "Last-Translator: José Nuno Coelho Sanarra Pires <jncp@rnl.ist.utl.pt>\n"
 "Language-Team: pt <morais@kde.org\n"
index 1ebc712..ddb227a 100644 (file)
@@ -4,7 +4,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-07-14 17:19-0400\n"
+"POT-Creation-Date: 2002-07-15 10:05-0400\n"
 
 #: build.c:40
 #, fuzzy
index 1c60e8b..e67c9bc 100644 (file)
--- a/po/ro.po
+++ b/po/ro.po
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-07-14 17:19-0400\n"
+"POT-Creation-Date: 2002-07-15 10:05-0400\n"
 "PO-Revision-Date: 1999-04-10 12:00+EST\n"
 "Last-Translator: Cristian Gafton <gafton@redhat.com>\n"
 "Language-Team: Romanian <ro@li.org>\n"
index 1c9d6c8..6e9b620 100644 (file)
@@ -7,7 +7,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2002-07-14 17:19-0400\n"
+"POT-Creation-Date: 2002-07-15 10:05-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index e805e85..1df5787 100644 (file)
--- a/po/ru.po
+++ b/po/ru.po
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-07-14 17:19-0400\n"
+"POT-Creation-Date: 2002-07-15 10:05-0400\n"
 "PO-Revision-Date: 2002-04-09 16:44-0400\n"
 "Last-Translator: Eugene Kanter, <eugene@bcl.bz>\n"
 "Language-Team: Black Cat Linux Team <blackcat-support@blackcatlinux.com>\n"
index 167ae03..605a9d7 100644 (file)
--- a/po/sk.po
+++ b/po/sk.po
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-07-14 17:19-0400\n"
+"POT-Creation-Date: 2002-07-15 10:05-0400\n"
 "PO-Revision-Date: 1999-04-08 21:37+02:00\n"
 "Last-Translator: Stanislav Meduna <stano@eunet.sk>\n"
 "Language-Team: Slovak <sk-i18n@rak.isternet.sk>\n"
index 702a783..a934bf6 100644 (file)
--- a/po/sl.po
+++ b/po/sl.po
@@ -1,12 +1,12 @@
 # -*- mode:po; coding:iso-latin-2; -*- Slovenian messages for Redhat pkg. mngr.
 # Copyright (C) 2000 Free Software Foundation, Inc.
 # Primo¾ Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si>, 2000.
-# $Id: sl.po,v 1.280 2002/07/14 21:24:03 jbj Exp $
+# $Id: sl.po,v 1.281 2002/07/18 21:44:11 jbj Exp $
 #
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-07-14 17:19-0400\n"
+"POT-Creation-Date: 2002-07-15 10:05-0400\n"
 "PO-Revision-Date: 2000-10-08 19:05+0200\n"
 "Last-Translator: Grega Fajdiga <gregor.fajdiga@telemach.net>\n"
 "Language-Team: Slovenian <sl@li.org>\n"
index 92608ef..69969d4 100644 (file)
--- a/po/sr.po
+++ b/po/sr.po
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-07-14 17:19-0400\n"
+"POT-Creation-Date: 2002-07-15 10:05-0400\n"
 "Content-Type: text/plain; charset=\n"
 "Date: 1998-05-02 21:41:47-0400\n"
 
index 3df8538..1fe229e 100644 (file)
--- a/po/sv.po
+++ b/po/sv.po
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.1\n"
-"POT-Creation-Date: 2002-07-14 17:19-0400\n"
+"POT-Creation-Date: 2002-07-15 10:05-0400\n"
 "PO-Revision-Date: 2002-07-11 22:49+0200\n"
 "Last-Translator: Göran Uddeborg <goeran@uddeborg.pp.se>\n"
 "Language-Team: Swedish <sv@li.org>\n"
index a49b707..e682288 100644 (file)
--- a/po/tr.po
+++ b/po/tr.po
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-07-14 17:19-0400\n"
+"POT-Creation-Date: 2002-07-15 10:05-0400\n"
 "PO-Revision-Date: 2001-07-05 08:02+300\n"
 "Last-Translator: Nilgun Belma Buguner <nilgun@technologist.com>\n"
 "Language-Team: Turkish <tr@li.org>\n"
index 328c9ba..c9774ea 100644 (file)
--- a/po/uk.po
+++ b/po/uk.po
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-07-14 17:19-0400\n"
+"POT-Creation-Date: 2002-07-15 10:05-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index 328c9ba..c9774ea 100644 (file)
--- a/po/wa.po
+++ b/po/wa.po
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-07-14 17:19-0400\n"
+"POT-Creation-Date: 2002-07-15 10:05-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index 328c9ba..c9774ea 100644 (file)
--- a/po/zh.po
+++ b/po/zh.po
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-07-14 17:19-0400\n"
+"POT-Creation-Date: 2002-07-15 10:05-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index 328c9ba..c9774ea 100644 (file)
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2002-07-14 17:19-0400\n"
+"POT-Creation-Date: 2002-07-15 10:05-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index 2e0e72d..6e49e79 100644 (file)
@@ -24,6 +24,8 @@
 
 #include "debug.h"
 
+static int _rpmts_debug = 0;
+
 /*@access alKey @*/
 
 /** \ingroup python
@@ -35,9 +37,8 @@
  * installation and upgrade of packages.  The rpm.ts object is
  * instantiated by the TransactionSet function in the rpm module.
  *
- * The TransactionSet function takes two optional arguments.  The first
- * argument is the root path, the second is an open database to perform
- * the transaction set upon.
+ * The TransactionSet function takes a single optional argument. The first
+ * argument is the root path.
  *
  * A rpm.ts object has the following methods:
  *
@@ -146,6 +147,10 @@ static void rpmtsAddAvailableElement(rpmts ts, Header h,
                provides, fi);
     fi = rpmfiFree(fi, 1);
     provides = rpmdsFree(provides);
+
+if (_rpmts_debug < 0)
+fprintf(stderr, "\tAddAvailable(%p) list %p\n", ts, ts->availablePackages);
+
 }
 
 /** \ingroup python
@@ -160,17 +165,18 @@ rpmts_AddInstall(rpmtsObject * s, PyObject * args)
     char * how = NULL;
     int isUpgrade = 0;
 
-    if (!PyArg_ParseTuple(args, "O!O|s:Add", &hdr_Type, &h, &key, &how))
+    if (!PyArg_ParseTuple(args, "O!O|s:AddInstall", &hdr_Type, &h, &key, &how))
        return NULL;
 
-#ifdef DYING
     {  PyObject * hObj = (PyObject *) h;
        if (hObj->ob_type != &hdr_Type) {
            PyErr_SetString(PyExc_TypeError, "bad type for header argument");
            return NULL;
        }
     }
-#endif
+
+if (_rpmts_debug < 0 || (_rpmts_debug > 0 && *how != 'a'))
+fprintf(stderr, "*** rpmts_AddInstall(%p) ts %p\n", s, s->ts);
 
     if (how && strcmp(how, "a") && strcmp(how, "u") && strcmp(how, "i")) {
        PyErr_SetString(PyExc_TypeError, "how argument must be \"u\", \"a\", or \"i\"");
@@ -203,11 +209,13 @@ rpmts_AddErase(rpmtsObject * s, PyObject * args)
     int count;
     rpmdbMatchIterator mi;
     
-    if (!PyArg_ParseTuple(args, "s:Remove", &name))
+if (_rpmts_debug)
+fprintf(stderr, "*** rpmts_AddErase(%p) ts %p\n", s, s->ts);
+
+    if (!PyArg_ParseTuple(args, "s:AddErase", &name))
         return NULL;
 
-    /* XXX: Copied hack from ../lib/rpminstall.c, rpmErase() */
-    mi = rpmdbInitIterator(dbFromDb(s->dbo), RPMDBI_LABEL, name, 0);
+    mi = rpmtsInitIterator(s->ts, RPMDBI_LABEL, name, 0);
     count = rpmdbGetIteratorCount(mi);
     if (count <= 0) {
         PyErr_SetString(pyrpmError, "package not installed");
@@ -241,6 +249,9 @@ rpmts_Check(rpmtsObject * s, PyObject * args)
     int allSuggestions = 0;
     int xx;
 
+if (_rpmts_debug)
+fprintf(stderr, "*** rpmts_Check(%p) ts %p\n", s, s->ts);
+
     if (!PyArg_ParseTuple(args, "|i:Check", &allSuggestions)) return NULL;
 
     xx = rpmtsCheck(s->ts);
@@ -323,6 +334,9 @@ rpmts_Order(rpmtsObject * s, PyObject * args)
 {
     int xx;
 
+if (_rpmts_debug)
+fprintf(stderr, "*** rpmts_Order(%p) ts %p\n", s, s->ts);
+
     if (!PyArg_ParseTuple(args, ":Order")) return NULL;
 
     xx = rpmtsOrder(s->ts);
@@ -338,7 +352,8 @@ rpmts_Clean(rpmtsObject * s, PyObject * args)
        /*@globals _Py_NoneStruct @*/
        /*@modifies s, _Py_NoneStruct @*/
 {
-    int xx;
+if (_rpmts_debug)
+fprintf(stderr, "*** rpmts_Clean(%p) ts %p\n", s, s->ts);
 
     if (!PyArg_ParseTuple(args, ":Clean")) return NULL;
 
@@ -357,6 +372,9 @@ rpmts_OpenDB(rpmtsObject * s, PyObject * args)
 {
     int xx;
 
+if (_rpmts_debug)
+fprintf(stderr, "*** rpmts_OpenDB(%p) ts %p\n", s, s->ts);
+
     if (!PyArg_ParseTuple(args, ":OpenDB")) return NULL;
 
     if (s->ts->dbmode == -1)
@@ -376,6 +394,9 @@ rpmts_CloseDB(rpmtsObject * s, PyObject * args)
 {
     int xx;
 
+if (_rpmts_debug)
+fprintf(stderr, "*** rpmts_CloseDB(%p) ts %p\n", s, s->ts);
+
     if (!PyArg_ParseTuple(args, ":CloseDB")) return NULL;
 
     xx = rpmtsCloseDB(s->ts);
@@ -396,6 +417,9 @@ rpmts_GetKeys(rpmtsObject * s, PyObject * args)
     int num, i;
     PyObject *tuple;
 
+if (_rpmts_debug)
+fprintf(stderr, "*** GetKeys(%p) ts %p\n", s, s->ts);
+
     if (!PyArg_ParseTuple(args, ":GetKeys")) return NULL;
 
     rpmtsGetKeys(s->ts, &data, &num);
@@ -435,8 +459,7 @@ rpmtsCallback(/*@unused@*/ const void * hd, const rpmCallbackType what,
 {
     struct rpmtsCallbackType_s * cbInfo = data;
     PyObject * args, * result;
-    int fd;
-    static FD_t fdt;
+    static FD_t fd;
 
     if (cbInfo->pythonError) return NULL;
     if (cbInfo->cb == Py_None) return NULL;
@@ -453,18 +476,27 @@ rpmtsCallback(/*@unused@*/ const void * hd, const rpmCallbackType what,
     }
 
     if (what == RPMCALLBACK_INST_OPEN_FILE) {
-        if (!PyArg_Parse(result, "i", &fd)) {
+       int fdno;
+
+        if (!PyArg_Parse(result, "i", &fdno)) {
            cbInfo->pythonError = 1;
            return NULL;
        }
-       fdt = fdDup(fd);
-       
        Py_DECREF(result);
-       return fdt;
-    }
 
+       fd = fdDup(fdno);
+if (_rpmts_debug)
+fprintf(stderr, "\t%p = fdDup(%d)\n", fd, fdno);
+       
+       return fd;
+    } else
     if (what == RPMCALLBACK_INST_CLOSE_FILE) {
-       Fclose (fdt);
+if (_rpmts_debug)
+fprintf(stderr, "\tFclose(%p)\n", fd);
+       Fclose (fd);
+    } else {
+if (_rpmts_debug)
+fprintf(stderr, "\t%ld:%ld key %p\n", amount, total, pkgKey);
     }
 
     Py_DECREF(result);
@@ -493,6 +525,9 @@ static PyObject * rpmts_Run(rpmtsObject * s, PyObject * args)
     (void) rpmtsSetNotifyCallback(s->ts, rpmtsCallback, (void *) &cbInfo);
     (void) rpmtsSetFlags(s->ts, flags);
 
+if (_rpmts_debug)
+fprintf(stderr, "*** rpmts_Run(%p) ts %p flags %x ignore %x\n", s, s->ts, s->ts->transFlags, ignoreSet);
+
     rc = rpmtsRun(s->ts, NULL, ignoreSet);
     ps = rpmtsProblems(s->ts);
 
@@ -533,6 +568,9 @@ rpmts_Next(rpmtsObject * s)
 {
     rpmte te;
 
+if (_rpmts_debug)
+fprintf(stderr, "*** rpmts_Next(%p) ts %p\n", s, s->ts);
+
     if (s == NULL || s->tsi == NULL)
        return NULL;
 
@@ -551,6 +589,9 @@ static PyObject *
 rpmts_Iter(rpmtsObject * s)
        /*@modifies s @*/
 {
+if (_rpmts_debug)
+fprintf(stderr, "*** rpmts_Iter(%p) ts %p\n", s, s->ts);
+
     s->tsi = rpmtsiInit(s->ts);
     s->tsiFilter = 0;
     Py_INCREF(s);
@@ -570,6 +611,9 @@ rpmts_Match (rpmtsObject * s, PyObject * args)
     int len = 0;
     int tag = RPMDBI_PACKAGES;
     
+if (_rpmts_debug)
+fprintf(stderr, "*** rpmts_Match(%p) ts %p\n", s, s->ts);
+
     if (!PyArg_ParseTuple(args, "|Ozi", &TagN, &key, &len))
        return NULL;
 
@@ -597,10 +641,16 @@ rpmts_Match (rpmtsObject * s, PyObject * args)
 static struct PyMethodDef rpmts_methods[] = {
     {"addInstall",     (PyCFunction) rpmts_AddInstall, METH_VARARGS,
        NULL },
+    {"add",            (PyCFunction) rpmts_AddInstall, METH_VARARGS,
+       NULL },
     {"addErase",       (PyCFunction) rpmts_AddErase,   METH_VARARGS,
        NULL },
+    {"remove",         (PyCFunction) rpmts_AddErase,   METH_VARARGS,
+       NULL },
     {"check",          (PyCFunction) rpmts_Check,      METH_VARARGS,
        NULL },
+    {"depcheck",       (PyCFunction) rpmts_Check,      METH_VARARGS,
+       NULL },
     {"order",          (PyCFunction) rpmts_Order,      METH_VARARGS,
        NULL },
     {"clean",          (PyCFunction) rpmts_Clean,      METH_VARARGS,
@@ -633,11 +683,10 @@ static void rpmts_dealloc(/*@only@*/ PyObject * o)
 {
     rpmtsObject * trans = (void *) o;
 
-    trans->ts->rdb = NULL;     /* XXX HACK: avoid rpmdb close/free */
+if (_rpmts_debug)
+fprintf(stderr, "%p -- ts %p db %p\n", trans, trans->ts, trans->ts->rdb);
     rpmtsFree(trans->ts);
-    if (trans->dbo) {
-       Py_DECREF(trans->dbo);
-    }
+
     if (trans->scriptFd) Fclose(trans->scriptFd);
     /* this will free the keyList, and decrement the ref count of all
        the items on the list as well :-) */
@@ -739,28 +788,20 @@ rpmtsObject *
 rpmts_Create(/*@unused@*/ PyObject * self, PyObject * args)
 {
     rpmtsObject * o;
-    rpmdbObject * db = NULL;
     char * rootDir = "/";
 
-    if (!PyArg_ParseTuple(args, "|sO!:Create", &rootDir, &rpmdb_Type, &db))
-       return NULL;
-#ifdef DYING
-    if (db && ((PyObject *) db)->ob_type != &rpmdb_Type) {
-       PyErr_SetString(PyExc_TypeError, "bad type for database argument");
+    if (!PyArg_ParseTuple(args, "|s:Create", &rootDir))
        return NULL;
-    }
-#endif
 
     o = (void *) PyObject_NEW(rpmtsObject, &rpmts_Type);
 
-    Py_XINCREF(db);
-    o->dbo = db;
-    o->scriptFd = NULL;
     o->ts = rpmtsCreate();
     (void) rpmtsSetRootDir(o->ts, rootDir);
-    /* XXX this will be fun to fix */
-    o->ts->rdb = (db ? dbFromDb(db) : NULL);
+
     o->keyList = PyList_New(0);
+    o->scriptFd = NULL;
 
+if (_rpmts_debug)
+fprintf(stderr, "%p ++ ts %p db %p\n", o, o->ts, o->ts->rdb);
     return o;
 }
index 9d50038..467612a 100644 (file)
@@ -10,7 +10,6 @@
 typedef struct rpmtsObject_s {
     PyObject_HEAD
     rpmts      ts;
-    rpmdbObject * dbo;
     PyObject * keyList;                /* keeps reference counts correct */
     FD_t scriptFd;
     rpmtsi tsi;
index 3da47eb..cc72822 100644 (file)
@@ -17,7 +17,7 @@ Name: rpm
 %define version @VERSION@
 Version: %{version}
 %{expand: %%define rpm_version %{version}}
-Release: 0.48
+Release: 0.50
 Group: System Environment/Base
 Source: ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/rpm-%{rpm_version}.tar.gz
 Copyright: GPL
@@ -514,6 +514,9 @@ fi
 %{__prefix}/include/popt.h
 
 %changelog
+* Mon Jul 15 2002 Jeff Johnson <jbj@redhat.com> 4.1-0.50
+- have rpmdb-redhat autoconfigure rpm to use %%_solve_dbpath.
+
 * Sun Jul 14 2002 Jeff Johnson <jbj@redhat.com> 4.1-0.49
 - python: sanity check fixes on rpmts/rpmte methods.
 
index 9c2dc51..c252dfb 100644 (file)
--- a/rpmrc.in
+++ b/rpmrc.in
@@ -1,7 +1,7 @@
 #/*! \page config_rpmrc Default configuration: /usr/lib/rpm/rpmrc
 # \verbatim
 #
-# $Id: rpmrc.in,v 2.50 2002/06/28 00:35:57 jbj Exp $
+# $Id: rpmrc.in,v 2.51 2002/07/18 21:42:20 jbj Exp $
 #
 # This is a global RPM configuration file. All changes made here will
 # be lost when the rpm package is upgraded. Any per-system configuration
@@ -343,7 +343,7 @@ buildarch_compat: ia64: noarch
 buildarch_compat: s390: noarch
 buildarch_compat: s390x: noarch
 
-macrofiles:    @RPMCONFIGDIR@/macros:@RPMCONFIGDIR@/%{_target}/macros:@SYSCONFIGDIR@/macros.specspo:@SYSCONFIGDIR@/macros.prelink:@SYSCONFIGDIR@/macros.up2date:@SYSCONFIGDIR@/macros:@SYSCONFIGDIR@/%{_target}/macros:~/.rpmmacros
+macrofiles:    @RPMCONFIGDIR@/macros:@RPMCONFIGDIR@/%{_target}/macros:@SYSCONFIGDIR@/macros.specspo:@SYSCONFIGDIR@/macros.prelink:@SYSCONFIGDIR@/macros.solve:@SYSCONFIGDIR@/macros.up2date:@SYSCONFIGDIR@/macros:@SYSCONFIGDIR@/%{_target}/macros:~/.rpmmacros
 
 # \endverbatim
 #*/