]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
testsolv: only use SELECTION_FILELIST if the arg starts with a '/'
authorMichael Schroeder <mls@suse.de>
Mon, 14 Jul 2014 11:24:55 +0000 (13:24 +0200)
committerMichael Schroeder <mls@suse.de>
Mon, 14 Jul 2014 11:24:55 +0000 (13:24 +0200)
tools/testsolv.c

index 34f393bc572a646089f859977e43b50bf0a6247f..279b43bc609801f816c43d1311fffe92e82d8e06 100644 (file)
@@ -141,8 +141,11 @@ main(int argc, char **argv)
            printf("test %d:\n", multijob++);
          if (list)
            {
+             int selflags = SELECTION_NAME|SELECTION_PROVIDES|SELECTION_CANON|SELECTION_DOTARCH|SELECTION_REL|SELECTION_GLOB|SELECTION_FLAT;
+             if (*list == '/')
+               selflags |= SELECTION_FILELIST;
              queue_empty(&job);
-             selection_make(pool, &job, list, SELECTION_NAME|SELECTION_PROVIDES|SELECTION_FILELIST|SELECTION_CANON|SELECTION_DOTARCH|SELECTION_REL|SELECTION_GLOB|SELECTION_FLAT);
+             selection_make(pool, &job, list, selflags);
              if (!job.elements)
                printf("No match\n");
              else