3 #include <rpmio_internal.h>
5 #include <rpmmessages.h>
10 static int _debug = 0;
12 #define HTTPPATH "https://wellfleet.jbj.org/rawhide/test/"
13 #define FTPPATH "ftp://wellfleet.jbj.org/pub/rawhide/packages/test/"
14 #define DIRPATH "/var/ftp/pub/rawhide/packages/test"
15 static char * httppath = HTTPPATH;
16 static char * ftppath = FTPPATH;
17 static char * dirpath = DIRPATH;
19 static void printDir(const char * path)
26 fprintf(stderr, "===== %s\n", path);
29 while ((dp = Readdir(dir)) != NULL) {
30 fprintf(stderr, "%5d (%x,%x) %x %x %s\n", i++,
33 (unsigned) dp->d_reclen,
34 (unsigned) dp->d_type,
40 static struct poptOption optionsTable[] = {
41 { "debug", 'd', POPT_ARG_VAL, &_debug, -1, NULL, NULL },
42 { "ftpdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_ftp_debug, -1,
43 N_("debug protocol data stream"), NULL},
44 { "rpmiodebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmio_debug, -1,
45 N_("debug rpmio I/O"), NULL},
46 { "urldebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_url_debug, -1,
47 N_("debug URL cache handling"), NULL},
48 { "verbose", 'v', 0, 0, 'v', NULL, NULL },
54 main(int argc, const char *argv[])
56 poptContext optCon = poptGetContext(argv[0], argc, argv, optionsTable, 0);
59 while ((rc = poptGetNextOpt(optCon)) > 0) {
62 rpmIncreaseVerbosity();
70 rpmIncreaseVerbosity();
71 rpmIncreaseVerbosity();