opkg: Update to latest svn and apply patch to enable readable logfiles

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
Richard Purdie 2010-01-26 23:18:28 +00:00
parent 6391725f94
commit 67fbc5c871
9 changed files with 41 additions and 180 deletions

View File

@ -75,9 +75,9 @@ SRCREV_pn-matchbox-themes-extra ?= "1524"
SRCREV_pn-matchbox-wm-2 ?= "2083"
SRCREV_pn-matchbox-wm ?= "1524"
SRCREV_pn-oh-puzzles ?= "23"
SRCREV_pn-opkg-native ?= "215"
SRCREV_pn-opkg-nativesdk ?= "215"
SRCREV_pn-opkg ?= "215"
SRCREV_pn-opkg-native ?= "518"
SRCREV_pn-opkg-nativesdk ?= "518"
SRCREV_pn-opkg ?= "518"
SRCREV_pn-opkg-utils-native ?= "4534"
SRCREV_pn-opkg-utils ?= "4534"
SRCREV_pn-oprofileui ?= "194"

View File

@ -11,8 +11,8 @@ PE = "1"
SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;proto=http \
file://opkg_unarchive.patch;patch=1;maxrev=201 \
file://opkg-intercept-cleanup.patch;patch=1 \
file://add_vercmp.patch;patch=1"
file://add_vercmp.patch;patch=1 \
file://logfix.patch;patch=1 "
S = "${WORKDIR}/trunk"
@ -26,7 +26,7 @@ do_configure_prepend() {
inherit autotools_stage pkgconfig
target_libdir := "${libdir}"
EXTRA_OECONF_virtclass-native = "--with-opkglibdir=${target_libdir} --disable-gpg"
EXTRA_OECONF_virtclass-native = "--with-opkglibdir=${target_libdir} --disable-gpg --disable-curl"
EXTRA_OECONF_virtclass-nativesdk = "--with-opkglibdir=${target_libdir} --disable-gpg"
#PROVIDES_append_virtclass-native = "virtual/update-alternatives-native"

View File

@ -1,10 +1,10 @@
Index: trunk/libopkg/opkg.c
===================================================================
--- trunk.orig/libopkg/opkg.c 2009-10-05 14:33:47.000000000 +0100
+++ trunk/libopkg/opkg.c 2009-10-05 20:59:19.000000000 +0100
@@ -1092,3 +1092,18 @@
free(src);
return ret;
--- trunk.orig/libopkg/opkg.c 2010-01-26 20:32:19.000000000 +0000
+++ trunk/libopkg/opkg.c 2010-01-26 20:40:34.000000000 +0000
@@ -876,3 +876,18 @@
return ret;
}
+
+int
@ -15,19 +15,19 @@ Index: trunk/libopkg/opkg.c
+ pkg1 = pkg_new();
+ pkg2 = pkg_new();
+
+ parseVersion(pkg1, ver1);
+ parseVersion(pkg2, ver2);
+ parse_version(pkg1, ver1);
+ parse_version(pkg2, ver2);
+
+ return pkg_compare_versions(pkg1, pkg2);
+}
+
Index: trunk/libopkg/opkg.h
===================================================================
--- trunk.orig/libopkg/opkg.h 2009-10-05 21:06:22.000000000 +0100
+++ trunk/libopkg/opkg.h 2009-10-05 21:06:35.000000000 +0100
@@ -87,4 +87,6 @@
--- trunk.orig/libopkg/opkg.h 2010-01-26 20:32:19.000000000 +0000
+++ trunk/libopkg/opkg.h 2010-01-26 20:35:19.000000000 +0000
@@ -58,4 +58,6 @@
int opkg_repository_accessibility_check(opkg_t *opkg);
int opkg_repository_accessibility_check(void);
+int opkg_compare_versions (const char *ver1, const char *ver2);
+

View File

@ -1,39 +0,0 @@
Index: opkg/libopkg/opkg_utils.c
===================================================================
--- opkg.orig/libopkg/opkg_utils.c 2008-10-23 09:36:52.000000000 +0100
+++ opkg/libopkg/opkg_utils.c 2008-10-23 09:37:05.000000000 +0100
@@ -165,7 +165,7 @@
}
-void free_error_list(){
+void free_error_list(void){
struct errlist *err_tmp_lst;
err_tmp_lst = error_list;
Index: opkg/libopkg/opkg_utils.h
===================================================================
--- opkg.orig/libopkg/opkg_utils.h 2008-10-23 09:36:50.000000000 +0100
+++ opkg/libopkg/opkg_utils.h 2008-10-23 09:37:13.000000000 +0100
@@ -23,7 +23,7 @@
void push_error_list(struct errlist **errors,char * msg);
void reverse_error_list(struct errlist **errors);
-void free_error_list();
+void free_error_list(void);
int get_available_blocks(char * filesystem);
char **read_raw_pkgs_from_file(const char *file_name);
Index: opkg/libopkg/opkg_cmd.c
===================================================================
--- opkg.orig/libopkg/opkg_cmd.c 2008-10-23 12:02:29.000000000 +0100
+++ opkg/libopkg/opkg_cmd.c 2008-10-23 12:02:53.000000000 +0100
@@ -151,7 +151,7 @@
error_list = error_list->next;
}
- free_error_list(&error_list);
+ free_error_list();
}
}

View File

@ -0,0 +1,23 @@
Patch to remove "duplicate" bits of logs from opkg output, which
massively simplifies do_rootfs logs. The reason is we get unflushed
data passed to the children and duplicated.
RP - 26/1/10
Index: trunk/libbb/gz_open.c
===================================================================
--- trunk.orig/libbb/gz_open.c 2010-01-26 23:12:10.000000000 +0000
+++ trunk/libbb/gz_open.c 2010-01-26 23:12:17.000000000 +0000
@@ -38,6 +38,12 @@
perror_msg("pipe");
return(NULL);
}
+
+ /* If we don't flush, we end up with two copies of anything pending,
+ one from the parent, one from the child */
+ fflush(stdout);
+ fflush(stderr);
+
if ((*pid = fork()) == -1) {
perror_msg("fork");
return(NULL);

View File

@ -1,53 +0,0 @@
diff -urN opkg.orig/libopkg/libopkg.c opkg/libopkg/libopkg.c
--- opkg.orig/libopkg/libopkg.c 2009-02-09 10:49:40.000000000 +0000
+++ opkg/libopkg/libopkg.c 2009-02-09 10:50:23.000000000 +0000
@@ -38,7 +38,7 @@
if ( level == OPKG_ERROR ){
push_error_list(&error_list, msg);
} else
- printf(msg);
+ printf("%s", msg);
}
return 0;
}
@@ -71,7 +71,7 @@
char* default_opkg_response_callback(char *question)
{
char *response = NULL;
- printf(question);
+ printf("%s", question);
fflush(stdout);
do {
response = (char *)file_read_line_alloc(stdin);
diff -urN opkg.orig/libopkg/opkg_cmd.c opkg/libopkg/opkg_cmd.c
--- opkg.orig/libopkg/opkg_cmd.c 2009-02-09 10:49:40.000000000 +0000
+++ opkg/libopkg/opkg_cmd.c 2009-02-09 10:50:23.000000000 +0000
@@ -369,7 +369,7 @@
perror (ctx->statedir);
sprintf_alloc (&cmd, "rm -rf %s", ctx->statedir);
- system (cmd);
+ err = system (cmd);
free (cmd);
free (ctx->statedir);
diff -urN opkg.orig/libopkg/pkg.c opkg/libopkg/pkg.c
--- opkg.orig/libopkg/pkg.c 2009-02-09 10:49:40.000000000 +0000
+++ opkg/libopkg/pkg.c 2009-02-09 10:52:49.000000000 +0000
@@ -1052,6 +1052,7 @@
void pkg_print_info(pkg_t *pkg, FILE *file)
{
+ int t = 0;
char * buff;
if (pkg == NULL) {
return;
@@ -1061,7 +1062,7 @@
if ( buff == NULL )
return;
if (strlen(buff)>2){
- fwrite(buff, 1, strlen(buff), file);
+ t = fwrite(buff, 1, strlen(buff), file); /* TODO: check t */
}
free(buff);
}

View File

@ -1,47 +0,0 @@
---
libopkg/opkg_cmd.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
--- trunk.orig/libopkg/opkg_cmd.c
+++ trunk/libopkg/opkg_cmd.c
@@ -19,6 +19,7 @@
#include "includes.h"
#include <dirent.h>
#include <glob.h>
+#include <unistd.h>
#include "opkg_conf.h"
#include "opkg_cmd.h"
@@ -350,7 +351,6 @@ static opkg_intercept_t opkg_prep_interc
static int opkg_finalize_intercepts(opkg_intercept_t ctx)
{
- char *cmd;
DIR *dir;
int err = 0;
@@ -376,6 +376,10 @@ static int opkg_finalize_intercepts(opkg
err = errno;
perror (de->d_name);
}
+ if (unlink (path)) {
+ err = errno;
+ perror (path);
+ }
}
free (path);
}
@@ -383,9 +387,10 @@ static int opkg_finalize_intercepts(opkg
} else
perror (ctx->statedir);
- sprintf_alloc (&cmd, "rm -rf %s", ctx->statedir);
- err = system (cmd);
- free (cmd);
+ if (rmdir (ctx->statedir)) {
+ err = errno;
+ perror (ctx->statedir);
+ }
free (ctx->statedir);
free (ctx);

View File

@ -1,14 +0,0 @@
Index: opkg/libopkg/opkg_install.c
===================================================================
--- opkg.orig/libopkg/opkg_install.c 2009-05-23 00:20:04.000000000 +0100
+++ opkg/libopkg/opkg_install.c 2009-05-23 00:20:09.000000000 +0100
@@ -21,7 +21,9 @@
#include <glob.h>
#include <time.h>
#include <signal.h>
+#ifndef __USE_GNU
typedef void (*sighandler_t)(int);
+#endif
#include "pkg.h"
#include "pkg_hash.h"

View File

@ -6,7 +6,7 @@ RCONFLICTS_update-alternatives-cworth = "update-alternatives-dpkg"
RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives}"
PACKAGE_ARCH_update-alternatives-cworth = "all"
PR = "r6"
PR = "r8"
PACKAGES =+ "libopkg-dev libopkg update-alternatives-cworth"
@ -19,15 +19,6 @@ FILES_libopkg = "${libdir}/*.so.*"
OPKG_INIT_POSITION = "98"
OPKG_INIT_POSITION_slugos = "41"
EXTRACFLAGS = ""
EXTRACFLAGS_omap-3430ldp = "-Wno-array-bounds"
EXTRACFLAGS_omap-3430sdp = "-Wno-array-bounds"
EXTRACFLAGS_beagleboard = "-Wno-array-bounds"
EXTRACFLAGS_qemuarmv7 = "-Wno-array-bounds"
EXTRACFLAGS_overo = "-Wno-array-bounds"
TARGET_CFLAGS += "${EXTRACFLAGS}"
pkg_postinst_${PN} () {
#!/bin/sh
if [ "x$D" != "x" ]; then