Panu Matilainen
9e90602693
Split fingerprinting stuff out of rpmtsRun()
...
- only prepare stage needs fingerprint associated caches and hashes,
push the allocations where needed
- do fingerprint additions in separate function
2009-02-24 11:15:53 +02:00
Panu Matilainen
15f17c4b48
Split prepare phase out of rpmtsRun()
2009-02-24 10:40:43 +02:00
Panu Matilainen
ddf1df4abf
File skipping only done for added packages, simplify
2009-02-24 10:28:27 +02:00
Panu Matilainen
3bf701761e
Eliminate unused variables
...
- numAdded and numRemoved not used for anything at all
2009-02-24 10:24:10 +02:00
Panu Matilainen
68995d5238
Split sanity checking out of rpmtsRun() to helper function
...
- with file counting done elsewhere, this becomes a clean and obvious split
- ensureOlder() doesn't need ts, just needs the problem set, simplifies
the problem set refcounting a bit
2009-02-24 10:13:43 +02:00
Panu Matilainen
1cce1b2444
Fix memory leak from unused problem set
...
- checkInstalledFiles() doesn't need ps for anything, this just caused
a memleak due to refcount
2009-02-24 10:10:38 +02:00
Panu Matilainen
62d27e0bd5
Calculate files in transaction just once
...
- move file counting from rpmtsRun() and rpmFindBaseNamesInDB() to single
helper, store result in rpmts struct
2009-02-24 09:21:20 +02:00
Panu Matilainen
0b2d7775c5
Make it possible to disable %pre- and %posttrans scriptlets (rhbz#475582)
...
- rpmtransFlags_e is overcrowded, map to "regular" %pre and %post
scriptlet behavior for now
- split up the transaction flags at some point to permit more precise
control
2009-01-17 14:15:50 +02:00
Panu Matilainen
af9801a162
Add extra parameter to rpmteClose() to control fi behavior
...
- pre/posttrans scripts should leave te->fi alone, now it was getting
nuked, oops..
2009-01-15 10:28:13 +02:00
Panu Matilainen
8becdbfd73
Remove couple of leftover, unused local variables
...
- one more fi-> access still lurking...
2008-12-19 16:19:32 +02:00
Panu Matilainen
8db2c32a74
Eliminate last remaining fi-internals use from transaction.c
2008-12-19 15:05:54 +02:00
Panu Matilainen
897bbbd708
Add internal rpmfi apis to deal with fingerprints, use them
2008-12-19 15:04:51 +02:00
Panu Matilainen
fe5e906ab2
Eliminate file info set argument to rpmpsmNew()
...
- ts element carries the info already, no need for separate argument
2008-12-19 14:57:37 +02:00
Panu Matilainen
cbcff3bd99
Optionally reload ts element file info in rpmteOpen(), free in close
...
- avoids having to muck with te internals here and there...
2008-12-19 14:34:45 +02:00
Panu Matilainen
87cf7db1ed
Use rpmteSetFI() to clear memory instead of direct access
...
- also fixes memleak in case rpmfi has no files
2008-12-19 14:13:48 +02:00
Panu Matilainen
4d1826f63f
Free rpmfi fingerprints in rpmfiFree()
2008-12-19 13:18:31 +02:00
Florian Festi
83f02cbb74
Reduce the hash size of the fingerPrintCache by factor 4
2008-12-18 16:22:13 +01:00
Florian Festi
feaad9829a
Do only add symlinks the the first rpmFpHash as these are the only one we really need in there.
...
Also reduce the hash size.
2008-12-18 16:22:13 +01:00
Florian Festi
e6f1c592fb
Reduce the size of the FpHashes by factor 4.
...
It turns out that large hashes leave a lot of buckets
empty without really reducing the maximum of collisions
a lot. Tests show that the collision lists are only 2.3
items on average and the maximum is only about 1.5 worse
than with a big hash table (~12 for large hashes).
2008-12-18 16:22:13 +01:00
Florian Festi
ac9c8dc48a
use RPMFI_KEEPHEADER instead of numerical constant
2008-12-10 13:40:53 +01:00
Florian Festi
6e7b664e81
Kill rpmfiUpdateState and free all the rpmfis as soon as file conflict check is done
2008-12-10 13:40:53 +01:00
Florian Festi
395b5cffd5
Move ->actions from rpmfi to rpmfs
...
and adjust all code using it
also "revert" a4e345455d
"Move file action calculations to rpmfiNew() where possible"
2008-12-10 13:40:53 +01:00
Florian Festi
8fa80b0f35
Create a new datastructure rpmfs aka File States that contains the information what to do with the files of an transaction element.
...
This patch moves rpmfi->replaced over to rpmfs. Move struct members to follow.
2008-12-10 13:40:53 +01:00
Panu Matilainen
dc818e6354
Move install langs to per-transaction level
...
- 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-30 14:07:03 +02:00
Panu Matilainen
5dfc982dda
Move netsharedpaths to per-transaction level
...
- netsharedpaths is clearly a per-transaction thing, avoid checking
and splitting etc over and over for every package
2008-11-30 13:51:32 +02:00
Panu Matilainen
b76b945b2d
Add + use internal rpmteHaveTransScript() function
...
- struct rpmte_s is now fully opaque within transaction.c
2008-11-27 10:48:22 +02:00
Panu Matilainen
2654bc49ab
Eliminate rpmtsiFi(), use rpmteFI() instead
...
- rpmtsiFi() is only used within iteration, so we already have the
element, no point in recalculating it
- also eliminates the sneaky side-effect of setting fi->te which otherwise
wouldn't exit
2008-11-27 10:25:47 +02:00
Panu Matilainen
9a155dd350
Avoid unnecessary use of file info sets transaction element
...
- ts element is available, no need to go backwards
2008-11-27 10:22:45 +02:00
Panu Matilainen
48cefd2d78
Drop the useless "tag" argument from rpmteFI()
...
- only RPMTAG_BASENAMES was ever allowed as the tag, makes no sense
- API change but AFAIK nothing outside rpm itself uses it anyway
2008-11-27 10:02:00 +02:00
Panu Matilainen
2494b26f01
Fix up couple of missed pieces rpmffi_s fi->te switchover
2008-11-26 17:41:22 +02:00
Panu Matilainen
7ef6ab6bcf
runTransScripts() don't need no steenking rpmfi's now
2008-11-26 17:35:13 +02:00
Panu Matilainen
801a36d69b
Rework rpmtsProcess() to use rpmteOpen+Close for both install and erase
...
- both cases behave fairly symmetrically now
- helps streamlining the process, we get the transaction element and
file info for it before creating the package state machine so we dont'
need to fuss around with updated file info etc
2008-11-26 17:35:13 +02:00
Panu Matilainen
1cbb50c7b9
Record failure of install/erase into transaction elements
...
- add rpmteMarkFailed() (internal) and rpmteFailed() methods to rpmte
- skip any elements marked as failed in rpmtsProcess()
- this is fairly close to the previous "now mostly broken" hack, except
we remember more than one failure so it's slightly better and it's
possible to do much better by making rpmteMarkFailed() smarter
2008-11-26 17:35:12 +02:00
Florian Festi
504b2cf8a7
Change rpmffi_s to contain a rpmte instead of rpmfi to be able to get rid of fi->te
2008-11-26 16:32:32 +01:00
Florian Festi
028030350a
Kill handleRmvdInstalledFile by moving remaining code to checkInstalledFiles
...
Switch to strict use of rpmtd accessor functions
2008-11-25 14:34:15 +01:00
Panu Matilainen
c8d0ea1c72
Move transscripts stuff from rpmfi to rpmte
...
- transaction scripts have zero to do with files...
2008-11-24 16:45:22 +02:00
Panu Matilainen
dc8f991671
Unify statistics timer calls for install+erase
2008-11-24 15:40:39 +02:00
Panu Matilainen
bc5c667d4f
Unify install+remove logging, unnecessary code duplication..
2008-11-24 15:40:39 +02:00
Panu Matilainen
5e4d353d79
Lift the main install+remove loop out of rpmtsRun()
...
- no functional changes
2008-11-24 15:40:39 +02:00
Florian Festi
9c66a6daa7
Fix timings and no longer pass the file count more than once.
2008-11-24 14:34:59 +01:00
Florian Festi
024e370ae7
Remove check that is commented out since ages
2008-11-24 14:10:11 +01:00
Florian Festi
c849fac52d
Remove no longer needed sharedCmp
2008-11-24 14:03:17 +01:00
Florian Festi
490a0e4aff
fix statistics for looking up symlinks
2008-11-24 14:03:16 +01:00
Florian Festi
95de4c8fef
Reimplement the check of the files in the transaction against the files in the rpmdb.
...
Use a global list of packages/files from the rpmdb that may conflict with files in the transaction to avoid loading packages from the rpmdb over and over again.
2008-11-24 14:03:16 +01:00
Panu Matilainen
f9ed52c0c7
fpCacheCreate() already doubles the size-hint, dont do it twice
2008-11-20 11:47:52 +02:00
Panu Matilainen
e5d97430b6
Use rpmfiFLangs() instead of direct access to structure in skipFiles()
2008-11-20 09:40:46 +02:00
Panu Matilainen
9bde09b599
Add + use internal helper function for getting+setting rpmfi replaced sizes
...
- lazy allocation on set, otherwise there's no replaced size - the getter
deals with this transparently
- saves a fair bit of memory, by no means everything has replaced files...
2008-11-19 12:42:47 +02:00
Panu Matilainen
2835e091ae
Yank rpmfi state update out of rpmtsRun()
...
- stuff it into internal rpmfiUpdateState() function to get it out of
sight for now, the mechanism needs some...
2008-11-14 17:16:42 +02:00
Panu Matilainen
ee59836299
Move open + close of files during install to separate functions
...
- internal rpmteOpen() and rpmteClose() functions replacing copy-paste
slop between rpmtsRun() and runTransScripts()
- eliminates bunch of rpmte privacy violations
- rpmtsRun() doesn't need the file descriptor for anything, might as well
keep it hidden
2008-11-14 16:22:51 +02:00
Panu Matilainen
ed8b3fb2c5
Move ts and preferred color fetching out of the loop
...
- neither ts or preferred color changes per-file
2008-11-13 09:56:52 +02:00