static int fileCompare(const void * one, const void * two);
static int installSources(char * rootdir, int fd, char ** specFilePtr);
static int markReplacedFiles(rpmdb db, struct replacedFile * replList);
-static int ensureOlder(rpmdb db, char * name, char * newVersion,
- char * newRelease, int dbOffset);
static int relocateFilelist(Header * hp, char * defaultPrefix,
char * newPrefix, int * relocationSize);
static int archOkay(Header h);
for (i = 0; i < matches.count; i++) {
if (matches.recs[i].recOffset != otherOffset) {
if (!(flags & INSTALL_UPGRADETOOLD))
- if (ensureOlder(db, name, version, release,
+ if (rpmEnsureOlder(db, name, version, release,
matches.recs[i].recOffset))
return 2;
*intptr++ = matches.recs[i].recOffset;
return 0;
}
-static int ensureOlder(rpmdb db, char * name, char * newVersion,
- char * newRelease, int dbOffset) {
+int rpmEnsureOlder(rpmdb db, char * name, char * newVersion,
+ char * newRelease, int dbOffset) {
Header h;
char * oldVersion, * oldRelease;
int rc, result;
int rpmInstallSourcePackage(char * prefix, int fd, char ** specFile);
int rpmInstallPackage(char * rootdir, rpmdb db, int fd, char * prefix,
int flags, notifyFunction notify, char * labelFormat);
+int rpmEnsureOlder(rpmdb db, char * name, char * newVersion,
+ char * newRelease, int dbOffset);
int rpmRemovePackage(char * prefix, rpmdb db, unsigned int offset, int test);
int rpmdbRemove(rpmdb db, unsigned int offset, int tolerant);
int rpmdbAdd(rpmdb db, Header dbentry);