rpm  5.4.10
Data Structures | Macros | Functions | Variables
rpminstall.c File Reference
#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 _RPMEVR_INTERNAL   /* XXX expose rpmVersionCompare prototype */
#define _RPMTS_INTERNAL   /* XXX ts->suggests */
#define _RPMGI_INTERNAL   /* XXX "+bing" args need gi->h. */
#define _RPMROLLBACK_INTERNAL
#define QVA_ISSET(_qvaflags, _FLAG)   ((_qvaflags) & (VERIFY_##_FLAG))
#define VSF_ISSET(_vsflags, _FLAG)   ((_vsflags) & (RPMVSF_##_FLAG))
#define VSF_SET(_vsflags, _FLAG)   (_vsflags) |= (RPMVSF_##_FLAG)
#define VSF_CLR(_vsflags, _FLAG)   (_vsflags) &= ~(RPMVSF_##_FLAG)

Functions

static void printHash (const rpmuint64_t amount, const rpmuint64_t total)
 Print a CLI progress bar.
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.
int rpmcliInstallProblems (rpmts ts, const char *msg, int rc)
 Report package problems (if any).
int rpmcliInstallSuggests (rpmts ts)
 Report packages(if any) that satisfy unresolved dependencies.
int rpmcliInstallCheck (rpmts ts)
 Check package element dependencies in a transaction set, reporting problems.
int rpmcliInstallOrder (rpmts ts)
 Order package elements in a transaction set, reporting problems.
int rpmcliInstallRun (rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet)
 Install/erase package elements in a transaction set, reporting problems.
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.
int rpmErase (rpmts ts, QVA_t ia, const char **argv)
 Erase binary rpm package.
int rpmInstallSource (rpmts ts, const char *arg, const char **specFilePtr, const char **cookie)
 Install source rpm package.

Variables

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

Detailed Description

Definition in file rpminstall.c.

Macro Definition Documentation

#define _RPMEVR_INTERNAL   /* XXX expose rpmVersionCompare prototype */

Definition at line 12 of file rpminstall.c.

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

Definition at line 24 of file rpminstall.c.

#define _RPMROLLBACK_INTERNAL

Definition at line 30 of file rpminstall.c.

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

Definition at line 20 of file rpminstall.c.

#define QVA_ISSET (   _qvaflags,
  _FLAG 
)    ((_qvaflags) & (VERIFY_##_FLAG))

Definition at line 54 of file rpminstall.c.

Referenced by rpmcliInstall(), and rpmErase().

#define VSF_CLR (   _vsflags,
  _FLAG 
)    (_vsflags) &= ~(RPMVSF_##_FLAG)

Definition at line 58 of file rpminstall.c.

Referenced by rpmErase().

#define VSF_ISSET (   _vsflags,
  _FLAG 
)    ((_vsflags) & (RPMVSF_##_FLAG))

Definition at line 56 of file rpminstall.c.

#define VSF_SET (   _vsflags,
  _FLAG 
)    (_vsflags) |= (RPMVSF_##_FLAG)

Definition at line 57 of file rpminstall.c.

Referenced by rpmcliInstall(), rpmErase(), and rpmInstallSource().

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
amountcurrent
totalfinal

Definition at line 79 of file rpminstall.c.

References rpmcliHashesCurrent, and rpmcliHashesTotal.

Referenced by rpmShowProgress().

static rpmRC rpmcliEraseElement ( rpmts  ts,
const char *  arg 
)
static
static const char* rpmcliInstallElementPath ( rpmts  ts,
const char *  arg 
)
static
static const char* rpmcliWalkFirst ( ARGV_t  av,
miRE  mire 
)
static

Variable Documentation

int rpmcliHashesCurrent = 0

Definition at line 65 of file rpminstall.c.

Referenced by printHash().

int rpmcliHashesTotal = 0

Definition at line 67 of file rpminstall.c.

Referenced by printHash().

int rpmcliPackagesTotal = 0

Definition at line 63 of file rpminstall.c.

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

rpmuint64_t rpmcliProgressCurrent = 0

Definition at line 69 of file rpminstall.c.

rpmuint64_t rpmcliProgressTotal = 0

Definition at line 71 of file rpminstall.c.