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>
This commit is contained in:
parent
67a79c7443
commit
3aa68f1282
|
@ -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"
|
||||
|
|
|
@ -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);
|
||||
|
||||
/*
|
|
@ -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() {
|
||||
|
|
|
@ -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 */
|
|
@ -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);
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue