Commit Graph

8746 Commits

Author SHA1 Message Date
Panu Matilainen d6ea0224cc Add couple of tar build tests + another version of hello tarball 2008-11-22 11:45:55 +02:00
Panu Matilainen 1c57e1d337 Add some (trivial) macro evaluation tests 2008-11-22 11:22:01 +02:00
Panu Matilainen a5ff12cc19 Add a couple of tests for installing non-existent files and such 2008-11-22 10:28:59 +02:00
Panu Matilainen 0bcdd93151 Add some basic tests for config file behavior 2008-11-22 01:15:20 +02:00
Panu Matilainen 9844bfc9b7 Add some basic tests for file conflict behavior 2008-11-21 23:59:25 +02:00
Panu Matilainen ab3e32ad97 Add basic version comparison testing for install/upgrade 2008-11-21 23:29:54 +02:00
Panu Matilainen 357a7170fa Simplify the run functions, fix --define behavior 2008-11-21 23:28:21 +02:00
Panu Matilainen 08c81de2ee 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
2008-11-21 17:59:49 +02:00
Panu Matilainen db6c332c49 Add + use wrapper function for calling rpm commands in tests
- avoids having to define --rcfile etc over and over again
2008-11-21 17:59:41 +02:00
Panu Matilainen ddf59da418 Kill the last remaining varprefix
- we're just mangling varprefix to localstatedir anyway, might as well
  just avoid that little extra trouble...
2008-11-21 17:59:33 +02:00
Panu Matilainen 3a03a2fc46 Define TOPDIR once in atlocal.in 2008-11-21 17:59:24 +02:00
Panu Matilainen 50e59e92dc These tests are expected to succeed 2008-11-21 17:59:16 +02:00
Panu Matilainen 31475056f8 Rpm is supposed to create build tree by itself, don't help it 2008-11-21 17:59:03 +02:00
Panu Matilainen 217e5700c0 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
2008-11-21 10:04:41 +02:00
Panu Matilainen 5e58eeb2d7 Permit relative paths in rpmioMkpath() and rpmMkdirs() 2008-11-21 09:50:53 +02:00
Panu Matilainen 19c5eb1ed8 Update --querytags test vrt FILECAPS 2008-11-21 08:57:12 +02:00
Panu Matilainen f9ed52c0c7 fpCacheCreate() already doubles the size-hint, dont do it twice 2008-11-20 11:47:52 +02:00
Panu Matilainen 2a1e88d27e 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...
2008-11-20 10:26:22 +02:00
Panu Matilainen 5487213d18 Add functions to create and free string cache(s) 2008-11-20 10:15:08 +02:00
Panu Matilainen 325198377d 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
2008-11-20 09:53:27 +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 0c4aa20a0a Add rpmfiFLang() method for retrieving file language(s)
- hardly anything needs outside install internals but it's harmless too...
2008-11-20 09:36:47 +02:00
Panu Matilainen 3bdac8f451 Generalize the user+group string cache + helpers 2008-11-20 09:26:12 +02:00
Panu Matilainen f90f2f1015 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...
2008-11-19 18:17:56 +02:00
Panu Matilainen 6fd987b729 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
2008-11-19 16:07:15 +02:00
Panu Matilainen 3b8ebf377b Oops, file modes are needed on erase too to avoid suffixes on directories 2008-11-19 15:52:03 +02:00
Panu Matilainen 36d4908efe Use matching type for fsm->digest to avoid unnecessary cast 2008-11-19 15:46:02 +02:00
Panu Matilainen 3eed102f11 Erm erm, really use the rpmfi creation flags in rpmteNew()
- this part was missing from 763cbf05b5
2008-11-19 14:06:37 +02:00
Panu Matilainen 2a50bb8388 Erm, really do lazy allocation of fi->replacedSizes
- this part was missing from 9bde09b599
2008-11-19 13:04:07 +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 d0b0883285 Eliminate unnecessary fi->record field
- transaction elements carry the db instance already and is available
  where needed
2008-11-19 11:59:53 +02:00
Panu Matilainen e3370d3b47 Avoid unnecessary mucking with rpmfi internals 2008-11-19 10:02:16 +02:00
Panu Matilainen 30fb610125 Refer to psm->te instead of fi->te in rpmpsmStage()
- transaction element is passed to psm, might as well use it
2008-11-19 09:45:05 +02:00
Panu Matilainen 140f0c8c83 Restore SIGPIPE to default action for scriptlets (rhbz#471591) 2008-11-19 08:16:03 +02:00
Panu Matilainen 2ca4430dd7 Updated Brazilian Portugese translation from Igor Pires Soares 2008-11-19 08:10:21 +02:00
Panu Matilainen 763cbf05b5 Use finer grained rpmfi creation flags for in rpmteNew()
- also call the erase flags erase, not remove...
2008-11-18 18:54:26 +02:00
Panu Matilainen 78e8e7c02c 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...
2008-11-18 18:36:45 +02:00
Panu Matilainen 0e65e6e92c Add preliminary rpmfi flag groupings for base operations
- just a start and probably not 100% accurate..
2008-11-18 18:32:58 +02:00
Panu Matilainen 219ba34736 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
2008-11-18 17:38:53 +02:00
Panu Matilainen 9444f2d7f5 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
2008-11-18 17:12:55 +02:00
Panu Matilainen f41bd90c2a 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)
2008-11-18 16:33:07 +02:00
Florian Festi 937d814328 Fix indentiation 2008-11-18 11:50:41 +01:00
Jindrich Novy 73c17671de Add AC_CONFIG_MACRO_DIR for the new libtool 2008-11-18 11:23:26 +01:00
Panu Matilainen dbad382930 Don't bother loading FILELANGS for installed packages
- only useful for anything when installing packages
2008-11-18 11:30:43 +02:00
Panu Matilainen 03d0f43f0b Lazy allocation of FSM for file info sets
- new more or less internal rpmfiFSM() to create FSM on demand, move
  mapflags calculation there
2008-11-18 11:27:47 +02:00
Panu Matilainen 61794cf2c0 Remove now unnecessary fi->keep_header 2008-11-18 11:27:04 +02:00
Panu Matilainen 341aaa6515 Remember rpmfi creation flags 2008-11-18 11:26:56 +02:00
Panu Matilainen ff9733b6fd Generate and insert SOURCERPM tag earlier
- needed to make checking for source/binary package in rpmfiNew() reliable
  at build time
2008-11-18 11:22:26 +02:00
Panu Matilainen 8d6c4b8c95 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)
2008-11-17 17:29:31 +02:00
Panu Matilainen 4927190cf1 Simplify rpmInstallLoadMacros()
- fi argument unused, remove
- no relevant return value, make it void
- handle any proper data type for per-header macros
2008-11-17 16:12:04 +02:00