1 #ifndef _RPMTS_INTERNAL_H
2 #define _RPMTS_INTERNAL_H
5 #include <rpm/rpmal.h> /* XXX availablePackage */
7 #include "lib/rpmhash.h" /* XXX hashTable */
8 #include "lib/fprint.h"
12 typedef struct diskspaceInfo_s * rpmDiskSpaceInfo;
16 struct diskspaceInfo_s {
17 dev_t dev; /*!< File system device number. */
18 int64_t bneeded; /*!< No. of blocks needed. */
19 int64_t ineeded; /*!< No. of inodes needed. */
20 int64_t bsize; /*!< File system block size. */
21 int64_t bavail; /*!< No. of blocks available. */
22 int64_t iavail; /*!< No. of inodes available. */
26 * Adjust for root only reserved space. On linux e2fs, this is 5%.
28 #define adj_fs_blocks(_nb) (((_nb) * 21) / 20)
30 /* argon thought a shift optimization here was a waste of time... he's
32 #define BLOCK_ROUND(size, block) (((size) + (block) - 1) / (block))
36 * The set of packages to be installed/removed atomically.
39 rpmtransFlags transFlags; /*!< Bit(s) to control operation. */
41 int (*solve) (rpmts ts, rpmds key, const void * data);
42 /*!< Search for NEVRA key. */
43 const void * solveData; /*!< Solve callback data */
45 rpmCallbackFunction notify; /*!< Callback function. */
46 rpmCallbackData notifyData; /*!< Callback private data. */
48 rpmps probs; /*!< Current problems in transaction. */
49 rpmprobFilterFlags ignoreSet;
50 /*!< Bits to filter current problems. */
52 unsigned int filesystemCount; /*!< No. of mounted filesystems. */
53 const char ** filesystems; /*!< Mounted filesystem names. */
54 rpmDiskSpaceInfo dsi; /*!< Per filesystem disk/inode usage. */
55 uint64_t fileCount; /*!< Total number of files in transaction */
57 rpmdb rdb; /*!< Install database handle. */
58 int dbmode; /*!< Install database open mode. */
59 rpmFpHash ht; /*!< Fingerprint hash table. */
61 int * removedPackages; /*!< Set of packages being removed. */
62 int numRemovedPackages; /*!< No. removed package instances. */
63 int allocedRemovedPackages; /*!< Size of removed packages array. */
65 rpmal addedPackages; /*!< Set of packages being installed. */
66 int numAddedPackages; /*!< No. added package instances. */
68 rpmte * order; /*!< Packages sorted by dependencies. */
69 int orderCount; /*!< No. of transaction elements. */
70 int orderAlloced; /*!< No. of allocated transaction elements. */
71 int unorderedSuccessors; /*!< Index of 1st element of successors. */
72 int ntrees; /*!< No. of dependency trees. */
73 int maxDepth; /*!< Maximum depth of dependency tree(s). */
75 int selinuxEnabled; /*!< Is SE linux enabled? */
76 int chrootDone; /*!< Has chroot(2) been been done? */
77 char * rootDir; /*!< Path to top of install tree. */
78 char * currDir; /*!< Current working directory. */
79 FD_t scriptFd; /*!< Scriptlet stdout/stderr. */
80 int delta; /*!< Delta for reallocation. */
81 rpm_tid_t tid; /*!< Transaction id. */
83 rpm_color_t color; /*!< Transaction color bits. */
84 rpm_color_t prefcolor; /*!< Preferred file color. */
86 rpmVSFlags vsflags; /*!< Signature/digest verification flags. */
88 rpmKeyring keyring; /*!< Keyring in use. */
90 ARGV_t netsharedPaths; /*!< From %{_netsharedpath} */
91 ARGV_t installLangs; /*!< From %{_install_langs} */
93 struct rpmop_s ops[RPMTS_OP_MAX];
95 rpmSpec spec; /*!< Spec file control structure. */
97 int nrefs; /*!< Reference count. */
100 #endif /* _RPMTS_INTERNAL_H */