libopkg: do not clobber package flags during parsing
authorJo-Philipp Wich <jo@mein.io>
Wed, 15 Feb 2017 23:18:25 +0000 (00:18 +0100)
committerJo-Philipp Wich <jo@mein.io>
Thu, 16 Feb 2017 16:02:30 +0000 (17:02 +0100)
When parsing "Status:" lines from package control or list files, do not
overwrite previously set flags in the package structure.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
libopkg/pkg_parse.c

index eca0b02..d8b7b52 100644 (file)
@@ -42,7 +42,7 @@ static void parse_status(pkg_t * pkg, const char *sstr)
        }
 
        pkg->state_want = pkg_state_want_from_str(sw_str);
-       pkg->state_flag = pkg_state_flag_from_str(sf_str);
+       pkg->state_flag |= pkg_state_flag_from_str(sf_str);
        pkg->state_status = pkg_state_status_from_str(ss_str);
 }