fix: legacy syntax not even close.
- permit Obsoletes: /path/to/file. CVS patchset: 7474 CVS date: 2004/10/17 18:24:36
This commit is contained in:
parent
dea95c48df
commit
5a91608e91
1
CHANGES
1
CHANGES
|
@ -19,6 +19,7 @@
|
|||
- disable expensive header+payload verifies in default config.
|
||||
- adjust digest/signature stats to count #pkgs and bytes.
|
||||
- obsolete Serial:, Copyright:, and RHNPlatform: syntax in spec files.
|
||||
- permit Obsoletes: /path/to/file.
|
||||
|
||||
4.3.1 -> 4.3.2:
|
||||
- use /etc/selinux/targeted/contexts/files/file_contexts for now.
|
||||
|
|
|
@ -809,13 +809,14 @@ static int findPreambleTag(Spec spec, /*@out@*/rpmTag * tag,
|
|||
initPreambleList();
|
||||
|
||||
for (p = preambleList; p->token != NULL; p++) {
|
||||
if (p->token && !xstrncasecmp(spec->line, p->token, p->len))
|
||||
break;
|
||||
if (!(p->token && !xstrncasecmp(spec->line, p->token, p->len)))
|
||||
continue;
|
||||
if (p->obsolete) {
|
||||
rpmError(RPMERR_BADSPEC, _("Obsolete syntax: %s\n"),
|
||||
p->token);
|
||||
p = NULL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (p == NULL || p->token == NULL)
|
||||
return 1;
|
||||
|
|
|
@ -106,7 +106,6 @@ int parseRCPOT(Spec spec, Package pkg, const char *field, rpmTag tagN,
|
|||
|
||||
/* Don't permit file names as args for certain tags */
|
||||
switch (tagN) {
|
||||
case RPMTAG_OBSOLETEFLAGS:
|
||||
case RPMTAG_CONFLICTFLAGS:
|
||||
case RPMTAG_BUILDCONFLICTS:
|
||||
if (r[0] == '/') {
|
||||
|
|
|
@ -289,7 +289,10 @@ int rpmtsAddInstallElement(rpmts ts, Header h,
|
|||
if (!strcmp(rpmteN(p), Name))
|
||||
continue;
|
||||
|
||||
mi = rpmtsInitIterator(ts, RPMTAG_PROVIDENAME, Name, 0);
|
||||
if (Name[0] == '/')
|
||||
mi = rpmtsInitIterator(ts, RPMTAG_BASENAMES, Name, 0);
|
||||
else
|
||||
mi = rpmtsInitIterator(ts, RPMTAG_PROVIDENAME, Name, 0);
|
||||
|
||||
xx = rpmdbPruneIterator(mi,
|
||||
ts->removedPackages, ts->numRemovedPackages, 1);
|
||||
|
@ -307,11 +310,16 @@ int rpmtsAddInstallElement(rpmts ts, Header h,
|
|||
* If no obsoletes version info is available, match all names.
|
||||
*/
|
||||
if (rpmdsEVR(obsoletes) == NULL
|
||||
|| rpmdsAnyMatchesDep(oh, obsoletes, _rpmds_nopromote))
|
||||
|| rpmdsAnyMatchesDep(oh, obsoletes, _rpmds_nopromote)) {
|
||||
const char * ohNEVRA = hGetNEVRA(oh, NULL);
|
||||
#ifdef DYING /* XXX see http://bugzilla.redhat.com #134497 */
|
||||
if (rpmVersionCompare(h, oh))
|
||||
#endif
|
||||
xx = removePackage(ts, oh, rpmdbGetIteratorOffset(mi), pkgKey);
|
||||
rpmMessage(RPMMESS_DEBUG, _(" Obsoletes: %s\t\terases %s\n"),
|
||||
rpmdsDNEVR(obsoletes)+2, ohNEVRA);
|
||||
ohNEVRA = _free(ohNEVRA);
|
||||
}
|
||||
}
|
||||
mi = rpmdbFreeIterator(mi);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue