Age | Commit message (Collapse) | Author | Files | Lines |
|
- Using a "global" variable for local iteration is just dumb...
|
|
- Now that we have separate functions for install, erase and build,
handle the hardlink saving locally where it matters.
|
|
- Having three places doing the same thing doesn't make a whole
lotta sense...
|
|
- Legitimately skipped files (links) must not cause install-errors.
This has always been broken, but the errors were completely ignored
on install prior to rpm 4.10, and now that we're only creating the
first instance of a shared file, secondary arch multilib packages
with hardlinks were causing install failures because of the "missing"
hardlinks here.
- The relevant part here is obviously the XFA_SKIPPING() test, for
which we need the file states. To keep the lines short, grab the
index to a helper variable and replace other fsm->li->filex[i] uses
with that too.
|
|
- Use string offsets for basename start and end to track the progress,
avoiding +1/-1 adjustments in every damn calculation.
- Reduce the places where new basename is calculated to just one
at the start of the main loop, just adjust the basename start
and end accordingly beforehand.
- This shouldn't change any functionality, just simplify the code
a little bit.
|
|
- fpLookupSubdir() has been broken for a long, long time, probably
because some subtle extra/missing slash issue. It got totally
wrecked by the pool changes though: there are heading and trailing
slashes everywhere and the calculations were off-by-one to every
possible direction because of that. And the previous attempts
(eg commit 566a332c6907a0969ea8f79a4c7a62bca2d1f1b4) makes
even a bigger mess of it.
- This is far messier than it needs to be, but for now going for
minimal resurrection rather than rewrite it all at once. It's also
not quite right either, but it does now actually detect at the conflicts
it was always supposed to.
|
|
|
|
|
|
- Basically reverts commit d10a9941326f7d397428c8ab0b4ba571cfc6c184
which was just a temporary transition-period thing. Moving pointers
dont bother us anymore...
|
|
- This gives quite a speedup for dependency checking as within
transaction, all the dependency sets come from the same pool
and making this just an integer comparison.
|
|
- Take advantage of the length-aware pool string->id lookup to avoid
the need to copy and locally modify the canonized dirname. Makes
the code cleaner and a little bit faster too.
- There are further possibilities in this direction, canonDir()
could return an id instead of malloced memory but that doesn't
remove the need for temporary bugg^H^Hffer to clean up the dir.
|
|
- Suddenly it all seems so much clearer...
- Also try to better handle the theoretical realpath() errors: on
failure the buffer contents are undefined and we shouldn't look
at them, free the buf and return NULL.
|
|
- Fixes regression (yum updates barf with conflicts) from commit
3b492620fb35a21d05b975e31130dc071f6fd8e2 which doesn't affect rpm
itself but breaks some API users like yum that first run a
test-transaction and if that succeeds, the same transaction is run
for real. In that case we need to redo the whole fingerprint dance
from scratch: throw away any former results and redo.
- Blaming Fedora 18 alpha preparations for not noticing this earlier:
there have been no updates to F16/F17 in almost a week, effectively
disabling a part of the regular rpm development QA :P
|
|
- sizeof() doesn't work very well for malloced arrays... not that it
matters a whole lot, this isn't a path that will ever be executed
afaict.
|
|
- Similar to commit ad99f4e84a5fea05edca59257b6e00d91d6c8a08 but at the
other end of the name: not all subdirs will exist in the pool already
but none of them exists without the heading slash. Saves another handful
of megs on larger transactions.
|
|
- In the old days, stripping trailing slashes made sense as its useless
as it is and stripping it saved a bit of memory, but now with the
directories in the pool things are different: while not all paths
we'll see here necessarily exist in the pool already, NONE of them
exists without the trailing slash, so stripping it out wastes gobs
of memory. Simplifies the code a bit and saves several megs of memory
on larger transactions, what's not to like?
|
|
- Refer to dirName when we haven't yet cleaned it up to clarify uses,
only initialize the const cleaned dir name pointer after we've
successfully cleaned it up. Rename cleanDirName to cdn to keep it
sweet and short, and suggest the relation to cdnl and cdnbuf.
|
|
- Use dynamically allocated cdnbuf in the non-absolute path case (when
exactly that occurs is another question) too instead of the on-stack
dir[], making the two paths a bit more similar.
|
|
- 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.
|
|
|
|
|
|
- Since commit 290fcbbe6b3ca2fb1d5e4a7269a32a94f8a1563a, key imports
on transaction sets where signature checking is disabled would fail
due to keyring not getting loaded at all. A regression of sorts,
in other words. As a minimal fix, temporarily enable sigcheck vsflags
during keyring loading.
|
|
- Missing RPMTAG_DIRNAME can mean either a package with uncompressed
filenames OR a new package with no files, in which case the retrofits
should not be performed. Also a newer package can be built with
--nodirtokens, requiring filelist compression but no other retrofits.
- Test for immutable region presence for more accurate v3 package
detection, if not present do a full retrofit. For others, explicitly
test for OLDFILENAMES presence and only compress the filelist if needed.e
|
|
- Ids are both faster to hash/compare and cheaper to store than string
pointers. Not a huge win but a win anyway...
|
|
- Eliminate redundant second strlen() on dirName on entry, and avoid
the first one as well by grabbing the length from pool instead.
- Reorganize the initializations and declarations a bit for clarity.
|
|
- Should've been in commit 1770fca303c5c5abdb27040649b458b59494823
|
|
|
|
- When at all possible, we'd prefer working on id's instead of
actual strings, change the lowest-level fingerprint lookup to
use those, doLookup() is now just a wrapper to handle string ->
pool id conversion before doing the actual work. This shouldn't
affect anything at all yet.
|
|
- Transaction preparation fingerprinting now shares all the strings from
rpmfi's etc. Rpmdb basename iterator still needs a private pool
as there's nowhere to get a pool handle (for now at least).
- We no longer need to (and actually we couldn't) freeze the
pool before fingerprinting.
|
|
- Both callers updated to still use a private pool so no practical
change here.
|
|
|
|
- <gulp> but no anomalies noted by test-suite, valgrind or
a bit of manual testing. Time will tell...
- Memory is no longer scarce or scary, the strings are simply owned
by the pool in all circumstances. Eliminate scareMemory foobar
from the fingerprinting internals.
|
|
- For now we're doing a fair amount of extra work and wasting memory
as data is in different pools so we need to copy to get the strings
and ids into our private pool. This will go away later.
|
|
- This is fairly straightforward (or supposed to be...) especially
now that its all hidden behind APIs. Note that we no longer bother
precalculating the hash as a pool-id's hash is a no-cost operation,
for strings it was far more expensive.
|
|
|
|
- rpmfi cannot know anything about the storage, so rpmfiFpxIndex()
cannot be... change it to rpmfiFps() which only returns the pointer
we got from fpLookupList()
- Change fpCacheGetByFp() to assume it gets passed an array of fps,
and take an additional index argument. Return the fingerprint
pointer on success, NULL on not found to allow further operations
on the fp without knowing its internals.
|
|
- If the fingerprint pointer passed to it is NULL then allocate space
for a new fingerprint, otherwise reuse the previous space. This should
allow optimizing the case where repeatedly calling and directory
doesn't change inside fpc so callers dont need special-case code
for this. For now, we dont care about optimizations, other than
making it possible later.
|
|
- Only disk-space calculations need the actual entry contents, add
getter for dir name and device. We're passing the cache to these
getters too: its not currently unusedd but will be needed for
directory name pool id->string translation once we get there...
|
|
|
|
- Eliminates one place where knowledge about fingerprint internals
has been needed, now rpmfi just gets (an supposedly) opaque blob back.
|
|
- Replace the direct hackery in rpmdb internals with a little less
direct hackery...
|
|
- 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...
|
|
- Rename addFingerprints() to fpCachePopulate() and move into fprint.c.
This doesn't really belong here as it requires fprint becoming aware
of transactions and all, but at least these are all controlled API
accesses unlike where in transaction.c this was messing with somebody
elses data structures directly.
- Move the by-fingerprint creation to fpCachePopulate() so it gets
lazily done as needed and copy the original hash-size heuristics
back here.
|
|
- For now, always create the by-fingerprint hash although rpmdb usage
doesn't need it. Next steps will fix...
- Add wrapper API for retrieving the records, adjust callers
- No functional changes, at least intended ones... just first steps
towards eliminating the hash-jungle and forcing a single API
through which this stuff gets handled
|
|
- Not that it matters much when everything else is wide open but gotta
start with something...
|
|
- Instead of adding three more pool-aware versions of the old API's,
convert the main callers to the newew more flexible API. As a
"minor side-effect" these now use the transaction string-pool as well,
so ALL our pre-transaction dependency sets are now using the global
pool.
|
|
- These all do more or less the same thing, easily handled with a common
function that takes a couple of more extra parameters. The old variants
become just wrappers to call the pool-aware rpmdsMatches() with suitable
arguments.
|
|
- This wasn't possible with the former static rpmlib() dependency set
as it would've kept the potentially huge global pool referenced
throughout process lifetime.
|
|
|
|
- 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.
|