tools/librpm-tizen.git
15 years agoRemove check that is commented out since ages
Florian Festi [Mon, 24 Nov 2008 13:10:11 +0000 (14:10 +0100)]
Remove check that is commented out since ages

15 years agoRemove no longer needed sharedCmp
Florian Festi [Fri, 21 Nov 2008 14:00:36 +0000 (15:00 +0100)]
Remove no longer needed sharedCmp

15 years agofix statistics for looking up symlinks
Florian Festi [Mon, 24 Nov 2008 12:36:28 +0000 (13:36 +0100)]
fix statistics for looking up symlinks

15 years agoReimplement the check of the files in the transaction against the files in the rpmdb.
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.

15 years agoswitch to new rpmfiReplaced API
Florian Festi [Wed, 19 Nov 2008 16:11:59 +0000 (17:11 +0100)]
switch to new rpmfiReplaced API

15 years agoAPI for accessing and creating fi->replaced
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!

15 years agoExpose rpmdbSortIterator in rpmdb_internal.h
Florian Festi [Sun, 9 Nov 2008 17:02:20 +0000 (18:02 +0100)]
Expose rpmdbSortIterator in rpmdb_internal.h

15 years agoAdd rpmdbExtendIterator to do repeated searches
Florian Festi [Sun, 9 Nov 2008 16:54:47 +0000 (17:54 +0100)]
Add rpmdbExtendIterator to do repeated searches

15 years agoSupport leaving HTDATATYPE undefined to use hash as key only hash (set)
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)

15 years agoAdd couple of tests for symlink <-> directory behavior
Panu Matilainen [Mon, 24 Nov 2008 11:33:41 +0000 (13:33 +0200)]
Add couple of tests for symlink <-> directory behavior

15 years agoRemove RPMCONFIGDIR sedding from Makefiles where no longer necessary
Panu Matilainen [Sat, 22 Nov 2008 16:00:10 +0000 (18:00 +0200)]
Remove RPMCONFIGDIR sedding from Makefiles where no longer necessary

15 years agoDon't bother setting rpmrc specifically in tests
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

15 years agoRemove -DRPMCONFIG from CPPFLAGS where unnecessary
Panu Matilainen [Sat, 22 Nov 2008 15:47:44 +0000 (17:47 +0200)]
Remove -DRPMCONFIG from CPPFLAGS where unnecessary

15 years agoUse %{_rpmconfigdir} throughout configuration macros and such
Panu Matilainen [Sat, 22 Nov 2008 15:36:05 +0000 (17:36 +0200)]
Use %{_rpmconfigdir} throughout configuration macros and such

15 years agoSet _rpmconfigdir macro on initialization
Panu Matilainen [Sat, 22 Nov 2008 15:21:33 +0000 (17:21 +0200)]
Set _rpmconfigdir macro on initialization

15 years agoUse rpmConfigDir() instead of hardwired path for rpmrc + macro locations
Panu Matilainen [Sat, 22 Nov 2008 15:12:54 +0000 (17:12 +0200)]
Use rpmConfigDir() instead of hardwired path for rpmrc + macro locations

15 years agoUse rpmConfigDir() instead of hardwired value in Lua initialization
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

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