summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-10-05 21:11:16 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2009-10-05 21:11:16 +0100
commit3aa68f12829260afb00b9e816bece02ae263e33e (patch)
tree04545c631b1b65f4f95f1991b579ae162ceb0466
parent67a79c7443d8265106f3d9e383684317c1863ecf (diff)
downloadopenembedded-core-3aa68f12829260afb00b9e816bece02ae263e33e.tar.gz
openembedded-core-3aa68f12829260afb00b9e816bece02ae263e33e.tar.bz2
openembedded-core-3aa68f12829260afb00b9e816bece02ae263e33e.zip
opkg: Switch to google svn and patch to export a version comparision function (patches taken from OE.dev)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
-rw-r--r--meta/conf/distro/include/poky-fixed-revisions.inc6
-rw-r--r--meta/packages/opkg/files/opkg_unarchive.patch13
-rw-r--r--meta/packages/opkg/opkg.inc18
-rw-r--r--meta/packages/opkg/opkg/add_vercmp.patch34
-rw-r--r--meta/packages/opkg/opkg/opkg-intercept-cleanup.patch47
-rw-r--r--meta/packages/opkg/opkg_svn.bb6
6 files changed, 106 insertions, 18 deletions
diff --git a/meta/conf/distro/include/poky-fixed-revisions.inc b/meta/conf/distro/include/poky-fixed-revisions.inc
index e8fdfcdf16..a017e180ff 100644
--- a/meta/conf/distro/include/poky-fixed-revisions.inc
+++ b/meta/conf/distro/include/poky-fixed-revisions.inc
@@ -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
index 0000000000..9e5ccfb714
--- /dev/null
+++ b/meta/packages/opkg/files/opkg_unarchive.patch
@@ -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);
+
+ /*
diff --git a/meta/packages/opkg/opkg.inc b/meta/packages/opkg/opkg.inc
index 0b1db89c8a..d82f6d53f2 100644
--- a/meta/packages/opkg/opkg.inc
+++ b/meta/packages/opkg/opkg.inc
@@ -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
index 0000000000..5c0473ff70
--- /dev/null
+++ b/meta/packages/opkg/opkg/add_vercmp.patch
@@ -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
index 0000000000..12893e3852
--- /dev/null
+++ b/meta/packages/opkg/opkg/opkg-intercept-cleanup.patch
@@ -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);
diff --git a/meta/packages/opkg/opkg_svn.bb b/meta/packages/opkg/opkg_svn.bb
index 68e04c60d6..0d68939346 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"
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
}