summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2007-11-29 10:38:58 +0200
committerPanu Matilainen <pmatilai@redhat.com>2007-11-29 10:38:58 +0200
commitfe086189b7bb836807dbc89ef707da678575f1f1 (patch)
treeae9a1e5d91c291e7bfa4427233d102df040a6aef
parentbcbc8126093dc200fbdcbc37451ac5b59d559de9 (diff)
downloadlibrpm-tizen-fe086189b7bb836807dbc89ef707da678575f1f1.tar.gz
librpm-tizen-fe086189b7bb836807dbc89ef707da678575f1f1.tar.bz2
librpm-tizen-fe086189b7bb836807dbc89ef707da678575f1f1.zip
Export FTS_* options through rpmgi.h as RPMGI_*
- permit full rpmgi use without exporting all of fts
-rw-r--r--lib/poptALL.c34
-rw-r--r--lib/query.c3
-rw-r--r--lib/rpmgi.h12
3 files changed, 30 insertions, 19 deletions
diff --git a/lib/poptALL.c b/lib/poptALL.c
index 94ec9b0c3..07cd72656 100644
--- a/lib/poptALL.c
+++ b/lib/poptALL.c
@@ -7,7 +7,7 @@
const char *__progname;
#include <rpmcli.h>
-#include "rpmio/fts.h"
+#include <rpmgi.h>
#include "debug.h"
@@ -166,22 +166,22 @@ static void rpmcliAllArgCallback( poptContext con,
int ftsOpts = 0;
struct poptOption rpmcliFtsPoptTable[] = {
- { "comfollow", '\0', POPT_BIT_SET, &ftsOpts, FTS_COMFOLLOW,
- N_("FTS_COMFOLLOW: follow command line symlinks"), NULL },
- { "logical", '\0', POPT_BIT_SET, &ftsOpts, FTS_LOGICAL,
- N_("FTS_LOGICAL: logical walk"), NULL },
- { "nochdir", '\0', POPT_BIT_SET, &ftsOpts, FTS_NOCHDIR,
- N_("FTS_NOCHDIR: don't change directories"), NULL },
- { "nostat", '\0', POPT_BIT_SET, &ftsOpts, FTS_NOSTAT,
- N_("FTS_NOSTAT: don't get stat info"), NULL },
- { "physical", '\0', POPT_BIT_SET, &ftsOpts, FTS_PHYSICAL,
- N_("FTS_PHYSICAL: physical walk"), NULL },
- { "seedot", '\0', POPT_BIT_SET, &ftsOpts, FTS_SEEDOT,
- N_("FTS_SEEDOT: return dot and dot-dot"), NULL },
- { "xdev", '\0', POPT_BIT_SET, &ftsOpts, FTS_XDEV,
- N_("FTS_XDEV: don't cross devices"), NULL },
- { "whiteout", '\0', POPT_BIT_SET, &ftsOpts, FTS_WHITEOUT,
- N_("FTS_WHITEOUT: return whiteout information"), NULL },
+ { "comfollow", '\0', POPT_BIT_SET, &ftsOpts, RPMGI_COMFOLLOW,
+ N_("RPMGI_COMFOLLOW: follow command line symlinks"), NULL },
+ { "logical", '\0', POPT_BIT_SET, &ftsOpts, RPMGI_LOGICAL,
+ N_("RPMGI_LOGICAL: logical walk"), NULL },
+ { "nochdir", '\0', POPT_BIT_SET, &ftsOpts, RPMGI_NOCHDIR,
+ N_("RPMGI_NOCHDIR: don't change directories"), NULL },
+ { "nostat", '\0', POPT_BIT_SET, &ftsOpts, RPMGI_NOSTAT,
+ N_("RPMGI_NOSTAT: don't get stat info"), NULL },
+ { "physical", '\0', POPT_BIT_SET, &ftsOpts, RPMGI_PHYSICAL,
+ N_("RPMGI_PHYSICAL: physical walk"), NULL },
+ { "seedot", '\0', POPT_BIT_SET, &ftsOpts, RPMGI_SEEDOT,
+ N_("RPMGI_SEEDOT: return dot and dot-dot"), NULL },
+ { "xdev", '\0', POPT_BIT_SET, &ftsOpts, RPMGI_XDEV,
+ N_("RPMGI_XDEV: don't cross devices"), NULL },
+ { "whiteout", '\0', POPT_BIT_SET, &ftsOpts, RPMGI_WHITEOUT,
+ N_("RPMGI_WHITEOUT: return whiteout information"), NULL },
POPT_TABLEEND
};
diff --git a/lib/query.c b/lib/query.c
index f87b67a45..829d18af5 100644
--- a/lib/query.c
+++ b/lib/query.c
@@ -20,7 +20,6 @@
#include "lib/manifest.h"
#include <rpmlog.h>
#include <rpmfileutil.h> /* rpmCleanPath */
-#include "rpmio/fts.h" /* FTS_* flags */
#include "debug.h"
#include "lib/misc.h" /* XXX for currentDirectory */
@@ -734,7 +733,7 @@ int rpmcliArgIter(rpmts ts, QVA_t qva, ARGV_t argv)
break;
case RPMQV_FTSWALK:
if (ftsOpts == 0)
- ftsOpts = (FTS_COMFOLLOW | FTS_LOGICAL | FTS_NOSTAT);
+ ftsOpts = (RPMGI_COMFOLLOW | RPMGI_LOGICAL | RPMGI_NOSTAT);
qva->qva_gi = rpmgiNew(ts, RPMDBI_FTSWALK, NULL, 0);
qva->qva_rc = rpmgiSetArgs(qva->qva_gi, argv, ftsOpts, giFlags);
diff --git a/lib/rpmgi.h b/lib/rpmgi.h
index 59090629b..30f30fe48 100644
--- a/lib/rpmgi.h
+++ b/lib/rpmgi.h
@@ -29,6 +29,18 @@ typedef enum rpmgiFlags_e {
RPMGI_NOHEADER = (1 << 4)
} rpmgiFlags;
+/** \ingroup rpmgi
+ * rpmgi FTS-flags
+ */
+#define RPMGI_COMFOLLOW 0x0001 /* follow command line symlinks */
+#define RPMGI_LOGICAL 0x0002 /* logical walk */
+#define RPMGI_NOCHDIR 0x0004 /* don't change directories */
+#define RPMGI_NOSTAT 0x0008 /* don't get stat info */
+#define RPMGI_PHYSICAL 0x0010 /* physical walk */
+#define RPMGI_SEEDOT 0x0020 /* return dot and dot-dot */
+#define RPMGI_XDEV 0x0040 /* don't cross devices */
+#define RPMGI_WHITEOUT 0x0080 /* return whiteout information */
+
extern rpmgiFlags giFlags;
/** \ingroup rpmgi