don't let them add packages for installation if they are source packages

CVS patchset: 2670
CVS date: 1999/01/07 04:06:30
This commit is contained in:
ewt 1999-01-07 04:06:30 +00:00
parent 1164370f66
commit fd5e7c4e30
1 changed files with 5 additions and 1 deletions

View File

@ -227,7 +227,7 @@ rpmTransactionSet rpmtransCreateSet(rpmdb db, char * root) {
return rpmdep;
}
void rpmtransAddPackage(rpmTransactionSet rpmdep, Header h, FD_t fd,
int rpmtransAddPackage(rpmTransactionSet rpmdep, Header h, FD_t fd,
void * key, int upgrade, rpmRelocation * relocs) {
/* this is an install followed by uninstalls */
dbiIndexSet matches;
@ -235,6 +235,10 @@ void rpmtransAddPackage(rpmTransactionSet rpmdep, Header h, FD_t fd,
int count, i, j;
char ** obsoletes;
if (headerIsEntry(h, RPMTAG_SOURCEPACKAGE)) {
return 1;
}
/* FIXME: handling upgrades like this is *almost* okay. It doesn't
check to make sure we're upgrading to a newer version, and it
makes it difficult to generate a return code based on the number of