diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-01-26 23:18:28 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-01-26 23:19:09 +0000 |
commit | 67fbc5c8719df7f0c1a82324c5276bcf76bb982c (patch) | |
tree | 32e2ddd4aedd0540eec6b0d3c171b962372640b1 /meta/packages | |
parent | 6391725f947ac216d168a37e10d174eab8542ab7 (diff) | |
download | poky-67fbc5c8719df7f0c1a82324c5276bcf76bb982c.tar.gz |
opkg: Update to latest svn and apply patch to enable readable logfiles
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/packages')
-rw-r--r-- | meta/packages/opkg/opkg.inc | 6 | ||||
-rw-r--r-- | meta/packages/opkg/opkg/add_vercmp.patch | 22 | ||||
-rw-r--r-- | meta/packages/opkg/opkg/fix_prototype.patch | 39 | ||||
-rw-r--r-- | meta/packages/opkg/opkg/logfix.patch | 23 | ||||
-rw-r--r-- | meta/packages/opkg/opkg/opkg-fix-gcc-warnings.patch | 53 | ||||
-rw-r--r-- | meta/packages/opkg/opkg/opkg-intercept-cleanup.patch | 47 | ||||
-rw-r--r-- | meta/packages/opkg/opkg/sighandlerfix.patch | 14 | ||||
-rw-r--r-- | meta/packages/opkg/opkg_svn.bb | 11 |
8 files changed, 38 insertions, 177 deletions
diff --git a/meta/packages/opkg/opkg.inc b/meta/packages/opkg/opkg.inc index 1d1cb5c26f..8b8c25aa03 100644 --- a/meta/packages/opkg/opkg.inc +++ b/meta/packages/opkg/opkg.inc | |||
@@ -11,8 +11,8 @@ PE = "1" | |||
11 | 11 | ||
12 | SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;proto=http \ | 12 | SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;proto=http \ |
13 | file://opkg_unarchive.patch;patch=1;maxrev=201 \ | 13 | file://opkg_unarchive.patch;patch=1;maxrev=201 \ |
14 | file://opkg-intercept-cleanup.patch;patch=1 \ | 14 | file://add_vercmp.patch;patch=1 \ |
15 | file://add_vercmp.patch;patch=1" | 15 | file://logfix.patch;patch=1 " |
16 | 16 | ||
17 | S = "${WORKDIR}/trunk" | 17 | S = "${WORKDIR}/trunk" |
18 | 18 | ||
@@ -26,7 +26,7 @@ do_configure_prepend() { | |||
26 | inherit autotools_stage pkgconfig | 26 | inherit autotools_stage pkgconfig |
27 | 27 | ||
28 | target_libdir := "${libdir}" | 28 | target_libdir := "${libdir}" |
29 | EXTRA_OECONF_virtclass-native = "--with-opkglibdir=${target_libdir} --disable-gpg" | 29 | EXTRA_OECONF_virtclass-native = "--with-opkglibdir=${target_libdir} --disable-gpg --disable-curl" |
30 | EXTRA_OECONF_virtclass-nativesdk = "--with-opkglibdir=${target_libdir} --disable-gpg" | 30 | EXTRA_OECONF_virtclass-nativesdk = "--with-opkglibdir=${target_libdir} --disable-gpg" |
31 | 31 | ||
32 | #PROVIDES_append_virtclass-native = "virtual/update-alternatives-native" | 32 | #PROVIDES_append_virtclass-native = "virtual/update-alternatives-native" |
diff --git a/meta/packages/opkg/opkg/add_vercmp.patch b/meta/packages/opkg/opkg/add_vercmp.patch index 5c0473ff70..540be83950 100644 --- a/meta/packages/opkg/opkg/add_vercmp.patch +++ b/meta/packages/opkg/opkg/add_vercmp.patch | |||
@@ -1,10 +1,10 @@ | |||
1 | Index: trunk/libopkg/opkg.c | 1 | Index: trunk/libopkg/opkg.c |
2 | =================================================================== | 2 | =================================================================== |
3 | --- trunk.orig/libopkg/opkg.c 2009-10-05 14:33:47.000000000 +0100 | 3 | --- trunk.orig/libopkg/opkg.c 2010-01-26 20:32:19.000000000 +0000 |
4 | +++ trunk/libopkg/opkg.c 2009-10-05 20:59:19.000000000 +0100 | 4 | +++ trunk/libopkg/opkg.c 2010-01-26 20:40:34.000000000 +0000 |
5 | @@ -1092,3 +1092,18 @@ | 5 | @@ -876,3 +876,18 @@ |
6 | free(src); | 6 | |
7 | return ret; | 7 | return ret; |
8 | } | 8 | } |
9 | + | 9 | + |
10 | +int | 10 | +int |
@@ -15,19 +15,19 @@ Index: trunk/libopkg/opkg.c | |||
15 | + pkg1 = pkg_new(); | 15 | + pkg1 = pkg_new(); |
16 | + pkg2 = pkg_new(); | 16 | + pkg2 = pkg_new(); |
17 | + | 17 | + |
18 | + parseVersion(pkg1, ver1); | 18 | + parse_version(pkg1, ver1); |
19 | + parseVersion(pkg2, ver2); | 19 | + parse_version(pkg2, ver2); |
20 | + | 20 | + |
21 | + return pkg_compare_versions(pkg1, pkg2); | 21 | + return pkg_compare_versions(pkg1, pkg2); |
22 | +} | 22 | +} |
23 | + | 23 | + |
24 | Index: trunk/libopkg/opkg.h | 24 | Index: trunk/libopkg/opkg.h |
25 | =================================================================== | 25 | =================================================================== |
26 | --- trunk.orig/libopkg/opkg.h 2009-10-05 21:06:22.000000000 +0100 | 26 | --- trunk.orig/libopkg/opkg.h 2010-01-26 20:32:19.000000000 +0000 |
27 | +++ trunk/libopkg/opkg.h 2009-10-05 21:06:35.000000000 +0100 | 27 | +++ trunk/libopkg/opkg.h 2010-01-26 20:35:19.000000000 +0000 |
28 | @@ -87,4 +87,6 @@ | 28 | @@ -58,4 +58,6 @@ |
29 | 29 | ||
30 | int opkg_repository_accessibility_check(opkg_t *opkg); | 30 | int opkg_repository_accessibility_check(void); |
31 | 31 | ||
32 | +int opkg_compare_versions (const char *ver1, const char *ver2); | 32 | +int opkg_compare_versions (const char *ver1, const char *ver2); |
33 | + | 33 | + |
diff --git a/meta/packages/opkg/opkg/fix_prototype.patch b/meta/packages/opkg/opkg/fix_prototype.patch deleted file mode 100644 index 4be881aa7e..0000000000 --- a/meta/packages/opkg/opkg/fix_prototype.patch +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | Index: opkg/libopkg/opkg_utils.c | ||
2 | =================================================================== | ||
3 | --- opkg.orig/libopkg/opkg_utils.c 2008-10-23 09:36:52.000000000 +0100 | ||
4 | +++ opkg/libopkg/opkg_utils.c 2008-10-23 09:37:05.000000000 +0100 | ||
5 | @@ -165,7 +165,7 @@ | ||
6 | } | ||
7 | |||
8 | |||
9 | -void free_error_list(){ | ||
10 | +void free_error_list(void){ | ||
11 | struct errlist *err_tmp_lst; | ||
12 | |||
13 | err_tmp_lst = error_list; | ||
14 | Index: opkg/libopkg/opkg_utils.h | ||
15 | =================================================================== | ||
16 | --- opkg.orig/libopkg/opkg_utils.h 2008-10-23 09:36:50.000000000 +0100 | ||
17 | +++ opkg/libopkg/opkg_utils.h 2008-10-23 09:37:13.000000000 +0100 | ||
18 | @@ -23,7 +23,7 @@ | ||
19 | |||
20 | void push_error_list(struct errlist **errors,char * msg); | ||
21 | void reverse_error_list(struct errlist **errors); | ||
22 | -void free_error_list(); | ||
23 | +void free_error_list(void); | ||
24 | |||
25 | int get_available_blocks(char * filesystem); | ||
26 | char **read_raw_pkgs_from_file(const char *file_name); | ||
27 | Index: opkg/libopkg/opkg_cmd.c | ||
28 | =================================================================== | ||
29 | --- opkg.orig/libopkg/opkg_cmd.c 2008-10-23 12:02:29.000000000 +0100 | ||
30 | +++ opkg/libopkg/opkg_cmd.c 2008-10-23 12:02:53.000000000 +0100 | ||
31 | @@ -151,7 +151,7 @@ | ||
32 | error_list = error_list->next; | ||
33 | |||
34 | } | ||
35 | - free_error_list(&error_list); | ||
36 | + free_error_list(); | ||
37 | } | ||
38 | |||
39 | } | ||
diff --git a/meta/packages/opkg/opkg/logfix.patch b/meta/packages/opkg/opkg/logfix.patch new file mode 100644 index 0000000000..da06f00bd0 --- /dev/null +++ b/meta/packages/opkg/opkg/logfix.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | Patch to remove "duplicate" bits of logs from opkg output, which | ||
2 | massively simplifies do_rootfs logs. The reason is we get unflushed | ||
3 | data passed to the children and duplicated. | ||
4 | |||
5 | RP - 26/1/10 | ||
6 | |||
7 | Index: 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); | ||
diff --git a/meta/packages/opkg/opkg/opkg-fix-gcc-warnings.patch b/meta/packages/opkg/opkg/opkg-fix-gcc-warnings.patch deleted file mode 100644 index 149542ed6a..0000000000 --- a/meta/packages/opkg/opkg/opkg-fix-gcc-warnings.patch +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | diff -urN opkg.orig/libopkg/libopkg.c opkg/libopkg/libopkg.c | ||
2 | --- opkg.orig/libopkg/libopkg.c 2009-02-09 10:49:40.000000000 +0000 | ||
3 | +++ opkg/libopkg/libopkg.c 2009-02-09 10:50:23.000000000 +0000 | ||
4 | @@ -38,7 +38,7 @@ | ||
5 | if ( level == OPKG_ERROR ){ | ||
6 | push_error_list(&error_list, msg); | ||
7 | } else | ||
8 | - printf(msg); | ||
9 | + printf("%s", msg); | ||
10 | } | ||
11 | return 0; | ||
12 | } | ||
13 | @@ -71,7 +71,7 @@ | ||
14 | char* default_opkg_response_callback(char *question) | ||
15 | { | ||
16 | char *response = NULL; | ||
17 | - printf(question); | ||
18 | + printf("%s", question); | ||
19 | fflush(stdout); | ||
20 | do { | ||
21 | response = (char *)file_read_line_alloc(stdin); | ||
22 | diff -urN opkg.orig/libopkg/opkg_cmd.c opkg/libopkg/opkg_cmd.c | ||
23 | --- opkg.orig/libopkg/opkg_cmd.c 2009-02-09 10:49:40.000000000 +0000 | ||
24 | +++ opkg/libopkg/opkg_cmd.c 2009-02-09 10:50:23.000000000 +0000 | ||
25 | @@ -369,7 +369,7 @@ | ||
26 | perror (ctx->statedir); | ||
27 | |||
28 | sprintf_alloc (&cmd, "rm -rf %s", ctx->statedir); | ||
29 | - system (cmd); | ||
30 | + err = system (cmd); | ||
31 | free (cmd); | ||
32 | |||
33 | free (ctx->statedir); | ||
34 | diff -urN opkg.orig/libopkg/pkg.c opkg/libopkg/pkg.c | ||
35 | --- opkg.orig/libopkg/pkg.c 2009-02-09 10:49:40.000000000 +0000 | ||
36 | +++ opkg/libopkg/pkg.c 2009-02-09 10:52:49.000000000 +0000 | ||
37 | @@ -1052,6 +1052,7 @@ | ||
38 | |||
39 | void pkg_print_info(pkg_t *pkg, FILE *file) | ||
40 | { | ||
41 | + int t = 0; | ||
42 | char * buff; | ||
43 | if (pkg == NULL) { | ||
44 | return; | ||
45 | @@ -1061,7 +1062,7 @@ | ||
46 | if ( buff == NULL ) | ||
47 | return; | ||
48 | if (strlen(buff)>2){ | ||
49 | - fwrite(buff, 1, strlen(buff), file); | ||
50 | + t = fwrite(buff, 1, strlen(buff), file); /* TODO: check t */ | ||
51 | } | ||
52 | free(buff); | ||
53 | } | ||
diff --git a/meta/packages/opkg/opkg/opkg-intercept-cleanup.patch b/meta/packages/opkg/opkg/opkg-intercept-cleanup.patch deleted file mode 100644 index 12893e3852..0000000000 --- a/meta/packages/opkg/opkg/opkg-intercept-cleanup.patch +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | --- | ||
2 | libopkg/opkg_cmd.c | 13 +++++++++---- | ||
3 | 1 file changed, 9 insertions(+), 4 deletions(-) | ||
4 | |||
5 | --- trunk.orig/libopkg/opkg_cmd.c | ||
6 | +++ trunk/libopkg/opkg_cmd.c | ||
7 | @@ -19,6 +19,7 @@ | ||
8 | #include "includes.h" | ||
9 | #include <dirent.h> | ||
10 | #include <glob.h> | ||
11 | +#include <unistd.h> | ||
12 | |||
13 | #include "opkg_conf.h" | ||
14 | #include "opkg_cmd.h" | ||
15 | @@ -350,7 +351,6 @@ static opkg_intercept_t opkg_prep_interc | ||
16 | |||
17 | static int opkg_finalize_intercepts(opkg_intercept_t ctx) | ||
18 | { | ||
19 | - char *cmd; | ||
20 | DIR *dir; | ||
21 | int err = 0; | ||
22 | |||
23 | @@ -376,6 +376,10 @@ static int opkg_finalize_intercepts(opkg | ||
24 | err = errno; | ||
25 | perror (de->d_name); | ||
26 | } | ||
27 | + if (unlink (path)) { | ||
28 | + err = errno; | ||
29 | + perror (path); | ||
30 | + } | ||
31 | } | ||
32 | free (path); | ||
33 | } | ||
34 | @@ -383,9 +387,10 @@ static int opkg_finalize_intercepts(opkg | ||
35 | } else | ||
36 | perror (ctx->statedir); | ||
37 | |||
38 | - sprintf_alloc (&cmd, "rm -rf %s", ctx->statedir); | ||
39 | - err = system (cmd); | ||
40 | - free (cmd); | ||
41 | + if (rmdir (ctx->statedir)) { | ||
42 | + err = errno; | ||
43 | + perror (ctx->statedir); | ||
44 | + } | ||
45 | |||
46 | free (ctx->statedir); | ||
47 | free (ctx); | ||
diff --git a/meta/packages/opkg/opkg/sighandlerfix.patch b/meta/packages/opkg/opkg/sighandlerfix.patch deleted file mode 100644 index b60245f581..0000000000 --- a/meta/packages/opkg/opkg/sighandlerfix.patch +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | Index: opkg/libopkg/opkg_install.c | ||
2 | =================================================================== | ||
3 | --- opkg.orig/libopkg/opkg_install.c 2009-05-23 00:20:04.000000000 +0100 | ||
4 | +++ opkg/libopkg/opkg_install.c 2009-05-23 00:20:09.000000000 +0100 | ||
5 | @@ -21,7 +21,9 @@ | ||
6 | #include <glob.h> | ||
7 | #include <time.h> | ||
8 | #include <signal.h> | ||
9 | +#ifndef __USE_GNU | ||
10 | typedef void (*sighandler_t)(int); | ||
11 | +#endif | ||
12 | |||
13 | #include "pkg.h" | ||
14 | #include "pkg_hash.h" | ||
diff --git a/meta/packages/opkg/opkg_svn.bb b/meta/packages/opkg/opkg_svn.bb index b84f63d540..9e1f00c2e2 100644 --- a/meta/packages/opkg/opkg_svn.bb +++ b/meta/packages/opkg/opkg_svn.bb | |||
@@ -6,7 +6,7 @@ RCONFLICTS_update-alternatives-cworth = "update-alternatives-dpkg" | |||
6 | RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives}" | 6 | RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives}" |
7 | PACKAGE_ARCH_update-alternatives-cworth = "all" | 7 | PACKAGE_ARCH_update-alternatives-cworth = "all" |
8 | 8 | ||
9 | PR = "r6" | 9 | PR = "r8" |
10 | 10 | ||
11 | PACKAGES =+ "libopkg-dev libopkg update-alternatives-cworth" | 11 | PACKAGES =+ "libopkg-dev libopkg update-alternatives-cworth" |
12 | 12 | ||
@@ -19,15 +19,6 @@ FILES_libopkg = "${libdir}/*.so.*" | |||
19 | OPKG_INIT_POSITION = "98" | 19 | OPKG_INIT_POSITION = "98" |
20 | OPKG_INIT_POSITION_slugos = "41" | 20 | OPKG_INIT_POSITION_slugos = "41" |
21 | 21 | ||
22 | EXTRACFLAGS = "" | ||
23 | EXTRACFLAGS_omap-3430ldp = "-Wno-array-bounds" | ||
24 | EXTRACFLAGS_omap-3430sdp = "-Wno-array-bounds" | ||
25 | EXTRACFLAGS_beagleboard = "-Wno-array-bounds" | ||
26 | EXTRACFLAGS_qemuarmv7 = "-Wno-array-bounds" | ||
27 | EXTRACFLAGS_overo = "-Wno-array-bounds" | ||
28 | |||
29 | TARGET_CFLAGS += "${EXTRACFLAGS}" | ||
30 | |||
31 | pkg_postinst_${PN} () { | 22 | pkg_postinst_${PN} () { |
32 | #!/bin/sh | 23 | #!/bin/sh |
33 | if [ "x$D" != "x" ]; then | 24 | if [ "x$D" != "x" ]; then |