Panu Matilainen [Thu, 8 Jan 2009 11:03:55 +0000 (13:03 +0200)]
Only touch _crypto_initialized if we actually change it
Panu Matilainen [Thu, 8 Jan 2009 10:24:50 +0000 (12:24 +0200)]
Cast to intptr_t instead of int to kick out the final warning
Panu Matilainen [Thu, 8 Jan 2009 10:07:54 +0000 (12:07 +0200)]
Include isaname support for arm (Kedar Sovani)
Panu Matilainen [Thu, 8 Jan 2009 09:47:31 +0000 (11:47 +0200)]
Make rpm_tid_t unsigned type to shut up remaining compiler warnings
Panu Matilainen [Thu, 8 Jan 2009 08:38:29 +0000 (10:38 +0200)]
Don't segfault in pgpPubkeyFingerprint() if rpmDigest* fails
- this can happen if NSS is not properly initialized, such as after
forking
- partial fix to rhbz#476737 (as in "doesn't crash"), deeper issue is
that NSS init needs to be done later than we do now
Panu Matilainen [Wed, 7 Jan 2009 13:54:06 +0000 (15:54 +0200)]
rpmRelocateFileList() doesn't need rpmte for anything, just file states
Panu Matilainen [Mon, 5 Jan 2009 15:43:37 +0000 (17:43 +0200)]
Validate + sort relocations in rpmte at create time
- instead of storing "raw" relocations in rpmte to be passed down to
rpmRelocateFileList() for copying over and sorting etc, do the work
just once at rpmteNew() time
- much of the real work to relocate header contents still needs to be done
twice as the header gets thrown and needs to be reconstructed in
rpmtsProcess()
Panu Matilainen [Sat, 20 Dec 2008 07:41:04 +0000 (09:41 +0200)]
Split saving relocations to header out of relocateFileList()
- also realizing we can just headerMod() the td's we originally got,
they contain the modified data now... duh :)
Panu Matilainen [Fri, 19 Dec 2008 22:43:51 +0000 (00:43 +0200)]
Split sorting out of relocateFileList()
Panu Matilainen [Fri, 19 Dec 2008 18:05:55 +0000 (20:05 +0200)]
Split RPMTAG_INSTPREFIXES addition out of relocateFileList()
- just splicing up the monster function...
Panu Matilainen [Mon, 5 Jan 2009 13:02:34 +0000 (15:02 +0200)]
Relocation needs to be called even if no relocs specified
- relocatable packages expect RPM_INSTALL_PREFIX in scriptlets even
default prefix is used, relocation adds RPMTAG_INSTPREFIXES
Panu Matilainen [Mon, 5 Jan 2009 09:25:03 +0000 (11:25 +0200)]
Lose deprecated DETAILS_AT_TOP doxygen setting
Panu Matilainen [Mon, 5 Jan 2009 09:18:46 +0000 (11:18 +0200)]
Eliminate header magic duplication all over the place, export it
- avoid several copies of the same thing...
- there are valid reasons for wanting to know header magic outside librpm,
export it as rpm_header_magic
Panu Matilainen [Mon, 5 Jan 2009 08:42:54 +0000 (10:42 +0200)]
Use enumeration for header flags
Panu Matilainen [Mon, 5 Jan 2009 08:39:15 +0000 (10:39 +0200)]
Remove unnecessary HEADER_FOOTAG definitions
- header.c can include rpmtag.h these days
Panu Matilainen [Fri, 2 Jan 2009 10:27:32 +0000 (12:27 +0200)]
rpmte struct is now fully opaque throughout rpm
Panu Matilainen [Fri, 2 Jan 2009 10:25:02 +0000 (12:25 +0200)]
Use rpmteSetFd() instead of direct access to rpmte structure
Panu Matilainen [Fri, 2 Jan 2009 10:21:52 +0000 (12:21 +0200)]
Add rpmteSetFd() (internal) function
- this is dumb as only rpmInstallSourcePackage() needs, figure out something
better eventually
Jindrich Novy [Tue, 23 Dec 2008 08:48:16 +0000 (09:48 +0100)]
Increase XZ decompression memlimit
Panu Matilainen [Mon, 22 Dec 2008 13:30:23 +0000 (15:30 +0200)]
Eliminate silly and now unnecessary rpmts(Set)RelocateElement() stuff
Panu Matilainen [Mon, 22 Dec 2008 13:29:52 +0000 (15:29 +0200)]
Perform relocations from rpmte instead of rpmfi
- rpmte has all the necessary bits at hand, rpmfi does not
- avoids silly ping-pong through transaction set to get to the ts element
- avoids recalculating number of relocations
- avoids accessing rpmte struct outside rpmte.c
Panu Matilainen [Fri, 19 Dec 2008 16:59:38 +0000 (18:59 +0200)]
Perform relocations *before* filling out rpmfi structure
- no need to fuss about recreating bits and pieces of rpmfi after the fact
Panu Matilainen [Fri, 19 Dec 2008 16:49:09 +0000 (18:49 +0200)]
Avoid a whole lotta shuffling wrt file info header
- We're not making copies of header or anything here, all this linking
and unlinking is unnecessary. Just have relocateFileList() modify the
header we pass to it, as that's what it's doing *anyway*
Panu Matilainen [Fri, 19 Dec 2008 15:46:16 +0000 (17:46 +0200)]
Ignore rpmfi flags for basenames + dirnames
- we make a copy if we modify, doesn't make a difference
Panu Matilainen [Fri, 19 Dec 2008 15:44:33 +0000 (17:44 +0200)]
Sanitize file modes handling in relocation
- we dont modify fi->fmodes so fi->scareFlags is irrelevant, just use minmem
always
- use rpmtd accessors instead of direct access
Panu Matilainen [Fri, 19 Dec 2008 15:34:40 +0000 (17:34 +0200)]
Remove unused file/dir color calculations
Panu Matilainen [Fri, 19 Dec 2008 15:27:28 +0000 (17:27 +0200)]
Save some trouble by grabbing malloced copy of dir indexes
Panu Matilainen [Fri, 19 Dec 2008 14:19:32 +0000 (16:19 +0200)]
Remove couple of leftover, unused local variables
- one more fi-> access still lurking...
Panu Matilainen [Fri, 19 Dec 2008 13:05:54 +0000 (15:05 +0200)]
Eliminate last remaining fi-internals use from transaction.c
Panu Matilainen [Fri, 19 Dec 2008 13:04:51 +0000 (15:04 +0200)]
Add internal rpmfi apis to deal with fingerprints, use them
Panu Matilainen [Fri, 19 Dec 2008 12:57:37 +0000 (14:57 +0200)]
Eliminate file info set argument to rpmpsmNew()
- ts element carries the info already, no need for separate argument
Panu Matilainen [Fri, 19 Dec 2008 12:34:45 +0000 (14:34 +0200)]
Optionally reload ts element file info in rpmteOpen(), free in close
- avoids having to muck with te internals here and there...
Panu Matilainen [Fri, 19 Dec 2008 12:13:48 +0000 (14:13 +0200)]
Use rpmteSetFI() to clear memory instead of direct access
- also fixes memleak in case rpmfi has no files
Panu Matilainen [Fri, 19 Dec 2008 12:04:18 +0000 (14:04 +0200)]
Add rpmteSetFI() ts element method
Panu Matilainen [Fri, 19 Dec 2008 11:18:31 +0000 (13:18 +0200)]
Free rpmfi fingerprints in rpmfiFree()
Florian Festi [Thu, 18 Dec 2008 10:57:02 +0000 (11:57 +0100)]
Reduce the hash size of the fingerPrintCache by factor 4
Florian Festi [Thu, 18 Dec 2008 10:54:45 +0000 (11:54 +0100)]
Do only add symlinks the the first rpmFpHash as these are the only one we really need in there.
Also reduce the hash size.
Florian Festi [Thu, 18 Dec 2008 08:41:12 +0000 (09:41 +0100)]
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).
Panu Matilainen [Thu, 18 Dec 2008 09:48:09 +0000 (11:48 +0200)]
Oops, rpmfiFInode() gone missing...
- forgotten from commit
9c15574bae8b11a7381c01a1af39e0d59558bad5
Panu Matilainen [Thu, 18 Dec 2008 08:01:01 +0000 (10:01 +0200)]
Check chroot() result in psm too (Pixel)
- bail out early if it fails instead of blindly continuing and potentially
messing in real root (chroot can fail for priviledged user too)
Panu Matilainen [Thu, 18 Dec 2008 07:51:37 +0000 (09:51 +0200)]
Permit --noscripts on verify (to disable %verifyscript execution)
- this used to work but got broken by the rpmi/rpmq/... unification
Panu Matilainen [Mon, 15 Dec 2008 08:26:45 +0000 (10:26 +0200)]
Check for termination signals during query loops
Panu Matilainen [Thu, 11 Dec 2008 08:17:48 +0000 (10:17 +0200)]
Add public rpmfi function for retrieving digest algorithm of the set
- the information is already available through rpmfiFDigest() but that
requires valid iteration index to be active, whereas the digest algo
is per info set, not per file
Panu Matilainen [Thu, 11 Dec 2008 08:11:59 +0000 (10:11 +0200)]
Avoid direct access to rpmfi directory indexes
Panu Matilainen [Thu, 11 Dec 2008 08:07:41 +0000 (10:07 +0200)]
Add (internal) rpmfi accessor for dir indexes
- except for dnli->active setting in dnlInitIterator(), "give me
directory matching this basename index" would be sufficient
Panu Matilainen [Thu, 11 Dec 2008 08:01:10 +0000 (10:01 +0200)]
More rpmfi direct access avoidance in fsm
- the remaining bits need further accessors / refactoring
Panu Matilainen [Thu, 11 Dec 2008 07:54:29 +0000 (09:54 +0200)]
Avoid most of direct rpmfi accesses in dnlInitIterator()
- need to add an accessor function for fi->dil info
Panu Matilainen [Thu, 11 Dec 2008 07:52:31 +0000 (09:52 +0200)]
Avoid bunch of now unnecessary direct accesses to rpmfi struct in fsm
Panu Matilainen [Thu, 11 Dec 2008 07:23:40 +0000 (09:23 +0200)]
Use indexed accessors instead of direct rpmfi struct access in fsmMapFCaps()
- also rpmts is unused here, remove
Panu Matilainen [Thu, 27 Nov 2008 09:19:24 +0000 (11:19 +0200)]
Avoid bunch of unnecessary direct fi-> accesses for file and dir count
Panu Matilainen [Thu, 11 Dec 2008 07:15:27 +0000 (09:15 +0200)]
Use indexed rpmfi accessors instead of fiddling with iterator index
- saving and restoring rpmfi iterator index has unwanted side-effects
- reverts brokenness from
6fd987b7291fb1306297c193f4ab01bf6cd02618
Panu Matilainen [Thu, 11 Dec 2008 06:57:16 +0000 (08:57 +0200)]
Add indexed accessors for rpmfi data, internal only for now
- fsm in particular wants random access to rpmfi data and there's little
reason to deny it, file info data is not going to move to linked lists
or anything like that anytime soon, permitting indexed access allows
eliminating direct accesses to rpmfi struct
Florian Festi [Mon, 8 Dec 2008 16:46:36 +0000 (17:46 +0100)]
use RPMFI_KEEPHEADER instead of numerical constant
Florian Festi [Wed, 3 Dec 2008 09:59:05 +0000 (10:59 +0100)]
Kill rpmfiUpdateState and free all the rpmfis as soon as file conflict check is done
Florian Festi [Wed, 3 Dec 2008 09:39:48 +0000 (10:39 +0100)]
Move ->actions from rpmfi to rpmfs
and adjust all code using it
also "revert"
a4e345455d817ce6c56940600d652ee3ae0aa5d5
"Move file action calculations to rpmfiNew() where possible"
Florian Festi [Tue, 2 Dec 2008 09:11:44 +0000 (10:11 +0100)]
Move the run time part of fstates from rpmfi to rpmfs. Keep fstates in rpmfi as long as it is a real tag read from the rpmdb.
Florian Festi [Mon, 1 Dec 2008 20:34:59 +0000 (21:34 +0100)]
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.
Jindrich Novy [Tue, 9 Dec 2008 15:24:16 +0000 (16:24 +0100)]
Nuke the useless bits of rpmsort.c declared in global scope
Panu Matilainen [Tue, 9 Dec 2008 12:58:43 +0000 (14:58 +0200)]
Update testsuite expectations as per array format change, add another test
Panu Matilainen [Tue, 9 Dec 2008 12:52:12 +0000 (14:52 +0200)]
Return nothing at all on empty array queryformats
- (none) might make some sense on non-existent tags elsewhere but
it's plain annoying on arrays
Panu Matilainen [Tue, 9 Dec 2008 12:15:45 +0000 (14:15 +0200)]
Throw out ancient python/ChangeLog
Jindrich Novy [Tue, 9 Dec 2008 11:47:50 +0000 (12:47 +0100)]
Move declarations of local variables for parsing functions
from global scope. Compilers aren't that stupid these days
Panu Matilainen [Tue, 9 Dec 2008 11:23:00 +0000 (13:23 +0200)]
Test for fakechroot in configure
- only needed by the testsuite
- optimally testsuite should skip parts needing fakechroot if it's not
there but at least this'll leave a trace into rpmtests.log...
Panu Matilainen [Tue, 9 Dec 2008 08:06:39 +0000 (10:06 +0200)]
Add "deptype" format extension
Panu Matilainen [Tue, 9 Dec 2008 07:51:17 +0000 (09:51 +0200)]
Oops, missing wrappers for C++ in headers (ticket #12)
Panu Matilainen [Mon, 8 Dec 2008 17:51:10 +0000 (19:51 +0200)]
Work around broken packages which dont have RPMTAG_SOURCERPM
- check the lead type and headerIsSource() agree on the type and if not,
fix it up based on the information in lead
Panu Matilainen [Mon, 8 Dec 2008 17:50:07 +0000 (19:50 +0200)]
Add function to retrieve type from rpmlead
- for some messed up packages there's no other reliable way to determine
source vs binary than looking at the lead :-/
Panu Matilainen [Mon, 8 Dec 2008 16:46:02 +0000 (18:46 +0200)]
Fix segfault on packages without separate scriptlet program tags (rhbz#475214)
Panu Matilainen [Fri, 5 Dec 2008 19:44:43 +0000 (21:44 +0200)]
Fix pkg-config provide generation on interdependent .pc's (rhbz#473814)
- based on Arjan van de Ven's and Dan Nicholson's suggestions
Panu Matilainen [Fri, 5 Dec 2008 19:17:16 +0000 (21:17 +0200)]
Avoid "template" which is a reserved word in C++
Panu Matilainen [Fri, 5 Dec 2008 11:38:30 +0000 (13:38 +0200)]
Tighten up setting and checking of buildroot (ticket #10)
- expand, set and verify buildroot just once for after main package preamble
is parsed to avoid sub-packages from overriding it
- spec can still mess with %buildroot by defining it to something else
after preamble but that's another issue...
Panu Matilainen [Thu, 4 Dec 2008 20:30:35 +0000 (22:30 +0200)]
Adjust test result to meet current expectation
Panu Matilainen [Thu, 4 Dec 2008 19:55:52 +0000 (21:55 +0200)]
Pay more attention to tag extension return codes
- behave like headerGet() does and return failure if there's no data
to return
- some cases where we used to return nothing previously now return (none)
in query, but the former behavior was inconsistent between tags
- not sure if (none) is really wanted for a return of no value always,
but at least it's consistent now
Panu Matilainen [Thu, 4 Dec 2008 17:10:41 +0000 (19:10 +0200)]
Fix triggerconds return when no data is there (rhbz#474550)
Panu Matilainen [Thu, 4 Dec 2008 17:04:14 +0000 (19:04 +0200)]
Avoid rpmtd abuse to report "(none)" when no data is found
- simplifies things quite a bit and avoids having to deal with
numeric data suddenly appearing as string elsewhere
Panu Matilainen [Thu, 4 Dec 2008 19:25:12 +0000 (21:25 +0200)]
Comment out rpmbuild --root tests
- no point testing what's not really ever been implemented
Panu Matilainen [Thu, 4 Dec 2008 19:23:06 +0000 (21:23 +0200)]
Add a pile of queryformat tests
- a few fail, and for a reason (rhbz#474550 and breakage from
tag class changes)
Panu Matilainen [Thu, 4 Dec 2008 08:23:40 +0000 (10:23 +0200)]
Fix python header retrieval return type for non-existent tags (rhbz#473239)
- array / not array return needs to be honored even when tag doesn't exist,
wtf have I been thinking, duh!
Panu Matilainen [Wed, 3 Dec 2008 12:56:52 +0000 (14:56 +0200)]
Add tests to verify on-disk status after install+erase
Panu Matilainen [Wed, 3 Dec 2008 12:17:25 +0000 (14:17 +0200)]
Add test to verify status of installed files
Panu Matilainen [Wed, 3 Dec 2008 09:29:19 +0000 (11:29 +0200)]
Remove unnecessary fiddling with rpmte internals
- rpmtsClean() will free the transaction element we added and rpmteFree()
will in turn close the file descriptor, free headers etc
Jindrich Novy [Mon, 1 Dec 2008 11:16:56 +0000 (12:16 +0100)]
Include rpmfileutil.h from rpmmacro.h so that
prototype for rpmGenPath() is included (rhbz#473420)
- unbreaks net-snmp
Panu Matilainen [Mon, 1 Dec 2008 11:03:05 +0000 (13:03 +0200)]
Retrieve header from rpmdb on rpmteOpen() if possible, even for TR_ADDED
- as rpmte now knows if it was already installed and the exact rpmdb
record, we can avoid having to re-re-re-open the package in %posttrans,
this means yum & the like can throw away package immediately after
it was processed (rhbz#457126)
- rearrange rpmteOpen() code a bit, split the actual header retrievals
from fd/rpmdb to separate static helper functions
Panu Matilainen [Sun, 30 Nov 2008 15:36:46 +0000 (17:36 +0200)]
Set/clear rpmte db instance on RPMDB_ADD / REMOVE from psm
- transaction elements now know their real status all the time now
Panu Matilainen [Sun, 30 Nov 2008 15:28:11 +0000 (17:28 +0200)]
Record header instance on rpmdbAdd() on success
Panu Matilainen [Sun, 30 Nov 2008 15:22:24 +0000 (17:22 +0200)]
Add and use (internal) method for setting header instance
- avoid mucking with header internals directly...
Panu Matilainen [Sun, 30 Nov 2008 12:07:03 +0000 (14:07 +0200)]
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
Panu Matilainen [Sun, 30 Nov 2008 11:51:32 +0000 (13:51 +0200)]
Move netsharedpaths to per-transaction level
- netsharedpaths is clearly a per-transaction thing, avoid checking
and splitting etc over and over for every package
Panu Matilainen [Sun, 30 Nov 2008 11:02:34 +0000 (13:02 +0200)]
Eliminate unused filename field in rpmts_s
Panu Matilainen [Sat, 29 Nov 2008 12:34:01 +0000 (14:34 +0200)]
Read default popt aliases again (rhbz#473167)
- makes testsuite depend on local aliases but using default popt config
is widely documented and needs to work, testsuite needs a better method
of disabling it if necessary
Panu Matilainen [Sat, 29 Nov 2008 11:52:32 +0000 (13:52 +0200)]
Unify dbiIndexSet allocations, allocate in power-of-two sizes
- allocating in even sized chunks helps avoiding crazy memory fragmentation
when resizing a lot (rhbz#472507)
- HEAD doesn't really need, rpm 4.6.x does, but doesn't hurt either...
Panu Matilainen [Sat, 29 Nov 2008 10:04:46 +0000 (12:04 +0200)]
Use proper type (unsigned) for index set offset/count
Florian Festi [Fri, 28 Nov 2008 11:16:00 +0000 (12:16 +0100)]
Delete _dbiIndexItem.fpNum as it is no longer used and also does not really fit in there
Florian Festi [Fri, 28 Nov 2008 10:14:41 +0000 (11:14 +0100)]
Delete rpmdbFindFpList and skipDir
as those are replaced by rpmFindBaseNamesInDB
and parts of checkInstalledFiles
Panu Matilainen [Thu, 27 Nov 2008 09:35:56 +0000 (11:35 +0200)]
Oops, it wasn't unnecessary include afterall..
Panu Matilainen [Thu, 27 Nov 2008 08:59:14 +0000 (10:59 +0200)]
Remove unnecessary rpmfi_internal.h include
Panu Matilainen [Thu, 27 Nov 2008 08:48:22 +0000 (10:48 +0200)]
Add + use internal rpmteHaveTransScript() function
- struct rpmte_s is now fully opaque within transaction.c
Panu Matilainen [Thu, 27 Nov 2008 08:28:10 +0000 (10:28 +0200)]
Eliminate the now unused ts element field of file info sets
Panu Matilainen [Thu, 27 Nov 2008 08:25:47 +0000 (10:25 +0200)]
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
Panu Matilainen [Thu, 27 Nov 2008 08:22:45 +0000 (10:22 +0200)]
Avoid unnecessary use of file info sets transaction element
- ts element is available, no need to go backwards