set SOLVER_SETREPO and SOLVER_SETVENDOR flags in repo limiter
authorMichael Schroeder <mls@suse.de>
Mon, 29 Oct 2012 13:02:06 +0000 (14:02 +0100)
committerMichael Schroeder <mls@suse.de>
Mon, 29 Oct 2012 13:02:06 +0000 (14:02 +0100)
examples/pysolv
examples/solv.c
src/solverdebug.c

index 50c8cb1..486ed98 100755 (executable)
@@ -641,7 +641,7 @@ if options.repos:
         if hasattr(repo, 'handle'):
             if not repolimiter:
                 repolimiter = pool.Selection()
-            repolimiter.addsimple(Job.SOLVER_SOLVABLE_REPO, repo.handle.id)
+            repolimiter.addsimple(Job.SOLVER_SOLVABLE_REPO|Job.SOLVER_SETREPO|Job.SOLVER_SETVENDOR, repo.handle.id)
 
 if cmd == 'search':
     matches = {}
index a40e6d0..7389db1 100644 (file)
@@ -2570,7 +2570,8 @@ main(int argc, char **argv)
          fprintf(stderr, "%s: no such repo\n", rname);
          exit(1);
        }
-      queue_push2(&repofilter, SOLVER_SOLVABLE_REPO, repoid);
+      /* SETVENDOR is actually wrong but useful */
+      queue_push2(&repofilter, SOLVER_SOLVABLE_REPO | SOLVER_SETREPO | SOLVER_SETVENDOR, repoid);
       argc -= 2;
       argv += 2;
     }
index f33f6d2..676c01d 100644 (file)
@@ -947,6 +947,7 @@ pool_selection2str(Pool *pool, Queue *selection, Id flagmask)
        {
          int o = strlen(s);
          s = pool_tmpappend(pool, s, " ", 0);
+         if (how & SOLVER_SETEV)
            s = pool_tmpappend(pool, s, ",setev", 0);
          if (how & SOLVER_SETEVR)
            s = pool_tmpappend(pool, s, ",setevr", 0);