summaryrefslogtreecommitdiff
path: root/packages/ipkg/files/enable_debversion.patch
blob: e9c3a7a1d49c8e1b7191bd54e8399d153cffb91f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
OE makes heavy use of the revision field so it makes sense to 
enable it. We don't want the familiar stuff though so patch that 
out.

RP - 19/02/2008

Index: ipkg-0.99.163/pkg.c
===================================================================
--- ipkg-0.99.163.orig/pkg.c	2008-02-19 00:35:03.000000000 +0000
+++ ipkg-0.99.163/pkg.c	2008-02-19 00:36:02.000000000 +0000
@@ -1118,15 +1118,11 @@
 	  return r;
      }
 
-#ifdef USE_DEBVERSION
      r = verrevcmp(pkg->revision, ref_pkg->revision);
      if (r) {
 	  return r;
      }
 
-     r = verrevcmp(pkg->familiar_revision, ref_pkg->familiar_revision);
-#endif
-
      return r;
 }
 
@@ -1240,10 +1236,7 @@
 {
      char *complete_version;
      char *epoch_str;
-#ifdef USE_DEBVERSION
      char *revision_str;
-     char *familiar_revision_str;
-#endif
 
      if (pkg->epoch) {
 	  sprintf_alloc(&epoch_str, "%d:", pkg->epoch);
@@ -1251,33 +1244,18 @@
 	  epoch_str = strdup("");
      }
 
-#ifdef USE_DEBVERSION
      if (pkg->revision && strlen(pkg->revision)) {
 	  sprintf_alloc(&revision_str, "-%s", pkg->revision);
      } else {
 	  revision_str = strdup("");
      }
 
-     if (pkg->familiar_revision && strlen(pkg->familiar_revision)) {
-	  sprintf_alloc(&familiar_revision_str, "-fam%s", pkg->familiar_revision);
-     } else {
-	  familiar_revision_str = strdup("");
-     }
-#endif
 
-#ifdef USE_DEBVERSION
-     sprintf_alloc(&complete_version, "%s%s%s%s",
-		   epoch_str, pkg->version, revision_str, familiar_revision_str);
-#else
-     sprintf_alloc(&complete_version, "%s%s",
-		   epoch_str, pkg->version);
-#endif
+     sprintf_alloc(&complete_version, "%s%s%s",
+		   epoch_str, pkg->version, revision_str);
 
      free(epoch_str);
-#ifdef USE_DEBVERSION
      free(revision_str);
-     free(familiar_revision_str);
-#endif
 
      return complete_version;
 }
Index: ipkg-0.99.163/pkg_parse.c
===================================================================
--- ipkg-0.99.163.orig/pkg_parse.c	2008-02-19 00:35:03.000000000 +0000
+++ ipkg-0.99.163/pkg_parse.c	2008-02-19 00:38:42.000000000 +0000
@@ -105,9 +105,7 @@
 int parseVersion(pkg_t *pkg, char *raw)
 {
   char *colon, *eepochcolon;
-#ifdef USE_DEBVERSION
   char *hyphen;
-#endif
   unsigned long epoch;
 
   if (!*raw) {
@@ -149,23 +147,12 @@
   }
   strcpy(pkg->version, raw);
 
-#ifdef USE_DEBVERSION
   hyphen= strrchr(pkg->version,'-');
 
   if (hyphen) {
     *hyphen++= 0;
-    if (strncmp("fam", hyphen, 3) == 0) {
-      pkg->familiar_revision=hyphen+3;
-      hyphen= strrchr(pkg->version,'-');
-      if (hyphen) {
-	*hyphen++= 0;
-	pkg->revision = hyphen;
-      }
-    } else {
       pkg->revision = hyphen;
-    }
   }
-#endif
 
 /*
   fprintf(stderr,"Parsed version: %lu, %s, %s, %s\n",