rpminstall.c File Reference
RPMCLI.
`#include "system.h"`
`#include <rpmio.h>`
`#include <rpmiotypes.h>`
`#include <poptIO.h>`
`#include <rpmtag.h>`
`#include <rpmevr.h>`
`#include "rpmdb.h"`
`#include "rpmte.h"`
`#include <rpmts.h>`
`#include "manifest.h"`
`#include "rpmgi.h"`
`#include <rpmlib.h>`
`#include <rpmcli.h>`
`#include <rpmrollback.h>`
`#include "debug.h"`
Include dependency graph for rpminstall.c:

Go to the source code of this file.

## Data Structures

struct | rpmRelocation_s

## Macros

#define | _RPMTS_INTERNAL /* XXX ts->suggests */
#define | _RPMGI_INTERNAL /* XXX "+bing" args need gi->h. */
#define | _RPMROLLBACK_INTERNAL

## Functions

static void | printHash (const rpmuint64_t amount, const rpmuint64_t total)
| Print a CLI progress bar. More...
void * | rpmShowProgress (const void *arg, const rpmCallbackType what, const rpmuint64_t amount, const rpmuint64_t total, fnpyKey key, void *data)
| The rpm CLI generic transaction callback handler. More...
int | rpmcliInstallProblems (rpmts ts, const char *msg, int rc)
| Report package problems (if any). More...
int | rpmcliInstallSuggests (rpmts ts)
| Report packages(if any) that satisfy unresolved dependencies. More...
int | rpmcliInstallCheck (rpmts ts)
| Check package element dependencies in a transaction set, reporting problems. More...
int | rpmcliInstallOrder (rpmts ts)
| Order package elements in a transaction set, reporting problems. More...
int | rpmcliInstallRun (rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet)
| Install/erase package elements in a transaction set, reporting problems. More...
static rpmRC | rpmcliEraseElement (rpmts ts, const char *arg)
static const char * | rpmcliWalkFirst (ARGV_t av, miRE mire)
static const char * | rpmcliInstallElementPath (rpmts ts, const char *arg)
int | rpmcliInstall (rpmts ts, QVA_t ia, const char **argv)
| Install/upgrade/freshen binary rpm package. More...
int | rpmErase (rpmts ts, QVA_t ia, const char **argv)
| Erase binary rpm package. More...
int | rpmInstallSource (rpmts ts, const char *arg, const char **specFilePtr, const char **cookie)
| Install source rpm package. More...

## Variables

int | rpmcliPackagesTotal = 0
int | rpmcliHashesCurrent = 0
int | rpmcliHashesTotal = 0
rpmuint64_t | rpmcliProgressCurrent = 0
rpmuint64_t | rpmcliProgressTotal = 0

## Macro Definition Documentation

#define _RPMGI_INTERNAL /* XXX "+bing" args need gi->h. */

Definition at line 23 of file rpminstall.c.

#define _RPMROLLBACK_INTERNAL

Definition at line 29 of file rpminstall.c.

#define _RPMTS_INTERNAL /* XXX ts->suggests */

Definition at line 19 of file rpminstall.c.

## Function Documentation

static void printHash | ( | const rpmuint64_t | amount,
|  | const rpmuint64_t | total
| ) |  |

static

Print a CLI progress bar.

Todo:
  Unsnarl isatty(STDOUT_FILENO) from the control flow.

Parameters

  amount | current
  total | final

Definition at line 56 of file rpminstall.c.

References rpmcliHashesCurrent, rpmcliHashesTotal, rpmcliProgressCurrent, and rpmcliProgressTotal.

Referenced by rpmShowProgress().

static rpmRC rpmcliEraseElement | ( | rpmts | ts,
|  | const char * | arg
| ) |  |

static

Definition at line 332 of file rpminstall.c.

References RPMDBI_LABEL, rpmmiFree(), rpmmiInstance(), rpmmiNext(), RPMRC_FAIL, RPMRC_NOTFOUND, RPMRC_OK, rpmtsAddEraseElement(), and rpmtsInitIterator().

Referenced by rpmcliInstall().

static const char* rpmcliInstallElementPath | ( | rpmts | ts,
|  | const char * | arg
| ) |  |

static

Definition at line 418 of file rpminstall.c.

References _free(), argvAppend(), argvCount(), argvFree(), argvSplit(), mireFree(), mireNew(), mireRegcomp(), rpmcliWalkFirst(), rpmExpand(), rpmGetPath(), rpmGlob(), and RPMMIRE_REGEX.

Referenced by rpmcliInstall().

static const char* rpmcliWalkFirst | ( | ARGV_t | av,
|  | miRE | mire
| ) |  |

static

Definition at line 359 of file rpminstall.c.

References _ftsent::fts_accpath, Fts_close(), FTS_COMFOLLOW, FTS_D, FTS_DC, FTS_DEFAULT, FTS_DNR, FTS_DOT, FTS_DP, FTS_ERR, FTS_F, _ftsent::fts_info, FTS_INIT, _ftsent::fts_level, FTS_LOGICAL, FTS_NOSTAT, FTS_NS, FTS_NSOK, Fts_open(), Fts_read(), Fts_set(), FTS_SKIP, FTS_SL, FTS_SLNONE, FTS_W, mireRegexec(), and xstrdup().

Referenced by rpmcliInstallElementPath().

## Variable Documentation

int rpmcliHashesCurrent = 0

Definition at line 42 of file rpminstall.c.

Referenced by printHash(), and rpmShowProgress().

int rpmcliHashesTotal = 0

Definition at line 44 of file rpminstall.c.

Referenced by printHash().

int rpmcliPackagesTotal = 0

Definition at line 40 of file rpminstall.c.

Referenced by rpmcliInstall(), rpmRollback(), rpmShowProgress(), and rpmtsAddInstallElement().

rpmuint64_t rpmcliProgressCurrent = 0

Definition at line 46 of file rpminstall.c.

Referenced by printHash(), and rpmShowProgress().

rpmuint64_t rpmcliProgressTotal = 0

Definition at line 48 of file rpminstall.c.

Referenced by printHash(), and rpmShowProgress().