]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
make 'solv info' work with command line packages
authorMichael Schroeder <mls@suse.de>
Wed, 16 Oct 2013 14:13:33 +0000 (16:13 +0200)
committerMichael Schroeder <mls@suse.de>
Wed, 16 Oct 2013 14:13:33 +0000 (16:13 +0200)
examples/solv.c

index c17b06a37289045c446631b9e4fe636745874317..3bb8b9cf81d2a4af1410fee4a3c83461b652e8d6 100644 (file)
@@ -2871,7 +2871,7 @@ main(int argc, char **argv)
     }
 
   /* process command line packages */
-  if (mainmode == MODE_LIST || mainmode == MODE_INSTALL)
+  if (mainmode == MODE_LIST || mainmode == MODE_INFO || mainmode == MODE_INSTALL)
     {
       for (i = 1; i < argc; i++)
        {
@@ -3233,6 +3233,8 @@ rerunsolver:
          if (s->repo == commandlinerepo)
            {
              loc = solvable_lookup_location(s, &medianr);
+             if (!loc)
+               continue;
              if (!(newpkgsfps[i] = fopen(loc, "r")))
                {
                  perror(loc);