platform/upstream/rpm.git
14 years agoUse the element color instead of header color
Panu Matilainen [Fri, 19 Mar 2010 07:04:12 +0000 (09:04 +0200)]
Use the element color instead of header color
- this is just the same thing, element color has been already calculated
  so no need to go through header extensions again

14 years agoOops, more leftovers from rpmal debug goo
Panu Matilainen [Thu, 18 Mar 2010 21:40:34 +0000 (23:40 +0200)]
Oops, more leftovers from rpmal debug goo

14 years agoLose leftovers from former rpmal implementation
Panu Matilainen [Thu, 18 Mar 2010 21:21:01 +0000 (23:21 +0200)]
Lose leftovers from former rpmal implementation

14 years agoHelper function for pruned iterators used in dependency checking
Panu Matilainen [Thu, 18 Mar 2010 18:51:42 +0000 (20:51 +0200)]
Helper function for pruned iterators used in dependency checking

14 years agoLose anaconda-specific check from 2000
Panu Matilainen [Thu, 18 Mar 2010 18:32:13 +0000 (20:32 +0200)]
Lose anaconda-specific check from 2000
- the predates lazy rpmdb open through rpmtsInitIterator() from 2001, and
  rpmtsCheck() explicitly opens the db anyway so this is completely moot

14 years agorpmalAdd() prototype cosmetics
Panu Matilainen [Thu, 18 Mar 2010 18:06:18 +0000 (20:06 +0200)]
rpmalAdd() prototype cosmetics

14 years agoLazy rpmal hash creation on first lookup, make rpmalMakeIndex() static
Panu Matilainen [Thu, 18 Mar 2010 17:55:57 +0000 (19:55 +0200)]
Lazy rpmal hash creation on first lookup, make rpmalMakeIndex() static
- the "new" hash-based rpmal only uses rpmalMakeIndex() for initial
  creation of the hash tables as late as possible for better estimate
  of needed hash size, but doesn't require any index regeneration if something
  is added
- first call to rpmalSatisfiedDepend() now initializes the hashes, if
  significant amount of entries are added after the first call hash
  table might get full ... so dont do that ;) (this was already true
  with rpmalMakeIndex(), now its just hidden out of sight)

14 years agoMake rpmalAllFileSatisfiesDepend() and rpmalAllSatisfiesDepend() static
Panu Matilainen [Thu, 18 Mar 2010 17:49:25 +0000 (19:49 +0200)]
Make rpmalAllFileSatisfiesDepend() and rpmalAllSatisfiesDepend() static
- rpmtsCheck() only wants yes/no answers from rpmal, and ordering
  wants the best provider, rpmalSatisfiesDepend() works for both
- update comments

14 years agoMinor cleanups to rpmtsAddInstallElement()
Panu Matilainen [Thu, 18 Mar 2010 15:33:05 +0000 (17:33 +0200)]
Minor cleanups to rpmtsAddInstallElement()
- combine some checks where it makes sense
- initialize isSource at declaration
- remove unnecessary NULL check on obsoletes, rpmdsNext() handles it

14 years agoEww, we dont want obsoletion by file names
Panu Matilainen [Thu, 18 Mar 2010 15:12:39 +0000 (17:12 +0200)]
Eww, we dont want obsoletion by file names
- obsoletion is only for package names, anything else has way too
  funky side-effects

14 years agoRefuse to install obsoleted packages (RhBug:486565)
Panu Matilainen [Thu, 18 Mar 2010 13:28:23 +0000 (15:28 +0200)]
Refuse to install obsoleted packages (RhBug:486565)
- Packages which are obsoleted by some installed package now behave
  much like conflicts, ie install is refused unless --nodeps is used
- Unlike conflicts, obsoletes are only tested against installed package
  names and not provides. Otherwise it would be impossible to create
  compat-packages which provide something that is obsoleted.
- Only check against installed obsoletes, as any obsoletes in the
  transaction could and should be handled automatically similarly to
  foo-1.0 and foo-2.0 in the same transaction set resulting only in foo-2.0
  getting installed.

14 years agoReplace the checkPackageDeps() monster with per-ds problem check helper
Panu Matilainen [Thu, 18 Mar 2010 13:24:08 +0000 (15:24 +0200)]
Replace the checkPackageDeps() monster with per-ds problem check helper
- just refactoring to avoid copy-pasteism, no functional changes

14 years agoLump the copy-paste checkDependentFoo() functions into one
Panu Matilainen [Thu, 18 Mar 2010 11:30:41 +0000 (13:30 +0200)]
Lump the copy-paste checkDependentFoo() functions into one
- just pass the dependency type from caller instead
- clarify the comments a bit
- no functional changes

14 years agoAdd a new problem type for obsoletes
Panu Matilainen [Thu, 18 Mar 2010 11:15:30 +0000 (13:15 +0200)]
Add a new problem type for obsoletes

14 years agoLose deprecated rpmtsFindPubkey()
Panu Matilainen [Thu, 18 Mar 2010 10:37:35 +0000 (12:37 +0200)]
Lose deprecated rpmtsFindPubkey()
- unused in rpm since 4.6.0, and even before that this wasn't really useful
  outside rpm internals

14 years agoAdd some basic dependency check tests to test-suite
Panu Matilainen [Thu, 18 Mar 2010 10:34:44 +0000 (12:34 +0200)]
Add some basic dependency check tests to test-suite

14 years agoDifferentiate between conflicts in db versus install set
Panu Matilainen [Thu, 18 Mar 2010 10:23:38 +0000 (12:23 +0200)]
Differentiate between conflicts in db versus install set
- this appears to have been broken since its introduction in 2002,
  commit d89ce5854d39a9e896759fb96e6e303c67573bb6...

14 years agoUse a switch-case when switch-case is called for
Panu Matilainen [Wed, 17 Mar 2010 06:04:55 +0000 (08:04 +0200)]
Use a switch-case when switch-case is called for

14 years agoLose ancient and bitrotten rpmdiff scripts (ticket #148)
Panu Matilainen [Mon, 15 Mar 2010 10:37:16 +0000 (12:37 +0200)]
Lose ancient and bitrotten rpmdiff scripts (ticket #148)
- More modern tools for diffing rpms exist, ones that use librpm
  instead of trying to parse the lowlevel header structures and tags
  by themselves. Nobody appears to use these scripts as they've been
  dysfunctional since eons ago, might as well drop them off.

14 years agoLose useless xinetd service stub (ticket #149)
Panu Matilainen [Mon, 15 Mar 2010 10:30:02 +0000 (12:30 +0200)]
Lose useless xinetd service stub (ticket #149)
- this never did anything to begin with, and BDB >= 4.8 doesn't support
  RPC at all so...

14 years agoAvoid eating empty lines in spec %prep section (RhBug:573339)
Panu Matilainen [Mon, 15 Mar 2010 10:00:55 +0000 (12:00 +0200)]
Avoid eating empty lines in spec %prep section (RhBug:573339)
- In spec %prep context empty lines don't usually matter but they can
  be significant in eg here-documents.
- Fixes regression from commit 94ff22b129aeb31c38848231e40f87aa4a5613a1

14 years agoAdd an enhanced argvSplitString() function for splitting strings to argv's
Panu Matilainen [Mon, 15 Mar 2010 09:54:55 +0000 (11:54 +0200)]
Add an enhanced argvSplitString() function for splitting strings to argv's
- Returns the newly created argv instead of useless "this always returns 0"
- By default make a "real" split, including empty strings
- Flags argument allows controlling behavior, for now only flag is to
  preserve argvSplit() behavior but leaves room for future enhancements
  such as quoted splitting etc

14 years agoTell python about RPMTRANS_FLAG_NOCONTEXTS
Panu Matilainen [Mon, 15 Mar 2010 07:45:49 +0000 (09:45 +0200)]
Tell python about RPMTRANS_FLAG_NOCONTEXTS

14 years agol10n: Updates to Ukrainian (uk) translation
Yuri Chornoivan [Sun, 14 Mar 2010 14:56:27 +0000 (14:56 +0000)]
l10n: Updates to Ukrainian (uk) translation

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

14 years agoDefault to "not found" for rpmtsSolve() + comment behavior
Panu Matilainen [Sun, 14 Mar 2010 09:21:22 +0000 (11:21 +0200)]
Default to "not found" for rpmtsSolve() + comment behavior
- this fixes the behavior when (as normally is the case) there is no
  depsolve callback set

14 years agoRevert "Unbreak conflicts from commit 1f46534b5444dda77e3a2c757f7c88c5ec93dba0"
Panu Matilainen [Sun, 14 Mar 2010 09:17:29 +0000 (11:17 +0200)]
Revert "Unbreak conflicts from commit 1f46534b5444dda77e3a2c757f7c88c5ec93dba0"
- This is completely broken and wrong, duh...
- This reverts commit d91060373663d703457c6e1abf40b495ea372bf2.

14 years agol10n: Updates to Ukrainian (uk) translation
Yuri Chornoivan [Sat, 13 Mar 2010 18:26:27 +0000 (18:26 +0000)]
l10n: Updates to Ukrainian (uk) translation

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

14 years agoAdd Problems() method to python transaction element class
Panu Matilainen [Sat, 13 Mar 2010 10:32:45 +0000 (12:32 +0200)]
Add Problems() method to python transaction element class

14 years agoAdd a helper function for turning rpm problem set into python list
Panu Matilainen [Sat, 13 Mar 2010 10:28:26 +0000 (12:28 +0200)]
Add a helper function for turning rpm problem set into python list

14 years agoUnbreak conflicts from commit 1f46534b5444dda77e3a2c757f7c88c5ec93dba0
Panu Matilainen [Sat, 13 Mar 2010 07:29:30 +0000 (09:29 +0200)]
Unbreak conflicts from commit 1f46534b5444dda77e3a2c757f7c88c5ec93dba0
- only call solve callback on requires, conflicts have satisfied/unsatisfied
  status backwards here

14 years agoFurther minor cleanups to rpmtsCheck()
Panu Matilainen [Fri, 12 Mar 2010 18:48:45 +0000 (20:48 +0200)]
Further minor cleanups to rpmtsCheck()
- if we dont care about rpmtsCloseDB() we dont need a variable for its status
- lose unnecessary rpmtsiFree(), there used to be exit jumps from middle
  of the loops but not anymore

14 years agoLose unused iterator + its freeing
Panu Matilainen [Fri, 12 Mar 2010 18:46:00 +0000 (20:46 +0200)]
Lose unused iterator + its freeing

14 years agoRemove unnecessary rpmdsSetNoPromote() calls in checkPackageSet()
Panu Matilainen [Fri, 12 Mar 2010 18:43:02 +0000 (20:43 +0200)]
Remove unnecessary rpmdsSetNoPromote() calls in checkPackageSet()
- rpmdsNew() sets nopromote to the global default already

14 years agoAdd internal API for depsolve callback
Panu Matilainen [Fri, 12 Mar 2010 18:40:05 +0000 (20:40 +0200)]
Add internal API for depsolve callback
- rpmts struct is now fully opaque within depends.c

14 years agoRecord problems into the transaction elements causing them
Panu Matilainen [Fri, 12 Mar 2010 17:41:10 +0000 (19:41 +0200)]
Record problems into the transaction elements causing them
- Any problem found in transaction processing is caused, or at least
  triggered by, some transaction element. Having the problems in
  elements lets API users easily determine which package caused which
  problem instead of having to parse problem strings in vain.
- No problem set stored in transaction set itself now, rpmtsProblems() API p
  reserved by making it collect problems from our transaction elements
  into a new set. The problem set fiddling in rpmtsRun() wrt %pretrans
  and all is a bit crazy - always was, now its just more visible...
- Make rpmtsCheck() pass the associated transaction elements into
  the lower level functions. rpmdsProblem() removed from API, it's
  not particularly useful outside rpmtsCheck() internals.
- rpmts struct is now opaque within depends.c except for solve callback
- This breaks --badreloc, need to figure out something saner for the
  problem filtering

14 years agoAdd a few API bits for problem sets in transaction elements
Panu Matilainen [Fri, 12 Mar 2010 14:18:16 +0000 (16:18 +0200)]
Add a few API bits for problem sets in transaction elements
- make rpmteProblems() public and refcount the returned sets
- add public rpmteCleanProblems() to destroy the per-element problem sets
- add internal rpmteAddDepProblem() for adding per-element dependency problems

14 years agoMove rpmps typedef into rpmtypes.h, its common enuf
Panu Matilainen [Fri, 12 Mar 2010 14:11:15 +0000 (16:11 +0200)]
Move rpmps typedef into rpmtypes.h, its common enuf

14 years agoFree iterators in the function which initialized them (symmetry is good)
Panu Matilainen [Fri, 12 Mar 2010 12:38:18 +0000 (14:38 +0200)]
Free iterators in the function which initialized them (symmetry is good)

14 years agoEliminate a bunch of pointless "can't happen" checks
Panu Matilainen [Fri, 12 Mar 2010 12:36:37 +0000 (14:36 +0200)]
Eliminate a bunch of pointless "can't happen" checks
- if these things actually happen, we're probably better of segfaulting...

14 years agoFurther cleanup the return code craziness in dependency checks
Panu Matilainen [Fri, 12 Mar 2010 12:27:52 +0000 (14:27 +0200)]
Further cleanup the return code craziness in dependency checks
- any problems found are added to the problem set, none of these
  return codes have been used since forever

14 years agoClean up dependency checking code
Panu Matilainen [Fri, 12 Mar 2010 11:53:01 +0000 (13:53 +0200)]
Clean up dependency checking code
- unsatisfiedDepend() only ever returns 0 or 1, lose the hysterical
  can't happen switch-cases and other bogus error code checking
- also lose unnecessary and mis-indented NULL-tests,
  rpmdsInit() and rpmdsNext() handle NULL cleanly by themselves

14 years agoMove rpmte-specific problem creation to a helper function
Panu Matilainen [Fri, 12 Mar 2010 09:44:47 +0000 (11:44 +0200)]
Move rpmte-specific problem creation to a helper function

14 years agoSplit transaction member information out of rpmts to separate struct
Panu Matilainen [Fri, 12 Mar 2010 08:20:25 +0000 (10:20 +0200)]
Split transaction member information out of rpmts to separate struct
- add internal rpmtsMembers() function to get the member structures
- the main rpmts struct is now opaque within order.c, and much closer
  to being so for depends.c and transaction.c too
- no functional changes

14 years agoTurn PSM into a complete blackbox
Panu Matilainen [Fri, 12 Mar 2010 07:01:25 +0000 (09:01 +0200)]
Turn PSM into a complete blackbox
- The psm structures aren't stored or passed around by any users,
  so there's no need for them to separately allocate and free the
  struct, bury this all inside rpmpsmRun() which takes care of
  initialization, actual actions and freeing.
- There's also no need for refcounting now as allocations are completely
  contained within the rpmpsmRun() blackbox. Lose psm-debug foo which
  was only used for refcount debugging.
- No functional changes

14 years agoSplit file state structures + routines out of rpmte to separate sources
Panu Matilainen [Fri, 12 Mar 2010 06:32:15 +0000 (08:32 +0200)]
Split file state structures + routines out of rpmte to separate sources
- no functional changes

14 years agol10n: Updates to Ukrainian (uk) translation
Yuri Chornoivan [Thu, 11 Mar 2010 17:56:24 +0000 (17:56 +0000)]
l10n: Updates to Ukrainian (uk) translation

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

14 years agoNot all scriptlets have bodies (eg -p /sbin/ldconfig), dont expand NULLs
Panu Matilainen [Thu, 11 Mar 2010 11:38:52 +0000 (13:38 +0200)]
Not all scriptlets have bodies (eg -p /sbin/ldconfig), dont expand NULLs

14 years agoMore dumb thinko/typo/braindamage in scriptlet expansion patches
Panu Matilainen [Thu, 11 Mar 2010 11:34:17 +0000 (13:34 +0200)]
More dumb thinko/typo/braindamage in scriptlet expansion patches
- qformat certainly shouldn't default to on, duh

14 years agoDumb segfault on trigger scripts with no flags, doh
Panu Matilainen [Thu, 11 Mar 2010 11:21:20 +0000 (13:21 +0200)]
Dumb segfault on trigger scripts with no flags, doh

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