summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2013-10-16 16:13:33 +0200
committerMichael Schroeder <mls@suse.de>2013-10-16 16:13:33 +0200
commit9a49a0393109e0590448183f0d4ef78ae9d0c49d (patch)
tree71d8288b619081842f523baffc34ffe2e9043052 /examples
parent310204fe90e36be930f0a5eb92b5688d3f178906 (diff)
downloadlibsolv-9a49a0393109e0590448183f0d4ef78ae9d0c49d.tar.gz
libsolv-9a49a0393109e0590448183f0d4ef78ae9d0c49d.tar.bz2
libsolv-9a49a0393109e0590448183f0d4ef78ae9d0c49d.zip
make 'solv info' work with command line packages
Diffstat (limited to 'examples')
-rw-r--r--examples/solv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/solv.c b/examples/solv.c
index c17b06a..3bb8b9c 100644
--- a/examples/solv.c
+++ b/examples/solv.c
@@ -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);