Bug 8356 - Opkg flag always returns success
Summary: Opkg flag always returns success
Status: RESOLVED FIXED
Alias: None
Product: opkg
Classification: Yocto Project Subprojects
Component: opkg (show other bugs)
Version: 0.3.0
Hardware: x86 Multiple
: Undecided minor
Target Milestone: 0.4.0
Assignee: Alejandro del Castillo
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2015-09-21 01:18 UTC by Alejandro del Castillo
Modified: 2016-12-08 22:21 UTC (History)
0 users

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
[PATCH] Added flag validation to opkg flag call. (2.64 KB, patch)
2016-11-26 12:46 UTC, Oleg Gashev
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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!