platform/upstream/rpm.git
15 years agoUse rpmConfigDir() for finding our popt alias file
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?

15 years agoAdd function to retrieve rpm config base directory
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...

15 years agoNuke leftover reference to brp-sparc64-linux
Panu Matilainen [Sat, 22 Nov 2008 13:37:00 +0000 (15:37 +0200)]
Nuke leftover reference to brp-sparc64-linux
- missed from commit cbbb03e3a34d492a7163f5a02f77b7e806702b41

15 years agoAdd keywords to all tests
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..

15 years agoAdd basic tests for Lua's rpm and posix extensions
Panu Matilainen [Sat, 22 Nov 2008 11:45:17 +0000 (13:45 +0200)]
Add basic tests for Lua's rpm and posix extensions

15 years agoAdd banners for nicer test output
Panu Matilainen [Sat, 22 Nov 2008 11:26:43 +0000 (13:26 +0200)]
Add banners for nicer test output

15 years agoA few more basic macro functionality tests
Panu Matilainen [Sat, 22 Nov 2008 11:20:33 +0000 (13:20 +0200)]
A few more basic macro functionality tests

15 years agoAdd couple of tar build tests + another version of hello tarball
Panu Matilainen [Sat, 22 Nov 2008 09:45:55 +0000 (11:45 +0200)]
Add couple of tar build tests + another version of hello tarball

15 years agoAdd some (trivial) macro evaluation tests
Panu Matilainen [Sat, 22 Nov 2008 09:22:01 +0000 (11:22 +0200)]
Add some (trivial) macro evaluation tests

15 years agoAdd a couple of tests for installing non-existent files and such
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

15 years agoAdd some basic tests for config file behavior
Panu Matilainen [Fri, 21 Nov 2008 23:15:20 +0000 (01:15 +0200)]
Add some basic tests for config file behavior

15 years agoAdd some basic tests for file conflict behavior
Panu Matilainen [Fri, 21 Nov 2008 21:59:25 +0000 (23:59 +0200)]
Add some basic tests for file conflict behavior

15 years agoAdd basic version comparison testing for install/upgrade
Panu Matilainen [Fri, 21 Nov 2008 21:29:54 +0000 (23:29 +0200)]
Add basic version comparison testing for install/upgrade

15 years agoSimplify the run functions, fix --define behavior
Panu Matilainen [Fri, 21 Nov 2008 21:28:21 +0000 (23:28 +0200)]
Simplify the run functions, fix --define behavior

15 years agoHackery to get rpm install tests to "work" with fakechroot
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

15 years agoAdd + use wrapper function for calling rpm commands in tests
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

15 years agoKill the last remaining varprefix
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...

15 years agoDefine TOPDIR once in atlocal.in
Panu Matilainen [Fri, 21 Nov 2008 11:28:35 +0000 (13:28 +0200)]
Define TOPDIR once in atlocal.in

15 years agoThese tests are expected to succeed
Panu Matilainen [Fri, 21 Nov 2008 10:02:17 +0000 (12:02 +0200)]
These tests are expected to succeed

15 years agoRpm is supposed to create build tree by itself, don't help it
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

15 years agoFix build tree creation with relative paths for %_topdir and friends
Panu Matilainen [Fri, 21 Nov 2008 08:04:41 +0000 (10:04 +0200)]
Fix build tree creation with relative paths for %_topdir and friends
- rpmtsRootDir() gives "/" even if root not actually set which makes sense
  for most operations but not when we're creating build directories

15 years agoPermit relative paths in rpmioMkpath() and rpmMkdirs()
Panu Matilainen [Fri, 21 Nov 2008 07:50:53 +0000 (09:50 +0200)]
Permit relative paths in rpmioMkpath() and rpmMkdirs()

15 years agoUpdate --querytags test vrt FILECAPS
Panu Matilainen [Fri, 21 Nov 2008 06:57:12 +0000 (08:57 +0200)]
Update --querytags test vrt FILECAPS

15 years agofpCacheCreate() already doubles the size-hint, dont do it twice
Panu Matilainen [Thu, 20 Nov 2008 09:47:52 +0000 (11:47 +0200)]
fpCacheCreate() already doubles the size-hint, dont do it twice

15 years agoUse per-rpmfi string cache for symlink targets
Panu Matilainen [Thu, 20 Nov 2008 08:26:22 +0000 (10:26 +0200)]
Use per-rpmfi string cache for symlink targets
- few files are actually symlinks so this is very sparse data
- per-rpmfi instead of global as link target names are not that likely
  to be shared across packages
- another few megs saved...

15 years agoAdd functions to create and free string cache(s)
Panu Matilainen [Thu, 20 Nov 2008 08:15:08 +0000 (10:15 +0200)]
Add functions to create and free string cache(s)

15 years agoUse global cache for file languages too
Panu Matilainen [Thu, 20 Nov 2008 07:53:27 +0000 (09:53 +0200)]
Use global cache for file languages too
- there's only a very limited number of language names ever present,
  and most files don't have languages attached at all
- another few megs saved on memory

15 years agoUse rpmfiFLangs() instead of direct access to structure in skipFiles()
Panu Matilainen [Thu, 20 Nov 2008 07:40:46 +0000 (09:40 +0200)]
Use rpmfiFLangs() instead of direct access to structure in skipFiles()

15 years agoAdd rpmfiFLang() method for retrieving file language(s)
Panu Matilainen [Thu, 20 Nov 2008 07:36:47 +0000 (09:36 +0200)]
Add rpmfiFLang() method for retrieving file language(s)
- hardly anything needs outside install internals but it's harmless too...

15 years agoGeneralize the user+group string cache + helpers
Panu Matilainen [Thu, 20 Nov 2008 07:26:12 +0000 (09:26 +0200)]
Generalize the user+group string cache + helpers

15 years agoBe more intelligent about storing file user and group names
Panu Matilainen [Wed, 19 Nov 2008 16:17:56 +0000 (18:17 +0200)]
Be more intelligent about storing file user and group names
- User and group names contain an enormous amount of redundancy: typically
  most files and directories are owned by root:root. Store the each unique
  name just once into global cache and store indexes to the cache into
  rpmfi user + group arrays. This saves several megabytes of memory on
  a transaction of non-trivial size...
- The cache implementation is dumb, but it's not noticeably slower than
  uncached version, copying megs of strings around is not cheap either.
  Easy enough to replace with a hash-table or such if performace becomes
  and issue...

15 years agoMake fsmMapAttrs() use rpmfi methods instead of directly accessing
Panu Matilainen [Wed, 19 Nov 2008 14:07:15 +0000 (16:07 +0200)]
Make fsmMapAttrs() use rpmfi methods instead of directly accessing
- Save rpmfi iteration index on entry, restore on exit to avoid clashing
  with other users of the given file info set. For now...
- Remove unnecessary re-initialization of uid and gid in case not found

15 years agoOops, file modes are needed on erase too to avoid suffixes on directories
Panu Matilainen [Wed, 19 Nov 2008 13:52:03 +0000 (15:52 +0200)]
Oops, file modes are needed on erase too to avoid suffixes on directories

15 years agoUse matching type for fsm->digest to avoid unnecessary cast
Panu Matilainen [Wed, 19 Nov 2008 13:46:02 +0000 (15:46 +0200)]
Use matching type for fsm->digest to avoid unnecessary cast

15 years agoErm erm, really use the rpmfi creation flags in rpmteNew()
Panu Matilainen [Wed, 19 Nov 2008 12:06:37 +0000 (14:06 +0200)]
Erm erm, really use the rpmfi creation flags in rpmteNew()
- this part was missing from 763cbf05b57da940d2972e0b448548481be400c6

15 years agoErm, really do lazy allocation of fi->replacedSizes
Panu Matilainen [Wed, 19 Nov 2008 11:04:07 +0000 (13:04 +0200)]
Erm, really do lazy allocation of fi->replacedSizes
- this part was missing from 9bde09b59969088c06eb6f5b8a2597b2e04bd306

15 years agoAdd + use internal helper function for getting+setting rpmfi replaced sizes
Panu Matilainen [Tue, 18 Nov 2008 10:00:10 +0000 (12:00 +0200)]
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...

15 years agoEliminate unnecessary fi->record field
Panu Matilainen [Wed, 19 Nov 2008 09:59:53 +0000 (11:59 +0200)]
Eliminate unnecessary fi->record field
- transaction elements carry the db instance already and is available
  where needed

15 years agoAvoid unnecessary mucking with rpmfi internals
Panu Matilainen [Wed, 19 Nov 2008 08:02:16 +0000 (10:02 +0200)]
Avoid unnecessary mucking with rpmfi internals

15 years agoRefer to psm->te instead of fi->te in rpmpsmStage()
Panu Matilainen [Wed, 19 Nov 2008 07:45:05 +0000 (09:45 +0200)]
Refer to psm->te instead of fi->te in rpmpsmStage()
- transaction element is passed to psm, might as well use it

15 years agoRestore SIGPIPE to default action for scriptlets (rhbz#471591)
Panu Matilainen [Wed, 19 Nov 2008 06:16:03 +0000 (08:16 +0200)]
Restore SIGPIPE to default action for scriptlets (rhbz#471591)

15 years agoUpdated Brazilian Portugese translation from Igor Pires Soares
Panu Matilainen [Wed, 19 Nov 2008 06:10:21 +0000 (08:10 +0200)]
Updated Brazilian Portugese translation from Igor Pires Soares

15 years agoUse finer grained rpmfi creation flags for in rpmteNew()
Panu Matilainen [Tue, 18 Nov 2008 16:54:26 +0000 (18:54 +0200)]
Use finer grained rpmfi creation flags for in rpmteNew()
- also call the erase flags erase, not remove...

15 years agoLimit the data rpmfi loads in query
Panu Matilainen [Tue, 18 Nov 2008 16:36:45 +0000 (18:36 +0200)]
Limit the data rpmfi loads in query
- makes queries a little bit faster, hardly makes a difference on
  modern hardware but loading unused data seems silly anyhow...

15 years agoAdd preliminary rpmfi flag groupings for base operations
Panu Matilainen [Tue, 18 Nov 2008 16:32:58 +0000 (18:32 +0200)]
Add preliminary rpmfi flag groupings for base operations
- just a start and probably not 100% accurate..

15 years agoAdd control bits for all (relevant) parts of rpmfi data
Panu Matilainen [Tue, 18 Nov 2008 15:38:53 +0000 (17:38 +0200)]
Add control bits for all (relevant) parts of rpmfi data
- permit fine grained control over what's loaded into fi for what operations,
  non-trivial memory savings are possible
- future possibilities - these reflect closely to rpm verify control
  bits, all we need is RPMFI_DISK or similar operation to pull the
  information from disk instead of header and then verify can simply
  compare two rpmfi's

15 years agoRemove useless default flags and action fields from rpmfi
Panu Matilainen [Tue, 18 Nov 2008 15:12:55 +0000 (17:12 +0200)]
Remove useless default flags and action fields from rpmfi
- fi->actions is always allocated so fi->action is never used for anything
- fi->flags is just as unused and unnecessary

15 years agoNuke useless rpmfiFContext()
Panu Matilainen [Tue, 18 Nov 2008 14:33:07 +0000 (16:33 +0200)]
Nuke useless rpmfiFContext()
- it only ever returns NULLs because there are no security contexts in
  headers (and having them in headers make no sense as the context varies
  based on whatever selinux policy happens to be active on the target
  system)

15 years agoFix indentiation
Florian Festi [Mon, 17 Nov 2008 12:44:06 +0000 (13:44 +0100)]
Fix indentiation

15 years agoAdd AC_CONFIG_MACRO_DIR for the new libtool
Jindrich Novy [Tue, 18 Nov 2008 10:23:26 +0000 (11:23 +0100)]
Add AC_CONFIG_MACRO_DIR for the new libtool

15 years agoDon't bother loading FILELANGS for installed packages
Panu Matilainen [Tue, 18 Nov 2008 09:30:43 +0000 (11:30 +0200)]
Don't bother loading FILELANGS for installed packages
- only useful for anything when installing packages

15 years agoLazy allocation of FSM for file info sets
Panu Matilainen [Tue, 18 Nov 2008 04:58:13 +0000 (06:58 +0200)]
Lazy allocation of FSM for file info sets
- new more or less internal rpmfiFSM() to create FSM on demand, move
  mapflags calculation there

15 years agoRemove now unnecessary fi->keep_header
Panu Matilainen [Tue, 18 Nov 2008 04:28:23 +0000 (06:28 +0200)]
Remove now unnecessary fi->keep_header

15 years agoRemember rpmfi creation flags
Panu Matilainen [Tue, 18 Nov 2008 04:26:02 +0000 (06:26 +0200)]
Remember rpmfi creation flags

15 years agoGenerate and insert SOURCERPM tag earlier
Panu Matilainen [Tue, 18 Nov 2008 09:22:26 +0000 (11:22 +0200)]
Generate and insert SOURCERPM tag earlier
- needed to make checking for source/binary package in rpmfiNew() reliable
  at build time

15 years agoAdd + use internal helper function for setting rpmfi file states
Panu Matilainen [Mon, 17 Nov 2008 15:29:31 +0000 (17:29 +0200)]
Add + use internal helper function for setting rpmfi file states
- instead of directly accessing the array from fsm, use a helper function
  which lazily allocates the state array as needed and sets state
- also fixes the silly case of non-installed packages showing their files
  as "normal", ie installed (now it shows "no state" as it's not relevant)

15 years agoSimplify rpmInstallLoadMacros()
Panu Matilainen [Mon, 17 Nov 2008 14:12:04 +0000 (16:12 +0200)]
Simplify rpmInstallLoadMacros()
- fi argument unused, remove
- no relevant return value, make it void
- handle any proper data type for per-header macros

15 years agoAvoid reconstructing half of rpmfi manually in rpmInstallSourcePackage()
Panu Matilainen [Mon, 17 Nov 2008 14:04:48 +0000 (16:04 +0200)]
Avoid reconstructing half of rpmfi manually in rpmInstallSourcePackage()
- similarly to commit 53ee682a491ceee4392815075cabbe58d0cc0c22, arrange
  the header to contain necessary paths before calling rpmfiNew()
- avoid unnecessary accesses to rpmfi internals otherwise too

15 years agoUnnecessary local variable, result only needed once
Panu Matilainen [Mon, 17 Nov 2008 12:21:38 +0000 (14:21 +0200)]
Unnecessary local variable, result only needed once

15 years agoAssume failure in rpmInstallSourcePackage()
Panu Matilainen [Sat, 15 Nov 2008 16:44:00 +0000 (18:44 +0200)]
Assume failure in rpmInstallSourcePackage()
- avoids bunch of redundant assignments

15 years agoCalculate total file size correctly in build (mdvbz#45820, rhbz#247374)
Panu Matilainen [Mon, 17 Nov 2008 11:39:22 +0000 (13:39 +0200)]
Calculate total file size correctly in build (mdvbz#45820, rhbz#247374)
- delay total size calculation until the real file list is known, ie
  in genCpioListAndHeaders() where duplicates and excludes have been
  weeded out

15 years agoMake depflagsFormat() accept any numeric type
Panu Matilainen [Mon, 17 Nov 2008 10:44:57 +0000 (12:44 +0200)]
Make depflagsFormat() accept any numeric type

15 years agoSimplify xmlFormat() by taking advantage of rpmtdClass()
Panu Matilainen [Mon, 17 Nov 2008 10:42:53 +0000 (12:42 +0200)]
Simplify xmlFormat() by taking advantage of rpmtdClass()

15 years agoMake fflagsFormat() accept any numeric type
Panu Matilainen [Mon, 17 Nov 2008 10:41:24 +0000 (12:41 +0200)]
Make fflagsFormat() accept any numeric type

15 years agoMake permsFormat() work with any numeric type
Panu Matilainen [Mon, 17 Nov 2008 10:39:13 +0000 (12:39 +0200)]
Make permsFormat() work with any numeric type

15 years agoMake triggertypeFormat() work for any numeric type
Panu Matilainen [Mon, 17 Nov 2008 10:37:42 +0000 (12:37 +0200)]
Make triggertypeFormat() work for any numeric type

15 years agoMake shescapeFormat() to accept any numeric type
Panu Matilainen [Mon, 17 Nov 2008 10:34:22 +0000 (12:34 +0200)]
Make shescapeFormat() to accept any numeric type

15 years agoTake advantage of rpmtdGetNumber() for date format specifiers
Panu Matilainen [Mon, 17 Nov 2008 10:29:01 +0000 (12:29 +0200)]
Take advantage of rpmtdGetNumber() for date format specifiers
- dateFormat() and dayFormat() now work for any numeric type

15 years agoTake advantage of rpmtdGetNumber() for numeric format specifiers
Panu Matilainen [Mon, 17 Nov 2008 10:23:19 +0000 (12:23 +0200)]
Take advantage of rpmtdGetNumber() for numeric format specifiers
- octalFormat() and hexFormat() now work for any number, not just int32,
  fixing rhbz#471820
- use a common helper-function for both formats, they only differ by o/x

15 years agoSimplify stringFormat() by using rpmtdGetNumber()
Panu Matilainen [Mon, 17 Nov 2008 10:16:51 +0000 (12:16 +0200)]
Simplify stringFormat() by using rpmtdGetNumber()

15 years agoAdd rpmtdGetNumber() for getting numeric values from tag container
Panu Matilainen [Mon, 17 Nov 2008 10:04:08 +0000 (12:04 +0200)]
Add rpmtdGetNumber() for getting numeric values from tag container
- returns the value (as opposed to pointer to, like the rpmtdGetUint32()
  and the like do) of any numeric type as uint64_t (largest supported
  integer type so everything can be converted to it)
- handy when you don't really care what the internal presentation is
- there's no rpmtdGetNextNumber() as there's no meaningful way to return
  end-of-iteration here

15 years agoIntroduce rpm tag "classes"
Panu Matilainen [Mon, 17 Nov 2008 09:31:00 +0000 (11:31 +0200)]
Introduce rpm tag "classes"
- rpm tag data can be either numeric, strings or binary data, each with
  their own "subclasses" (different sized integers etc), add new
  enumeration for these
- add rpmTagGetClass(), rpmtdClass() public functions for retrieving the
  base class of tag and container
- useful for getting a basic idea how to handle tag/container data

15 years agoUse rpmpsmNew() + rpmpsmFree() instead of manually doing the same
Panu Matilainen [Sat, 15 Nov 2008 15:55:47 +0000 (17:55 +0200)]
Use rpmpsmNew() + rpmpsmFree() instead of manually doing the same

15 years agoEliminate bogus const from fi->apath
Panu Matilainen [Sat, 15 Nov 2008 15:20:13 +0000 (17:20 +0200)]
Eliminate bogus const from fi->apath

15 years agoEliminate match iterator from psm struct
Panu Matilainen [Sat, 15 Nov 2008 14:00:36 +0000 (16:00 +0200)]
Eliminate match iterator from psm struct
- it's only needed in local scope anywhere, no point having it psm global

15 years agoAvoid having to reconstruct half of rpmfi manually in genCpioListAndHeader()
Panu Matilainen [Sat, 15 Nov 2008 12:22:47 +0000 (14:22 +0200)]
Avoid having to reconstruct half of rpmfi manually in genCpioListAndHeader()
- We need the on-disk paths for the cpio list in here, so instead of
  creating an rpmfi with wrong paths (for build purposes) and then
  painfully reconstructing half the fileinfo structures by hand, pass
  the on-disk path into rpmfiNew() to begin with and then switch the
  intended cpio path back into header.
- Duplicates and excludes are already filtered out from the header filelist
  so walk that instead of spec filelist to avoid having to filter out
  duplicates and excludes, again.

15 years agoLose useless fsm/rpmfi astriplen field
Panu Matilainen [Sat, 15 Nov 2008 11:22:19 +0000 (13:22 +0200)]
Lose useless fsm/rpmfi astriplen field
- only "used" for debugging output, duh...

15 years agoDon't bother creating a dummy transaction element for rpmfi in build
Panu Matilainen [Sat, 15 Nov 2008 10:07:44 +0000 (12:07 +0200)]
Don't bother creating a dummy transaction element for rpmfi in build
- nothing in the build path requires fi->te to be present, so don't
  muck with rpmte internals needlessly

15 years agoMinor genCpioListAndHeader() cleanups
Panu Matilainen [Sat, 15 Nov 2008 09:50:09 +0000 (11:50 +0200)]
Minor genCpioListAndHeader() cleanups
- rpmfiNew() only cares about ts for install-time relocations, nothing
  to "fix" wrt that
- we know fip is never NULL (this is a static function with whopping two
  callers), don't try to cover up for potential programmer errors

15 years agoDon't have to free what's not allocated to begin with...
Panu Matilainen [Fri, 14 Nov 2008 20:45:42 +0000 (22:45 +0200)]
Don't have to free what's not allocated to begin with...

15 years agoAdd more flags to control rpmfi creation
Panu Matilainen [Fri, 14 Nov 2008 20:44:07 +0000 (22:44 +0200)]
Add more flags to control rpmfi creation
- RPMFI_NOFILELANGS to avoid loading lang data (only useful on install)
- RPMFI_NOFILEOWNER to avoid loading of user+group data

15 years agoYank rpmfi state update out of rpmtsRun()
Panu Matilainen [Fri, 14 Nov 2008 15:16:42 +0000 (17:16 +0200)]
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...

15 years agoMove open + close of files during install to separate functions
Panu Matilainen [Fri, 14 Nov 2008 11:05:41 +0000 (13:05 +0200)]
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

15 years agoAllow setting custom parameters to patch (rhbz#471006)
Jindrich Novy [Fri, 14 Nov 2008 14:16:08 +0000 (15:16 +0100)]
Allow setting custom parameters to patch (rhbz#471006)
- added new _default_patch_flags macro with the rpm default
  "-s" parameter

15 years agoFix capability verification
Panu Matilainen [Fri, 14 Nov 2008 07:47:43 +0000 (09:47 +0200)]
Fix capability verification
- the previous implementation was pretty busted up, cap_size() is the
  size of external representation, not sizeof(*cap_t) as pointed out by
  Andrew Morgan
- check for cap_compare() in configure and use it if available (it's
  a Linux-specific extension to the posix draft and only very recent
  libcap has it)
- if cap_compare() isn't available, use internal variant that does it
  the hard way by converting the capabilities to external presentation
  and comparing those

16 years agoFilter out mtime difference of shared files on verify (rhbz#426672, #444661)
Panu Matilainen [Thu, 13 Nov 2008 11:22:03 +0000 (13:22 +0200)]
Filter out mtime difference of shared files on verify (rhbz#426672, #444661)
- Since we permit shared files to differ by mtime on installation, it makes
  no sense to consider them as verification failure either. This has been
  especially bad on multilib where timestamp differences make verify warning
  lights look like Las Vegas at night. If file mtime on disk and header
  differs, check if it's owned by more than one package and if so, ignore
  the timestamp difference.

16 years agoMove ts and preferred color fetching out of the loop
Panu Matilainen [Thu, 13 Nov 2008 07:56:52 +0000 (09:56 +0200)]
Move ts and preferred color fetching out of the loop
- neither ts or preferred color changes per-file

16 years agoRemove unused fsm subbuf field
Panu Matilainen [Wed, 12 Nov 2008 19:58:56 +0000 (21:58 +0200)]
Remove unused fsm subbuf field

16 years agoDon't bother retrieving db offset for erase elements
Panu Matilainen [Wed, 12 Nov 2008 17:36:58 +0000 (19:36 +0200)]
Don't bother retrieving db offset for erase elements
- not needed anymore, use -1 to mean "unused" and document dboffset
  to rpmtsAddEraseElement() as unused

16 years agoTake advantage of headerGetInstance() in removePackage()
Panu Matilainen [Wed, 12 Nov 2008 17:33:12 +0000 (19:33 +0200)]
Take advantage of headerGetInstance() in removePackage()
- avoids an extra argument, making dboffset argument to
  rpmtsAddEraseElement() unused

16 years agoTake advantage of headerGetInstance() in rpmte
Panu Matilainen [Wed, 12 Nov 2008 17:24:58 +0000 (19:24 +0200)]
Take advantage of headerGetInstance() in rpmte
- rpmte db_instance and dboffset are exactly the same thing, unify
- pull rpmte->db_instance from header directly, ignore dboffset argument
  to rpmteNew() (removing the arg would just break api needlessly, otoh
  it's unlikely that anything outside rpm actually uses rpmteNew())
- eliminate the now unnecessary added/removed union from te struct
- rpmteDBOffset() is now just an alias for rpmteDBInstance(), deprecate?

16 years agoGrab rpmfi record from header on rpmfiNew()
Panu Matilainen [Wed, 12 Nov 2008 16:29:51 +0000 (18:29 +0200)]
Grab rpmfi record from header on rpmfiNew()
- avoids having to muck with it from rpmtsRun()

16 years agoAdd rpmdb record number to headers retrieved from rpmdb
Panu Matilainen [Wed, 12 Nov 2008 15:58:37 +0000 (17:58 +0200)]
Add rpmdb record number to headers retrieved from rpmdb
- set "instance" number on retrieval from rpmdb
- add public headerGetInstance() function for retrieving the value
- ported from rpm5.org, useful for number of things

16 years agoConvert obvious bits of rpmtsRun() to use rpmfiFAction()
Panu Matilainen [Tue, 11 Nov 2008 20:37:12 +0000 (22:37 +0200)]
Convert obvious bits of rpmtsRun() to use rpmfiFAction()
- remaining access to fi->actions is the nasty part of copying things
  around to transfer state

16 years agoConvert skipFiles() to rpmfi(Set)FAction()
Panu Matilainen [Tue, 11 Nov 2008 20:35:45 +0000 (22:35 +0200)]
Convert skipFiles() to rpmfi(Set)FAction()

16 years agoConvert handleOverlappedFiles() to rpmfi(Set)Faction()
Panu Matilainen [Tue, 11 Nov 2008 20:32:23 +0000 (22:32 +0200)]
Convert handleOverlappedFiles() to rpmfi(Set)Faction()

16 years agoConvert handleRmvdInstalledFiles() to rpmfiSetFAction()
Panu Matilainen [Tue, 11 Nov 2008 20:19:29 +0000 (22:19 +0200)]
Convert handleRmvdInstalledFiles() to rpmfiSetFAction()

16 years agoConvert handleInstInstalledFiles() to rpmfi(Set)Faction()
Panu Matilainen [Tue, 11 Nov 2008 20:17:10 +0000 (22:17 +0200)]
Convert handleInstInstalledFiles() to rpmfi(Set)Faction()

16 years agoAdd rpmfi get + set methods for file actions
Panu Matilainen [Tue, 11 Nov 2008 20:09:48 +0000 (22:09 +0200)]
Add rpmfi get + set methods for file actions

16 years agoRemove unnecessary initialization
Panu Matilainen [Tue, 11 Nov 2008 19:06:32 +0000 (21:06 +0200)]
Remove unnecessary initialization
- rpmfiNew() zeroes out everything, including striplen + astriplen