diff options
author | jbj <devnull@localhost> | 1999-11-26 22:31:19 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 1999-11-26 22:31:19 +0000 |
commit | 4d26dfa475765173ecb06bf17bda66ddb179acad (patch) | |
tree | de0d0a74f8eb70dec86270d0577e1a5777d8a3e1 /python | |
parent | 90098c27571975cd88c05b617504d78e06187431 (diff) | |
download | rpm-4d26dfa475765173ecb06bf17bda66ddb179acad.tar.gz rpm-4d26dfa475765173ecb06bf17bda66ddb179acad.tar.bz2 rpm-4d26dfa475765173ecb06bf17bda66ddb179acad.zip |
Minimal python compile.
CVS patchset: 3439
CVS date: 1999/11/26 22:31:19
Diffstat (limited to 'python')
-rw-r--r-- | python/rpmmodule.c | 2 | ||||
-rw-r--r-- | python/upgrade.c | 17 |
2 files changed, 12 insertions, 7 deletions
diff --git a/python/rpmmodule.c b/python/rpmmodule.c index 6b6faf9c0..4265b8a6e 100644 --- a/python/rpmmodule.c +++ b/python/rpmmodule.c @@ -4,6 +4,8 @@ #include <sys/stat.h> #include <sys/time.h> #include <unistd.h> +#include <glob.h> /* XXX rpmio.h */ +#include <dirent.h> /* XXX rpmio.h */ #include "Python.h" #include "rpmlib.h" diff --git a/python/upgrade.c b/python/upgrade.c index 1bf863cfd..99161088e 100644 --- a/python/upgrade.c +++ b/python/upgrade.c @@ -2,10 +2,13 @@ #include <stdlib.h> #include <unistd.h> #include <fcntl.h> -#include <rpm/rpmlib.h> -#include <rpm/header.h> #include <string.h> +#include <glob.h> /* XXX rpmio.h */ +#include <dirent.h> /* XXX rpmio.h */ + +#include <rpmlib.h> + #include "hash.h" #include "upgrade.h" @@ -102,7 +105,7 @@ static void addLostFiles(rpmdb db, struct pkgSet *psp, struct hash_table *ht) pack = bsearch(&keyaddr, psp->packages, psp->numPackages, sizeof(*psp->packages), (void *)pkgCompare); if (!pack) { - if (headerGetEntry(h, RPMTAG_FILENAMES, NULL, + if (headerGetEntry(h, RPMTAG_OLDFILENAMES, NULL, (void **) &installedFiles, &installedFileCount)) { compareFileList(0, NULL, installedFileCount, installedFiles, ht); @@ -217,7 +220,7 @@ static int findUpgradePackages(rpmdb db, struct pkgSet *psp, DEBUG (("UPGRADE\n")) (*pip)->selected = 1; - if (!headerGetEntry(h, RPMTAG_FILENAMES, NULL, + if (!headerGetEntry(h, RPMTAG_OLDFILENAMES, NULL, (void **) &availFiles, &availFileCount)) { availFiles = NULL; availFileCount = 0; @@ -227,7 +230,7 @@ static int findUpgradePackages(rpmdb db, struct pkgSet *psp, /* Compare the file lists */ installedHeader = rpmdbGetRecord(db, matches.recs[i].recOffset); - if (!headerGetEntry(installedHeader, RPMTAG_FILENAMES, NULL, + if (!headerGetEntry(installedHeader, RPMTAG_OLDFILENAMES, NULL, (void **) &installedFiles, &installedFileCount)) { installedFiles = NULL; @@ -279,7 +282,7 @@ static int removeMovedFilesAlreadyHandled(struct pkgSet *psp, name = NULL; headerGetEntry(h, RPMTAG_NAME, NULL, (void **) &name, NULL); - if (!headerGetEntry(h, RPMTAG_FILENAMES, NULL, + if (!headerGetEntry(h, RPMTAG_OLDFILENAMES, NULL, (void **) &availFiles, &availFileCount)) { availFiles = NULL; availFileCount = 0; @@ -324,7 +327,7 @@ static int findPackagesWithRelocatedFiles(struct pkgSet *psp, availFiles = NULL; availFileCount = 0; - if (headerGetEntry(h, RPMTAG_FILENAMES, NULL, + if (headerGetEntry(h, RPMTAG_OLDFILENAMES, NULL, (void **) &availFiles, &availFileCount)) { for (i = 0; i < availFileCount; i++) { if ((file = htInTable(ht, availFiles[i]))) { |