platform/upstream/rpm.git
14 years agoRecord originating header instance to all problems where relevant
Panu Matilainen [Fri, 26 Mar 2010 13:22:13 +0000 (15:22 +0200)]
Record originating header instance to all problems where relevant
- currently unused but allows tracking things like file conflicts
  back to the originating header directly from the problem set

14 years agoTake advantage of rpmdsInstance() in dependency problem reporting
Panu Matilainen [Fri, 26 Mar 2010 13:11:57 +0000 (15:11 +0200)]
Take advantage of rpmdsInstance() in dependency problem reporting
- Other than having less arguments to pass here and there, doesn't
  give any immediate advantage, but with the origin of installed
  dependency stored in problem sets, it'd be possible to track back
  a dependency problem back to the originating header

14 years agoRecord header instance in dependency sets + add API for retrieving
Panu Matilainen [Fri, 26 Mar 2010 12:56:14 +0000 (14:56 +0200)]
Record header instance in dependency sets + add API for retrieving

14 years agoMerge checkPackageSet() into checkInstDeps()
Panu Matilainen [Fri, 26 Mar 2010 12:18:45 +0000 (14:18 +0200)]
Merge checkPackageSet() into checkInstDeps()
- checkPackageSet() got refactored out of being useful standalone
  while I wasn't looking :)

14 years agoAvoid unnecessary argument now that problem pkgNEVRA is always te NEVRA
Panu Matilainen [Fri, 26 Mar 2010 11:36:36 +0000 (13:36 +0200)]
Avoid unnecessary argument now that problem pkgNEVRA is always te NEVRA

14 years agoChange the problem data arrangement for dependency problems
Panu Matilainen [Fri, 26 Mar 2010 11:20:17 +0000 (13:20 +0200)]
Change the problem data arrangement for dependency problems
- pkgNEVR in problems is now always the NEVR of the transaction element
  triggering the problem, and altNEVR is the other affected package,
  dependency string is stored in the problem string attribute
- no user visible changed, except for somebody crazy enough to try to
  do something other than print the problem message strings
- we wouldn't really need to strdup() the pkgNEVR in problems now,
  but leaving that alone for the moment...

14 years agoFilter out duplicate problems when adding to element problem sets
Panu Matilainen [Fri, 26 Mar 2010 10:23:47 +0000 (12:23 +0200)]
Filter out duplicate problems when adding to element problem sets
- Problems associated with a transaction element are necessarily unique
  to that element, so when filtered there we don't have to worry about
  skipping dupes elsewhere like in merged sets. This can actually lead
  to apparent duplicates in the current problem report output (eg in cases
  where multiple packages provide the same dependency which would be
  removed, like multilib packages), but this is only an artifact of
  they way the problems are currently printed out.
- While this is still a dumb linear search, it can be several seconds
  faster than the previous filtering in rpmpsPrint(), which is now
  just a dumb convenience function.

14 years agoEliminate rpmpsAppend() from the API
Panu Matilainen [Fri, 26 Mar 2010 09:22:18 +0000 (11:22 +0200)]
Eliminate rpmpsAppend() from the API
- This was only a convenience function that shouldn't really have been
  exported to begin with, and is not necessary at all - bury it
  inside rpmte.c for now to hide lazy problem set allocation
- In the other news of the day... According to git, this happens to be
  the 10000th commit to the master branch of this codebase.
  Happy anniversary to rpm :P

14 years agoPush problem creation argument sanitation to the level below
Panu Matilainen [Fri, 26 Mar 2010 08:41:10 +0000 (10:41 +0200)]
Push problem creation argument sanitation to the level below
- rpmpsAppend() and rpmProblemCreate() have no use for fn/dn either,
  its just stored in one string internally
- this is kinda unnecessary API break but these aren't used outside
  rpm so it doesn't make much difference

14 years agoSanitize rpmteAddProblem() arguments
Panu Matilainen [Fri, 26 Mar 2010 08:27:39 +0000 (10:27 +0200)]
Sanitize rpmteAddProblem() arguments
- lump fn/dn into one, in no case both are needed
- move altNEVR earlier to lump the generic attribute foo last

14 years agoUse the new problem set iterator where it makes more sense
Panu Matilainen [Fri, 26 Mar 2010 07:31:00 +0000 (09:31 +0200)]
Use the new problem set iterator where it makes more sense

14 years agoUse rpmpsMerge() for collecting element problems in rpmtsProblems()
Panu Matilainen [Fri, 26 Mar 2010 07:21:06 +0000 (09:21 +0200)]
Use rpmpsMerge() for collecting element problems in rpmtsProblems()

14 years agoAdd a simple and dumb rpmpsMerge() function to merge two problem sets
Panu Matilainen [Fri, 26 Mar 2010 07:20:05 +0000 (09:20 +0200)]
Add a simple and dumb rpmpsMerge() function to merge two problem sets

14 years agoAdd a saner rpmps iteration interface
Panu Matilainen [Fri, 26 Mar 2010 06:50:30 +0000 (08:50 +0200)]
Add a saner rpmps iteration interface
- simply return the actual problem objects from the iterator instead
  of "index" which is not usable for anything outside rpmps.c
- implement rpmpsNexIterator() on top of the new rpmpsiNext() as
  backwards compatibility for now

14 years agoHandle NULL and the same literal problem pointer in rpmProblemCompare()
Panu Matilainen [Fri, 26 Mar 2010 05:09:47 +0000 (07:09 +0200)]
Handle NULL and the same literal problem pointer in rpmProblemCompare()
- if the pointers to compare are the same, the problem is the same
  (even if NULL for our purposes)
- if they're not the same and either is NULL then they're not the same

14 years agol10n: Updates to Polish (pl) translation
Piotr Drąg [Fri, 26 Mar 2010 01:01:37 +0000 (01:01 +0000)]
l10n: Updates to Polish (pl) translation

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

14 years agoUpdate translations for the rpmps -> rpmprob split
Panu Matilainen [Thu, 25 Mar 2010 14:48:08 +0000 (16:48 +0200)]
Update translations for the rpmps -> rpmprob split

14 years agoSplit rpm problem type + its "methods" to separate source + header
Panu Matilainen [Thu, 25 Mar 2010 14:46:39 +0000 (16:46 +0200)]
Split rpm problem type + its "methods" to separate source + header
- rpmps is just something that stores rpm problems, problems themselves
  are individual and opaque "objects", deserving their own module

14 years agoAdd public function for testing problem equality
Panu Matilainen [Thu, 25 Mar 2010 14:22:53 +0000 (16:22 +0200)]
Add public function for testing problem equality
- turn around sameProblem() return, pay more attention to details
  and make it public
- use it in rpmpsTrim() too

14 years agoLose unused ignoreProblem from rpmProblem struct
Panu Matilainen [Thu, 25 Mar 2010 14:06:07 +0000 (16:06 +0200)]
Lose unused ignoreProblem from rpmProblem struct
- this is an artifact from rpm 4.4.x-times, and even back then
  nothing used it, the only api to set it was in python bindings and.. eww
- also killing this makes rpmpsTrim() do something semi-useful again

14 years agoMinor cleanup to rpmpsGetProblem()
Panu Matilainen [Thu, 25 Mar 2010 10:45:37 +0000 (12:45 +0200)]
Minor cleanup to rpmpsGetProblem()
- avoid dumb pointer fiddles, ps->probs is just a bleeping array

14 years agoMinor cleanup to rpmpsAppendProblem()
Panu Matilainen [Thu, 25 Mar 2010 10:39:13 +0000 (12:39 +0200)]
Minor cleanup to rpmpsAppendProblem()
- dont bother adding NULL problems
- avoid dumb pointer fiddles, ps->probs is just a bleeping array

14 years agoMinor cleanup to rpmpsFreeIterator()
Panu Matilainen [Thu, 25 Mar 2010 10:35:05 +0000 (12:35 +0200)]
Minor cleanup to rpmpsFreeIterator()

14 years agoDont bother allocating iterator if there's no data to iterate
Panu Matilainen [Thu, 25 Mar 2010 10:34:06 +0000 (12:34 +0200)]
Dont bother allocating iterator if there's no data to iterate

14 years agoClean up verifyDependencies() a bit, no functional changes
Panu Matilainen [Thu, 25 Mar 2010 09:34:24 +0000 (11:34 +0200)]
Clean up verifyDependencies() a bit, no functional changes
- only init problem iterator if there are problems
- use problems and nevra from the faked up transaction element
- the return code is the number of problems, no need to count separately

14 years agoSanitize verifyscript handling a bit
Panu Matilainen [Thu, 25 Mar 2010 09:13:16 +0000 (11:13 +0200)]
Sanitize verifyscript handling a bit
- set the transaction scriptfd once in rpmcliVerify() instead of
  dupping and closing and dupping and closing for every verified package

14 years agoRevert "Transaction element type is not a bitfield but a plain old enum"
Panu Matilainen [Thu, 25 Mar 2010 08:31:47 +0000 (10:31 +0200)]
Revert "Transaction element type is not a bitfield but a plain old enum"
- Element types are not a bitfield but they're declared this way to
  permit easy filtering on iteration.
- This reverts commit 6ed64c001f667ad8fb8bdec01f5ca54f57c44270.

14 years agoAdd Epoch, Architecture and BugURL to rpm -qi and fix alignment (RhBug:575499)
Jindrich Novy [Wed, 24 Mar 2010 20:12:27 +0000 (21:12 +0100)]
Add Epoch, Architecture and BugURL to rpm -qi and fix alignment (RhBug:575499)

14 years agol10n: Updates to Polish (pl) translation
Piotr Drąg [Wed, 24 Mar 2010 12:26:44 +0000 (12:26 +0000)]
l10n: Updates to Polish (pl) translation

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

14 years agoRemove rpmteColorDS() from the API/ABI
Panu Matilainen [Wed, 24 Mar 2010 09:04:31 +0000 (11:04 +0200)]
Remove rpmteColorDS() from the API/ABI
- this gets called on transaction element initialization anyway,
  there's no reason why anybody should need to call it from outside

14 years agoDocument deprecation of mi.count() and ds.Count().
Ville Skyttä [Fri, 19 Mar 2010 18:09:15 +0000 (20:09 +0200)]
Document deprecation of mi.count() and ds.Count().

14 years agoMore here-doc skipping fixes for perl.req (#128).
Ville Skyttä [Wed, 3 Mar 2010 18:49:42 +0000 (20:49 +0200)]
More here-doc skipping fixes for perl.req (#128).

14 years agoAdd RPMBUILD_ISFOO constants to python rpmb module (ticket #123)
Panu Matilainen [Wed, 24 Mar 2010 08:24:55 +0000 (10:24 +0200)]
Add RPMBUILD_ISFOO constants to python rpmb module (ticket #123)

14 years agoAdd __bool__() / __nonzero__() method to python rpmmi objects (ticket #153)
Panu Matilainen [Wed, 24 Mar 2010 07:53:25 +0000 (09:53 +0200)]
Add __bool__() / __nonzero__() method to python rpmmi objects (ticket #153)
- Objects supporting __len__() use (len > 0) for boolean representation,
  which normally makes sense but as the match iterator count is often
  zero despite the iterator actually existing and returning something,
  and breaks existing code (rpmlint at least)
- Adding a __bool__() (known as __nonzero__() in Python < 3) method
  returning true for non-NULL iterator fixes this and gives more
  meaningful answers than pre 4.8.0 which simply always returned True

14 years agoFirst take at pluggable file attribute + dependency extraction system
Panu Matilainen [Tue, 23 Mar 2010 14:21:27 +0000 (16:21 +0200)]
First take at pluggable file attribute + dependency extraction system
- move most of the hardwired classification logic from rpmfc C-code
  to macro-based configuration, supporting drop-in addition of arbitrary
  new attributes + dependency extractors based on regex matching of
  libmagic file types and paths
- just the initial rough conversion of our built-in dependency types,
  various open questions + todo-items remain, plus likely fair amount
  of more-or-less subtle breakage

14 years agoFix fallout from rpmgi.h moving to internal path
Panu Matilainen [Tue, 23 Mar 2010 14:29:59 +0000 (16:29 +0200)]
Fix fallout from rpmgi.h moving to internal path

14 years agol10n: Updates to Spanish (Castilian) (es) translation
Héctor Daniel Cabrera [Mon, 22 Mar 2010 17:02:19 +0000 (17:02 +0000)]
l10n: Updates to Spanish (Castilian) (es) translation

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

14 years agoLose leftover RPMDBI_ARGLIST rpmgi pseudo tag
Panu Matilainen [Mon, 22 Mar 2010 13:48:26 +0000 (15:48 +0200)]
Lose leftover RPMDBI_ARGLIST rpmgi pseudo tag
- should've really been in commit a2156379641e48fbad88d1088eb06d7bfa78927c

14 years agoMop up leftovers from past times
Panu Matilainen [Mon, 22 Mar 2010 13:43:05 +0000 (15:43 +0200)]
Mop up leftovers from past times

14 years agoUpdate translations to shed non-existent messages from recent churn
Panu Matilainen [Mon, 22 Mar 2010 13:20:30 +0000 (15:20 +0200)]
Update translations to shed non-existent messages from recent churn

14 years agoOops, remember to free transaction set in rpmgi
Panu Matilainen [Mon, 22 Mar 2010 13:14:39 +0000 (15:14 +0200)]
Oops, remember to free transaction set in rpmgi
- dumb regression from commit a0c2c6ed83a166d35ad3d3e8b22a08aae5420731

14 years agoLose completely unused rpmte_debug junk
Panu Matilainen [Mon, 22 Mar 2010 12:50:50 +0000 (14:50 +0200)]
Lose completely unused rpmte_debug junk

14 years agoTake a transaction set reference on verified db iteration
Panu Matilainen [Mon, 22 Mar 2010 12:45:49 +0000 (14:45 +0200)]
Take a transaction set reference on verified db iteration
- forward linking hasn't been an issue since >= 4.6.0...

14 years agoDocument rpmteHeader() returning a new header reference
Panu Matilainen [Mon, 22 Mar 2010 12:44:14 +0000 (14:44 +0200)]
Document rpmteHeader() returning a new header reference

14 years agoFurther rpmio NULL sanity checks
Panu Matilainen [Mon, 22 Mar 2010 12:23:05 +0000 (14:23 +0200)]
Further rpmio NULL sanity checks
- instead of blowing up with asserts, return error codes / NULLs

14 years agoLose FDSANE() macro, check in c2f() and callers instead
Panu Matilainen [Mon, 22 Mar 2010 12:09:58 +0000 (14:09 +0200)]
Lose FDSANE() macro, check in c2f() and callers instead

14 years agoChange most of the FDSANE() asserts into good old NULL-checks
Panu Matilainen [Mon, 22 Mar 2010 11:47:32 +0000 (13:47 +0200)]
Change most of the FDSANE() asserts into good old NULL-checks
- blowing up with an assert failure deep inside io "library" is not
  a very friendly thing to do...

14 years agoLose the useless rpmio refcounting debug junk
Panu Matilainen [Mon, 22 Mar 2010 11:25:57 +0000 (13:25 +0200)]
Lose the useless rpmio refcounting debug junk
- the rpmio API always had this goo, should've gotten rid of it
  back in commit dbdbe8010cd944f026a5a4e5d071eb31d29d81c4 but .. oh well

14 years agoLose the useless rpmdb refcounting debug junk + switches
Panu Matilainen [Mon, 22 Mar 2010 11:05:38 +0000 (13:05 +0200)]
Lose the useless rpmdb refcounting debug junk + switches
- get the debug messages out of API, this is what should've been in commit
  dbdbe8010cd944f026a5a4e5d071eb31d29d81c4

14 years agoLose the useless rpmds refcounting debug junk + switches
Panu Matilainen [Mon, 22 Mar 2010 11:04:26 +0000 (13:04 +0200)]
Lose the useless rpmds refcounting debug junk + switches
- get the debug messages out of API, this is what should've been in commit
  dbdbe8010cd944f026a5a4e5d071eb31d29d81c4

14 years agoLose the useless rpmps refcounting debug junk
Panu Matilainen [Mon, 22 Mar 2010 10:54:44 +0000 (12:54 +0200)]
Lose the useless rpmps refcounting debug junk
- get the debug messages out of API, this is what should've been in commit
  dbdbe8010cd944f026a5a4e5d071eb31d29d81c4

14 years agoLose the useless rpmfi refcounting etc debug messages + debug switches
Panu Matilainen [Mon, 22 Mar 2010 10:49:45 +0000 (12:49 +0200)]
Lose the useless rpmfi refcounting etc debug messages + debug switches
- get the debug messages out of API, this is what should've been in commit
  dbdbe8010cd944f026a5a4e5d071eb31d29d81c4

14 years agoLose the useless rpmts refcounting debug messages + debug switches
Panu Matilainen [Mon, 22 Mar 2010 10:40:27 +0000 (12:40 +0200)]
Lose the useless rpmts refcounting debug messages + debug switches
- get the debug messages out of API, this is what should've been in commit
  dbdbe8010cd944f026a5a4e5d071eb31d29d81c4 - just wtf have I been thinking?
- also tolerate NULL passed to rpmtsLink() and rpmtsUnlink()

14 years agoHandle obsoletions within the added package set automatically
Panu Matilainen [Mon, 22 Mar 2010 09:05:17 +0000 (11:05 +0200)]
Handle obsoletions within the added package set automatically
- similarly to skipping/replacing different versions of a package
  getting added to transaction, detect obsoletion too and
  skip/replace to avoid installing packages obsoleted by something
  else in the set

14 years agoUse package NEVRA for replaced/skipped messages, simplify
Panu Matilainen [Mon, 22 Mar 2010 08:37:32 +0000 (10:37 +0200)]
Use package NEVRA for replaced/skipped messages, simplify
- dependency strings look funny when we're talking about packages,
  use the full NEVRA instead
- unify the logging calls

14 years agoAvoid redundant headerGet()'s on arch and os
Panu Matilainen [Mon, 22 Mar 2010 08:02:49 +0000 (10:02 +0200)]
Avoid redundant headerGet()'s on arch and os

14 years agoRefactor duplicate checking out of rpmtsAddInstallElement()
Panu Matilainen [Mon, 22 Mar 2010 07:46:51 +0000 (09:46 +0200)]
Refactor duplicate checking out of rpmtsAddInstallElement()

14 years agoEliminate redundant if
Panu Matilainen [Mon, 22 Mar 2010 06:42:35 +0000 (08:42 +0200)]
Eliminate redundant if

14 years agoThere's nothing to translate in fts.c, remove from POTFILES.in
Panu Matilainen [Fri, 19 Mar 2010 17:58:31 +0000 (19:58 +0200)]
There's nothing to translate in fts.c, remove from POTFILES.in
- should've been in commit ad43e72d70604eac223fd20c97ca990fa4936ac6, oh well

14 years agoDont bother hanging onto header in rpmgi
Panu Matilainen [Fri, 19 Mar 2010 17:55:54 +0000 (19:55 +0200)]
Dont bother hanging onto header in rpmgi
- rpmgi has no use for the header and we dont really need it for iteration
  either, just return the header we opened and let caller free

14 years agoLose some unused leftover rpmgi goo
Panu Matilainen [Fri, 19 Mar 2010 17:35:19 +0000 (19:35 +0200)]
Lose some unused leftover rpmgi goo

14 years agoReturn headers from rpmgiNext() directly
Panu Matilainen [Fri, 19 Mar 2010 17:25:23 +0000 (19:25 +0200)]
Return headers from rpmgiNext() directly

14 years agoEliminate rpmgi from public API & ABI
Panu Matilainen [Fri, 19 Mar 2010 17:15:44 +0000 (19:15 +0200)]
Eliminate rpmgi from public API & ABI

14 years agoPass args and flags to rpmgi constructor already, lose rpmgiSetArgs()
Panu Matilainen [Fri, 19 Mar 2010 17:04:07 +0000 (19:04 +0200)]
Pass args and flags to rpmgi constructor already, lose rpmgiSetArgs()
- tags and the like to constructor make no sense anymore, rpmgi
  does nothing but walk manifests and files from argv
- simplifies things further...

14 years agoBury FTS inside librpmbuild and eliminate from public ABI
Panu Matilainen [Fri, 19 Mar 2010 16:23:52 +0000 (18:23 +0200)]
Bury FTS inside librpmbuild and eliminate from public ABI

14 years agoRip RPMDBI_PACKAGES iteration support out of rpmgi
Panu Matilainen [Fri, 19 Mar 2010 15:56:53 +0000 (17:56 +0200)]
Rip RPMDBI_PACKAGES iteration support out of rpmgi
- lift the tag-filtering part into query code, that's at least somewhat
  useful
- rpmgi is now just a glorified path argument iterator

14 years agoOne helluva complicated way to pass our own arg back to us
Panu Matilainen [Fri, 19 Mar 2010 14:30:55 +0000 (16:30 +0200)]
One helluva complicated way to pass our own arg back to us

14 years agoLose unused temporary/pseudo rpmdbi tags
Panu Matilainen [Fri, 19 Mar 2010 14:55:27 +0000 (16:55 +0200)]
Lose unused temporary/pseudo rpmdbi tags
- we haven't had any temporary dbis since rpm 4.8.0 where Depends
  got axed, the rest were just nonexistent fluff anyway

14 years agoEliminate RPMDBI_ADDED iterator mode from rpmgi
Panu Matilainen [Fri, 19 Mar 2010 14:55:01 +0000 (16:55 +0200)]
Eliminate RPMDBI_ADDED iterator mode from rpmgi
- there already exists a specialized iterator for this purpose for
  programmatic purposes and no cli-switches or the like to use this
  (as it would be meaningless really in rpm-cli context) so ... rip

14 years agoEliminate hysterical --hdlist query option and everything implementing it
Panu Matilainen [Fri, 19 Mar 2010 14:54:00 +0000 (16:54 +0200)]
Eliminate hysterical --hdlist query option and everything implementing it
- This hidden gem used "system hdlist", ie "/usr/share/comps/%{_arch}/hdlist
  as the source for queries. Such "system hdlist" hasn't existed anywhere
  since RHL 9/FC 1 times...

14 years agoEliminate --wtfwalk .. err, --ftswalk and everything implementing it
Panu Matilainen [Fri, 19 Mar 2010 14:52:19 +0000 (16:52 +0200)]
Eliminate --wtfwalk .. err, --ftswalk and everything implementing it
- that's what find + xargs are for, this is just useless cruft

14 years agoLose useless rpmgi reference counting
Panu Matilainen [Fri, 19 Mar 2010 14:51:32 +0000 (16:51 +0200)]
Lose useless rpmgi reference counting
- these dont get passed around in a manner where refcounting would
  make any difference

14 years agoLose the hidden and useless transaction add/order through rpmgi hackery
Panu Matilainen [Fri, 19 Mar 2010 14:50:58 +0000 (16:50 +0200)]
Lose the hidden and useless transaction add/order through rpmgi hackery

14 years agoLose unused rpmgiTs()
Panu Matilainen [Fri, 19 Mar 2010 14:48:42 +0000 (16:48 +0200)]
Lose unused rpmgiTs()

14 years agoLose unused qva_char and qva_rc fields from rpmQVKArguments struct
Panu Matilainen [Fri, 19 Mar 2010 14:45:56 +0000 (16:45 +0200)]
Lose unused qva_char and qva_rc fields from rpmQVKArguments struct
- both are only ever assigned to with useless values and never read...

14 years agoVerify the various version comparison results in testsuite
Panu Matilainen [Fri, 19 Mar 2010 08:49:17 +0000 (10:49 +0200)]
Verify the various version comparison results in testsuite

14 years agoSplit upgrade + obsolete erasure element addition to helper functions
Panu Matilainen [Fri, 19 Mar 2010 08:03:38 +0000 (10:03 +0200)]
Split upgrade + obsolete erasure element addition to helper functions
- just slicing up the biiig rpmtsAddInstallElement(), no functional changes

14 years agoLose unused/useless variable
Panu Matilainen [Fri, 19 Mar 2010 07:49:45 +0000 (09:49 +0200)]
Lose unused/useless variable

14 years agoUse a macro for the common color skipping checks
Panu Matilainen [Fri, 19 Mar 2010 07:48:10 +0000 (09:48 +0200)]
Use a macro for the common color skipping checks

14 years agoDont bother taking ds reference on obsoletes, we dont do it elsewhere either
Panu Matilainen [Fri, 19 Mar 2010 07:32:17 +0000 (09:32 +0200)]
Dont bother taking ds reference on obsoletes, we dont do it elsewhere either

14 years agoDead code removal
Panu Matilainen [Fri, 19 Mar 2010 07:18:25 +0000 (09:18 +0200)]
Dead code removal
- this code has last been active sometime < 2004, nobody's been missing it
- based on comments in https://bugzilla.redhat.com/show_bug.cgi?id=134497
  it was some highly specific kludge for somebody to begin with and
  shouldn't have been in rpm upstream ever but history is lost here...
- move the removePackage() outside the debug goo so the actual action
  stands out

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.