]> git.pld-linux.org Git - packages/rpm.git/blob - rpm-epoch0.patch
adcce508ee164329ee76011cb1c51452aec4436b
[packages/rpm.git] / rpm-epoch0.patch
1 --- rpm-4.3/build/parsePreamble.c.orig  2004-02-26 22:31:15.020274848 +0100
2 +++ rpm-4.3/build/parsePreamble.c       2004-02-26 22:33:33.616205064 +0100
3 @@ -455,6 +455,8 @@
4  extern int noLang;
5  /*@=redecl@*/
6  
7 +static int noEpoch;
8 +
9  /**
10   */
11  /*@-boundswrite@*/
12 @@ -626,6 +628,7 @@
13                      spec->lineNum, spec->line);
14             return RPMERR_BADSPEC;
15         }
16 +       noEpoch = 0;
17         xx = headerAddEntry(pkg->header, tag, RPM_INT32_TYPE, &num, 1);
18         break;
19      case RPMTAG_AUTOREQPROV:
20 @@ -865,6 +868,8 @@
21      strcpy(NVR, "(main package)");
22  
23      pkg = newPackage(spec);
24 +    
25 +    noEpoch = 1;
26         
27      if (! initialPackage) {
28         /* There is one option to %package: <pkg> or -n <pkg> */
29 @@ -932,6 +937,11 @@
30      if (!spec->anyarch && checkForValidArchitectures(spec))
31         return RPMERR_BADSPEC;
32  
33 +    if (noEpoch) {
34 +       int num = 0;
35 +       headerAddEntry(pkg->header, RPMTAG_EPOCH, RPM_INT32_TYPE, &num, 1);
36 +    }
37 +
38      if (pkg == spec->packages)
39         fillOutMainPackage(pkg->header);
40  
This page took 0.210102 seconds and 3 git commands to generate.