]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
- fix wrong logic
authorMichael Schroeder <mls@suse.de>
Mon, 16 Apr 2012 16:40:03 +0000 (18:40 +0200)
committerMichael Schroeder <mls@suse.de>
Mon, 16 Apr 2012 16:40:03 +0000 (18:40 +0200)
tools/archpkgs2solv.c
tools/rpms2solv.c

index 1f89929c1a09ee90dff69e146ddf36b0e7592ad6..4ce95a4ba44faf90b7c5eea2a020743e9e8328fb 100644 (file)
@@ -118,7 +118,7 @@ main(int argc, char **argv)
   repo_add_repodata(repo, 0);
   res = 0;
   for (i = 0; i < npkgs; i++)
-    if (repo_add_arch_pkg(repo, pkgs[i], REPO_REUSE_REPODATA|REPO_NO_INTERNALIZE|flags) != 0)
+    if (repo_add_arch_pkg(repo, pkgs[i], REPO_REUSE_REPODATA|REPO_NO_INTERNALIZE|flags) == 0)
       {
        fprintf(stderr, "archpkgs2solv: %s\n", pool_errstr(pool));
        res = 1;
index 29e851a9c8e0118b16a828130c12e22ee001333c..54ea4e9f4a8413581cf652d8f0b81db326dea7b1 100644 (file)
@@ -55,7 +55,6 @@ main(int argc, char **argv)
   int c, i, res, nrpms = 0;
   Pool *pool = pool_create();
   Repo *repo;
-  Repodata *data;
   FILE *fp;
   char buf[4096], *p;
   const char *basefile = 0;
@@ -116,7 +115,7 @@ main(int argc, char **argv)
   res = 0;
   for (i = 0; i < nrpms; i++)
     {
-      if (repo_add_rpm(repo, rpms[i], REPO_REUSE_REPODATA|REPO_NO_INTERNALIZE))
+      if (repo_add_rpm(repo, rpms[i], REPO_REUSE_REPODATA|REPO_NO_INTERNALIZE) == 0)
        {
          fprintf(stderr, "rpms2solv: %s\n", pool_errstr(pool));
          res = 1;