summaryrefslogtreecommitdiff
path: root/lib/rpmts_internal.h
AgeCommit message (Collapse)AuthorFilesLines
2012-12-19Handle transaction global pool allocation centrally in rpmtsPool()Panu Matilainen1-1/+1
- Previously the pool would only get allocated on successfull addition of install or erasure elements, causing assert() failures on operations on empty transaction set, which should be just a no-op, not an error. - Make rpmtsPool() create the pool if it doesn't exist, update relevant users to call rpmtsPool() instead of directly accessing tsmem->pool, this avoids having to worry about pool existence in all the various cases. - Also fix up the pool-related comment on rpmtsEmpty(): pools does not and can not support emptying as it could break references to its contents. Per-string refcount would be needed for emptying support. (cherry picked from commit d73535e1a9dc5095e78475adc5b636d99f01efa9)
2012-11-01Hide the strpool-related rpmts/rpmfi/rpmds interfaces out of sight for nowPanu Matilainen1-0/+8
- In the package/transaction related things the strpool is more of an internal implementation detail than an end-goal in itself, move string pool related interfaces of rpmts, rpmfi and rpmds to internal-only APIs for now. The kind interfaces we'll want to eventually export a) dont exist yet and b) are likely to be something very different. - The string pool itself remains exported however, its a handy data structure for all sorts of things and both librpm and librpmbuild heavily use it already.
2012-09-14Bury the fingerprint hash-types into fprint.c, clean upPanu Matilainen1-0/+1
- fprint.h only needs rpmtypes.h now, remove historical leftovers - Avoids having to define the hash types multiple times as they're now buried out of sight - fpHashFunction() and fpLookupSubdir() can now be made static, do so...
2012-09-13Hang rpmlib() dependency set onto transaction setPanu Matilainen1-0/+1
- Eliminates the cumbersome static rpmlib ds instance which can never be freed, as a member of the transaction set it simply gets cleaned out along with other transaction (dependency) data.
2012-09-12Add infastructure for global transaction set string poolPanu Matilainen1-0/+2
- Add a pool pointer to to ts members struct and a getter function - Grab the global pool for rpmte dependency- and file info creation, if its NULL then the sets will use private pools of their own. - Add the (currently) required magic voodoo rain-dance to freeze and unfreeze the pool as necessary wrt new element additions: for current rpmal and fingerprinting to work, the string pointers must be immovable. - This is infrastructure only: nothing creates the global pool yet, so everything is still using private pools.
2012-09-12Add an nternal rpmal create+populate helper function, use for erased packagesPanu Matilainen1-0/+3
- We'll need this shortly for added packages too...
2012-08-30Store transaction element pointers in the removedPkgs hashPanu Matilainen1-1/+1
- Change the hashtype name to something else, its no longer a plain int hash. Still needs double definition as its not contained in a single source (might want a wrapper similar to rpmal), but slightly more contained now than the previous intHash definition. - This opens up some new possibilities, to be taken advantage of in later commits.
2012-01-12remove the 'path' parameter of rpmtsSELabelInit()Ales Kozumplik1-2/+1
- It is always selinux_file_context_path() anyway.
2012-01-12selinux: reopen label between transactions if necessary (RhBug: 746073)Ales Kozumplik1-3/+5
2010-12-21Move rpmtsSELabelFoo() functions to an internal-only headerPanu Matilainen1-0/+21
- The sepolicy plugin needs them so the symbols can't be hidden, but these are not something external API-users should be messing with. - Ultimately we'll want to push the actual labeling from FSM to the plugin, insulating rpm from all SELinux specifics, this is just a band-aid temporary "solution" to keep this out of the API.
2010-09-21Add "c++ protection" to (hopefully) all of our internal headersPanu Matilainen1-0/+8
2010-09-01...and finally eliminate the spec crapola from transaction set for goodPanu Matilainen1-2/+0
2010-09-01Use selabel interfaces instead of matchpathconSteve Lawrence1-0/+2
This replaces the old matchpathcon interfaces with the new selabel interfaces for relabeling files, storing an selabel handle in the transaction set. With this change, also comes an added distinction between --nocontexts being specified and a failure to read the load file contexts. Previously, there was no distinction, and both cases used the RPMTRANS_FLAG_NOCONTEXTS flag. However, with the new policy plugin, it is necessary to make such a distinction. This is because matchpathcon_init (now selabel interfaces) can fail at the beginning of the transaction, but succeed later after new policy is installed. Because of this, we may need to enable/disable RPMTRANS_FLAG_NOCONTEXTS multiple times. However, because this flag could also mean --nocontexts, we cannot do that. By storing the selabel handle in the rpmts, we can easily keep track if the handle has been successfully created, rather than overloading RPMTRANS_FLAG_NOCONTEXTS with two meanings.
2010-09-01Update the plugin architecture to allow for remembering stateSteve Lawrence1-0/+2
This moves most of the plugin logic to a new rpmplugins file with a struct and functions for managing plugins, allowing for plugins to carry state. This also adds init and cleanup hooks for plugins to initialize and cleanup their state, and a new 'open te' hook allowing plugins to read and save information from transaction elements. This also generalizes the plugin architecture a bit so it isn't so specific to collections.
2010-08-13Lose the now unnecessary rpmtsSELinuxEnabled() functionPanu Matilainen1-1/+0
- it never was anything more than a cached value of is_selinux_enabled() and caching this fairly expensive result is no longer needed as scriptlet execution wrt selinux contexts is now conditionalized on RPMTRANS_FLAG_NOCONTEXTS instead
2010-06-22numAddedPackages is unused since rpm 4.8.0, eliminatePanu Matilainen1-2/+0
2010-05-31Use the new chroot API everywhere, eliminate old related gooPanu Matilainen1-2/+0
2010-05-21Move the lone hashFunctionString() into misc.[ch], eliminate rpmhash.[ch]Panu Matilainen1-1/+0
- Besides there not being much point in having a separate source + header for a small single function, this fixes build on case-insensitive systems such as Mac OS X.
2010-05-06Convert tsmem->removedPackages to a hash table and remove rpmdbPruneIterator ↵Florian Festi1-3/+1
from the API
2010-04-22Make transaction lock path per-transactionPanu Matilainen1-0/+1
- Although it doesn't really happen in practise, rpm's API permits several transactions with possibly differing roots within process lifetime. Previously the lock path was calculated just once globally so we could easily be locking in a completely wrong place (eg locking in a previously accessed chroot when system rpmdb should be transaction-locked)
2010-04-22Further generalize the rpmlock interfacePanu Matilainen1-0/+3
- Move transaction lock path handling into rpmts.c, export new low level rpmlockAcquire() function to actually grab a lock - Rename rpmtsFreeLock() to rpmlockFree() and return NULL in the general rpm style
2010-03-14Default to "not found" for rpmtsSolve() + comment behaviorPanu Matilainen1-0/+1
- this fixes the behavior when (as normally is the case) there is no depsolve callback set
2010-03-12Add internal API for depsolve callbackPanu Matilainen1-0/+3
- rpmts struct is now fully opaque within depends.c
2010-03-12Record problems into the transaction elements causing themPanu Matilainen1-1/+0
- Any problem found in transaction processing is caused, or at least triggered by, some transaction element. Having the problems in elements lets API users easily determine which package caused which problem instead of having to parse problem strings in vain. - No problem set stored in transaction set itself now, rpmtsProblems() API p reserved by making it collect problems from our transaction elements into a new set. The problem set fiddling in rpmtsRun() wrt %pretrans and all is a bit crazy - always was, now its just more visible... - Make rpmtsCheck() pass the associated transaction elements into the lower level functions. rpmdsProblem() removed from API, it's not particularly useful outside rpmtsCheck() internals. - rpmts struct is now opaque within depends.c except for solve callback - This breaks --badreloc, need to figure out something saner for the problem filtering
2010-03-12Split transaction member information out of rpmts to separate structPanu Matilainen1-11/+19
- add internal rpmtsMembers() function to get the member structures - the main rpmts struct is now opaque within order.c, and much closer to being so for depends.c and transaction.c too - no functional changes
2010-02-05Remove no longer neede rpmts->filesystemCount and->filesystemsFlorian Festi1-2/+0
2009-12-21Remove unused ordering related members from rpmts structPanu Matilainen1-2/+0
2009-12-15Eliminate transaction disk space checking functions from the APIPanu Matilainen1-26/+1
- The DSI stuff runs from deep inside rpmtsRun() with no chance for API users to do anything with it. Bury into transaction.c and make static to let us change the way it works without API constraints...
2009-10-27Make disk space problem reporting slightly saner (RhBug:517418)Panu Matilainen1-0/+2
- Only report disk space/inode issues for packages that are affected instead of piling up all the problems in all filesystems on all remaining packages - The messages are still ambiguous at best, need to figure out something better one of these days...
2009-09-10Rip the broken asynchronous psm machineryPanu Matilainen1-1/+0
- it was only "used" for the ldconfig optimization and actually been completely broken since the ordering rewrite
2009-04-03Make rpmal header & all internalPanu Matilainen1-1/+1
- rpmal is hardly useful outside rpm itself, avoid exporting stuff unnecessarily
2009-02-24Push the rest of the prepare-calculations down to rpmtsPrepare()Panu Matilainen1-1/+0
- total file count only needed during prepare, pass around as necessary - all fingerprinting related activity (skipping files, memory allocations etc) are now handled locally from rpmtsPrepare() - throw out some ancient no longer relevant comments
2009-02-24Eliminate fingerprint hash from ts structPanu Matilainen1-1/+0
- only prepare stage needs, alloc+free locally and pass around to helpers as necessary
2009-02-24Calculate files in transaction just oncePanu Matilainen1-0/+1
- move file counting from rpmtsRun() and rpmFindBaseNamesInDB() to single helper, store result in rpmts struct
2008-12-22Eliminate silly and now unnecessary rpmts(Set)RelocateElement() stuffPanu Matilainen1-3/+1
2008-11-30Move install langs to per-transaction levelPanu Matilainen1-0/+1
- install langs is clearly a per-transaction thing, avoid checking and splitting etc over and over for every package - also if any of the %{_install_lang} is "all", disable all language processing as we'll be installing every language anyway
2008-11-30Move netsharedpaths to per-transaction levelPanu Matilainen1-0/+2
- netsharedpaths is clearly a per-transaction thing, avoid checking and splitting etc over and over for every package
2008-11-30Eliminate unused filename field in rpmts_sPanu Matilainen1-2/+0
2008-10-24Change both hashes to a typed versionFlorian Festi1-1/+3
2008-07-04Remove solvedb API and other related stuffPanu Matilainen1-4/+0
- nobody has used the solvedb for anything in years - the mechanism + rpmcache are horribly broken on multilib - solvedb is way too heavyweight to be really usable as a general mechanism - solver callback hook left in place as that could in theory be usable still - we need something better to replace this all, getting rid of it now so we're not stuck with the API forever
2008-07-04Kill of rpmtsAvailable()Panu Matilainen1-5/+0
- long since deprecated and nothing uses it, might as well go
2008-07-02Make rpmkeyring.h public headerPanu Matilainen1-1/+0
2008-07-01Eliminate remaining signature checking bits from rpmtsPanu Matilainen1-3/+0
- rpmdb-specific rpmtsFindPubkey() no longer needed for anything, and neither are the cached packets and stuff
2008-07-01Proof of concept rpmtsFindPubkey() implementation with the new keyringPanu Matilainen1-0/+2
- ifdeffed out for now, needs a bit more flesh and a working import routine
2008-06-30Detach pgp digest from transaction setPanu Matilainen1-2/+0
- pass the pgp container around as argument as needed - eliminate the related API from rpmts
2008-06-30Detach signature tag data from transaction setPanu Matilainen1-4/+0
- pass signature tag data around as argument to rpmVerifySignature() as needed - eliminate the related API from rpmts
2008-06-10Use 64bit data types in diskspaceInfo_sJindrich Novy1-6/+6
2008-05-12Fixup paths and Makefiles for rpmdb/ eliminationPanu Matilainen1-1/+1
2008-03-17Remove support for automatic rollback on failurePanu Matilainen1-4/+0
- doing this reliably from rpm is simply not possible as there's no way to undo script actions, might as well not pretend we can - for a feature that's not generally usable it complicates mainline code way too much
2008-03-07Make _cacheDependsRC static, not needed outside depends.cPanu Matilainen1-2/+0