summaryrefslogtreecommitdiff
path: root/recipes/opkg/files/opkg-intercept-cleanup.patch
diff options
context:
space:
mode:
authorGraham Gower <graham.gower@gmail.com>2010-06-29 18:54:00 +0000
committerKhem Raj <raj.khem@gmail.com>2010-08-03 13:02:24 -0700
commit11d08db8106e173599cf5efec58d2710c66bba51 (patch)
tree8319aa1b07152198f386fb8707d2b137734caf12 /recipes/opkg/files/opkg-intercept-cleanup.patch
parent060285f9fdb9bc0065f119a41edb15e0182c069c (diff)
opkg recipe overhaul - removal of opkg-nogpg and opkg-nogpg-nocurl.
None of the distros in OE appear to want/need gpg or curl support in opkg; so have opkg.inc remove them by default. This diff makes things more consistent across all distros/tasks/images. The slugos recipe is kept intact and further divided from the more modern recipes. The opkg-native recipe is the sane-srcrev version even when building slugos, which should allow for changes to opkg related bbclasses without breaking the slugos build. Build tested for qemumipsel/minimal-image and nslu2/slugos-image. minimal-image builds 10% quicker in my setup and is 1mb smaller. Signed-off-by: Graham Gower <graham.gower@gmail.com> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'recipes/opkg/files/opkg-intercept-cleanup.patch')
-rw-r--r--recipes/opkg/files/opkg-intercept-cleanup.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/recipes/opkg/files/opkg-intercept-cleanup.patch b/recipes/opkg/files/opkg-intercept-cleanup.patch
new file mode 100644
index 0000000000..12893e3852
--- /dev/null
+++ b/recipes/opkg/files/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);