platform/upstream/rpm.git
14 years agoSupport run-time macro and queryformat expansion on scriptlets
Panu Matilainen [Thu, 11 Mar 2010 10:06:49 +0000 (12:06 +0200)]
Support run-time macro and queryformat expansion on scriptlets
- Add per-scriptlet type flag tags to control special behavior.
- Add rpmlib dependency on scriptlet expansion - if a package relies
  on scriptlet expansion it cannot be correctly installed with
  a version of rpm that doesn't support it.
- Expansion is always an opt-in behavior, enabled with -q and/or -e argument
  in spec. We can't just blindly expand even macros as there's no telling
  %{} constructs might mean in whatever language is used for the script.
- Queryformat expansion requires great care with strange and ugly escapes
  when writing scriptlets, but OTOH it permits access arbitrary header
  data at runtime, which has previously been completely impossible.
- The handling of these expansions needs unifying for all scriptlet types,
  the trigger scriptlet handling is uuugly. Macro expansion could be
  transparently done from rpmScriptRun(), but because of their similar
  syntax, macro expansion needs to happen before query format expansion,
  and we dont have the header available in rpmScriptrun()

14 years agol10n: Initial Ukrainian translation
Yuri Chornoivan [Tue, 9 Mar 2010 18:15:02 +0000 (18:15 +0000)]
l10n: Initial Ukrainian translation

Transmitted-via: Transifex (www.transifex.net)

14 years agoUpdated Spanish translation (Héctor Daniel Cabrera through Transifex)
Panu Matilainen [Mon, 8 Mar 2010 13:00:15 +0000 (15:00 +0200)]
Updated Spanish translation (Héctor Daniel Cabrera through Transifex)

14 years agoUpdated Polish translation from Piotr Drąg
Panu Matilainen [Sun, 7 Mar 2010 10:43:25 +0000 (12:43 +0200)]
Updated Polish translation from Piotr Drąg

14 years agoMinor cleanup to PSM_INIT stage, no functional changes
Panu Matilainen [Sat, 6 Mar 2010 09:34:09 +0000 (11:34 +0200)]
Minor cleanup to PSM_INIT stage, no functional changes
- lose redundant RPMRC_OK assignment + cosmetics

14 years agoUpdate translations to shed non-existent messages from recent changes
Panu Matilainen [Sat, 6 Mar 2010 09:17:29 +0000 (11:17 +0200)]
Update translations to shed non-existent messages from recent changes

14 years agoLose a couple of leftover variables from times before headerPutString()
Panu Matilainen [Sat, 6 Mar 2010 09:04:48 +0000 (11:04 +0200)]
Lose a couple of leftover variables from times before headerPutString()

14 years agoDont bother translators with internal error debug foo
Panu Matilainen [Sat, 6 Mar 2010 09:03:11 +0000 (11:03 +0200)]
Dont bother translators with internal error debug foo

14 years agorpmdsN() and rpmdsEVR() returning NULL here is a serious can't happen
Panu Matilainen [Sat, 6 Mar 2010 09:01:08 +0000 (11:01 +0200)]
rpmdsN() and rpmdsEVR() returning NULL here is a serious can't happen

14 years agoLose more ancient compatibility retrofit goo
Panu Matilainen [Mon, 1 Mar 2010 14:32:54 +0000 (16:32 +0200)]
Lose more ancient compatibility retrofit goo
- FILEUIDS, FILEGIDS and DEFAULTPREFIX are all rpm 1.x - 2.x era,
  packages we can't even read anymore...

14 years agoRip out more rpm 2.x era relocation leftovers
Panu Matilainen [Mon, 1 Mar 2010 14:13:52 +0000 (16:13 +0200)]
Rip out more rpm 2.x era relocation leftovers
- we can't even read packages from that timeframe, much less relocate them

14 years agoRemove now unused inFtw from file lists
Panu Matilainen [Mon, 1 Mar 2010 13:55:57 +0000 (15:55 +0200)]
Remove now unused inFtw from file lists

14 years agoLose ancient prefix remnants from build code
Panu Matilainen [Mon, 1 Mar 2010 13:52:46 +0000 (15:52 +0200)]
Lose ancient prefix remnants from build code
- since commit 840599e3d92e29e8e1c1cf7ecf4ad5c37d3bf021 in 1998, nothing
  has set RPMTAG_DEFAULTPREFIX meaning fl.prefix is always NULL...

14 years agoFix rpmfcAttrDeps() for perl modules (was broken in c03be327).
Ville Skyttä [Fri, 26 Feb 2010 17:25:04 +0000 (19:25 +0200)]
Fix rpmfcAttrDeps() for perl modules (was broken in c03be327).

14 years agoEmit highest versions of perl module deps, not first versioned ones found.
Ville Skyttä [Thu, 25 Feb 2010 17:51:25 +0000 (19:51 +0200)]
Emit highest versions of perl module deps, not first versioned ones found.

Requires the "version" module installed (perl >= 5.9 or separately), falls
back to the previous "output first versioned one found" behavior if it is
not available.

14 years agoFix open POD section leak across different files in perl.req.
Ville Skyttä [Thu, 25 Feb 2010 17:45:10 +0000 (19:45 +0200)]
Fix open POD section leak across different files in perl.req.

14 years agoMake perl.{req,prov} warn about unreadable files.
Ville Skyttä [Thu, 25 Feb 2010 17:37:55 +0000 (19:37 +0200)]
Make perl.{req,prov} warn about unreadable files.

14 years agoUpdated Spanish translation from Héctor Daniel Cabrera (ticket #141)
Panu Matilainen [Mon, 1 Mar 2010 09:48:28 +0000 (11:48 +0200)]
Updated Spanish translation from Héctor Daniel Cabrera (ticket #141)

14 years agoMinor rpmtsCheckDSIProblems() cleanup
Panu Matilainen [Fri, 26 Feb 2010 11:45:47 +0000 (13:45 +0200)]
Minor rpmtsCheckDSIProblems() cleanup

14 years agoLose some unnecessary includes
Panu Matilainen [Fri, 26 Feb 2010 07:36:42 +0000 (09:36 +0200)]
Lose some unnecessary includes

14 years agoHide install/erase statistics collection inside psm
Panu Matilainen [Fri, 26 Feb 2010 07:17:03 +0000 (09:17 +0200)]
Hide install/erase statistics collection inside psm

14 years agoLose fluff from ensureOlder()
Panu Matilainen [Thu, 25 Feb 2010 19:50:20 +0000 (21:50 +0200)]
Lose fluff from ensureOlder()
- p and h can't possibly be NULL in the place this gets called
- the single caller doesn't care about return value

14 years agoLose another pointless NULL-check on rpmfi iteration + an unused variable
Panu Matilainen [Thu, 25 Feb 2010 19:35:56 +0000 (21:35 +0200)]
Lose another pointless NULL-check on rpmfi iteration + an unused variable

14 years agoRemove unnecessary fiddling with ts element header
Panu Matilainen [Thu, 25 Feb 2010 19:18:47 +0000 (21:18 +0200)]
Remove unnecessary fiddling with ts element header
- rpmteClose() takes care of freeing the header already

14 years agoLose some completely pointless "can't happen" checks
Panu Matilainen [Thu, 25 Feb 2010 18:52:35 +0000 (20:52 +0200)]
Lose some completely pointless "can't happen" checks
- rpmfiFC() returns 0 if called with NULL, which is ok in these cases
- rpmfiInit() and rpmfiNext() behave correctly when passed NULL, no need
  check separately
- "dn" is already referenced before checking for NULL... it really
  cannot happen ;)

14 years agoTidy up checkProblems() a bit, no functional changes
Panu Matilainen [Thu, 25 Feb 2010 18:42:55 +0000 (20:42 +0200)]
Tidy up checkProblems() a bit, no functional changes
- avoid a million redundant calls to rpmtsFilterFlags()
- turn osOkay() and archOkay() into macros, they're suitably dumb for that

14 years agoLose some long since unnecessary includes
Panu Matilainen [Thu, 25 Feb 2010 18:26:28 +0000 (20:26 +0200)]
Lose some long since unnecessary includes

14 years agoDuh, yet more leftover io flag stuff in psm
Panu Matilainen [Thu, 25 Feb 2010 18:18:48 +0000 (20:18 +0200)]
Duh, yet more leftover io flag stuff in psm
- should've been in commit 6193da9cad40dbbc1d7ce974ab9df96986a52183

14 years agoGah, stupid thinko in elfdeps
Panu Matilainen [Thu, 25 Feb 2010 13:16:39 +0000 (15:16 +0200)]
Gah, stupid thinko in elfdeps
- for DSO's without a soname, we should be adding a *provide* of the
  basename, not require
- dumb regression from commit 87c237bebfc792a8b439fa2c5a2b78328b139d50

14 years agoImplement pretrans, posttrans and verifyscript as psm goals
Panu Matilainen [Thu, 25 Feb 2010 12:22:34 +0000 (14:22 +0200)]
Implement pretrans, posttrans and verifyscript as psm goals
- Loose rpmpsmScriptStage() hack and bury the psm details inside
  the psm implementation
- Map the script-only goal enums to the corresponding script tag
  to avoid having to re-re-re-map stuff unnecessarily
- pretrans and posttrans should really be handled as a part of PKG_INSTALL
  process, but as these stages are disconnected from the main install
  part we can't remember the state in the psm - it would need to be
  stashed into transaction elements in the meanwhile

14 years agoSeparate PSM goals from individual stages
Panu Matilainen [Thu, 25 Feb 2010 11:54:51 +0000 (13:54 +0200)]
Separate PSM goals from individual stages
- no functional changes - supposedly
- nothing outside the PSM should need to know anything about its
  internals, the general goals need to be sufficient (not the case yet)
- define goals to match rpmteType so there's no need to re-re-re-map
  the operations
- loose the big unused individual stage string switch

14 years agoTransaction element type is not a bitfield but a plain old enum
Panu Matilainen [Thu, 25 Feb 2010 11:34:51 +0000 (13:34 +0200)]
Transaction element type is not a bitfield but a plain old enum

14 years agoImprove failed transaction element behavior + logging
Panu Matilainen [Thu, 25 Feb 2010 10:36:09 +0000 (12:36 +0200)]
Improve failed transaction element behavior + logging
- handle failed element in rpmteOpen() already, avoiding need to check
  everywhere else
- elements cancelled due to parent failure can further cancel their
  dependent elements
- all failed, including skipped, elements are now logged

14 years agoCount the number of failures for transaction elements
Panu Matilainen [Thu, 25 Feb 2010 10:32:57 +0000 (12:32 +0200)]
Count the number of failures for transaction elements
- this lets us track whether the package itself failed or if it
  was cancelled due to parent failure

14 years agoYank out a bunch of unused defines
Panu Matilainen [Thu, 25 Feb 2010 09:25:15 +0000 (11:25 +0200)]
Yank out a bunch of unused defines

14 years agoLose now unnecessary progTag from psm
Panu Matilainen [Thu, 25 Feb 2010 09:05:02 +0000 (11:05 +0200)]
Lose now unnecessary progTag from psm
- our scriptlet thingie knows which progtag to use for a given script tag
  already, no need to baby-feed the psm

14 years agoFirst rough-cut version of scriptlet abstraction
Panu Matilainen [Thu, 25 Feb 2010 08:58:51 +0000 (10:58 +0200)]
First rough-cut version of scriptlet abstraction
- Split the low-level scriptlet machinery out of psm
- New struct to hold the necessary information about scriptlets so
  we can execute them without having a header at hand.
- Trigger handling is hackish and needs more love...

14 years agoLog all install/erase failures in rpmtsProcess()
Panu Matilainen [Thu, 25 Feb 2010 08:58:09 +0000 (10:58 +0200)]
Log all install/erase failures in rpmtsProcess()

14 years agoMove rpmteTypeString() back to rpmte, internal only though
Panu Matilainen [Thu, 25 Feb 2010 08:36:15 +0000 (10:36 +0200)]
Move rpmteTypeString() back to rpmte, internal only though

14 years agoKick out stillborn code
Panu Matilainen [Thu, 25 Feb 2010 06:28:34 +0000 (08:28 +0200)]
Kick out stillborn code
- psm aint the place to fiddle with db internals anyway

14 years agoClean up handleOneTrigger() a bit
Panu Matilainen [Wed, 24 Feb 2010 14:53:52 +0000 (16:53 +0200)]
Clean up handleOneTrigger() a bit
- no functional changes (supposedly ;) - just shuffle things a bit
  to condense and make it friendlier on the eyes

14 years agoLose unused PSM_RPMIO_FLAGS state
Panu Matilainen [Wed, 24 Feb 2010 13:02:42 +0000 (15:02 +0200)]
Lose unused PSM_RPMIO_FLAGS state
- should've been in commit 6193da9cad40dbbc1d7ce974ab9df96986a52183

14 years agoPermit simple strings to be returned argv-style from headers too
Panu Matilainen [Wed, 24 Feb 2010 07:42:11 +0000 (09:42 +0200)]
Permit simple strings to be returned argv-style from headers too

14 years agoThe lower level script runners dont really need psm for anything now
Panu Matilainen [Tue, 23 Feb 2010 13:11:21 +0000 (15:11 +0200)]
The lower level script runners dont really need psm for anything now

14 years agoBury the signal queue stuff inside runExtScript()
Panu Matilainen [Wed, 24 Feb 2010 14:35:45 +0000 (16:35 +0200)]
Bury the signal queue stuff inside runExtScript()
- lose psmWait() which is just a fancy wrapper for rpmsqWait(), instead
  collect scriptlet runtime stats for all scripts (previously lua wasn't
  counted)

14 years agoLose psmWait(), instead collect scriptlet runtime stats for all scripts
Panu Matilainen [Tue, 23 Feb 2010 12:59:25 +0000 (14:59 +0200)]
Lose psmWait(), instead collect scriptlet runtime stats for all scripts
- psmWait() which was not much more than a fancy wrapper over
  rpmsqWait() predates lua scriptlets by far and no time got counted
  for them at all. Useless but everybody loves stats...

14 years agoPush prefix calculation higher in the psm foodchain
Panu Matilainen [Wed, 24 Feb 2010 14:33:21 +0000 (16:33 +0200)]
Push prefix calculation higher in the psm foodchain
- Header is no longer needed for the low-level scriptlet execution
- Lose support for ancient RPMTAG_INSTALLPREFIX relocation, it was
  deprecated in 1998 already. Preserve $RPM_INSTALL_PREFIX behavior
  for scriptlets though.

14 years agoRemove unused os and arch score from transaction elements
Panu Matilainen [Mon, 22 Feb 2010 09:45:28 +0000 (11:45 +0200)]
Remove unused os and arch score from transaction elements

14 years agoHandle NULL passed to rpmMachineScore()
Panu Matilainen [Mon, 22 Feb 2010 09:13:05 +0000 (11:13 +0200)]
Handle NULL passed to rpmMachineScore()

14 years agoExtract #!/usr/bin/env interpreter dependencies, part 1 (ticket #136)
Panu Matilainen [Thu, 18 Feb 2010 13:23:02 +0000 (15:23 +0200)]
Extract #!/usr/bin/env interpreter dependencies, part 1 (ticket #136)
- With "#!/usr/bin/env <interpreter>" shebang directives, rpm previously
  only added a dependency for /usr/bin/env, completely missing the
  actual interpreter. If the interpreter happens to be an absolute path, we
  can just add it as is.
- Patch originally from Ville Skyttä

14 years agoPerform dependency extraction solely based on collected attributes
Panu Matilainen [Thu, 18 Feb 2010 11:23:18 +0000 (13:23 +0200)]
Perform dependency extraction solely based on collected attributes
- Yank out the now unnecessary apply table + related apply functions, simply
  collect dependencies for whatever attributes we found for a given file

14 years agoClassify .desktop files by just path
Panu Matilainen [Thu, 18 Feb 2010 10:44:05 +0000 (12:44 +0200)]
Classify .desktop files by just path
- Previously we required a file to be classified as text and have
  .desktop suffix, for now replace that with just a regex. We'll eventually
  want/need some extra qualifying logic to handle cases like these,
  eg "only apply path attributes if condition X is also true"

14 years agofontconfig -> font dependency extractor rename
Panu Matilainen [Thu, 18 Feb 2010 10:31:34 +0000 (12:31 +0200)]
fontconfig -> font dependency extractor rename
- No functional changes, just clearing the naming conventions to avoid
  having to extra mapping for attribute -> extractor name. The current
  font provides are handled by fontconfig, but that's just an internal
  implementation detail.

14 years agoAdd debug output for file attributes
Panu Matilainen [Thu, 18 Feb 2010 10:26:03 +0000 (12:26 +0200)]
Add debug output for file attributes

14 years agoAdd path coloring for versioned python interpreter itself
Panu Matilainen [Thu, 18 Feb 2010 10:25:04 +0000 (12:25 +0200)]
Add path coloring for versioned python interpreter itself
- pythondeps.sh knows how to figure python(abi) provide from
  /usr/bin/pythonN.N version but as that's an ELF file, pythondeps.sh
  never got a chance to run on that file

14 years agoReplace python-specific path-coloring hack with a generic mechanism
Panu Matilainen [Thu, 18 Feb 2010 09:47:34 +0000 (11:47 +0200)]
Replace python-specific path-coloring hack with a generic mechanism
- Use a table of regex pattern - attribute list pairs to apply any
  additional path based attributes. While the fundamental type of a file
  certainly does not depend on its location on the filesystem, its
  location *does* have attached semantics and it'd be just silly to
  ignore that fact.
- The current implementation is dumb as it ends up recompiling the regexes
  and splitting the attr strings a million times. OTOH compiling the
  regexes into the static rpmfcPathTable would be wrong as the patterns
  can contain macros and they can vary from package to package when building
  several packages on one invocation. The attribute split + regex compilation
  should be done once per rpmfc instanciation...

14 years agoScript/interpreter terminology renaming
Panu Matilainen [Thu, 18 Feb 2010 08:35:21 +0000 (10:35 +0200)]
Script/interpreter terminology renaming
- No functional changes, just making more obvious mapping between
  attributes and the dependency extractor names. This also leaves the
  term "interpreter" free for use for the actual interpreters, such
  as interpreter(python) provides if we go that way (ticket #136).

14 years agoEliminate silly redundancy
Panu Matilainen [Thu, 18 Feb 2010 08:26:24 +0000 (10:26 +0200)]
Eliminate silly redundancy
- rpmfcSaveArg() and addAttr() were the very same thing, unify
- turn hasAttr() into a macro, its just dumb enough for that

14 years agoOnly run dependency extractors on files with attached attributes
Panu Matilainen [Wed, 17 Feb 2010 15:12:52 +0000 (17:12 +0200)]
Only run dependency extractors on files with attached attributes
- looking at file colors still works as every relevant type has
  RPMFC_INCLUDE set but this includes various things we might not have
  attributes for, just avoids unnecessary work and is more obvious this way
- should really have been in commit ad2c8485ea109d37a2fb8ee9ed5f688eef282bf8

14 years agoSimplify rpmfcAddFileDep()
Panu Matilainen [Wed, 17 Feb 2010 15:03:19 +0000 (17:03 +0200)]
Simplify rpmfcAddFileDep()
- rpmfcHelper() already has the "deptype" character in the format
  we want for file deps, pass it as argument avoiding bunch of silliness

14 years agoUse text token attributes instead of bitfield for file classification
Panu Matilainen [Wed, 17 Feb 2010 13:09:20 +0000 (15:09 +0200)]
Use text token attributes instead of bitfield for file classification
- 32 bits are nowhere near enough to meaningfully classify all the
  types of data we might want to extract dependencies for, the bitfield
  was already almost used up and twisty with embedded enumeration in the
  middle etc. With text-based tokens, there are no limits to the total
  number of known attributes or number of attributes that can be attached
  to a given file. This also paves way to moving the classification table
  out of librpmbuild into configuration file(s).
- Remove most of the now unused RPMFC_FOO definitions from the FCOLOR enum,
  leaving just the more abstract INCLUDE, WHITE etc which control other
  aspects of the operation. Also ELF is special as the value ends up
  in headers, preserve it too.

14 years agoPlug a silly memleak in processPackageFiles()
Panu Matilainen [Wed, 17 Feb 2010 10:58:40 +0000 (12:58 +0200)]
Plug a silly memleak in processPackageFiles()

14 years agoSkip over =for ... perlpod construct (RhBug:477516)
Panu Matilainen [Mon, 15 Feb 2010 06:52:54 +0000 (08:52 +0200)]
Skip over =for ... perlpod construct (RhBug:477516)
- patch from Ville Skyttä

14 years agoDon't trump versioned module dependencies with unversioned ones.
Ville Skyttä [Sat, 13 Feb 2010 10:02:20 +0000 (12:02 +0200)]
Don't trump versioned module dependencies with unversioned ones.

14 years agoExtract dependencies from some usual syntaxes of "use base qw(Foo)".
Ville Skyttä [Sat, 13 Feb 2010 09:52:38 +0000 (11:52 +0200)]
Extract dependencies from some usual syntaxes of "use base qw(Foo)".

14 years agoTrivial perl.req cleanups.
Ville Skyttä [Sat, 13 Feb 2010 09:04:17 +0000 (11:04 +0200)]
Trivial perl.req cleanups.

Drop dead code, comment fixes, weed out duplicate dependencies to perl
(done by rpm itself anyway, but does not hurt to do it already on this
level for cleaner results when testing).

14 years agoEmit dependencies only to interpreters with absolute paths.
Ville Skyttä [Wed, 10 Feb 2010 19:58:43 +0000 (21:58 +0200)]
Emit dependencies only to interpreters with absolute paths.

14 years agoAllow whitespace between #! and the interpreter.
Ville Skyttä [Wed, 10 Feb 2010 19:56:33 +0000 (21:56 +0200)]
Allow whitespace between #! and the interpreter.

14 years agoAvoid some unnecessary command invocations in scripts.
Ville Skyttä [Wed, 3 Feb 2010 21:15:31 +0000 (23:15 +0200)]
Avoid some unnecessary command invocations in scripts.

14 years agoAvoid some stat() calls.
Ville Skyttä [Wed, 3 Feb 2010 21:14:27 +0000 (23:14 +0200)]
Avoid some stat() calls.

14 years agoFix reversed logic in getSystemBundles().
Ville Skyttä [Wed, 3 Feb 2010 21:13:07 +0000 (23:13 +0200)]
Fix reversed logic in getSystemBundles().

14 years agoPermit requires extraction too from fontconfig and desktop files
Panu Matilainen [Wed, 10 Feb 2010 09:12:54 +0000 (11:12 +0200)]
Permit requires extraction too from fontconfig and desktop files
- presently unused but...

14 years agoSplit elf dependency extraction out of librpmbuild to external helper
Panu Matilainen [Wed, 10 Feb 2010 08:52:40 +0000 (10:52 +0200)]
Split elf dependency extraction out of librpmbuild to external helper
- Elf dependency extraction code code lifted from rpmfcELF() and refactored
  to saner pieces. Having it in separate executable also frees librpmbuild
  of libelf dependency, clean up the unnecessary linkage etc from
  autofoo
- This lets internal dependency generator for elf files be
  overridden without losing file coloring (which is required for
  correct multilib handling). It also permits non-native elf files
  (eg when cross-building) to be handled by providing a custom
  elf dependency helper
- On the flip side, this inevitably slows down builds somewhat as
  two fork-exec's are needed for every elf file, but unlike invoking
  something like the python interpreter, this is a slim helper...
- All dependency extractors of the internal dependency generator are now
  external helpers (how twisted is that, huh? :) and thus can be customized
  and filtered through %__foo_provides|requires macros

14 years agoSeparate helper for script interpreters, split out of librpmbuild
Panu Matilainen [Wed, 10 Feb 2010 09:19:49 +0000 (11:19 +0200)]
Separate helper for script interpreters, split out of librpmbuild
- permit overriding/customization of script interepreter dependencies
- unlike the C-version, the interpreter.req only looks at the first line
  for shebang: libmagic only looks at the first line too, so anything
  else will never get classified as scripts in the first place

14 years agoMake rpmfcSCRIPT() a bit easier on the eyes...
Panu Matilainen [Wed, 10 Feb 2010 07:24:21 +0000 (09:24 +0200)]
Make rpmfcSCRIPT() a bit easier on the eyes...

14 years agoMove rpmVersionCompare() into a more logical place
Panu Matilainen [Tue, 9 Feb 2010 09:35:47 +0000 (11:35 +0200)]
Move rpmVersionCompare() into a more logical place
- it has nothing to do with psm so no point having it there

14 years agoUnify scriptlet execution calling conventions and error handling
Panu Matilainen [Tue, 9 Feb 2010 09:21:29 +0000 (11:21 +0200)]
Unify scriptlet execution calling conventions and error handling
- Split external scriptlet execution to separate function, called
  identically with internal (ie lua) scriptlet run
- runScript() is now just a dispatcher which calls the lower level script
  runner and decides whether the scriptlet failure is fatal or not.
- Only %prein and %preun scriptlet failures are considered fatal
  regardless of the type of failure, as they prevent the install/erase
  from taking place at all. Other failures might or might not be fatal
  in terms of package functionality but rpm has no way of knowing whether
  that is the case, so we only report what we know for a fact:
  either the package was installed/erased or not, and either it had
  scriptlet failures (for which callbacks are issued) or it didn't.

14 years agoLose unused stillborn psm threading stuff (didn't I already do this?)
Panu Matilainen [Tue, 9 Feb 2010 08:17:19 +0000 (10:17 +0200)]
Lose unused stillborn psm threading stuff (didn't I already do this?)

14 years agoUse a more reasonable type for rpmteHeaderSize()
Panu Matilainen [Tue, 9 Feb 2010 08:01:40 +0000 (10:01 +0200)]
Use a more reasonable type for rpmteHeaderSize()
- Headers must always fit into memory which is not true of rpm_loff_t,
  and the real size is arbitrarily capped far below even that limit.
  headerSizeof() uses unsigned int here, just use that...
- Doesn't affect the calculations, just type pedantry...

14 years agoMove tsortInfo typedef into internal-only header
Panu Matilainen [Tue, 9 Feb 2010 07:47:35 +0000 (09:47 +0200)]
Move tsortInfo typedef into internal-only header
- this is not exposed outside librpm internals

14 years agoBah, missing include in commit 121f73bb4932d15e618e82d5c6d7b43280dc0f7d
Panu Matilainen [Tue, 9 Feb 2010 07:45:58 +0000 (09:45 +0200)]
Bah, missing include in commit 121f73bb4932d15e618e82d5c6d7b43280dc0f7d

14 years agoUnbreak python(abi) requires generation (RhBug:562906)
Panu Matilainen [Tue, 9 Feb 2010 07:37:51 +0000 (09:37 +0200)]
Unbreak python(abi) requires generation (RhBug:562906)
- commit 426a7b6f44c6a0e1633693575c7bb6fcc76cf8a5 caused pythondeps.sh
  to match too much, undo the damage
- patch from David Malcolm

14 years agoAdd macro expansion queryformat extension
Panu Matilainen [Mon, 8 Feb 2010 08:01:19 +0000 (10:01 +0200)]
Add macro expansion queryformat extension
- unused at the moment but doesn't hurt anything either...

14 years agoRemove unused mntctl & mount related header checks
Panu Matilainen [Fri, 5 Feb 2010 15:08:05 +0000 (17:08 +0200)]
Remove unused mntctl & mount related header checks

14 years agoRemove no longer neede rpmts->filesystemCount and->filesystems
Florian Festi [Fri, 5 Feb 2010 11:43:21 +0000 (12:43 +0100)]
Remove no longer neede rpmts->filesystemCount and->filesystems

14 years agoClean up comments
Florian Festi [Thu, 4 Feb 2010 10:02:25 +0000 (11:02 +0100)]
Clean up comments

14 years agoConsider rpmdb growing when doing space calculations
Florian Festi [Tue, 2 Feb 2010 10:25:59 +0000 (11:25 +0100)]
Consider rpmdb growing when doing space calculations
Fix ticket #26

14 years agoAdd rpmteHeaderSize
Florian Festi [Tue, 2 Feb 2010 10:12:07 +0000 (11:12 +0100)]
Add rpmteHeaderSize

14 years agoFix compile when using a linker that defaults to --no-as-needed
Richard Hughes [Thu, 4 Feb 2010 10:25:28 +0000 (10:25 +0000)]
Fix compile when using a linker that defaults to --no-as-needed

14 years agoMake rpm version available to python
Panu Matilainen [Thu, 4 Feb 2010 15:37:21 +0000 (17:37 +0200)]
Make rpm version available to python

14 years agoHandle erased packages wrt disk-space problem reporting (RhBug:561160)
Panu Matilainen [Thu, 4 Feb 2010 13:55:16 +0000 (15:55 +0200)]
Handle erased packages wrt disk-space problem reporting (RhBug:561160)
- erased packages in the transaction cause space needs to shrink, which
  commit 2222e81e1cf74bbf78acb9969592ab06e2289929 failed to take into
  account, causing false disk space errors from unaffected packages
- adjust obneeded and oineeded when the requirements shrink
- new disk space problems can only occur when the requirements grow,
  change the pmtsCheckDSIProblems() check to reflect that (although not
  strictly necessary)

14 years agoUpdate translations for a change to kill the mntctl() strings there
Panu Matilainen [Wed, 3 Feb 2010 15:37:58 +0000 (17:37 +0200)]
Update translations for a change to kill the mntctl() strings there

14 years agoKill off couple of dangling lib/fs.c references
Panu Matilainen [Wed, 3 Feb 2010 15:36:45 +0000 (17:36 +0200)]
Kill off couple of dangling lib/fs.c references

14 years agoKill RPMTAG_FSNAMES and RPMTAG_FSSIZES and everything implementing them
Florian Festi [Wed, 3 Feb 2010 14:41:58 +0000 (15:41 +0100)]
Kill RPMTAG_FSNAMES and RPMTAG_FSSIZES and everything implementing them

14 years agoFix stupid off by one error
Florian Festi [Wed, 3 Feb 2010 14:42:52 +0000 (15:42 +0100)]
Fix stupid off by one error

14 years agoAvoid loading information for all filesystems
Florian Festi [Wed, 3 Feb 2010 10:45:21 +0000 (11:45 +0100)]
Avoid loading information for all filesystems

This patch is heavily based on the "lazystatfs" patch by Michael Schroeder from
Novell/SUSE. Thanks!

14 years agobrp-python-bytecompile fixes + improvements (RhBug:558997)
Panu Matilainen [Wed, 3 Feb 2010 10:26:23 +0000 (12:26 +0200)]
brp-python-bytecompile fixes + improvements (RhBug:558997)
- fix incorrect paths (eg /site-packages/filename.py instead of
  /usr/lib/pythonX.Y/site-packages/filename.py) ending up in bytecode
- add a "strict" mode where byte-compilation errors will abort the build
- when in non-strict mode, byte-compile everything we can instead of
  bailing out at first error
- patch originally from Toshio Kuratomi, slightly changed to preserve
  the original order of arguments to avoid unnecessary incompatibilities

14 years agoClean up rpmfcClassify() a bit more
Panu Matilainen [Mon, 1 Feb 2010 11:22:36 +0000 (13:22 +0200)]
Clean up rpmfcClassify() a bit more
- push variables to the local blocks they're actually needed in, sanitize

14 years agoSingle point of exit for rpmfcClassify()
Panu Matilainen [Mon, 1 Feb 2010 11:22:26 +0000 (13:22 +0200)]
Single point of exit for rpmfcClassify()
- cleans up returns + avoids a possible memleak from fcav on failure

14 years agoClean up rpmfcHelper() a bit
Panu Matilainen [Mon, 1 Feb 2010 11:21:46 +0000 (13:21 +0200)]
Clean up rpmfcHelper() a bit
- push local variables to the scope where actually needed
- use ARGV_t routines for creating av, makes allocations more obvious