diff --git a/CHANGES b/CHANGES index eb0e2bdd7..34632a342 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,6 @@ 2.90 -> 2.91 - create rpmbzio.c to avoid implicit dependence on libbz2 for installer. + - spec files can provide /filename now 2.5.x -> 2.90 - added --excludepath diff --git a/build/parseReqs.c b/build/parseReqs.c index 9a31fe341..a4412afdf 100644 --- a/build/parseReqs.c +++ b/build/parseReqs.c @@ -118,15 +118,14 @@ int parseProvidesObsoletes(Spec spec, Package pkg, char *field, int tag) line = buf; while ((prov = strtok(line, " ,\t\n"))) { - if (prov[0] == '/') { + if (prov[0] == '/' && tag != RPMTAG_PROVIDES) { rpmError(RPMERR_BADSPEC, - _("line %d: No file names in %s: %s"), - spec->lineNum, - (tag == RPMTAG_PROVIDES) ? "Provides" : "Obsoletes", - spec->line); + _("line %d: No file names in Obsoletes: %s"), + spec->lineNum, spec->line); return RPMERR_BADSPEC; } - if (!(isalnum(prov[0]) || prov[0] == '_')) { + if (!(isalnum(prov[0]) || prov[0] == '_') && + (tag == RPMTAG_OBSOLETES || prov[0] != '/')) { rpmError(RPMERR_BADSPEC, _("line %d: %s: tokens must begin with alpha-numeric: %s"), spec->lineNum, @@ -134,14 +133,6 @@ int parseProvidesObsoletes(Spec spec, Package pkg, char *field, int tag) spec->line); return RPMERR_BADSPEC; } - if (!(isalnum(prov[0]) || prov[0] == '_')) { - rpmError(RPMERR_BADSPEC, - "line %d: %s: tokens must begin with alpha-numeric: %s", - spec->lineNum, - (tag == RPMTAG_PROVIDES) ? "Provides" : "Obsoletes", - spec->line); - return RPMERR_BADSPEC; - } addReqProv(spec, pkg->header, flags, prov, NULL, 0); line = NULL; } diff --git a/lib/depends.c b/lib/depends.c index 5c4b24c99..09667d328 100644 --- a/lib/depends.c +++ b/lib/depends.c @@ -468,41 +468,41 @@ static int unsatisfiedDepend(rpmTransactionSet rpmdep, char * reqName, dbiFreeIndexRecord(matches); if (i < dbiIndexSetCount(matches)) return 0; } - } else { - if (!reqFlags && !rpmdbFindByProvides(rpmdep->db, reqName, - &matches)) { - for (i = 0; i < dbiIndexSetCount(matches); i++) { - unsigned int recOffset = dbiIndexRecordOffset(matches, i); - if (bsearch(&recOffset, - rpmdep->removedPackages, - rpmdep->numRemovedPackages, - sizeof(int), intcmp)) - continue; + } + + if (!reqFlags && !rpmdbFindByProvides(rpmdep->db, reqName, + &matches)) { + for (i = 0; i < dbiIndexSetCount(matches); i++) { + unsigned int recOffset = dbiIndexRecordOffset(matches, i); + if (bsearch(&recOffset, + rpmdep->removedPackages, + rpmdep->numRemovedPackages, + sizeof(int), intcmp)) + continue; + break; + } + + dbiFreeIndexRecord(matches); + if (i < dbiIndexSetCount(matches)) return 0; + } + + if (!rpmdbFindPackage(rpmdep->db, reqName, &matches)) { + for (i = 0; i < dbiIndexSetCount(matches); i++) { + unsigned int recOffset = dbiIndexRecordOffset(matches, i); + if (bsearch(&recOffset, + rpmdep->removedPackages, + rpmdep->numRemovedPackages, + sizeof(int), intcmp)) + continue; + + if (dbrecMatchesDepFlags(rpmdep, recOffset, + reqVersion, reqFlags)) { break; } - - dbiFreeIndexRecord(matches); - if (i < dbiIndexSetCount(matches)) return 0; } - if (!rpmdbFindPackage(rpmdep->db, reqName, &matches)) { - for (i = 0; i < dbiIndexSetCount(matches); i++) { - unsigned int recOffset = dbiIndexRecordOffset(matches, i); - if (bsearch(&recOffset, - rpmdep->removedPackages, - rpmdep->numRemovedPackages, - sizeof(int), intcmp)) - continue; - - if (dbrecMatchesDepFlags(rpmdep, recOffset, - reqVersion, reqFlags)) { - break; - } - } - - dbiFreeIndexRecord(matches); - if (i < dbiIndexSetCount(matches)) return 0; - } + dbiFreeIndexRecord(matches); + if (i < dbiIndexSetCount(matches)) return 0; } }