Map PreReq into Requires(pre,preun) at build
authorPanu Matilainen <pmatilai@redhat.com>
Mon, 1 Jun 2009 10:28:50 +0000 (13:28 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Mon, 1 Jun 2009 10:28:50 +0000 (13:28 +0300)
- this gives a more reasonable mapping to former behavior of PreReq
  when cutting loops

build/parseReqs.c

index a983496..73c6cdc 100644 (file)
@@ -59,7 +59,8 @@ rpmRC parseRCPOT(rpmSpec spec, Package pkg, const char *field, rpmTag tagN,
        h = spec->buildRestrictions;
        break;
     case RPMTAG_PREREQ:
-       tagflags |= RPMSENSE_PREREQ;
+       /* XXX map legacy PreReq into Requires(pre,preun) */
+       tagflags |= (RPMSENSE_SCRIPT_PRE|RPMSENSE_SCRIPT_PREUN);
        h = pkg->header;
        break;
     case RPMTAG_TRIGGERPREIN: