]> git.ipfire.org Git - pakfire.git/commitdiff
util: Skip any dependencies starting with #
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 7 Dec 2021 16:43:43 +0000 (16:43 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 7 Dec 2021 16:43:43 +0000 (16:43 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/util.c

index 92d2282945621708e1ff5a41026f10701129ff5b..b777069dff79211d312323fc0d82e42200c3b38d 100644 (file)
@@ -304,6 +304,10 @@ Id pakfire_str2dep(struct pakfire* pakfire, const char* s) {
        if (isspace(*s))
                s++;
 
+       // Ignore any comments
+       if (*s == '#')
+               return id;
+
        // Parse any rich dependencies
        if (*s == '(')
                id = pakfire_parse_rich_dep(pakfire, &s, 0);