Bug 8356

Summary: Opkg flag always returns success
Product: [Yocto Project Subprojects] opkg Reporter: Alejandro del Castillo <alejandro.delcastillo>
Component: opkgAssignee: Alejandro del Castillo <alejandro.delcastillo>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: Undecided    
Version: 0.3.0   
Target Milestone: 0.4.0   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
[PATCH] Added flag validation to opkg flag call. none

Description Alejandro del Castillo 2015-09-21 01:18:47 UTC
What steps will reproduce the problem?
1.Run opkg flag with an invalid flag
   opkg flag badflag A
2.Opkg will return no error (0) and a misleading message that makes you think the operation succeeded
   
"Setting flags for package A to badflag."

Package A will remain unchanged.

What is the expected output? What do you see instead?

Opkg flag only supports the following flags = hold|noprune|user|ok|installed|unpacked

It should validate the input and report an error if invalid.

Originally reported by alejandro.delcastill, Jun 23, 2015
-----------------------------------------------------------------------------
Comment 1 Oleg Gashev 2016-11-26 12:46:52 UTC
Created attachment 3547 [details]
[PATCH] Added flag validation to opkg flag call.
Comment 2 Alejandro del Castillo 2016-12-08 22:21:13 UTC
Commited (14429c593c6ee593da937b859967b645174a730f)

thanks Oleg!