summaryrefslogtreecommitdiff
path: root/lib/query.c
diff options
context:
space:
mode:
authorjbj <devnull@localhost>1999-12-12 17:46:22 +0000
committerjbj <devnull@localhost>1999-12-12 17:46:22 +0000
commit292b9f10befbeb1044d2db98f62de0e65aff3317 (patch)
treee746bc9c751df6d2709bf8e447c9d3c77c6b6722 /lib/query.c
parentb438e61808c5a81b6d648a632278b6adc7db680e (diff)
downloadrpm-292b9f10befbeb1044d2db98f62de0e65aff3317.tar.gz
rpm-292b9f10befbeb1044d2db98f62de0e65aff3317.tar.bz2
rpm-292b9f10befbeb1044d2db98f62de0e65aff3317.zip
lib/rpminstall.c: Perform glob on remote ftp install args.
lib/misc.[ch]: Rename remoteGlob to rpmGlob. Preserve glob_error behavior. build/files.c: Ditto. lib/rpmio.c: Collapse ftpFileDesc() into ftpReq(). lib/rpmio.c: Eliminate all uses of u->path. lib/url.c: Ditto. lib/url.c: Tweak url cache code to reuse empty slots (never happens). CVS patchset: 3478 CVS date: 1999/12/12 17:46:22
Diffstat (limited to 'lib/query.c')
-rw-r--r--lib/query.c82
1 files changed, 41 insertions, 41 deletions
diff --git a/lib/query.c b/lib/query.c
index 91ee65e8f..5e06fdfdb 100644
--- a/lib/query.c
+++ b/lib/query.c
@@ -454,61 +454,61 @@ int rpmQueryVerify(QVA_t *qva, enum rpmQVSources source, const char * arg,
int retcode = 0;
char *end = NULL;
- switch (source) {
+ switch (source) {
case RPMQV_RPM:
- { int argc = 0;
- const char ** argv = NULL;
- int i;
+ { int argc = 0;
+ const char ** argv = NULL;
+ int i;
- rc = remoteGlob(arg, &argc, &argv);
- if (rc)
- return 1;
- for (i = 0; i < argc; i++) {
- FD_t fd;
- fd = Fopen(argv[i], "r.ufdio");
- if (Ferror(fd)) {
- /* XXX Fstrerror */
- fprintf(stderr, _("open of %s failed: %s\n"), argv[i],
+ rc = rpmGlob(arg, &argc, &argv);
+ if (rc)
+ return 1;
+ for (i = 0; i < argc; i++) {
+ FD_t fd;
+ fd = Fopen(argv[i], "r.ufdio");
+ if (Ferror(fd)) {
+ /* XXX Fstrerror */
+ fprintf(stderr, _("open of %s failed: %s\n"), argv[i],
#ifndef NOTYET
urlStrerror(argv[i]));
#else
Fstrerror(fd));
#endif
- if (fd)
- Fclose(fd);
- retcode = 1;
- break;
- }
+ if (fd) Fclose(fd);
+ retcode = 1;
+ break;
+ }
- retcode = rpmReadPackageHeader(fd, &h, &isSource, NULL, NULL);
+ retcode = rpmReadPackageHeader(fd, &h, &isSource, NULL, NULL);
- Fclose(fd);
+ Fclose(fd);
- switch (retcode) {
- case 0:
- if (h == NULL) {
- fprintf(stderr, _("old format source packages cannot "
+ switch (retcode) {
+ case 0:
+ if (h == NULL) {
+ fprintf(stderr, _("old format source packages cannot "
"be queried\n"));
+ retcode = 1;
+ break;
+ }
+ retcode = showPackage(qva, db, h);
+ headerFree(h);
+ break;
+ case 1:
+ fprintf(stderr, _("%s does not appear to be a RPM package\n"),
+ argv[i]);
+ /*@fallthrough@*/
+ case 2:
+ fprintf(stderr, _("query of %s failed\n"), argv[i]);
retcode = 1;
break;
}
- retcode = showPackage(qva, db, h);
- headerFree(h);
- break;
- case 1:
- fprintf(stderr, _("%s does not appear to be a RPM package\n"), argv[i]);
- /*@fallthrough@*/
- case 2:
- fprintf(stderr, _("query of %s failed\n"), argv[i]);
- retcode = 1;
- break;
}
- }
- if (argv) {
- for (i = 0; i < argc; i++)
- xfree(argv[i]);
- xfree(argv);
- }
+ if (argv) {
+ for (i = 0; i < argc; i++)
+ xfree(argv[i]);
+ xfree(argv);
+ }
} break;
case RPMQV_SPECFILE:
@@ -658,7 +658,7 @@ int rpmQueryVerify(QVA_t *qva, enum rpmQVSources source, const char * arg,
dbiFreeIndexRecord(matches);
}
break;
- }
+ }
return retcode;
}