#include "system.h"#include <rpmcli.h>#include "rpmdb.h"#include "rpmds.h"#include "rpmte.h"#include "rpmts.h"#include "manifest.h"#include "misc.h"#include "debug.h"Go to the source code of this file.
Data Structures | |
| struct | rpmEIU |
Defines | |
| #define | _RPMTS_INTERNAL |
Typedefs | |
| typedef const char * | str_t |
Functions | |
| static void | printHash (const unsigned long amount, const unsigned long total) |
| Print a CLI progress bar. | |
| void * | rpmShowProgress (const void *arg, const rpmCallbackType what, const unsigned long amount, const unsigned long total, fnpyKey key, void *data) |
| The rpm CLI generic transaction callback handler. | |
| int | rpmInstall (rpmts ts, struct rpmInstallArguments_s *ia, const char **fileArgv) |
| Install/upgrade/freshen binary rpm package. | |
| int | rpmErase (rpmts ts, struct rpmInstallArguments_s *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. | |
| static int | IDTintcmp (const void *a, const void *b) |
| IDTX | IDTXfree (IDTX idtx) |
| Destroy id index. | |
| IDTX | IDTXnew (void) |
| Create id index. | |
| IDTX | IDTXgrow (IDTX idtx, int need) |
| Insure that index has room for "need" elements. | |
| IDTX | IDTXsort (IDTX idtx) |
| Sort tag (instance,value) pairs. | |
| IDTX | IDTXload (rpmts ts, rpmTag tag) |
| Load tag (instance,value) pairs from rpm databse, and return sorted id index. | |
| IDTX | IDTXglob (rpmts ts, const char *globstr, rpmTag tag) |
| Load tag (instance,value) pairs from packages, and return sorted id index. | |
| int | rpmRollback (rpmts ts, struct rpmInstallArguments_s *ia, const char **argv) |
| Rollback transactions, erasing new, reinstalling old, package(s). | |
Variables | |
| int | rpmcliPackagesTotal = 0 |
| int | rpmcliHashesCurrent = 0 |
| int | rpmcliHashesTotal = 0 |
| int | rpmcliProgressCurrent = 0 |
| int | rpmcliProgressTotal = 0 |
| static int | reverse = -1 |
Definition in file rpminstall.c.
| #define _RPMTS_INTERNAL |
Definition at line 13 of file rpminstall.c.
| typedef const char* str_t |
Definition at line 256 of file rpminstall.c.
| static int IDTintcmp | ( | const void * | a, | |
| const void * | b | |||
| ) | [static] |
Destroy id index.
| idtx | id index |
Definition at line 917 of file rpminstall.c.
References _free(), IDT_s::h, headerFree(), IDTindex_s::idt, and IDTindex_s::nidt.
Referenced by getRepackageHeaderFromTE(), rpmts_IDTXglob(), and rpmts_IDTXload().
Load tag (instance,value) pairs from packages, and return sorted id index.
| ts | transaction set | |
| globstr | glob expression | |
| tag | rpm tag |
Definition at line 1012 of file rpminstall.c.
References _, _free(), Fclose(), rpmEIU::fd, Ferror(), Fopen(), Fstrerror(), IDT_s::h, rpmEIU::h, headerFree(), headerGetEntry(), headerIsEntry(), headerLink(), IDTindex_s::idt, IDTXgrow(), IDTXsort(), IDT_s::instance, rpmEIU::isSource, IDT_s::key, IDTindex_s::nidt, RPMERR_OPEN, rpmError, rpmGlob(), rpmEIU::rpmrc, RPMRC_NOKEY, RPMRC_NOTTRUSTED, RPMRC_OK, rpmReadPackageFile(), RPMTAG_SOURCEPACKAGE, IDT_s::u32, and IDT_s::val.
Referenced by getRepackageHeaderFromTE(), rpmRollback(), and rpmts_IDTXglob().
Insure that index has room for "need" elements.
| idtx | id index | |
| need | additional no. of elements needed |
Definition at line 941 of file rpminstall.c.
References IDTindex_s::alloced, IDTindex_s::delta, IDTindex_s::idt, IDTXnew(), IDTindex_s::nidt, IDTindex_s::size, and xrealloc().
Referenced by IDTXglob(), and IDTXload().
Load tag (instance,value) pairs from rpm databse, and return sorted id index.
| ts | transaction set | |
| tag | rpm tag |
Definition at line 965 of file rpminstall.c.
References IDT_s::h, rpmEIU::h, headerGetEntry(), headerLink(), IDTindex_s::idt, IDTXgrow(), IDTXsort(), IDT_s::instance, IDT_s::key, IDTindex_s::nidt, RPM_INT32_TYPE, RPM_NULL_TYPE, rpmdbFreeIterator(), rpmdbGetIteratorOffset(), rpmdbNextIterator(), rpmdbSetIteratorRE(), RPMMIRE_DEFAULT, RPMTAG_NAME, rpmtsInitIterator(), IDT_s::u32, and IDT_s::val.
Referenced by rpmRollback(), and rpmts_IDTXload().
| IDTX IDTXnew | ( | void | ) |
Create id index.
Definition at line 933 of file rpminstall.c.
References xcalloc().
Referenced by IDTXgrow().
Sort tag (instance,value) pairs.
| idtx | id index |
Definition at line 958 of file rpminstall.c.
References IDTindex_s::idt, IDTintcmp(), IDTindex_s::nidt, and IDTindex_s::size.
Referenced by IDTXglob(), and IDTXload().
| static void printHash | ( | const unsigned long | amount, | |
| const unsigned long | total | |||
| ) | [static] |
Print a CLI progress bar.
| amount | current | |
| total | final |
Definition at line 41 of file rpminstall.c.
References rpmcliHashesCurrent, rpmcliHashesTotal, rpmcliProgressCurrent, and rpmcliProgressTotal.
Referenced by rpmShowProgress().
int reverse = -1 [static] |
Definition at line 905 of file rpminstall.c.
| int rpmcliHashesCurrent = 0 |
| int rpmcliHashesTotal = 0 |
| int rpmcliPackagesTotal = 0 |
Definition at line 25 of file rpminstall.c.
Referenced by rpmInstall(), rpmRollback(), rpmShowProgress(), and rpmtsAddInstallElement().
| int rpmcliProgressCurrent = 0 |
| int rpmcliProgressTotal = 0 |
1.5.2