summaryrefslogtreecommitdiffstats
path: root/meta/packages/ipkg/files/enable_debversion.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/ipkg/files/enable_debversion.patch')
-rw-r--r--meta/packages/ipkg/files/enable_debversion.patch111
1 files changed, 111 insertions, 0 deletions
diff --git a/meta/packages/ipkg/files/enable_debversion.patch b/meta/packages/ipkg/files/enable_debversion.patch
new file mode 100644
index 0000000000..e9c3a7a1d4
--- /dev/null
+++ b/meta/packages/ipkg/files/enable_debversion.patch
@@ -0,0 +1,111 @@
1OE makes heavy use of the revision field so it makes sense to
2enable it. We don't want the familiar stuff though so patch that
3out.
4
5RP - 19/02/2008
6
7Index: ipkg-0.99.163/pkg.c
8===================================================================
9--- ipkg-0.99.163.orig/pkg.c 2008-02-19 00:35:03.000000000 +0000
10+++ ipkg-0.99.163/pkg.c 2008-02-19 00:36:02.000000000 +0000
11@@ -1118,15 +1118,11 @@
12 return r;
13 }
14
15-#ifdef USE_DEBVERSION
16 r = verrevcmp(pkg->revision, ref_pkg->revision);
17 if (r) {
18 return r;
19 }
20
21- r = verrevcmp(pkg->familiar_revision, ref_pkg->familiar_revision);
22-#endif
23-
24 return r;
25 }
26
27@@ -1240,10 +1236,7 @@
28 {
29 char *complete_version;
30 char *epoch_str;
31-#ifdef USE_DEBVERSION
32 char *revision_str;
33- char *familiar_revision_str;
34-#endif
35
36 if (pkg->epoch) {
37 sprintf_alloc(&epoch_str, "%d:", pkg->epoch);
38@@ -1251,33 +1244,18 @@
39 epoch_str = strdup("");
40 }
41
42-#ifdef USE_DEBVERSION
43 if (pkg->revision && strlen(pkg->revision)) {
44 sprintf_alloc(&revision_str, "-%s", pkg->revision);
45 } else {
46 revision_str = strdup("");
47 }
48
49- if (pkg->familiar_revision && strlen(pkg->familiar_revision)) {
50- sprintf_alloc(&familiar_revision_str, "-fam%s", pkg->familiar_revision);
51- } else {
52- familiar_revision_str = strdup("");
53- }
54-#endif
55
56-#ifdef USE_DEBVERSION
57- sprintf_alloc(&complete_version, "%s%s%s%s",
58- epoch_str, pkg->version, revision_str, familiar_revision_str);
59-#else
60- sprintf_alloc(&complete_version, "%s%s",
61- epoch_str, pkg->version);
62-#endif
63+ sprintf_alloc(&complete_version, "%s%s%s",
64+ epoch_str, pkg->version, revision_str);
65
66 free(epoch_str);
67-#ifdef USE_DEBVERSION
68 free(revision_str);
69- free(familiar_revision_str);
70-#endif
71
72 return complete_version;
73 }
74Index: ipkg-0.99.163/pkg_parse.c
75===================================================================
76--- ipkg-0.99.163.orig/pkg_parse.c 2008-02-19 00:35:03.000000000 +0000
77+++ ipkg-0.99.163/pkg_parse.c 2008-02-19 00:38:42.000000000 +0000
78@@ -105,9 +105,7 @@
79 int parseVersion(pkg_t *pkg, char *raw)
80 {
81 char *colon, *eepochcolon;
82-#ifdef USE_DEBVERSION
83 char *hyphen;
84-#endif
85 unsigned long epoch;
86
87 if (!*raw) {
88@@ -149,23 +147,12 @@
89 }
90 strcpy(pkg->version, raw);
91
92-#ifdef USE_DEBVERSION
93 hyphen= strrchr(pkg->version,'-');
94
95 if (hyphen) {
96 *hyphen++= 0;
97- if (strncmp("fam", hyphen, 3) == 0) {
98- pkg->familiar_revision=hyphen+3;
99- hyphen= strrchr(pkg->version,'-');
100- if (hyphen) {
101- *hyphen++= 0;
102- pkg->revision = hyphen;
103- }
104- } else {
105 pkg->revision = hyphen;
106- }
107 }
108-#endif
109
110 /*
111 fprintf(stderr,"Parsed version: %lu, %s, %s, %s\n",