# rpmqv.c File Reference

`#include "system.h"`
`#include <rpmcli.h>`
`#include <rpmbuild.h>`
`#include "debug.h"`

Go to the source code of this file.

## Defines

#define | _AUTOHELP
#define | POPT_NODEPS 1025
#define | POPT_FORCE 1026
#define | POPT_NOMD5 1027
#define | POPT_NOSCRIPTS 1028
#define | GETOPT_DBPATH 1010
#define | GETOPT_SHOWRC 1018
#define | GETOPT_DEFINEMACRO 1020
#define | GETOPT_EVALMACRO 1021
#define | MODES_QV (MODE_QUERY | MODE_VERIFY)
#define | MODES_IE (MODE_INSTALL | MODE_ERASE)
#define | MODES_BT (MODE_BUILD | MODE_TARBUILD | MODE_REBUILD | MODE_RECOMPILE)
#define | MODES_K (MODE_CHECKSIG | MODE_RESIGN)
#define | MODES_DB (MODE_INITDB | MODE_REBUILDDB | MODE_VERIFYDB)
#define | MODES_FOR_DBPATH (MODES_BT | MODES_IE | MODES_QV | MODES_DB)
#define | MODES_FOR_NODEPS (MODES_BT | MODES_IE | MODE_VERIFY)
#define | MODES_FOR_TEST (MODES_BT | MODES_IE)
#define | MODES_FOR_ROOT (MODES_BT | MODES_IE | MODES_QV | MODES_DB)

## Enumerations

enum | modes { MODE_QUERY = (1 << 0), MODE_VERIFY = (1 << 3), MODE_QUERYTAGS = (1 << 9), MODE_INSTALL = (1 << 1), MODE_ERASE = (1 << 2), MODE_BUILD = (1 << 4), MODE_REBUILD = (1 << 5), MODE_RECOMPILE = (1 << 8), MODE_TARBUILD = (1 << 11), MODE_CHECKSIG = (1 << 6), MODE_RESIGN = (1 << 7), MODE_INITDB = (1 << 10), MODE_REBUILDDB = (1 << 12), MODE_VERIFYDB = (1 << 13), MODE_UNKNOWN = 0 }

## Functions

static void | argerror (const char *desc)
static void | printVersion (void)
static void | printBanner (void)
static void | printUsage (void)
int | main (int argc, const char **argv)

## Variables

int | _ftp_debug
int | noLibio
int | _rpmio_debug
int | _url_debug
static int | help = 0
static int | noUsageMsg = 0
static const char * | pipeOutput = NULL
static int | quiet = 0
static const char * | rcfile = NULL
static char * | rootdir = "/"
static int | showrc = 0
static int | showVersion = 0
static struct poptOption | rpmAllPoptTable []
static struct poptOption | optionsTable []

## Define Documentation

#define _AUTOHELP

| Definition at line 3 of file rpmqv.c.

#define GETOPT_DBPATH 1010

| Definition at line 33 of file rpmqv.c.

#define GETOPT_DEFINEMACRO 1020

| Definition at line 35 of file rpmqv.c. Referenced by main().

#define GETOPT_EVALMACRO 1021

| Definition at line 36 of file rpmqv.c. Referenced by main().

#define GETOPT_SHOWRC 1018

| Definition at line 34 of file rpmqv.c.

#define MODES_BT (MODE_BUILD | MODE_TARBUILD | MODE_REBUILD | MODE_RECOMPILE)

| Referenced by main().

#define MODES_DB (MODE_INITDB | MODE_REBUILDDB | MODE_VERIFYDB)

| Referenced by main().

#define MODES_FOR_DBPATH (MODES_BT | MODES_IE | MODES_QV | MODES_DB)

| Definition at line 71 of file rpmqv.c. Referenced by main().

#define MODES_FOR_NODEPS (MODES_BT | MODES_IE | MODE_VERIFY)

| Definition at line 72 of file rpmqv.c. Referenced by main().

#define MODES_FOR_ROOT (MODES_BT | MODES_IE | MODES_QV | MODES_DB)

| Definition at line 74 of file rpmqv.c. Referenced by main().

#define MODES_FOR_TEST (MODES_BT | MODES_IE)

| Definition at line 73 of file rpmqv.c. Referenced by main().

#define MODES_IE (MODE_INSTALL | MODE_ERASE)

| Referenced by main().

#define MODES_K (MODE_CHECKSIG | MODE_RESIGN)

| Referenced by main().

#define MODES_QV (MODE_QUERY | MODE_VERIFY)

| Referenced by main().

#define POPT_FORCE 1026

| Definition at line 17 of file rpmqv.c. Referenced by buildArgCallback(), and main().

#define POPT_NODEPS 1025

| Definition at line 16 of file rpmqv.c. Referenced by buildArgCallback(), and main().

#define POPT_NOMD5 1027

| Definition at line 18 of file rpmqv.c. Referenced by main().

#define POPT_NOSCRIPTS 1028

| Definition at line 19 of file rpmqv.c. Referenced by main().

## Enumeration Type Documentation

enum modes

Enumeration values:

  MODE_QUERY |
  MODE_VERIFY |
  MODE_QUERYTAGS |
  MODE_INSTALL |
  MODE_ERASE |
  MODE_BUILD |
  MODE_REBUILD |
  MODE_RECOMPILE |
  MODE_TARBUILD |
  MODE_CHECKSIG |
  MODE_RESIGN |
  MODE_INITDB |
  MODE_REBUILDDB |
  MODE_VERIFYDB |
  MODE_UNKNOWN |

Definition at line 41 of file rpmqv.c.

## Function Documentation

static void argerror | ( | const char * | desc | ) | `[static]`

| Definition at line 220 of file rpmqv.c. References _, __progname, and EXIT_FAILURE. Referenced by installArgCallback(), and main().

int main | ( | int | argc,
|  | const char ** | argv
| ) |

Definition at line 284 of file rpmqv.c.

References _, __progname, _free(), _ftp_debug, _noTransScripts, _noTransTriggers, _rpmio_debug, _url_debug, rpmSignArguments_s::addSign, argerror(), bindtextdomain, build(), rpmBuildArguments_s::buildAmount, rpmBuildArguments_s::buildChar, rpmBuildArguments_s::buildMode, rpmBuildArguments_s::buildRootOverride, CHECKSIG_ALL, CHECKSIG_MD5, rpmSignArguments_s::checksigFlags, dbiTags, rpmInstallArguments_s::eraseInterfaceFlags, EXIT_FAILURE, rpmBuildArguments_s::force, freeFilesystems(), freeNames(), freeSpec(), freeSpecVec, GETOPT_DEFINEMACRO, GETOPT_EVALMACRO, help, rpmInstallArguments_s::incldocs, rpmDatabaseArguments_s::init, INSTALL_ERASE, INSTALL_FRESHEN, INSTALL_HASH, INSTALL_INSTALL, INSTALL_NODEPS, INSTALL_NONE, INSTALL_PERCENT, INSTALL_UPGRADE, rpmInstallArguments_s::installInterfaceFlags, LIBRPMALIAS_FILENAME, LOCALEDIR, MODE_BUILD, MODE_CHECKSIG, MODE_ERASE, MODE_INITDB, MODE_INSTALL, MODE_QUERY, MODE_QUERYTAGS, MODE_REBUILD, MODE_REBUILDDB, MODE_RECOMPILE, MODE_RESIGN, MODE_TARBUILD, MODE_UNKNOWN, MODE_VERIFY, MODE_VERIFYDB, MODES_BT, MODES_DB, MODES_FOR_DBPATH, MODES_FOR_NODEPS, MODES_FOR_ROOT, MODES_FOR_TEST, MODES_IE, MODES_K, MODES_QV, rpmRelocation_s::newPath, rpmBuildArguments_s::noDeps, rpmInstallArguments_s::noDeps, noLibio, noUsageMsg, rpmInstallArguments_s::numRelocations, rpmRelocation_s::oldPath, optionsTable, PACKAGE, parseSpec(), parseSpecVec, pipeOutput, POPT_BADOPTION_NOALIAS, POPT_FORCE, POPT_NODEPS, POPT_NOMD5, POPT_NOSCRIPTS, poptBadOption(), poptFreeContext(), poptGetArg(), poptGetArgs(), poptGetContext(), poptGetNextOpt(), poptGetOptArg(), poptPeekArg(), poptReadConfigFile(), poptReadDefaultConfig(), poptResetContext(), poptSetExecPath(), poptStrerror(), poptStuffArgs(), rpmInstallArguments_s::prefix, printUsage(), printVersion(), rpmInstallArguments_s::probFilter, quiet, rpmQVArguments_s::qva_char, rpmQVArguments_s::qva_fflags, rpmQVArguments_s::qva_flags, rpmQVArguments_s::qva_mode, rpmQVArguments_s::qva_prefix, rpmQVArguments_s::qva_queryFormat, rpmQVArguments_s::qva_source, rpmQVArguments_s::qva_sourceCount, rpmInstallArguments_s::rbtid, rcfile, rpmDatabaseArguments_s::rebuild, rpmInstallArguments_s::relocations, RESIGN_ADD_SIGNATURE, RESIGN_CHK_SIGNATURE, RESIGN_NEW_SIGNATURE, RESIGN_NONE, RMIL_CMDLINE, rpmInstallArguments_s::rootdir, rpmBuildArguments_s::rootdir, rootdir, rpmBTArgs, RPMBUILD_BUILD, RPMBUILD_CLEAN, RPMBUILD_FILECHECK, RPMBUILD_INSTALL, RPMBUILD_PACKAGEBINARY, RPMBUILD_PACKAGESOURCE, RPMBUILD_PREP, RPMBUILD_RMBUILD, RPMBUILD_RMSOURCE, RPMBUILD_RMSPEC, rpmCheckSig(), rpmCLIMacroContext, RPMCONFIGDIR, rpmDBArgs, rpmdbInit(), rpmdbRebuild(), rpmdbVerify(), rpmDefineMacro(), rpmDetectPGPVersion(), rpmDisplayQueryTags(), rpmErase(), rpmExpand(), rpmExpandNumeric(), RPMFILE_ALL, rpmFreeMacros(), rpmFreeRpmrc(), rpmGetPassPhrase(), rpmIArgs, rpmIncreaseVerbosity, rpmInstall(), rpmInstallSource(), rpmIsVerbose, rpmKArgs, rpmlogClose(), RPMLOOKUPSIG_DISABLE, RPMLOOKUPSIG_QUERY, rpmLookupSignatureType(), RPMMESS_NORMAL, RPMMESS_QUIET, RPMPROB_FILTER_DISKNODES, RPMPROB_FILTER_DISKSPACE, RPMPROB_FILTER_FORCERELOCATE, RPMPROB_FILTER_IGNOREARCH, RPMPROB_FILTER_IGNOREOS, RPMPROB_FILTER_NONE, RPMPROB_FILTER_OLDPACKAGE, RPMPROB_FILTER_REPLACENEWFILES, RPMPROB_FILTER_REPLACEOLDFILES, RPMPROB_FILTER_REPLACEPKG, rpmQuery(), RPMQV_ALL, RPMQV_PACKAGE, rpmQVArgs, rpmReadConfigFiles(), rpmReSign(), rpmRollback(), rpmSetVerbosity, rpmShowRC(), RPMSIGTAG_GPG, RPMSIGTAG_PGP, RPMSIGTAG_PGP5, RPMTRANS_FLAG_ALLFILES, RPMTRANS_FLAG_JUSTDB, RPMTRANS_FLAG_NODOCS, RPMTRANS_FLAG_NOMD5, RPMTRANS_FLAG_NONE, RPMTRANS_FLAG_NOSCRIPTS, RPMTRANS_FLAG_NOTRIGGERS, RPMTRANS_FLAG_TEST, rpmVerify(), setlocale, setprogname, rpmBuildArguments_s::shortCircuit, showrc, showVersion, rpmSignArguments_s::sign, rpmBuildArguments_s::sign, specedit, rpmBuildArguments_s::targets, textdomain, rpmInstallArguments_s::transFlags, UNINSTALL_ALLMATCHES, UNINSTALL_NODEPS, UNINSTALL_NONE, URL_IS_UNKNOWN, urlFreeCache(), urlIsURL(), rpmDatabaseArguments_s::verify, VERIFY_ALL, VERIFY_DEPS, VERIFY_MD5, VERIFY_SCRIPT, xmalloc(), xrealloc(), and xstrdup().

static void printBanner | ( | void |  | ) | `[static]`

| Definition at line 235 of file rpmqv.c. References _. Referenced by printUsage().

static void printUsage | ( | void |  | ) | `[static]`

| Definition at line 243 of file rpmqv.c. References _, __progname, printBanner(), and printVersion(). Referenced by main().

static void printVersion | ( | void |  | ) | `[static]`

| Definition at line 228 of file rpmqv.c. References _, and rpmEVR. Referenced by main(), and printUsage().

## Variable Documentation

int _ftp_debug

| Definition at line 118 of file rpmio.c. Referenced by checkResponse(), ftpCommand(), ftpReq(), httpReq(), httpResp(), main(), tcpConnect(), and ufdClose().

int _rpmio_debug

| Definition at line 123 of file rpmio.c. Referenced by Access(), Closedir(), fdFgets(), Fdopen(), fdWritable(), Fopen(), ftpGlob(), ftpGlobfree(), ftpLstat(), Glob(), Globfree(), Link(), Lstat(), main(), Opendir(), Readdir(), Rename(), Stat(), ufdOpen(), ufdRead(), and ufdWrite().

int _url_debug

| Definition at line 34 of file url.c. Referenced by main(), and urlGetFile().

int help = 0`[static]`

| Definition at line 93 of file rpmqv.c. Referenced by main().

int noLibio

| Definition at line 100 of file rpmio.c. Referenced by Fclose(), Fdopen(), main(), and ufdClose().

int noUsageMsg = 0`[static]`

| Definition at line 95 of file rpmqv.c. Referenced by main().

struct poptOption optionsTable[]`[static]`

| Definition at line 162 of file rpmqv.c. Referenced by main().

const char* pipeOutput = NULL`[static]`

| Definition at line 97 of file rpmqv.c. Referenced by main().

int quiet = 0`[static]`

| Definition at line 99 of file rpmqv.c. Referenced by main().

const char* rcfile = NULL`[static]`

| Definition at line 101 of file rpmqv.c. Referenced by main().

char* rootdir = "/"`[static]`

| Definition at line 103 of file rpmqv.c. Referenced by main().

struct poptOption rpmAllPoptTable[]`[static]`

| Definition at line 110 of file rpmqv.c.

int showrc = 0`[static]`

| Definition at line 105 of file rpmqv.c. Referenced by main().

int showVersion = 0`[static]`

| Definition at line 107 of file rpmqv.c. Referenced by main().