- 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).
\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
.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)
.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})
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;
* 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);
* 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;
/* ===============================================
* 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) {
/* ===============================================
* 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) {
/* ===============================================
* 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 */
#/*! \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.
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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
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"
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"
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"
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"
# -*- 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"
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"
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"
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"
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"
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"
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"
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"
#include "debug.h"
+static int _rpmts_debug = 0;
+
/*@access alKey @*/
/** \ingroup python
* 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:
*
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
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\"");
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");
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);
{
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);
/*@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;
{
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)
{
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);
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);
{
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;
}
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);
(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);
{
rpmte te;
+if (_rpmts_debug)
+fprintf(stderr, "*** rpmts_Next(%p) ts %p\n", s, s->ts);
+
if (s == NULL || s->tsi == NULL)
return NULL;
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);
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;
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,
{
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 :-) */
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;
}
typedef struct rpmtsObject_s {
PyObject_HEAD
rpmts ts;
- rpmdbObject * dbo;
PyObject * keyList; /* keeps reference counts correct */
FD_t scriptFd;
rpmtsi tsi;
%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
%{__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.
#/*! \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
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
#*/