summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/opkg/opkg
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/opkg/opkg')
-rw-r--r--meta/recipes-devtools/opkg/opkg/add_vercmp.patch34
-rw-r--r--meta/recipes-devtools/opkg/opkg/headerfix.patch17
-rw-r--r--meta/recipes-devtools/opkg/opkg/logfix.patch23
3 files changed, 74 insertions, 0 deletions
diff --git a/meta/recipes-devtools/opkg/opkg/add_vercmp.patch b/meta/recipes-devtools/opkg/opkg/add_vercmp.patch
new file mode 100644
index 0000000000..540be83950
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/add_vercmp.patch
@@ -0,0 +1,34 @@
1Index: trunk/libopkg/opkg.c
2===================================================================
3--- trunk.orig/libopkg/opkg.c 2010-01-26 20:32:19.000000000 +0000
4+++ trunk/libopkg/opkg.c 2010-01-26 20:40:34.000000000 +0000
5@@ -876,3 +876,18 @@
6
7 return ret;
8 }
9+
10+int
11+opkg_compare_versions (const char *ver1, const char *ver2)
12+{
13+ pkg_t *pkg1, *pkg2;
14+
15+ pkg1 = pkg_new();
16+ pkg2 = pkg_new();
17+
18+ parse_version(pkg1, ver1);
19+ parse_version(pkg2, ver2);
20+
21+ return pkg_compare_versions(pkg1, pkg2);
22+}
23+
24Index: trunk/libopkg/opkg.h
25===================================================================
26--- trunk.orig/libopkg/opkg.h 2010-01-26 20:32:19.000000000 +0000
27+++ trunk/libopkg/opkg.h 2010-01-26 20:35:19.000000000 +0000
28@@ -58,4 +58,6 @@
29
30 int opkg_repository_accessibility_check(void);
31
32+int opkg_compare_versions (const char *ver1, const char *ver2);
33+
34 #endif /* OPKG_H */
diff --git a/meta/recipes-devtools/opkg/opkg/headerfix.patch b/meta/recipes-devtools/opkg/opkg/headerfix.patch
new file mode 100644
index 0000000000..d0711ecd0e
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/headerfix.patch
@@ -0,0 +1,17 @@
1Without this, the FILE reference in this header can cause compile issues.
2
3RP - 29/1/10
4
5Index: trunk/libopkg/pkg_dest.h
6===================================================================
7--- trunk.orig/libopkg/pkg_dest.h 2010-01-29 09:37:22.000000000 +0000
8+++ trunk/libopkg/pkg_dest.h 2010-01-29 09:37:33.000000000 +0000
9@@ -18,6 +18,8 @@
10 #ifndef PKG_DEST_H
11 #define PKG_DEST_H
12
13+#include <stdio.h>
14+
15 typedef struct pkg_dest pkg_dest_t;
16 struct pkg_dest
17 {
diff --git a/meta/recipes-devtools/opkg/opkg/logfix.patch b/meta/recipes-devtools/opkg/opkg/logfix.patch
new file mode 100644
index 0000000000..da06f00bd0
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/logfix.patch
@@ -0,0 +1,23 @@
1Patch to remove "duplicate" bits of logs from opkg output, which
2massively simplifies do_rootfs logs. The reason is we get unflushed
3data passed to the children and duplicated.
4
5RP - 26/1/10
6
7Index: trunk/libbb/gz_open.c
8===================================================================
9--- trunk.orig/libbb/gz_open.c 2010-01-26 23:12:10.000000000 +0000
10+++ trunk/libbb/gz_open.c 2010-01-26 23:12:17.000000000 +0000
11@@ -38,6 +38,12 @@
12 perror_msg("pipe");
13 return(NULL);
14 }
15+
16+ /* If we don't flush, we end up with two copies of anything pending,
17+ one from the parent, one from the child */
18+ fflush(stdout);
19+ fflush(stderr);
20+
21 if ((*pid = fork()) == -1) {
22 perror_msg("fork");
23 return(NULL);