[oe-commits] Paul Barker : opkg: Fix add-exclude.patch

git at git.openembedded.org git at git.openembedded.org
Mon Feb 24 16:14:34 UTC 2014


Module: openembedded-core.git
Branch: master-next
Commit: c269cea3117d7fa120c02bdb47d1adf18a1bcba1
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=c269cea3117d7fa120c02bdb47d1adf18a1bcba1

Author: Paul Barker <paul at paulbarker.me.uk>
Date:   Wed Feb 19 15:15:17 2014 +0000

opkg: Fix add-exclude.patch

The case statement for ARGS_OPT_ADD_EXCLUDE added to the argument handling
switch statement in opkg was missing a "break;" at the end, so it was falling
through into the handler for ARGS_OPT_NOACTION. Thus when "--add-exclude" was
specified on the command line it was as if "--noaction" was also being
specified. This appears to be the root cause of YP bug 5311.

Tested using the case described by Alexandru Georgescu in YP bug 5311:

    MACHINE ??= "qemux86"
    IMAGE_INSTALL_append = " man"
    PACKAGE_EXCLUDE = "man"
    PACKAGE_CLASSES ?= "package_ipk"

Built image and boot tested on qemu, ensured that man was not installed but the
rest of the system was installed correctly.

Signed-off-by: Paul Barker <paul at paulbarker.me.uk>
Cc: Mark Hatle <mark.hatle at windriver.com>
Cc: Saul Wold <saul.wold at intel.com>
Cc: Alexandru Georgescu <alexandru.c.georgescu at intel.com>
Signed-off-by: Saul Wold <sgw at linux.intel.com>

---

 meta/recipes-devtools/opkg/opkg/add-exclude.patch | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/opkg/opkg/add-exclude.patch b/meta/recipes-devtools/opkg/opkg/add-exclude.patch
index 8489058..8d328d5 100644
--- a/meta/recipes-devtools/opkg/opkg/add-exclude.patch
+++ b/meta/recipes-devtools/opkg/opkg/add-exclude.patch
@@ -84,7 +84,7 @@ Index: trunk/src/opkg-cl.c
  	{"test", 0, 0, ARGS_OPT_NOACTION},
  	{"tmp-dir", 1, 0, 't'},
  	{"tmp_dir", 1, 0, 't'},
-@@ -198,6 +200,17 @@ args_parse(int argc, char *argv[])
+@@ -198,6 +200,18 @@ args_parse(int argc, char *argv[])
  			}
  			free(tuple);
  			break;
@@ -99,10 +99,11 @@ Index: trunk/src/opkg-cl.c
 +				conf->exclude_list = realloc(conf->exclude_list, sizeof(char *) * conf->exclude_count);
 +				conf->exclude_list[conf->exclude_count - 1] = tuple;
 +			}
++			break;
  		case ARGS_OPT_NOACTION:
  			conf->noaction = 1;
  			break;
-@@ -282,6 +295,7 @@ usage()
+@@ -282,6 +296,7 @@ usage()
  	printf("\t--offline-root <dir>	offline installation of packages.\n");
  	printf("\t--add-arch <arch>:<prio>	Register architecture with given priority\n");
  	printf("\t--add-dest <name>:<path>	Register destination with given path\n");



More information about the Openembedded-commits mailing list