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
Panu Matilainen [Thu, 27 Nov 2008 08:02:00 +0000 (10:02 +0200)]
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
Panu Matilainen [Thu, 27 Nov 2008 07:39:40 +0000 (09:39 +0200)]
Eliminate silly rpmfiTypeString()
- Transaction elements are install/erase type, not file info sets,
rename to rpmteTypeString(). It's only "useful" for fsm internal
debugging messages, hide it there.
Panu Matilainen [Wed, 26 Nov 2008 14:14:29 +0000 (16:14 +0200)]
Eliminate fi->te use in fsm
Panu Matilainen [Wed, 26 Nov 2008 14:08:04 +0000 (16:08 +0200)]
Pass rpmte to fsmSetup()
- fsm needs the transaction element for progress notification and
element type anyway
Panu Matilainen [Wed, 26 Nov 2008 14:01:40 +0000 (16:01 +0200)]
Remove bogus consts from fsmSetup() args
- rpmfi is messed with (at least file actions)
- const on typedef'ed type doesn't mean a thing anyhow
Panu Matilainen [Wed, 26 Nov 2008 17:04:02 +0000 (19:04 +0200)]
Use rpmteNEVRA() for scriptlet messages now that it's possible
Jindrich Novy [Wed, 26 Nov 2008 15:43:49 +0000 (16:43 +0100)]
Increase memory limit for LZMA compression
so that everything up to level 9 gets safely
expanded
Jindrich Novy [Wed, 26 Nov 2008 15:35:07 +0000 (16:35 +0100)]
Initialize the LZMA encoder/decoder on demand, not both
Panu Matilainen [Wed, 26 Nov 2008 15:41:22 +0000 (17:41 +0200)]
Fix up couple of missed pieces rpmffi_s fi->te switchover
Panu Matilainen [Tue, 25 Nov 2008 15:05:26 +0000 (17:05 +0200)]
runTransScripts() don't need no steenking rpmfi's now
Panu Matilainen [Tue, 25 Nov 2008 14:35:21 +0000 (16:35 +0200)]
Lose unnecessary and silly rpmpsmGetTs() internal func
Panu Matilainen [Tue, 25 Nov 2008 14:32:36 +0000 (16:32 +0200)]
Resurrect rpmVerifyScript()
- fake up a transction element set that we can use to convince psm to
execute the script
- a bit hacky but by no means worse than the former fi->h abuse with
scaremem and all
Panu Matilainen [Tue, 25 Nov 2008 12:01:38 +0000 (14:01 +0200)]
Rip the remains of fi->h in psm
- erasure doesn't need the special casing anymore
- remove useless comments
Panu Matilainen [Tue, 25 Nov 2008 11:44:51 +0000 (13:44 +0200)]
Use ts element, not fi header for PSM_PKGINSTALL (PSM_POST + PSM_INIT)
Panu Matilainen [Tue, 25 Nov 2008 10:53:46 +0000 (12:53 +0200)]
Use ts element, not fi header in PSM_RPMIO_FLAGS and PSM_RPMDB_ADD
Panu Matilainen [Tue, 25 Nov 2008 10:39:37 +0000 (12:39 +0200)]
Make psm scriptlet operations use ts element header instead of fi
- this breaks %verifyscript operation (temporarily)
Panu Matilainen [Tue, 25 Nov 2008 10:22:10 +0000 (12:22 +0200)]
Lose now unnecessary PSM_RPMDB_LOAD stage and rpmpsmSetFI()
Panu Matilainen [Tue, 25 Nov 2008 10:17:47 +0000 (12:17 +0200)]
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
Panu Matilainen [Tue, 25 Nov 2008 09:51:30 +0000 (11:51 +0200)]
Teach rpmteOpen() and rpmteClose() about TR_REMOVED type
- for open, fetch the header from rpmdb, closing is nearly a no-op
- allows install and erase behave more symmetrically, and also paving way
for better erase callback notifications and other things
- watch out for them refcounts...
Panu Matilainen [Tue, 25 Nov 2008 09:46:20 +0000 (11:46 +0200)]
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
Florian Festi [Wed, 26 Nov 2008 15:29:55 +0000 (16:29 +0100)]
Change rpmffi_s to contain a rpmte instead of rpmfi to be able to get rid of fi->te
Panu Matilainen [Wed, 26 Nov 2008 06:58:35 +0000 (08:58 +0200)]
Don't bother zeroing rpmte twice on free
- delTE() already zeroes it out
Panu Matilainen [Tue, 25 Nov 2008 16:06:31 +0000 (18:06 +0200)]
Add rpmhash.[CH] to EXTRA_DIST so they get included in tarballs
Florian Festi [Tue, 25 Nov 2008 15:05:00 +0000 (16:05 +0100)]
Switch rpmfiUpdateState to the new ->replaced API
and free the additional allocated but unused memory
Florian Festi [Tue, 25 Nov 2008 13:33:11 +0000 (14:33 +0100)]
Kill handleRmvdInstalledFile by moving remaining code to checkInstalledFiles
Switch to strict use of rpmtd accessor functions
Jindrich Novy [Tue, 25 Nov 2008 13:12:50 +0000 (14:12 +0100)]
Port LZMA (XZ) support to the new API
- get rid of the obsolete "alone" LZMA file format
and hacks around it
Jindrich Novy [Tue, 25 Nov 2008 13:11:08 +0000 (14:11 +0100)]
Use the new LZMA (XZ) magic
Panu Matilainen [Mon, 24 Nov 2008 14:45:22 +0000 (16:45 +0200)]
Move transscripts stuff from rpmfi to rpmte
- transaction scripts have zero to do with files...
Panu Matilainen [Mon, 24 Nov 2008 13:39:17 +0000 (15:39 +0200)]
Unify statistics timer calls for install+erase
Panu Matilainen [Mon, 24 Nov 2008 13:33:23 +0000 (15:33 +0200)]
Unify install+remove logging, unnecessary code duplication..
Panu Matilainen [Mon, 24 Nov 2008 13:31:31 +0000 (15:31 +0200)]
Lift the main install+remove loop out of rpmtsRun()
- no functional changes
Florian Festi [Mon, 24 Nov 2008 13:34:59 +0000 (14:34 +0100)]
Fix timings and no longer pass the file count more than once.
Florian Festi [Mon, 24 Nov 2008 13:10:11 +0000 (14:10 +0100)]
Remove check that is commented out since ages
Florian Festi [Fri, 21 Nov 2008 14:00:36 +0000 (15:00 +0100)]
Remove no longer needed sharedCmp
Florian Festi [Mon, 24 Nov 2008 12:36:28 +0000 (13:36 +0100)]
fix statistics for looking up symlinks
Florian Festi [Fri, 7 Nov 2008 09:58:25 +0000 (10:58 +0100)]
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.
Florian Festi [Wed, 19 Nov 2008 16:11:59 +0000 (17:11 +0100)]
switch to new rpmfiReplaced API
Florian Festi [Wed, 19 Nov 2008 16:09:57 +0000 (17:09 +0100)]
API for accessing and creating fi->replaced
- new API is not compatible with accessing fi->replaced directly!
Florian Festi [Sun, 9 Nov 2008 17:02:20 +0000 (18:02 +0100)]
Expose rpmdbSortIterator in rpmdb_internal.h
Florian Festi [Sun, 9 Nov 2008 16:54:47 +0000 (17:54 +0100)]
Add rpmdbExtendIterator to do repeated searches
Florian Festi [Wed, 5 Nov 2008 14:11:55 +0000 (15:11 +0100)]
Support leaving HTDATATYPE undefined to use hash as key only hash (set)
Panu Matilainen [Mon, 24 Nov 2008 11:33:41 +0000 (13:33 +0200)]
Add couple of tests for symlink <-> directory behavior
Panu Matilainen [Sat, 22 Nov 2008 16:00:10 +0000 (18:00 +0200)]
Remove RPMCONFIGDIR sedding from Makefiles where no longer necessary
Panu Matilainen [Sat, 22 Nov 2008 15:51:42 +0000 (17:51 +0200)]
Don't bother setting rpmrc specifically in tests
- RPM_CONFIGDIR environment is used
Panu Matilainen [Sat, 22 Nov 2008 15:47:44 +0000 (17:47 +0200)]
Remove -DRPMCONFIG from CPPFLAGS where unnecessary
Panu Matilainen [Sat, 22 Nov 2008 15:36:05 +0000 (17:36 +0200)]
Use %{_rpmconfigdir} throughout configuration macros and such
Panu Matilainen [Sat, 22 Nov 2008 15:21:33 +0000 (17:21 +0200)]
Set _rpmconfigdir macro on initialization
Panu Matilainen [Sat, 22 Nov 2008 15:12:54 +0000 (17:12 +0200)]
Use rpmConfigDir() instead of hardwired path for rpmrc + macro locations
Panu Matilainen [Sat, 22 Nov 2008 14:44:33 +0000 (16:44 +0200)]
Use rpmConfigDir() instead of hardwired value in Lua initialization
- userconfig is actually unused
Panu Matilainen [Sat, 22 Nov 2008 16:08:40 +0000 (18:08 +0200)]
Use rpmConfigDir() for finding our popt alias file
- this allows popt aliases to be reliably available in tests
- why do we have the popt initialization done twice?
Panu Matilainen [Sat, 22 Nov 2008 16:06:31 +0000 (18:06 +0200)]
Add function to retrieve rpm config base directory
- one-shot to determine configuration base directory path from
RPM_CONFIGDIR environement or build-time default
- rpmfileutil is a bit strange place, this would really belong to librpm
but Lua initialization needs the path so...
Panu Matilainen [Sat, 22 Nov 2008 13:37:00 +0000 (15:37 +0200)]
Nuke leftover reference to brp-sparc64-linux
- missed from commit
cbbb03e3a34d492a7163f5a02f77b7e806702b41
Panu Matilainen [Sat, 22 Nov 2008 12:07:34 +0000 (14:07 +0200)]
Add keywords to all tests
- just initial groupings to have something there..
Panu Matilainen [Sat, 22 Nov 2008 11:45:17 +0000 (13:45 +0200)]
Add basic tests for Lua's rpm and posix extensions
Panu Matilainen [Sat, 22 Nov 2008 11:26:43 +0000 (13:26 +0200)]
Add banners for nicer test output
Panu Matilainen [Sat, 22 Nov 2008 11:20:33 +0000 (13:20 +0200)]
A few more basic macro functionality tests
Panu Matilainen [Sat, 22 Nov 2008 09:45:55 +0000 (11:45 +0200)]
Add couple of tar build tests + another version of hello tarball
Panu Matilainen [Sat, 22 Nov 2008 09:22:01 +0000 (11:22 +0200)]
Add some (trivial) macro evaluation tests
Panu Matilainen [Sat, 22 Nov 2008 08:28:59 +0000 (10:28 +0200)]
Add a couple of tests for installing non-existent files and such
Panu Matilainen [Fri, 21 Nov 2008 23:15:20 +0000 (01:15 +0200)]
Add some basic tests for config file behavior
Panu Matilainen [Fri, 21 Nov 2008 21:59:25 +0000 (23:59 +0200)]
Add some basic tests for file conflict behavior
Panu Matilainen [Fri, 21 Nov 2008 21:29:54 +0000 (23:29 +0200)]
Add basic version comparison testing for install/upgrade
Panu Matilainen [Fri, 21 Nov 2008 21:28:21 +0000 (23:28 +0200)]
Simplify the run functions, fix --define behavior
Panu Matilainen [Fri, 21 Nov 2008 15:48:27 +0000 (17:48 +0200)]
Hackery to get rpm install tests to "work" with fakechroot
- fakechroot throws it's own curveballs into the already mixed up thing,
copy things to the test dir and set chroot base to that to avoid
confusion with cwd and such
- klunky and ugly but at least the tests pass now when running non-root
Panu Matilainen [Fri, 21 Nov 2008 15:39:39 +0000 (17:39 +0200)]
Add + use wrapper function for calling rpm commands in tests
- avoids having to define --rcfile etc over and over again
Panu Matilainen [Fri, 21 Nov 2008 14:13:03 +0000 (16:13 +0200)]
Kill the last remaining varprefix
- we're just mangling varprefix to localstatedir anyway, might as well
just avoid that little extra trouble...
Panu Matilainen [Fri, 21 Nov 2008 11:28:35 +0000 (13:28 +0200)]
Define TOPDIR once in atlocal.in
Panu Matilainen [Fri, 21 Nov 2008 10:02:17 +0000 (12:02 +0200)]
These tests are expected to succeed
Panu Matilainen [Fri, 21 Nov 2008 15:59:03 +0000 (17:59 +0200)]
Rpm is supposed to create build tree by itself, don't help it