]> code.ossystems Code Review - openembedded-core.git/commitdiff
opkg: Switch to google svn and patch to export a version comparision function (patche...
authorRichard Purdie <rpurdie@linux.intel.com>
Mon, 5 Oct 2009 20:11:16 +0000 (21:11 +0100)
committerRichard Purdie <rpurdie@linux.intel.com>
Mon, 5 Oct 2009 20:11:16 +0000 (21:11 +0100)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
meta/conf/distro/include/poky-fixed-revisions.inc
meta/packages/opkg/files/opkg_unarchive.patch [new file with mode: 0644]
meta/packages/opkg/opkg.inc
meta/packages/opkg/opkg/add_vercmp.patch [new file with mode: 0644]
meta/packages/opkg/opkg/opkg-intercept-cleanup.patch [new file with mode: 0644]
meta/packages/opkg/opkg_svn.bb

index e8fdfcdf16f1d2e691764d4be39b8f78287d828d..a017e180ffbc74dfb6d1c7fd7cf5927c95937892 100644 (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 ?= "4545"
-SRCREV_pn-opkg-nativesdk ?= "4545"
-SRCREV_pn-opkg ?= "4545"
+SRCREV_pn-opkg-native ?= "215"
+SRCREV_pn-opkg-nativesdk ?= "215"
+SRCREV_pn-opkg ?= "215"
 SRCREV_pn-opkg-utils-native ?= "4534"
 SRCREV_pn-opkg-utils ?= "4534"
 SRCREV_pn-oprofileui ?= "194"
diff --git a/meta/packages/opkg/files/opkg_unarchive.patch b/meta/packages/opkg/files/opkg_unarchive.patch
new file mode 100644 (file)
index 0000000..9e5ccfb
--- /dev/null
@@ -0,0 +1,13 @@
+--- trunk/libbb/unarchive.c.orig       2009-02-11 22:14:58.000000000 +0100
++++ trunk/libbb/unarchive.c    2009-02-11 22:15:07.000000000 +0100
+@@ -606,6 +606,10 @@
+                 tar_entry->name = concat_path_file(tar.formated.prefix, tar.formated.name);
+         }
++      if (strlen(tar_entry->name) > 100) {
++              tar_entry->name[100] = 0;
++      }
++
+       // tar_entry->name = xstrdup(tar.formated.name);
+ /*
index 0b1db89c8aef2785b09cf75fd43242ceb73cea95..d82f6d53f2e53e7dd5424c803e4ec73ac6829d2a 100644 (file)
@@ -5,20 +5,14 @@ SECTION = "base"
 LICENSE = "GPL"
 DEPENDS = "curl gpgme"
 PV = "0.0+svnr${SRCREV}"
+PE = "1"
 
-# opkg-fix-gcc-warnings.patch: the patch is already upstreamed and could be
-#                              taken out once okpg is updated to new repo
-#                              http://opkg.googlecode.com/svn/trunk
-#                              with rev >= 150
+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"
 
-# sighandlerfix.patch: from r145
-
-SRC_URI = "svn://svn.openmoko.org/trunk/src/target/;module=opkg;proto=http \
-           file://fix_prototype.patch;patch=1 \
-           file://sighandlerfix.patch;patch=1 \
-           file://opkg-fix-gcc-warnings.patch;patch=1"
-
-S = "${WORKDIR}/opkg"
+S = "${WORKDIR}/trunk"
 
 # Werror gives all kinds bounds issuses with gcc 4.3.3
 do_configure_prepend() {
diff --git a/meta/packages/opkg/opkg/add_vercmp.patch b/meta/packages/opkg/opkg/add_vercmp.patch
new file mode 100644 (file)
index 0000000..5c0473f
--- /dev/null
@@ -0,0 +1,34 @@
+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;
+ }
++
++int
++opkg_compare_versions (const char *ver1, const char *ver2)
++{
++  pkg_t *pkg1, *pkg2;
++
++  pkg1 = pkg_new();
++  pkg2 = pkg_new();
++
++  parseVersion(pkg1, ver1);
++  parseVersion(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 @@
+ int opkg_repository_accessibility_check(opkg_t *opkg);
++int opkg_compare_versions (const char *ver1, const char *ver2);
++
+ #endif /* OPKG_H */
diff --git a/meta/packages/opkg/opkg/opkg-intercept-cleanup.patch b/meta/packages/opkg/opkg/opkg-intercept-cleanup.patch
new file mode 100644 (file)
index 0000000..12893e3
--- /dev/null
@@ -0,0 +1,47 @@
+---
+ 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);
index 68e04c60d6b4396ae5c3678e885ef96211d9a456..0d68939346eb43b4d4fda28f1d80dd07774b7253 100644 (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 = "r10"
+PR = "r3"
 
 PACKAGES =+ "libopkg-dev libopkg update-alternatives-cworth"
 
@@ -28,7 +28,7 @@ EXTRACFLAGS_overo = "-Wno-array-bounds"
 
 TARGET_CFLAGS += "${EXTRACFLAGS}"
 
-pkg_postinst_opkg () {
+pkg_postinst_${PN} () {
 #!/bin/sh
 if [ "x$D" != "x" ]; then
        install -d ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d
@@ -43,7 +43,7 @@ fi
 update-alternatives --install ${bindir}/opkg opkg ${bindir}/opkg-cl 100
 }
 
-pkg_postrm_opkg () {
+pkg_postrm_${PN} () {
 #!/bin/sh
 update-alternatives --remove opkg ${bindir}/opkg-cl
 }