tools/librpm-tizen.git
14 years agoLift RPMDBI_PACKAGES handling from db add/remove to separate helper
Panu Matilainen [Wed, 7 Apr 2010 08:11:55 +0000 (11:11 +0300)]
Lift RPMDBI_PACKAGES handling from db add/remove to separate helper
- Remove vs add is rather similar, unify the copy-pasteish code
- Be a bit more careful about error returns from the primary db functions

14 years agoLift header instance number figuring out of rpmdbAdd() to helper function
Panu Matilainen [Wed, 7 Apr 2010 06:18:44 +0000 (09:18 +0300)]
Lift header instance number figuring out of rpmdbAdd() to helper function

14 years agoVerify header sanity as the first thing in rpmdbAdd()
Panu Matilainen [Wed, 7 Apr 2010 05:58:23 +0000 (08:58 +0300)]
Verify header sanity as the first thing in rpmdbAdd()
- avoid allocating header instance for something that we'd fail to add
- avoid possibly adding data to indexes even if adding the header
  itself fails, duh

14 years agoMove header INSTALLTID manipulation out of rpmdbAdd()
Panu Matilainen [Wed, 7 Apr 2010 05:35:14 +0000 (08:35 +0300)]
Move header INSTALLTID manipulation out of rpmdbAdd()

14 years agoRemove unused require- and provideversion indexes
Panu Matilainen [Wed, 7 Apr 2010 04:48:33 +0000 (07:48 +0300)]
Remove unused require- and provideversion indexes
- For completely unused indexes, these are fairly expensive too

14 years agoEliminate redundant/bogus temporary variable shuffling
Panu Matilainen [Wed, 7 Apr 2010 03:55:15 +0000 (06:55 +0300)]
Eliminate redundant/bogus temporary variable shuffling
- This fetches the special key zero which is used for bookkeeping of
  header "instance" numbers, the actual header to be stored is NOT
  relevant here
- keyp, keylen, datap and datalen are just redundant fluff, manipulate
  the key and data DBT directly

14 years agoRemove unused _DBI defines
Panu Matilainen [Tue, 6 Apr 2010 10:13:14 +0000 (13:13 +0300)]
Remove unused _DBI defines

14 years agoLose unused fluff from openDatabase()
Panu Matilainen [Tue, 6 Apr 2010 10:09:34 +0000 (13:09 +0300)]
Lose unused fluff from openDatabase()
- As RPMDBI_PACKAGES is always the first index, the for-loop never
  did anything else than open the Packages db and exit with success/fail.
  For the same reason RPMDB_FLAG_MINIMAL didn't do anything at all here,
  lose the unnecessary flag..

14 years agoEliminate static _rebuildinprogress hack, use per-db flag instead
Panu Matilainen [Tue, 6 Apr 2010 10:02:58 +0000 (13:02 +0300)]
Eliminate static _rebuildinprogress hack, use per-db flag instead
- replace unused RPMDB_FLAG_CHROOT with RPMDB_FLAG_REBUILD and pass
  around as necessary

14 years agoBury rpmdb flags inside rpmdb.c, not used by anything outside it
Panu Matilainen [Tue, 6 Apr 2010 09:59:06 +0000 (12:59 +0300)]
Bury rpmdb flags inside rpmdb.c, not used by anything outside it

14 years agoUnbreak --rebuilddb
Panu Matilainen [Mon, 5 Apr 2010 15:09:57 +0000 (18:09 +0300)]
Unbreak --rebuilddb
- managed to bust up the rebuilddb-path generation once again in commit
  890cea56c91ff6ff887a439c036d345715e6c5c2, doh
- make the intended logic more obviours

14 years agol10n: Updates to Ukrainian (uk) translation
Yuri Chornoivan [Mon, 5 Apr 2010 07:22:31 +0000 (07:22 +0000)]
l10n: Updates to Ukrainian (uk) translation

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

14 years agol10n: Updates to Russian (ru) translation
Misha Shnurapet [Fri, 2 Apr 2010 12:55:37 +0000 (12:55 +0000)]
l10n: Updates to Russian (ru) translation

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

14 years agoNuke bogus comments + related NULL-checks
Panu Matilainen [Thu, 1 Apr 2010 15:19:49 +0000 (18:19 +0300)]
Nuke bogus comments + related NULL-checks
- db->_dbi cannot be NULL if db is not NULL, it's allocated at
  newRpmDB() and freed in rpmdbClose() and nothing else touches it

14 years agoClean up rpmdb struct initialization
Panu Matilainen [Thu, 1 Apr 2010 14:59:38 +0000 (17:59 +0300)]
Clean up rpmdb struct initialization
- lose the dumb template assignment and related defines

14 years agoLose unused static initialization foo
Panu Matilainen [Thu, 1 Apr 2010 14:49:07 +0000 (17:49 +0300)]
Lose unused static initialization foo

14 years agoClean up formatting in rpmdbCountPackages() (just cosmetics)
Panu Matilainen [Thu, 1 Apr 2010 13:58:12 +0000 (16:58 +0300)]
Clean up formatting in rpmdbCountPackages() (just cosmetics)

14 years agoRemove unused rpmdbCloseDBI()
Panu Matilainen [Thu, 1 Apr 2010 13:29:38 +0000 (16:29 +0300)]
Remove unused rpmdbCloseDBI()
- this was used by the Depends temporary db hack, forcing it
  to be exposed in the API... not anymore

14 years agoGenerate package database statistics on close & make use of it on open
Panu Matilainen [Thu, 1 Apr 2010 12:28:45 +0000 (15:28 +0300)]
Generate package database statistics on close & make use of it on open
- Turn dbiStat() into more useful: return the number of keys in the
  index, hiding away the BDB internal access method stuff into the backend
- Force statistics gathering at Packages db close, take advantage of
  that when its opened to get a fairly accurate count of packages for
  initial "header verified" bitmap allocation. Previously DB_FAST_STAT
  was used on open but it never returns anything when no stats have
  been previously collected, hence the need for the expensive slow stat.
- The performance hit from stat generation is hardly worth it for
  the bitmap allocation alone, but lets see if there are other uses...
- Also gets rid of dbi_stats member, this is not particularly useful

14 years agoLose "support" for truly ancient BDB versions
Panu Matilainen [Thu, 1 Apr 2010 10:54:39 +0000 (13:54 +0300)]
Lose "support" for truly ancient BDB versions
- BDB >= 4.3 is required now, and even thats several years old

14 years agoRename dbiOpen() + dbiOpenDB() to make their layer obvious from the name
Panu Matilainen [Thu, 1 Apr 2010 09:48:17 +0000 (12:48 +0300)]
Rename dbiOpen() + dbiOpenDB() to make their layer obvious from the name
- dbiOpen() in rpmdb.c operates on "rpmdb layer" so calling it
  rpmdbOpenIndex(), dbiOpenDB() on the other hand is the lowest level
  backend thing, which is now called dbiOpen() to be in line with
  the other operations like dbiClose()

14 years agoPass rpmdb to dbiFindByLabel() / rpmdbiFindMatch() directly
Panu Matilainen [Thu, 1 Apr 2010 09:34:59 +0000 (12:34 +0300)]
Pass rpmdb to dbiFindByLabel() / rpmdbiFindMatch() directly
- avoids having to go backwards from the dbi to rpmdb when we very well
  have the rpmdb handle at hand here...

14 years agoEliminate dbi_rpmtag member from dbiIndex struct
Panu Matilainen [Thu, 1 Apr 2010 09:25:04 +0000 (12:25 +0300)]
Eliminate dbi_rpmtag member from dbiIndex struct
- the backend doesn't care about the tag beyond initialization,
  and the tag is only used for error messages from rpmdb layer which
  already knows what the tag is

14 years agoDefine + use enum for primary/secondary index types + api to get it
Panu Matilainen [Thu, 1 Apr 2010 09:01:28 +0000 (12:01 +0300)]
Define + use enum for primary/secondary index types + api to get it
- no functional changes, making the type more obvious than
  "case 2*sizeof(int32_t):"

14 years agoRename the dbi access method member dbi_type -> dbi_dbtype
Panu Matilainen [Thu, 1 Apr 2010 08:47:15 +0000 (11:47 +0300)]
Rename the dbi access method member dbi_type -> dbi_dbtype
- make it more obvious what it is

14 years agoSplit dbiIndex out of rpmdb_internal.h into header of its own
Panu Matilainen [Thu, 1 Apr 2010 08:13:37 +0000 (11:13 +0300)]
Split dbiIndex out of rpmdb_internal.h into header of its own
- the dbi presents an internal api of its own, and deserves a separate
  header (baby steps to making dbiIndex opaque outside the backend)
- move dbiVerify() to the backend where it belongs
- mark all the dbiFoo() functions as internal

14 years agoEliminate unnecessary argument to dbiCopen()
Panu Matilainen [Thu, 1 Apr 2010 07:25:55 +0000 (10:25 +0300)]
Eliminate unnecessary argument to dbiCopen()
- txnid (which is unused...) is stored in dbi so dbiCopen() can already
  get to it

14 years agoMove dbi_no_dbsync logic to inside dbiSync()
Panu Matilainen [Thu, 1 Apr 2010 07:18:05 +0000 (10:18 +0300)]
Move dbi_no_dbsync logic to inside dbiSync()
- avoids having to check for it in every single caller

14 years agoOn header iteration format queries, dump the contents as-is
Panu Matilainen [Thu, 1 Apr 2010 07:03:21 +0000 (10:03 +0300)]
On header iteration format queries, dump the contents as-is
- This makes eg --xml query of packages give out the true contents
  of the package, raw i18n strings and all, which is what you probably
  want when examining the contents on this level. Regular queries still
  run with all bells 'n whistless enabled.

14 years agoDisable header i18n lookup in headerCopyTags() (RhBug:578299)
Panu Matilainen [Thu, 1 Apr 2010 06:15:06 +0000 (09:15 +0300)]
Disable header i18n lookup in headerCopyTags() (RhBug:578299)
- without HEADERGET_RAW here, only one of the translations in header
  (whatever happens to be "current" locale) gets copied

14 years agoRemove BDB recno + queue access methods from configuration
Panu Matilainen [Wed, 31 Mar 2010 09:17:00 +0000 (12:17 +0300)]
Remove BDB recno + queue access methods from configuration
- these rather limited access methods have never been used for anything,
  rpm always used hash access and later btree to varying degree

14 years agoDatabase metadata integer byte order is not user serviceable config
Panu Matilainen [Tue, 30 Mar 2010 23:51:39 +0000 (02:51 +0300)]
Database metadata integer byte order is not user serviceable config

14 years agoLose dbi file configuration option
Panu Matilainen [Tue, 30 Mar 2010 23:48:03 +0000 (02:48 +0300)]
Lose dbi file configuration option
- index names are rpm tag names, period
- also we dont need to strdup() the tag name, rpmTagGetName() returns
  pointers to const strings these days

14 years agoMake dbiVerify() and dbiOpen() static, not needed outside rpmdb.c
Panu Matilainen [Tue, 30 Mar 2010 23:47:33 +0000 (02:47 +0300)]
Make dbiVerify() and dbiOpen() static, not needed outside rpmdb.c

14 years agoBury dbiIndexItem and dbiIndexSet structs inside rpmdb.c
Panu Matilainen [Tue, 30 Mar 2010 23:37:13 +0000 (02:37 +0300)]
Bury dbiIndexItem and dbiIndexSet structs inside rpmdb.c

14 years agoMake dbiIndexSet operations static inside rpmdb.c
Panu Matilainen [Tue, 30 Mar 2010 23:34:21 +0000 (02:34 +0300)]
Make dbiIndexSet operations static inside rpmdb.c

14 years agoLose the BDB access method configuration options
Panu Matilainen [Tue, 30 Mar 2010 23:16:54 +0000 (02:16 +0300)]
Lose the BDB access method configuration options
- In the ~10 years of their existance none of them have been used,
  and besides users have no business messing with fundamental database
  behavior such as whether duplicates are allowed or not

14 years agoWe really dont care about macro expanded per-db error prefix
Panu Matilainen [Tue, 30 Mar 2010 23:04:21 +0000 (02:04 +0300)]
We really dont care about macro expanded per-db error prefix

14 years agoLose shmkey + shared BDB config options
Panu Matilainen [Tue, 30 Mar 2010 22:59:27 +0000 (01:59 +0300)]
Lose shmkey + shared BDB config options
- we dont want anything to do with System V IPC, really... BDB uses
  file backed mmap when it needs, this suits us just fine

14 years agoRemove "truncate" BDB config option
Panu Matilainen [Tue, 30 Mar 2010 22:55:06 +0000 (01:55 +0300)]
Remove "truncate" BDB config option
- Truncate is so dangerous that dbiOpenDB() discarded it even if
  set in configuration. How useful is that?

14 years agoWe dont want to use DB_HOME environment, ever
Panu Matilainen [Tue, 30 Mar 2010 22:53:12 +0000 (01:53 +0300)]
We dont want to use DB_HOME environment, ever
- rpm has its own switches for overriding the db home when that's
  necessary, DB_HOME it should use not

14 years agoWe dont have any temporary databases anymore, lose the config switches
Panu Matilainen [Tue, 30 Mar 2010 22:45:26 +0000 (01:45 +0300)]
We dont have any temporary databases anymore, lose the config switches
- The last temporary db was Depends which is now replaced with an
  in-memory hash, and the temporary dbs were troublesome with
  chroot operations anyway, good riddance

14 years agoLose pointless per-db and per-dbi errfile and errcall pointers
Panu Matilainen [Tue, 30 Mar 2010 22:41:04 +0000 (01:41 +0300)]
Lose pointless per-db and per-dbi errfile and errcall pointers
- BDB uses stderr for errfile when not set, which is what we set it
  to through various hoops. Just leave it alone.
- db_errcall has always been (intentionally) NULL to disable that output,
  the errors get logged though cvtdberr() with slight filtering

14 years agoShred a pile of BDB config goo that's never been actually implemented
Panu Matilainen [Tue, 30 Mar 2010 22:27:04 +0000 (01:27 +0300)]
Shred a pile of BDB config goo that's never been actually implemented
- with the exception subfile (used by now extinct sqlite backend)
  none of this was ever even connected to the bdb configuration...

14 years agoShed the pointless per-dbi memory allocators
Panu Matilainen [Tue, 30 Mar 2010 22:12:15 +0000 (01:12 +0300)]
Shed the pointless per-dbi memory allocators
- we want to use our own allocators for exit-on-enomem behavior but
  having per-index allocator configuration makes no sense whatsoever

14 years agoEliminate now unnecessary db_ndbi field, number of indexes is constant
Panu Matilainen [Tue, 30 Mar 2010 22:09:51 +0000 (01:09 +0300)]
Eliminate now unnecessary db_ndbi field, number of indexes is constant

14 years agoMake rpmdb index list hard-wired
Panu Matilainen [Tue, 30 Mar 2010 22:05:03 +0000 (01:05 +0300)]
Make rpmdb index list hard-wired
- We dont grow new indexes every other day, and especially this
  is not activity that users need to be able to do
- Gets rid of the hysterical initialization and million can't happen
  NULL-checks

14 years agoMinor cleanup to rpmdbAdd()
Panu Matilainen [Tue, 30 Mar 2010 21:43:34 +0000 (00:43 +0300)]
Minor cleanup to rpmdbAdd()
- move dbiOpen() + check to more sensible place, curing the
  busted indentation
- initialize at declaration save a few unnecessary lines

14 years agoAdd + use a helper function for retrieving single header at offset
Panu Matilainen [Tue, 30 Mar 2010 21:40:23 +0000 (00:40 +0300)]
Add + use a helper function for retrieving single header at offset

14 years agoMinor cleanups to rpmdbAdd() and rpmdbRemove()
Panu Matilainen [Tue, 30 Mar 2010 20:23:53 +0000 (23:23 +0300)]
Minor cleanups to rpmdbAdd() and rpmdbRemove()

14 years agoMinor cleanup to rpmdbRebuild(), use rstreq() instead of hand-comparing
Panu Matilainen [Tue, 30 Mar 2010 20:11:21 +0000 (23:11 +0300)]
Minor cleanup to rpmdbRebuild(), use rstreq() instead of hand-comparing

14 years agoHide rpmte open/close/error etc logic inside rpmteProcess()
Panu Matilainen [Mon, 29 Mar 2010 15:36:21 +0000 (18:36 +0300)]
Hide rpmte open/close/error etc logic inside rpmteProcess()
- make a bunch of helper functions static now that they're not needed
  elsewhere, rpmte is slowly becoming self-aware ;)

14 years agoMove the little thats left of psm.h into rpmte_internal.h
Panu Matilainen [Mon, 29 Mar 2010 14:14:55 +0000 (17:14 +0300)]
Move the little thats left of psm.h into rpmte_internal.h
- no functional changes, just shuffling declares around

14 years agol10n: Updates to Polish (pl) translation
Piotr Drąg [Mon, 29 Mar 2010 14:38:09 +0000 (14:38 +0000)]
l10n: Updates to Polish (pl) translation

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

14 years agoOops, scriptlet related error messages had dropped out of potfiles
Panu Matilainen [Mon, 29 Mar 2010 13:14:50 +0000 (16:14 +0300)]
Oops, scriptlet related error messages had dropped out of potfiles

14 years agoUpdate translatios again to shed non-existent messages from recent churn
Panu Matilainen [Mon, 29 Mar 2010 13:11:08 +0000 (16:11 +0300)]
Update translatios again to shed non-existent messages from recent churn

14 years agoLazy allocation of rpmds color array
Panu Matilainen [Mon, 29 Mar 2010 13:05:32 +0000 (16:05 +0300)]
Lazy allocation of rpmds color array
- only requires and provides in transaction elements get colored,
  dont allocate unused memory

14 years agoLose long since unused fdReadable() and fdWritable()
Panu Matilainen [Mon, 29 Mar 2010 12:33:03 +0000 (15:33 +0300)]
Lose long since unused fdReadable() and fdWritable()
- these have been unused since rpm 4.6.0, and can be implemented
  without access to rpmio internals too if somebody cares...

14 years agoLose long since unused url control structure and related functions
Panu Matilainen [Mon, 29 Mar 2010 12:27:43 +0000 (15:27 +0300)]
Lose long since unused url control structure and related functions
- these have been unused since rpm 4.6.0, and rpm is not in the
  url business, rip.

14 years agoRemove unused dependency set file reference count
Panu Matilainen [Mon, 29 Mar 2010 12:03:14 +0000 (15:03 +0300)]
Remove unused dependency set file reference count
- this has never been used for anything at all, there are better things
  to use our memory for than unused arrays

14 years agoRemove unused and non-sensible depedency set build-time
Panu Matilainen [Mon, 29 Mar 2010 11:53:10 +0000 (14:53 +0300)]
Remove unused and non-sensible depedency set build-time
- Buildtime was never part of rpm version comparison nor should it be,
  on rpm level the only sensible differentiator between two identical
  dependencies is the dependency color if any. Other than that, random()
  just as "appropriate" as build time.

14 years agoheaderNextTag() fits the checkForDuplicates() use-case better
Panu Matilainen [Mon, 29 Mar 2010 11:40:40 +0000 (14:40 +0300)]
headerNextTag() fits the checkForDuplicates() use-case better
- as we're only looking at tags, not their contents... avoid unnecessary
  data shuffling and the code is a little simpler too

14 years agoUnbreak cpio archive path generation
Panu Matilainen [Mon, 29 Mar 2010 07:59:58 +0000 (10:59 +0300)]
Unbreak cpio archive path generation
- fixes regression from commit 45e2d4e1d0260a9c07eb1daf0c68b82f602ad16f
- striplen was never set on build at all, and the psm part was unused
  too - either unused since forever or possibly related to repackaging

14 years agoOops, being a bit too strict on dependency qualifiers
Panu Matilainen [Mon, 29 Mar 2010 06:35:25 +0000 (09:35 +0300)]
Oops, being a bit too strict on dependency qualifiers
- Forgot how nasty hack parseBits() was... its abusing multilang
  support and the multilang support passes "C" if no lang is specified,
  which certainly isn't a valid qualifier. Make multilang vs tag with
  optional qualifiers different types in PreambleRec, which allows
  handling this more sanely
- Additionally build-dependencies dont take any qualifiers now

14 years agoTeach rpm about pre-transaction dependencies
Panu Matilainen [Mon, 29 Mar 2010 05:58:27 +0000 (08:58 +0300)]
Teach rpm about pre-transaction dependencies
- A pre-transaction dependency is generally anything that must be
  available at the start of the transaction, and cannot be resolved
  by packages *in* the transaction. This lets %pretrans scriptlet
  dependencies be expressed correctly, and could be also used for
  other kinds of pre-conditions.
- rpmlib() dependencies are a special case of pre-trans dependencies
  but leaving them handled separately as they cannot be provided by
  anything in rpmdb either, whereas pretrans dependencies can.

14 years agoAlways fail build on unknown dependency qualifiers
Panu Matilainen [Mon, 29 Mar 2010 05:30:18 +0000 (08:30 +0300)]
Always fail build on unknown dependency qualifiers
- previously unknown qualifiers would go unnoticed if they happened
  be last (including being the only qualifier), eg Requires(pre,junk)
  or Requires(junk) would be cheerfully accepted but Requires(junk,pre) not.

14 years agoAlways initialize tagflags to RPMSENSE_ANY
Panu Matilainen [Mon, 29 Mar 2010 05:27:35 +0000 (08:27 +0300)]
Always initialize tagflags to RPMSENSE_ANY

14 years agoReport all enabled dependency bits in deptype format extension
Panu Matilainen [Mon, 29 Mar 2010 04:20:33 +0000 (07:20 +0300)]
Report all enabled dependency bits in deptype format extension
- dont make assumptions about which bits can be enabled simultaneously,
  just dump 'em all

14 years agoDont bother translators with dependency lookup debug messages
Panu Matilainen [Mon, 29 Mar 2010 03:48:23 +0000 (06:48 +0300)]
Dont bother translators with dependency lookup debug messages

14 years agoLose unused RPMSENSE_PATCHES
Panu Matilainen [Mon, 29 Mar 2010 03:37:27 +0000 (06:37 +0300)]
Lose unused RPMSENSE_PATCHES
- this was never used by upstream at least, and the "patch rpms" this
  refers to was abandoned by Suse in favor of deltarpm a long time ago...

14 years agoRemove redundant assignments
Panu Matilainen [Mon, 29 Mar 2010 03:29:19 +0000 (06:29 +0300)]
Remove redundant assignments
- everything but buildrequires goes to pkg->header, no point having
  this separately set in each case

14 years agoGroup the tag cases a bit more logically in parseRCPOT()
Panu Matilainen [Mon, 29 Mar 2010 03:27:44 +0000 (06:27 +0300)]
Group the tag cases a bit more logically in parseRCPOT()

14 years agoDrop "support" for per-scriptlet build-requires
Panu Matilainen [Mon, 29 Mar 2010 03:17:30 +0000 (06:17 +0300)]
Drop "support" for per-scriptlet build-requires
- Rpm has never done anything useful with "BuildRequires(prep): foo"
  style dependencies other than recorded them in src.rpms, nor is there much
  point in properly supporting this in the future either
- Frees up four more bits from rpmsenseFlags for better uses

14 years agoFree up three bits from rpmsenseFlags
Panu Matilainen [Mon, 29 Mar 2010 02:59:54 +0000 (05:59 +0300)]
Free up three bits from rpmsenseFlags
- pass the wanted dependency type to addReqProv() as tagN argument
  (previously unused, eh...) instead of taking up three precious bits
  for internal-only purposes from a constrained bitfield

14 years agoAdd ds.Instance() method to python bindings
Panu Matilainen [Fri, 26 Mar 2010 15:07:00 +0000 (17:07 +0200)]
Add ds.Instance() method to python bindings
- the naming between header/rpmte/rpmds "instance" is wonderfully
  inconsistent... oh well

14 years agoTake advantage of rpmdsCurrent() in python bindings
Panu Matilainen [Fri, 26 Mar 2010 15:00:20 +0000 (17:00 +0200)]
Take advantage of rpmdsCurrent() in python bindings

14 years agoAdd public rpmdsCurrent() function for creating a single ds from iteration
Panu Matilainen [Fri, 26 Mar 2010 14:54:16 +0000 (16:54 +0200)]
Add public rpmdsCurrent() function for creating a single ds from iteration
- Permits extracting single dependencies from a set with instance
  number inherited without exposing rpmdsSetInstance() kind of thing
- Also faster than calling rpmdsSingle(rpmdsTagN(ds), rpmdsN(ds)....)
  where each call re-re-re-re-validates the indexes

14 years agoSplit single ds generation into helper function, clean up a bit
Panu Matilainen [Fri, 26 Mar 2010 14:45:46 +0000 (16:45 +0200)]
Split single ds generation into helper function, clean up a bit
- allows nicer handling of ds instance without special cases

14 years agoSimplify rpmcliTransaction() a bit
Panu Matilainen [Fri, 26 Mar 2010 14:14:52 +0000 (16:14 +0200)]
Simplify rpmcliTransaction() a bit
- No need for separate the install and erase cases here for problem
  filter flags: we only check disk space for added packages so this
  is just a no-op anyway
- Also no need to fiddle with eflags for ordering, we always want
  ordering unless --noorder specified

14 years agol10n: Updates to Spanish (Castilian) (es) translation
Héctor Daniel Cabrera [Fri, 26 Mar 2010 13:51:00 +0000 (13:51 +0000)]
l10n: Updates to Spanish (Castilian) (es) translation

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

14 years agoOops, diskspace problem messed up from the argument shuffle
Panu Matilainen [Fri, 26 Mar 2010 13:28:25 +0000 (15:28 +0200)]
Oops, diskspace problem messed up from the argument shuffle
- fixes regression from commit 12392d93e2006ac63f918a154f29283a14fb98cf

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