summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorjbj <devnull@localhost>1999-09-19 15:27:37 +0000
committerjbj <devnull@localhost>1999-09-19 15:27:37 +0000
commite0e0a755b917d358d38003a3da2f46d83fb70265 (patch)
treec9821d6fd091e648f881794710382fe9a61755d6 /python
parent29c1a3598ac127c4b2b0b936a2edd6c76ce82325 (diff)
downloadrpm-e0e0a755b917d358d38003a3da2f46d83fb70265.tar.gz
rpm-e0e0a755b917d358d38003a3da2f46d83fb70265.tar.bz2
rpm-e0e0a755b917d358d38003a3da2f46d83fb70265.zip
When comparing EVR with missing epoch, package with epoch is considered newer.
Free providesEVR from added package index. python: shared module linked correctly. CVS patchset: 3305 CVS date: 1999/09/19 15:27:37
Diffstat (limited to 'python')
-rw-r--r--python/Makefile.am11
-rw-r--r--python/Makefile.in22
-rw-r--r--python/rpmmodule.c24
3 files changed, 41 insertions, 16 deletions
diff --git a/python/Makefile.am b/python/Makefile.am
index 90f361af6..5010502ca 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -9,17 +9,20 @@ INCLUDES = \
-I/usr/include/python1.5 \
@INCPATH@
+EXTRA_DIST = hash.h upgrade.h
mylibs= \
$(top_builddir)/lib/librpm.la \
$(top_builddir)/popt/libpopt.la
+LDADD =
+
pythondir = $(prefix)/lib/python1.5/site-packages
python_PROGRAMS = rpmmodule.so
+rpmmodule_so_SOURCES =
+rpmmodule_so_LDFLAGS = -lrpm -lpopt $(LIBS) -shared -Wl,-soname,rpmmodule.so
noinst_LTLIBRARIES = librpmmodule.la
-EXTRA_DIST = hash.h upgrade.h
librpmmodule_la_SOURCES = rpmmodule.c hash.c upgrade.c
-rpmmodule.so: rpmmodule.lo
- gcc -shared rpmmodule.lo -lrpm -ldb1 @BZIP2LIB@ -L/usr/local/lib -lz -lc -o $@
-
+rpmmodule.so: $(librpmmodule_la_OBJECTS)
+ $(CC) -o $@ $^ $(rpmmodule_so_LDFLAGS)
diff --git a/python/Makefile.in b/python/Makefile.in
index 32e08b0b0..534c9a5be 100644
--- a/python/Makefile.in
+++ b/python/Makefile.in
@@ -71,7 +71,6 @@ AS = @AS@
AWK = @AWK@
BUILD_RPMCONVERT = @BUILD_RPMCONVERT@
BZIP2BIN = @BZIP2BIN@
-BZIP2LIB = @BZIP2LIB@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
@@ -150,14 +149,18 @@ AUTOMAKE_OPTIONS = 1.4 foreign
INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_srcdir)/popt -I/usr/include/python1.5 @INCPATH@
+EXTRA_DIST = hash.h upgrade.h
mylibs = $(top_builddir)/lib/librpm.la $(top_builddir)/popt/libpopt.la
+LDADD =
+
pythondir = $(prefix)/lib/python1.5/site-packages
python_PROGRAMS = rpmmodule.so
+rpmmodule_so_SOURCES =
+rpmmodule_so_LDFLAGS = -lrpm -lpopt $(LIBS) -shared -Wl,-soname,rpmmodule.so
noinst_LTLIBRARIES = librpmmodule.la
-EXTRA_DIST = hash.h upgrade.h
librpmmodule_la_SOURCES = rpmmodule.c hash.c upgrade.c
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../config.h
@@ -173,11 +176,9 @@ librpmmodule_la_LIBADD =
librpmmodule_la_OBJECTS = rpmmodule.lo hash.lo upgrade.lo
PROGRAMS = $(python_PROGRAMS)
-rpmmodule_so_SOURCES = rpmmodule.so.c
-rpmmodule_so_OBJECTS = rpmmodule.so.o
+rpmmodule_so_OBJECTS =
rpmmodule_so_LDADD = $(LDADD)
rpmmodule_so_DEPENDENCIES =
-rpmmodule_so_LDFLAGS =
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -190,10 +191,9 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = gtar
GZIP_ENV = --best
-DEP_FILES = .deps/hash.P .deps/rpmmodule.P .deps/rpmmodule.so.P \
-.deps/upgrade.P
-SOURCES = $(librpmmodule_la_SOURCES) rpmmodule.so.c
-OBJECTS = $(librpmmodule_la_OBJECTS) rpmmodule.so.o
+DEP_FILES = .deps/hash.P .deps/rpmmodule.P .deps/upgrade.P
+SOURCES = $(librpmmodule_la_SOURCES) $(rpmmodule_so_SOURCES)
+OBJECTS = $(librpmmodule_la_OBJECTS) $(rpmmodule_so_OBJECTS)
all: all-redirect
.SUFFIXES:
@@ -439,8 +439,8 @@ distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
-rpmmodule.so: rpmmodule.lo
- gcc -shared rpmmodule.lo -lrpm -ldb1 @BZIP2LIB@ -L/usr/local/lib -lz -lc -o $@
+rpmmodule.so: $(librpmmodule_la_OBJECTS)
+ $(CC) -o $@ $^ $(rpmmodule_so_LDFLAGS)
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/python/rpmmodule.c b/python/rpmmodule.c
index 640b72eb3..b45ac3acb 100644
--- a/python/rpmmodule.c
+++ b/python/rpmmodule.c
@@ -309,6 +309,27 @@ void initrpm(void) {
PyInt_FromLong(RPMCALLBACK_UNINST_START));
PyDict_SetItemString(d, "RPMCALLBACK_UNINST_STOP",
PyInt_FromLong(RPMCALLBACK_UNINST_STOP));
+
+ PyDict_SetItemString(d, "RPMPROB_BADARCH",
+ PyInt_FromLong(RPMPROB_BADARCH));
+ PyDict_SetItemString(d, "RPMPROB_BADOS",
+ PyInt_FromLong(RPMPROB_BADOS));
+ PyDict_SetItemString(d, "RPMPROB_PKG_INSTALLED",
+ PyInt_FromLong(RPMPROB_PKG_INSTALLED));
+ PyDict_SetItemString(d, "RPMPROB_BADRELOCATE",
+ PyInt_FromLong(RPMPROB_BADRELOCATE));
+ PyDict_SetItemString(d, "RPMPROB_REQUIRES",
+ PyInt_FromLong(RPMPROB_REQUIRES));
+ PyDict_SetItemString(d, "RPMPROB_CONFLICT",
+ PyInt_FromLong(RPMPROB_CONFLICT));
+ PyDict_SetItemString(d, "RPMPROB_NEW_FILE_CONFLICT",
+ PyInt_FromLong(RPMPROB_NEW_FILE_CONFLICT));
+ PyDict_SetItemString(d, "RPMPROB_FILE_CONFLICT",
+ PyInt_FromLong(RPMPROB_FILE_CONFLICT));
+ PyDict_SetItemString(d, "RPMPROB_OLDPACKAGE",
+ PyInt_FromLong(RPMPROB_OLDPACKAGE));
+ PyDict_SetItemString(d, "RPMPROB_DISKSPACE",
+ PyInt_FromLong(RPMPROB_DISKSPACE));
}
@@ -1385,7 +1406,8 @@ static PyObject * rpmtransRun(rpmtransObject * s, PyObject * args) {
}
if (rc < 0) {
- return Py_BuildValue("i", rc);
+ list = PyList_New(0);
+ return list;
} else if (!rc) {
Py_INCREF(Py_None);
return Py_None;