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 eca0b027c56121a46b2eb4289fd6a83945fcf48e..d8b7b522b6077bbcd09b79ab8f6510ccbbc03aa4 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);
 }