[NEEDS,TESTING] opkg: Fix add-exclude.patch

Submitted by Paul Barker on Jan. 27, 2014, 12:44 p.m.

Details

Message ID 1390826695-5067-1-git-send-email-paul@paulbarker.me.uk
State Superseded
Headers show

Commit Message

Paul Barker Jan. 27, 2014, 12:44 p.m.
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.

This patch should fix that behaviour and that bug.

Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
Cc: Mark Hatle <mark.hatle@windriver.com>
Cc: Saul Wold <saul.wold@intel.com>
---

This patch needs testing against the cases where PACKAGE_EXCLUDE was failing, I
haven't been able to test this myself beyond checking that opkg still builds
with it applied. Saul and Mark initially discussed the bug with me so they're
probably better placed to test it, I'm just sending this as a bump as the bug
has been outstanding for a long time now.

 meta/recipes-devtools/opkg/opkg/add-exclude.patch | 1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/meta/recipes-devtools/opkg/opkg/add-exclude.patch b/meta/recipes-devtools/opkg/opkg/add-exclude.patch
index 8489058..506de7b 100644
--- a/meta/recipes-devtools/opkg/opkg/add-exclude.patch
+++ b/meta/recipes-devtools/opkg/opkg/add-exclude.patch
@@ -99,6 +99,7 @@  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;

Comments

Paul Barker Feb. 11, 2014, 11:32 a.m.
On 27 January 2014 12:44, Paul Barker <paul@paulbarker.me.uk> wrote:
> 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.
>
> This patch should fix that behaviour and that bug.
>
> Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
> Cc: Mark Hatle <mark.hatle@windriver.com>
> Cc: Saul Wold <saul.wold@intel.com>

I should have checked this more myself before sending - I didn't run
'rediff' on the patch after manually editing it so it failed to apply
cleanly. I'll update it and send v2.

I'm still not sure how best to test this one myself but it would be
good to see it tested and fix the relevant bug. Once that's done I can
look at upstreaming this feature into opkg.