Age | Commit message (Collapse) | Author | Files | Lines |
|
- Similar lazily created hash as provides for fast obsoletes lookups.
This is so similar the provides that creation etc functions should
be unified, but leaving that exercise till later.
|
|
- The same hash type is valid for any ds and we'll be adding more...
|
|
- Use indexed access to the file info sets so we're not mucking
around with somebody elses rpmfi iterator index (currently not an
issue but still...)
|
|
- Use indexed access and comparison to avoid mucking around with
eg transaction element dependency sets while the callers are walking
over them.
|
|
- Use indexed access to the dependencies so we're not mucking with
the rpmds iterator index behind anybodys back, this could affect
all sorts of things but miraculously nothing is hitting it atm...
|
|
- Separate provides and files hash creation, delay both until the last
moment before first valid lookup. In practise, this means the provides
hash is created early due to lookups from rpmtsAddInstallElement(),
but the big bad file hash creation is delayed until the entire
transaction set has been more-or-less populated. Which means we have
a better idea about the necessary hash table size, meaning fewer
hash resizes, resulting in good deal faster execution with no
downsides - if something happened to trigger an early file lookup
it'll all still work, just slower.
|
|
- The provides hash lookup can and does return hits that dont actually
satisfy the dependency. Dont bother callers with apparent hits
(ie non-NULL returns) when nothing actually matches the dependency.
|
|
- For some uses, we need to be more selective about providers...
|
|
- We need to grab the dependency string in rpmalAllSatisfiesDepend()
already to see whether its a file dependency or not, just pass that
to the file deps to avoid redundant work.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- This is a false positive really, or at least a cant-happen case
|
|
- Another modest improvement in redundant rehashing elimination, but in the
big picture, this is really just another fart in the Sahara desert...
|
|
- Similar to commit 9fb81eac0bcd239e46459f72916099f1adfc5cb9 but
on the to-be-installed set: obsoletes should only be matched against
package names, not any provide or file names. Hasn't really mattered
previously due to the way its called, but since commit
05487d9a3f763cfed5f5ca75b4fbadb62f38dfd6 I guess it started to matter.
It's more correct this way anyhow, and should fix RhBug:810077.
- Since rpmal only knows about provides, we need to handle obsoletes
as a special case and filter out matches on provide names different
than the matching package name.
|
|
- Similarly to commit 40ee8e7427ace319687dd36bd5f745d1ef2f2236,
take --noconfigs into account for the virtual config() provides too
|
|
- Files which dont get installed cannot very well satisfy dependencies,
take this into account for docs and configs when --nodocs & --noconfigs
flags are used.
|
|
- No functional changes here, but we'll need to know some of these
bits for accurately calculating various dependency bits later on.
|
|
|
|
- There are places in rpmio and build that would benefit from hashing, but
hashFunctionString() being internal to librpm has prevented that. Rename
to rstrhash() to resemble the other foo in rpmstring.h for
minimal namespacing as its now public function and update callers.
- Also mark the function as "pure" - it only looks at its arguments.
This is one of the busiest functions in entire rpm so any optimization
no matter how minor is well worth it.
- Hereby awarding hashFunctionString() with the grand prize for
the Most Moved Around Function in rpm ;)
|
|
- This is exactly the same structure as availableIndexEntry, no need
for a different struct for it.
|
|
This patch adds the install-time feature that if a package requires a package
in a collection, then it also requires all other packages in that collection.
This has the effect that collections will be roughly grouped together during a
transaction.
Although this is not absolutely necessary for the majority of collections, it
is required for the SELinux collection. This is because all SELinux policies
must be installed before the applications they secure to ensure correct labels.
This means we must ensure packages in the selinux collection are ordered
earlier in the transaction than all applications they protect. Adding this
implicit runtime requirements achieves this in a general manner, without major
modifications to dependency ordering.
To accomplish this, this patch splits the addRelation function into two parts:
one that determines which relations to add, and one that actually adds them.
After the usual relation is added between two packages, it then determines if
the required package contains any collections. If so, it finds all other
packages that are in the same collections and creates additional relations.
|
|
- 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.
|
|
|
|
- get the debug messages out of API, this is what should've been in commit
dbdbe8010cd944f026a5a4e5d071eb31d29d81c4
|
|
- get the debug messages out of API, this is what should've been in commit
dbdbe8010cd944f026a5a4e5d071eb31d29d81c4
|
|
|
|
- the "new" hash-based rpmal only uses rpmalMakeIndex() for initial
creation of the hash tables as late as possible for better estimate
of needed hash size, but doesn't require any index regeneration if something
is added
- first call to rpmalSatisfiedDepend() now initializes the hashes, if
significant amount of entries are added after the first call hash
table might get full ... so dont do that ;) (this was already true
with rpmalMakeIndex(), now its just hidden out of sight)
|
|
- rpmtsCheck() only wants yes/no answers from rpmal, and ordering
wants the best provider, rpmalSatisfiesDepend() works for both
- update comments
|
|
- avoid multiple strrchr() calls
- avoid _constfree(), the string size is known from strrchr() so we dont
need to allocate on heap at all
|
|
|
|
- Instead of blindly picking the first match, try to pick the best provider
for the dependency: for colored dependencies, try to find a provider of
matching color. For non-colored dependencies, prefer providers of
transaction preferred color.
- This avoids creating bogus and loopy relations between 32- and 64-bit packages
where they dont exist, and makes behavior with things like /sbin/ldconfig
consistent by returning the preferred colored element.
|
|
|
|
- rpmal is hardly useful outside rpm itself, avoid exporting stuff
unnecessarily
|
|
color of the rpmfi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- we don't support relocated x86 on ppc in qemu either...
|
|
- explicitly include what's really needed instead
- document remaining uses
|
|
- add comments wrt needle dirName - those are actual const pointers to
within rpmfi, must not free
|
|
|
|
- adjust include paths accordingly
|