]> git.pld-linux.org Git - packages/rpm.git/blob - rpm-kill-prereq.patch
- updated for 4.4.3
[packages/rpm.git] / rpm-kill-prereq.patch
1 --- rpm-4.4.2/lib/depends.c.orig        2005-10-07 13:39:39.000000000 +0200
2 +++ rpm-4.4.2/lib/depends.c     2005-10-07 13:45:07.000000000 +0200
3 @@ -966,8 +966,6 @@
4  static inline /*@observer@*/ const char * const identifyDepend(int_32 f)
5         /*@*/
6  {
7 -    if (isLegacyPreReq(f))
8 -       return "PreReq:";
9      f = _notpre(f);
10      if (f & RPMSENSE_SCRIPT_PRE)
11         return "Requires(pre):";
12 @@ -1035,7 +1033,7 @@
13          * Attempt to unravel a dependency loop by eliminating Requires's.
14          */
15         /*@-branchstate@*/
16 -       if (zap && !(Flags & RPMSENSE_PREREQ)) {
17 +       if (zap) {
18             rpmMessage(msglvl,
19                         _("removing %s \"%s\" from tsort relations.\n"),
20                         (rpmteNEVRA(p) ?  rpmteNEVRA(p) : "???"), dp);
21 @@ -1297,15 +1295,15 @@
22  
23             switch (rpmteType(p)) {
24             case TR_REMOVED:
25 -               /* Skip if not %preun/%postun requires or legacy prereq. */
26 +               /* Skip if not %preun/%postun requires */
27                 if (isInstallPreReq(Flags)
28 -                || !( isErasePreReq(Flags) || isLegacyPreReq(Flags) ) )
29 +                || !( isErasePreReq(Flags) ) )
30                     /*@innercontinue@*/ continue;
31                 /*@switchbreak@*/ break;
32             case TR_ADDED:
33 -               /* Skip if not %pre/%post requires or legacy prereq. */
34 +               /* Skip if not %pre/%post requires */
35                 if (isErasePreReq(Flags)
36 -                || !( isInstallPreReq(Flags) || isLegacyPreReq(Flags) ) )
37 +                || !( isInstallPreReq(Flags) ) )
38                     /*@innercontinue@*/ continue;
39                 /*@switchbreak@*/ break;
40             }
41 @@ -1324,15 +1322,15 @@
42  
43             switch (rpmteType(p)) {
44             case TR_REMOVED:
45 -               /* Skip if %preun/%postun requires or legacy prereq. */
46 +               /* Skip if %preun/%postun requires */
47                 if (isInstallPreReq(Flags)
48 -                ||  ( isErasePreReq(Flags) || isLegacyPreReq(Flags) ) )
49 +                ||  ( isErasePreReq(Flags) ) )
50                     /*@innercontinue@*/ continue;
51                 /*@switchbreak@*/ break;
52             case TR_ADDED:
53 -               /* Skip if %pre/%post requires or legacy prereq. */
54 +               /* Skip if %pre/%post requires */
55                 if (isErasePreReq(Flags)
56 -                ||  ( isInstallPreReq(Flags) || isLegacyPreReq(Flags) ) )
57 +                ||  ( isInstallPreReq(Flags) ) )
58                     /*@innercontinue@*/ continue;
59                 /*@switchbreak@*/ break;
60             }
61 --- rpm-4.4.2/lib/rpmlib.h.orig 2005-07-12 12:38:54.000000000 +0200
62 +++ rpm-4.4.2/lib/rpmlib.h      2005-10-07 13:47:23.000000000 +0200
63 @@ -505,13 +505,13 @@
64      RPMSENSE_PROVIDES  = (1 << 4), /* only used internally by builds */
65      RPMSENSE_CONFLICTS = (1 << 5), /* only used internally by builds */
66         /* bit 6 used to be RPMSENSE_PREREQ */
67 -#define        RPMSENSE_PREREQ RPMSENSE_ANY
68 +    RPMSENSE_PREREQ    = (1 << 6), /* phased out. */
69      RPMSENSE_OBSOLETES = (1 << 7), /* only used internally by builds */
70      RPMSENSE_INTERP    = (1 << 8),     /*!< Interpreter used by scriptlet. */
71 -    RPMSENSE_SCRIPT_PRE        = ((1 << 9)|RPMSENSE_PREREQ), /*!< %pre dependency. */
72 -    RPMSENSE_SCRIPT_POST = ((1 << 10)|RPMSENSE_PREREQ), /*!< %post dependency. */
73 -    RPMSENSE_SCRIPT_PREUN = ((1 << 11)|RPMSENSE_PREREQ), /*!< %preun dependency. */
74 -    RPMSENSE_SCRIPT_POSTUN = ((1 << 12)|RPMSENSE_PREREQ), /*!< %postun dependency. */
75 +    RPMSENSE_SCRIPT_PRE        = (1 << 9), /*!< %pre dependency. */
76 +    RPMSENSE_SCRIPT_POST = (1 << 10), /*!< %post dependency. */
77 +    RPMSENSE_SCRIPT_PREUN = (1 << 11), /*!< %preun dependency. */
78 +    RPMSENSE_SCRIPT_POSTUN = (1 << 12), /*!< %postun dependency. */
79      RPMSENSE_SCRIPT_VERIFY = (1 << 13),        /*!< %verify dependency. */
80      RPMSENSE_FIND_REQUIRES = (1 << 14), /*!< find-requires generated dependency. */
81      RPMSENSE_FIND_PROVIDES = (1 << 15), /*!< find-provides generated dependency. */
82 @@ -524,7 +524,7 @@
83      RPMSENSE_SCRIPT_BUILD = (1 << 21), /*!< %build build dependency. */
84      RPMSENSE_SCRIPT_INSTALL = (1 << 22),/*!< %install build dependency. */
85      RPMSENSE_SCRIPT_CLEAN = (1 << 23), /*!< %clean build dependency. */
86 -    RPMSENSE_RPMLIB = ((1 << 24) | RPMSENSE_PREREQ), /*!< rpmlib(feature) dependency. */
87 +    RPMSENSE_RPMLIB = (1 << 24), /*!< rpmlib(feature) dependency. */
88  /*@-enummemuse@*/
89      RPMSENSE_TRIGGERPREIN = (1 << 25), /*!< @todo Implement %triggerprein. */
90  /*@=enummemuse@*/
91 @@ -560,7 +560,7 @@
92  #define        _ERASE_ONLY_MASK  \
93      _notpre(RPMSENSE_SCRIPT_PREUN|RPMSENSE_SCRIPT_POSTUN)
94  
95 -#define        isLegacyPreReq(_x)  (((_x) & _ALL_REQUIRES_MASK) == RPMSENSE_PREREQ)
96 +#define        isLegacyPreReq(_x)  (0)
97  #define        isInstallPreReq(_x)     ((_x) & _INSTALL_ONLY_MASK)
98  #define        isErasePreReq(_x)       ((_x) & _ERASE_ONLY_MASK)
99  
100 --- rpm-4.4.2/build/parseReqs.c.orig    2004-10-17 20:44:15.000000000 +0200
101 +++ rpm-4.4.2/build/parseReqs.c 2005-10-07 13:40:50.000000000 +0200
102 @@ -58,11 +58,11 @@
103         h = spec->buildRestrictions;
104         break;
105      case RPMTAG_PREREQ:
106 -       tagflags |= RPMSENSE_PREREQ;
107 +       tagflags |= RPMSENSE_ANY;
108         h = pkg->header;
109         break;
110      case RPMTAG_BUILDPREREQ:
111 -       tagflags |= RPMSENSE_PREREQ;
112 +       tagflags |= RPMSENSE_ANY;
113         h = spec->buildRestrictions;
114         break;
115      case RPMTAG_TRIGGERIN:
116 --- rpm-4.4.2/build/reqprov.c.orig      2004-10-09 20:23:00.000000000 +0200
117 +++ rpm-4.4.2/build/reqprov.c   2005-10-07 13:42:01.000000000 +0200
118 @@ -37,11 +37,6 @@
119         nametag = RPMTAG_CONFLICTNAME;
120         versiontag = RPMTAG_CONFLICTVERSION;
121         flagtag = RPMTAG_CONFLICTFLAGS;
122 -    } else if (Flags & RPMSENSE_PREREQ) {
123 -       nametag = RPMTAG_REQUIRENAME;
124 -       versiontag = RPMTAG_REQUIREVERSION;
125 -       flagtag = RPMTAG_REQUIREFLAGS;
126 -       extra = Flags & _ALL_REQUIRES_MASK;
127      } else if (Flags & RPMSENSE_TRIGGER) {
128         nametag = RPMTAG_TRIGGERNAME;
129         versiontag = RPMTAG_TRIGGERVERSION;
130 --- rpm-4.4.2/build/rpmfc.c.orig        2005-10-07 13:39:40.000000000 +0200
131 +++ rpm-4.4.2/build/rpmfc.c     2005-10-07 13:42:14.000000000 +0200
132 @@ -1634,18 +1634,9 @@
133    { "Provides",                { "%{?__find_provides}", NULL, NULL, NULL },
134         RPMTAG_PROVIDENAME, RPMTAG_PROVIDEVERSION, RPMTAG_PROVIDEFLAGS,
135         0, -1 },
136 -#ifdef DYING
137 -  { "PreReq",          { NULL, NULL, NULL, NULL },
138 -       RPMTAG_REQUIRENAME, RPMTAG_REQUIREVERSION, RPMTAG_REQUIREFLAGS,
139 -       RPMSENSE_PREREQ, 0 },
140 -  { "Requires(interp)",        { NULL, "interp", NULL, NULL },
141 -       -1, -1, RPMTAG_REQUIREFLAGS,
142 -       _notpre(RPMSENSE_INTERP), 0 },
143 -#else
144    { "Requires(interp)",        { NULL, "interp", NULL, NULL },
145         RPMTAG_REQUIRENAME, RPMTAG_REQUIREVERSION, RPMTAG_REQUIREFLAGS,
146         _notpre(RPMSENSE_INTERP), 0 },
147 -#endif
148    { "Requires(rpmlib)",        { NULL, "rpmlib", NULL, NULL },
149         -1, -1, RPMTAG_REQUIREFLAGS,
150         _notpre(RPMSENSE_RPMLIB), 0 },
This page took 0.056917 seconds and 3 git commands to generate.