tools/librpm-tizen.git
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

15 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.

15 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

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

15 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

15 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

15 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?

15 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()

15 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

15 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

15 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()

15 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()

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

15 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()

15 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

15 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

15 years agoMove file action calculations to rpmfiNew() where possible
Panu Matilainen [Tue, 11 Nov 2008 19:01:02 +0000 (21:01 +0200)]
Move file action calculations to rpmfiNew() where possible
- for build operations and src.rpm install this is known

15 years agoCpio flags are only relevant for fsm, get them out of rpmfi
Panu Matilainen [Tue, 11 Nov 2008 18:48:35 +0000 (20:48 +0200)]
Cpio flags are only relevant for fsm, get them out of rpmfi

15 years agoFigure out cpio mapflags in rpmfiNew()
Panu Matilainen [Tue, 11 Nov 2008 12:50:53 +0000 (14:50 +0200)]
Figure out cpio mapflags in rpmfiNew()
- all the necessary info is there, no need to litter the logic all over
  the place

15 years agoPush archivePos from rpmfi to fsm
Panu Matilainen [Tue, 11 Nov 2008 11:53:31 +0000 (13:53 +0200)]
Push archivePos from rpmfi to fsm
- archive position is only meaningful in fsm context anyway

15 years agoAdjust rpmfi directory count while messing with it in build
Panu Matilainen [Tue, 11 Nov 2008 15:35:42 +0000 (17:35 +0200)]
Adjust rpmfi directory count while messing with it in build
- otherwise we can miss some entries in rpmfiFN() max calculation and
  blow up in entertaining ways

15 years agoAdd the post-build package checker feature in rpmbuild (upstream ticket #2)
Jindrich Novy [Mon, 10 Nov 2008 14:52:29 +0000 (15:52 +0100)]
Add the post-build package checker feature in rpmbuild (upstream ticket #2)
- allow to run helper programs to check:
  - generated SRPM
  - each generated RPM after it is successfully written
  - whole successfully written binary package set
- it is possible to use it for sanity checks

15 years agoAdd macros for the post-build package checkers feature (upstream ticket #2)
Jindrich Novy [Mon, 10 Nov 2008 14:46:43 +0000 (15:46 +0100)]
Add macros for the post-build package checkers feature (upstream ticket #2)
- _build_pkgcheck: helper that is ran for every binary RPM successfully
  written
- _build_pkgcheck_set: helper ran for the whole binary package set
- _build_pkgcheck_srpm: helper ran for SRPM
- _nonzero_exit_pkgcheck_terminate_build: indicates whether the build
  should fail if helper returns non-zero exit status

15 years agoReset return values to zero + NULL's on not found in hash GetEntry()
Panu Matilainen [Fri, 7 Nov 2008 10:03:54 +0000 (12:03 +0200)]
Reset return values to zero + NULL's on not found in hash GetEntry()
- avoids having to separately check for return value in some cases and
  accidents from not resetting the values in caller
- in line with headerGet() behavior

15 years agoRename doLookup to fpLookup to get rid of one function just calling the other
Florian Festi [Wed, 5 Nov 2008 14:23:19 +0000 (15:23 +0100)]
Rename doLookup to fpLookup to get rid of one function just calling the other

15 years agocleanup fpLookupSubdir
Florian Festi [Fri, 7 Nov 2008 09:53:55 +0000 (10:53 +0100)]
cleanup fpLookupSubdir
 * rename end -> endsubdir
 * fix assignment mess
 * fix memory leak (no longer free current_fp.subDir which may be NULL)
 * set endsubdir to NULL while not valid

15 years agoReverse hash GetEntry() return code vs found/not found
Panu Matilainen [Fri, 7 Nov 2008 09:52:24 +0000 (11:52 +0200)]
Reverse hash GetEntry() return code vs found/not found
- be in line with hash HasEntry() and other similar functions
- internal-only function with just one place actually checking the return

15 years agorpmsqAction() proto needs SA_SIGINFO conditionals too (ticket #4)
Panu Matilainen [Thu, 6 Nov 2008 08:03:10 +0000 (10:03 +0200)]
rpmsqAction() proto needs SA_SIGINFO conditionals too (ticket #4)

15 years agoNuke the ugly hardwired "known arch" list from label parsing
Panu Matilainen [Wed, 5 Nov 2008 18:37:48 +0000 (20:37 +0200)]
Nuke the ugly hardwired "known arch" list from label parsing
- we have list of known archs in rpmrc, might as well use it
- avoids having to patch & recompile rpm just to have rpmtsInitIterator()
  recognize new archs when it's runtime configurable otherwise
- checking against compatible arch would be saner except then people could
  get into even more trouble using --ignorearch...

15 years agoCalculate filename buffer len lazily in rpmfiFN() as needed
Panu Matilainen [Wed, 5 Nov 2008 13:44:35 +0000 (15:44 +0200)]
Calculate filename buffer len lazily in rpmfiFN() as needed
- avoids having to separately calculate in genCpioListAndHeader()
- avoids unnecessary fnlen field in rpmfi struct
- avoids having to calculate it at all if rpmfiFN() is never called

15 years agoRemove yet more unused fields from rpmfi struct
Panu Matilainen [Wed, 5 Nov 2008 13:24:08 +0000 (15:24 +0200)]
Remove yet more unused fields from rpmfi struct

15 years agoRemove fperms and dperms from rpmfi struct
Panu Matilainen [Wed, 5 Nov 2008 13:18:43 +0000 (15:18 +0200)]
Remove fperms and dperms from rpmfi struct
- only fsm internals need and just use straightforward defaults, move
  the defaults there...

15 years agoUse cpioMapFlags type consistently for map flags
Panu Matilainen [Wed, 5 Nov 2008 12:30:01 +0000 (14:30 +0200)]
Use cpioMapFlags type consistently for map flags

15 years agoStop messing with fi->fstates allocations in psm
Panu Matilainen [Wed, 5 Nov 2008 12:10:16 +0000 (14:10 +0200)]
Stop messing with fi->fstates allocations in psm
- it's alloced and freed by rpmfiNew()/Free() always anyway

15 years agoKill off per-file cpio map flags
Panu Matilainen [Wed, 5 Nov 2008 11:17:50 +0000 (13:17 +0200)]
Kill off per-file cpio map flags
- nothing uses/needs them, one less murky fi->foo allocation less
- apparently a leftover from initial multilib attempts long long ago

15 years agoRemove unused variable
Panu Matilainen [Wed, 5 Nov 2008 10:45:03 +0000 (12:45 +0200)]
Remove unused variable

15 years agoRemove useless rpmfi->gid and uid "defaults"
Panu Matilainen [Wed, 5 Nov 2008 10:38:16 +0000 (12:38 +0200)]
Remove useless rpmfi->gid and uid "defaults"
- they were only ever set on src.rpm installation yet overridden by
  package contents unless src.rpm didn't contain RPMTAG_FILEUSERNAME
  (and GROUP). Which would mean rpm 1.0 packages or thereabouts, or a
  malformed package. In that case we just fall back to root uid,
  it hardly matters

15 years agofi->actions is already initialized earlier in rpmfiNew()
Panu Matilainen [Wed, 5 Nov 2008 09:49:33 +0000 (11:49 +0200)]
fi->actions is already initialized earlier in rpmfiNew()

15 years agofi->actions cannot be non-NULL in rpmfiNew()
Panu Matilainen [Wed, 5 Nov 2008 09:47:29 +0000 (11:47 +0200)]
fi->actions cannot be non-NULL in rpmfiNew()

15 years agoDead code removal
Panu Matilainen [Wed, 5 Nov 2008 07:36:20 +0000 (09:36 +0200)]
Dead code removal

15 years agoStop messing around with rpmfi user+group names from psm
Panu Matilainen [Tue, 4 Nov 2008 12:53:11 +0000 (14:53 +0200)]
Stop messing around with rpmfi user+group names from psm
- these are loaded and freed by rpmfiNew/Free() as necessary

15 years agoFix segfault on relocation (rhbz#468319)
Panu Matilainen [Tue, 4 Nov 2008 11:33:27 +0000 (13:33 +0200)]
Fix segfault on relocation (rhbz#468319)
- a bogus free() / thinko

15 years agoAvoid leaking C99 options into stock %{__cc} macro
Panu Matilainen [Tue, 4 Nov 2008 09:36:01 +0000 (11:36 +0200)]
Avoid leaking C99 options into stock %{__cc} macro