summaryrefslogtreecommitdiff
path: root/lib/rpmts.h
AgeCommit message (Collapse)AuthorFilesLines
2013-02-02Suspend exclusive database lock when scriptlets get calledAnas Nashif1-0/+2
Suspend exclusive database lock when scriptlets get called, allowing read access in scriptlets. Only needed for DB_PRIVATE (aka global) locking.
2012-11-01Hide the strpool-related rpmts/rpmfi/rpmds interfaces out of sight for nowPanu Matilainen1-7/+0
- 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-12Add infastructure for global transaction set string poolPanu Matilainen1-0/+7
- 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.
2010-12-21Move rpmtsSELabelFoo() functions to an internal-only headerPanu Matilainen1-21/+0
- 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-12-20Free up a bunch of bits from rpmtransFlags_ePanu Matilainen1-15/+18
- With all this unused junk gone from the bitfield, we suddenly have plenty of bits to play with... - Preserving the symbols, just defined to 0, to avoid unnecessarily breaking compilation of stuff that refers to the old unused/unimplemented flags
2010-12-20Mark two more unused rpmts flags as suchPanu Matilainen1-2/+2
2010-12-20Rip the remains of --aid and --nosuggest, except for the callbackPanu Matilainen1-2/+2
- Only thing ever using RPMTRANS_FLAG_ADDINDEPS and _NOSUGGEST was rpm itself, and we haven't had an in-rpm implementation for this since the broken "rpmdb as repo format" was ripped out in 4.6.0. We dont need these special flags to support the operation anyway, IF somebody sets the solve callback, it will be used and the one implementing the callback gets to deal with whether those bits should be added to transaction or not.
2010-12-20Rip the stillborn, broken apply/commit transaction gooPanu Matilainen1-5/+5
- This was beginnings of something ten years ago, and that something was long since abandoned. These never did anything useful that --justdb/--noscripts wouldn't do.
2010-10-22Change rpmdb internals and iterator APIs to use the appropriate tag typesPanu Matilainen1-2/+2
- The actual indexes are rpmDbiTags, and the tag passed to rpmtsInitIterator() and rpmdbInitIterator() always refers to a database index, not arbitrary header tag. The tag passed to rpmdbSetIteratorRE() however /does/ refer to a header tag. This rather important distinction can actually be expressed in the API. - As the indexes are generated from header tags of the same value, most of these need to use the TagVal types instead of actual enums to avoid mismatches - the value is what counts, not it being an enum. - Several places still have variables misleadingly named "rpmtag" when they refer to dbi tags, but leaving them for now to avoid excessive changes at once.
2010-09-21Differentiate between the possible te types and iterator selector valuesPanu Matilainen1-2/+2
- Transaction elements can only be of one type (hence the enum), but the transaction set iteration permits selecting more than one. Add a new typedef dummy for this purpose only.
2010-09-21Stop abusing enum typedefs for bitfield typesPanu Matilainen1-4/+8
- Enums are fine for defining the bitfield flags, but the bitfield itself is not an enumeration. Add a separate typedef on "rpmFlags" type (presenting a bitfield of flags) for all of these. Compilers hardly care, but the typedefs give a nice visual clue for us humans using these flags far away from ho^H^H definitions.
2010-09-13Eliminate all fooUnlink() functions out of the APIPanu Matilainen1-7/+0
- These are internal helpers only, all refcount users need to use fooFree() or similar for correct operation. Add fwd declarations where necessary to avoid moving code around unnecessarily. - We could add these back later as aliases to fooFree() but for now, just get them out of the way.
2010-09-02Return NULL from rpmtsProblems() if no problems existPanu Matilainen1-1/+1
- Avoids callers having to separately test for number of problems and freeing when no problems exist
2010-09-01...and finally eliminate the spec crapola from transaction set for goodPanu Matilainen1-15/+0
2010-09-01Use selabel interfaces instead of matchpathconSteve Lawrence1-0/+21
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/+7
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-7/+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-22Add plugin calling supportSteve Lawrence1-0/+1
This patch adds a simple plugin system that makes simple problems easy to solve, and difficult problems, such as SELinux, possible. When the transaction gets to the point where a collection action should occur, it expands a macro of the form %__collection_<collection name> to get the path to a plugin and any additional options. The plugin is dlopen'ed, and the appropriate function is called in the plugin, with the additional arguments passed in. This also adds a --nocollections option to disable performing Collection actions.
2010-05-31Use the new chroot API everywhere, eliminate old related gooPanu Matilainen1-29/+0
2010-04-21Eliminate unused "known problems" based filtering from rpmtsRun()Rakesh Pandit1-1/+1
- This mechanism has never been used by anything at all, which suggests its not a particularly useful feature - Removing unused rpmpsTrim() from rpmps - Marking okProbs parameter of rpmtsRun() function as unused to avoid unnecessary breakage
2010-03-22Lose the useless rpmts refcounting debug messages + debug switchesPanu Matilainen1-6/+2
- get the debug messages out of API, this is what should've been in commit dbdbe8010cd944f026a5a4e5d071eb31d29d81c4 - just wtf have I been thinking? - also tolerate NULL passed to rpmtsLink() and rpmtsUnlink()
2010-03-18Lose deprecated rpmtsFindPubkey()Panu Matilainen1-8/+0
- unused in rpm since 4.6.0, and even before that this wasn't really useful outside rpm internals
2009-12-18Move transaction element iterator into rpmts.c where it logically belongsPanu Matilainen1-0/+23
- make rpmtsi_s really opaque, move rpmtsi typedef to rpmtypes.h along with all the other commonly used types
2009-12-17Eliminate unused + unnecessary transaction element iterator modePanu Matilainen1-1/+1
2009-12-15Eliminate transaction disk space checking functions from the APIPanu Matilainen1-27/+0
- 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-02Return error code from rpmtsAddEraseElement() failurePanu Matilainen1-1/+1
- trying to remove non-installed header counts as an error
2009-10-02Push the rpmtsGetKeys() stuff over to python completelyPanu Matilainen1-12/+0
- trivially implemented in python by iterating over transaction element keys, we dont need no stinking extra librpm APIs for this
2009-10-01Add API for setting preferred transaction file colorPanu Matilainen1-0/+8
- not strictly needed as it gets its default from a macro but .. shrug
2009-09-10Rip the broken asynchronous psm machineryPanu Matilainen1-8/+0
- it was only "used" for the ldconfig optimization and actually been completely broken since the ordering rewrite
2009-02-27Add md5->filedigest aliases (rhbz#487597)Jindrich Novy1-0/+1
- add %verify(nofiledigest) as %verify(nomd5) file attribute alias - reference digests as digests not checksums - make old md5 related symbols obsolete and use newer reference - update man page accordingly
2008-12-22Eliminate silly and now unnecessary rpmts(Set)RelocateElement() stuffPanu Matilainen1-15/+0
2008-11-12Don't bother retrieving db offset for erase elementsPanu Matilainen1-1/+1
- not needed anymore, use -1 to mean "unused" and document dboffset to rpmtsAddEraseElement() as unused
2008-10-24Delete findFps foobarFlorian Festi1-1/+0
including fpsCompare and the fpsdebug opt
2008-07-04Remove solvedb API and other related stuffPanu Matilainen1-33/+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-9/+0
- long since deprecated and nothing uses it, might as well go
2008-07-02Change rpmts keyring get/set interface to more transparent handlingPanu Matilainen1-4/+4
- add extra parameter to rpmtsGetKeyring() to automatically load up default keyring if not already set - rpmtsSetKeyring() with NULL keyring just frees up current keyring - adjust callers wrt the change - allows more transparent action for various "legacy" code-paths
2008-07-02Add docs for the new rpmts methods, deprecate rpmtsFindPubkey()Panu Matilainen1-1/+15
2008-07-01Add methods for getting and setting the keyring used by a transactionPanu Matilainen1-0/+4
- semantics of exactly when and how this is permitted needs more thought...
2008-06-30Detach pgp digest from transaction setPanu Matilainen1-28/+2
- 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-41/+0
- pass signature tag data around as argument to rpmVerifySignature() as needed - eliminate the related API from rpmts
2008-06-16Doxygen parameter name mismatchPanu Matilainen1-1/+1
2008-06-10rpmtsUpdateDSI now uses rpm_loff_t for fileSizeJindrich Novy1-4/+4
2008-06-09Use rpm_loff_t for transaction callback amount+total argumentsPanu Matilainen1-1/+1
- ought to be safe as data is only ever automatically converted to larger type on notify calls
2008-05-08Check for transaction root sanity in rpmtsSetRootDir()Panu Matilainen1-2/+2
- only regular paths starting with / permitted - change prototype to permit return codes
2008-04-24Remove meaningless extern on function declarations in headersPanu Matilainen1-2/+2
2008-03-17Remove repackage support to finish off with rollbackPanu Matilainen1-3/+2
The two main classes of rollback/repackage need are 1) Gimme back the previous version, this broke XYZ on my system. This is better handled by downgrading to the previous version of original package instead of repackaged garbage. We should maintain real package (version) history somewhere. 2) Upgrade messed up my configuration. Instead of repackaging everything we could be far more intelligent wrt config files, stick them into real version control or at least have hooks to do so. RPMCALLBACK_REPACKAGE_* and RPMTRANS_FLAG_REPACKAGE definitions left around to avoid needlessly breaking everybodys callbacks (for now)
2008-03-17Remove support for automatic rollback on failurePanu Matilainen1-29/+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-02-05Mass convert (back) to rpmTag as it's usable everywhere nowPanu Matilainen1-1/+1
- cast away a few cases where the enum usage causes ridiculous amount of compiler warnings from unhandled switch-cases
2008-02-05Use rpmSigTag enum for signature tags everywhere, more or less..Panu Matilainen1-2/+2
2008-02-05Use rpmTagType always now that it's available everywherePanu Matilainen1-2/+2
- RPM_MASK_TYPE is not a datatype, move it out of the enum - add missing cases python header handling to shut up gcc