Age | Commit message (Collapse) | Author | Files | Lines |
|
- 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)
|
|
- 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.
|
|
- 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...
|
|
- 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.
|
|
- 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.
|
|
- We'll need this shortly for added packages too...
|
|
- 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.
|
|
- It is always selinux_file_context_path() anyway.
|
|
|
|
- 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.
|
|
|
|
|
|
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.
|
|
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.
|
|
- 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
|
|
|
|
|
|
- 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.
|
|
from the API
|
|
- 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)
|
|
- 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
|
|
- this fixes the behavior when (as normally is the case) there is no
depsolve callback set
|
|
- rpmts struct is now fully opaque within depends.c
|
|
- 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
|
|
- 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
|
|
|
|
|
|
- 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...
|
|
- 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...
|
|
- it was only "used" for the ldconfig optimization and actually been
completely broken since the ordering rewrite
|
|
- rpmal is hardly useful outside rpm itself, avoid exporting stuff
unnecessarily
|
|
- 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
|
|
- only prepare stage needs, alloc+free locally and pass around to
helpers as necessary
|
|
- move file counting from rpmtsRun() and rpmFindBaseNamesInDB() to single
helper, store result in rpmts struct
|
|
|
|
- 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
|
|
- netsharedpaths is clearly a per-transaction thing, avoid checking
and splitting etc over and over for every package
|
|
|
|
|
|
- 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
|
|
- long since deprecated and nothing uses it, might as well go
|
|
|
|
- rpmdb-specific rpmtsFindPubkey() no longer needed for anything, and
neither are the cached packets and stuff
|
|
- ifdeffed out for now, needs a bit more flesh and a working
import routine
|
|
- pass the pgp container around as argument as needed
- eliminate the related API from rpmts
|
|
- pass signature tag data around as argument to rpmVerifySignature() as
needed
- eliminate the related API from rpmts
|
|
|
|
|
|
- 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
|
|
|