tools/librpm-tizen.git
14 years agoUpdate .gitignore a bit
Panu Matilainen [Mon, 7 Jun 2010 09:51:09 +0000 (12:51 +0300)]
Update .gitignore a bit

14 years agol10n: Updated Ukrainian (uk) translation to 100%
Yuri Chornoivan [Sun, 6 Jun 2010 05:40:03 +0000 (05:40 +0000)]
l10n: Updated Ukrainian (uk) translation to 100%

New status: 724 messages complete with 0 fuzzies and 0 untranslated.

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

14 years agol10n: Updated Polish (pl) translation to 100%
Piotr Drąg [Thu, 3 Jun 2010 18:45:25 +0000 (18:45 +0000)]
l10n: Updated Polish (pl) translation to 100%

New status: 724 messages complete with 0 fuzzies and 0 untranslated.

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

14 years agoFix "empty reply from server" curl-syndrome with url retrieval (RhBug:598988)
Panu Matilainen [Thu, 3 Jun 2010 13:22:09 +0000 (16:22 +0300)]
Fix "empty reply from server" curl-syndrome with url retrieval (RhBug:598988)
- We were adding a trailing newline to urlhelper command line passed
  to execvp(), with the newline ending up in the URL passed to curl.
  Many servers dont seem to mind the extra newline, but some do. Oh well...

14 years agoRemove POSIX file capabilities from executables on erase/rename too
Panu Matilainen [Thu, 3 Jun 2010 08:04:12 +0000 (11:04 +0300)]
Remove POSIX file capabilities from executables on erase/rename too
- Just like suid/sgid bits, hardlinks to executables with capabilities
  set can "leak" permissions to old, potentially vulnerable versions
  of binaries. Related to RhBug:598775.

14 years agoStrip s-bits on upgrade too (RhBug:598775)
Panu Matilainen [Wed, 2 Jun 2010 06:15:48 +0000 (09:15 +0300)]
Strip s-bits on upgrade too (RhBug:598775)
- Previously only actual package removal would clear s-bits from
  s[ug]id files. This needs to be done on upgrade too to prevent
  leaving vulnerable hardlinks of s[ug]id binaries around.

14 years agol10n: Updates to Japanese (ja) translation
Tadashi Jokagi [Wed, 2 Jun 2010 00:01:13 +0000 (00:01 +0000)]
l10n: Updates to Japanese (ja) translation

New status: 664 messages complete with 47 fuzzies and 13 untranslated.

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

14 years agoRefactor rpmdb lookups + caching to a helper function + cosmetics
Panu Matilainen [Tue, 1 Jun 2010 12:49:16 +0000 (15:49 +0300)]
Refactor rpmdb lookups + caching to a helper function + cosmetics
- no functional changes (supposedly ;) just cleaning things up a bit

14 years agoOn colored transactions, require matching arch for freshen (RhBug:553108)
Panu Matilainen [Tue, 1 Jun 2010 10:55:15 +0000 (13:55 +0300)]
On colored transactions, require matching arch for freshen (RhBug:553108)
- What we'd really want to compare here is the color or ISA of the packages
  but color isn't realiable as eg -devel packages often aren't correctly
  colored, and ISA isn't currently available in the header as a standalone
  entry. Comparing arch prevents otherwise reasoable i386 -> i686 type
  arch changes on freshen but at least it avoids the most pathological
  issues.

14 years agoPermit DOS line-endings in PGP armors (RhBug:532992)
Panu Matilainen [Tue, 1 Jun 2010 08:58:42 +0000 (11:58 +0300)]
Permit DOS line-endings in PGP armors (RhBug:532992)
- RFC-4880 doesn't requires unix-style line-endings, we shouldn't either.
  This is probably still oversly strict as RFC-4880 appears to permit
  any whitespace to follow armor headers but ... shrug.

14 years agoSupport many pubkeys in a single file in --import (RhBug:586827)
Panu Matilainen [Tue, 1 Jun 2010 07:37:09 +0000 (10:37 +0300)]
Support many pubkeys in a single file in --import (RhBug:586827)

14 years agoDon't return errors on trying to import duplicate keys
Panu Matilainen [Tue, 1 Jun 2010 07:15:10 +0000 (10:15 +0300)]
Don't return errors on trying to import duplicate keys
- On the principle of "no news is good news", if we already have the
  keys to be imported, then everything is ok. The former behavior is
  just confusing as witnessed in RhBug:462979

14 years agoNuke leftover variable from the chroot workout
Panu Matilainen [Mon, 31 May 2010 15:00:33 +0000 (18:00 +0300)]
Nuke leftover variable from the chroot workout

14 years agoUpdate translations to pick up chroot-related string changes
Panu Matilainen [Mon, 31 May 2010 14:01:53 +0000 (17:01 +0300)]
Update translations to pick up chroot-related string changes

14 years agoUse the new chroot API everywhere, eliminate old related goo
Panu Matilainen [Mon, 31 May 2010 11:07:46 +0000 (14:07 +0300)]
Use the new chroot API everywhere, eliminate old related goo

14 years agoAdd a simple API for dealing with chroot state changes
Panu Matilainen [Mon, 31 May 2010 10:11:47 +0000 (13:11 +0300)]
Add a simple API for dealing with chroot state changes
- Chroot is a process global state so it needs to be tracked globally.
  A process can (in theory) have several transaction sets, each with
  different roots (although only one can be active at any time), so
  associating the chroot state with transaction set (as currently done)
  is not right.
- "Reference count" chroot entering and exiting so callers dont need
  to track the state changes individually when they need to go
  in and out of chroot if not already done.
- This should probably go to librpmio eventually but as there are no
  needs outside librpm currently, keeping this internal so we're free
  to fiddle with the api if necessary

14 years agoEliminate unused no-op FSM_CHROOT stage
Panu Matilainen [Mon, 31 May 2010 10:28:58 +0000 (13:28 +0300)]
Eliminate unused no-op FSM_CHROOT stage
- the fsm thingie doesn't need to deal with chroot issues: except for
  build where it doesn't matter, its only called from psm where the
  chroot is already taken care of

14 years agoAdd internal helper for formatting file attribute strings
Panu Matilainen [Fri, 28 May 2010 09:57:59 +0000 (12:57 +0300)]
Add internal helper for formatting file attribute strings
- Eliminates some copy-paste slopping. Verify code traditionally only
  shows the first attribute, take care to keep that format to avoid
  breaking scripts unnecessarily

14 years agoAdd header extension tag RPMTAG_FILESTATUS for file verification
Panu Matilainen [Fri, 28 May 2010 09:21:34 +0000 (12:21 +0300)]
Add header extension tag RPMTAG_FILESTATUS for file verification
- Permits basic file verification with just a headerGet(), with some
  caveats: there's no way to control which attributes get verified,
  and there's no filtering of mtime differences of shared files. Those
  aside, rpm -q --qf "[%{filestates:vflags} %{filenames}\n] <args>" now
  performs the same as "rpm -V --nodeps --noscripts <args>"

14 years agoAdd internal helper for formatting verify flags
Panu Matilainen [Fri, 28 May 2010 09:18:26 +0000 (12:18 +0300)]
Add internal helper for formatting verify flags

14 years agoMove shared file timestamp filtering out of rpmVerifyFile()
Panu Matilainen [Fri, 28 May 2010 07:49:58 +0000 (10:49 +0300)]
Move shared file timestamp filtering out of rpmVerifyFile()
- rpmVerifyFile() reports things as they are in reality - if timestamps
  on disk differ to header then it reports it. Filtering on the result
  belongs to the code interpreting the results.

14 years agoDont crash on NULL ts to rpmtsInitIterator()
Panu Matilainen [Fri, 28 May 2010 07:27:01 +0000 (10:27 +0300)]
Dont crash on NULL ts to rpmtsInitIterator()

14 years agoOnly pass the info we actually care about to verifyHeader()
Panu Matilainen [Fri, 28 May 2010 06:57:09 +0000 (09:57 +0300)]
Only pass the info we actually care about to verifyHeader()

14 years agoEliminate unused argument to verifyDependencies()
Panu Matilainen [Fri, 28 May 2010 06:51:51 +0000 (09:51 +0300)]
Eliminate unused argument to verifyDependencies()

14 years agoClean up verify script handling a bit
Panu Matilainen [Fri, 28 May 2010 06:47:47 +0000 (09:47 +0300)]
Clean up verify script handling a bit
- test verifyscript existence in rpmVerifyScript() instead of caller,
  making it safe+correct for calling on any header
- eliminate unused/unnecessary arguments, local variables and bogus leftover
  comments

14 years agoHandle test-transaction centrally on entry to psm
Panu Matilainen [Wed, 26 May 2010 10:25:39 +0000 (13:25 +0300)]
Handle test-transaction centrally on entry to psm
- psm in test-mode is a no-op anyway, so dont bother at all with it
- also removes the need to check for test mode on pre/posttrans scripts,
  these are now fully covered by psm too

14 years agoEliminate rpmts from the scriptlet machinery
Panu Matilainen [Wed, 26 May 2010 08:30:15 +0000 (11:30 +0300)]
Eliminate rpmts from the scriptlet machinery
- pass scriptFd and selinux enabled status as arguments from psm level
- selinux status could be queried directly with is_selinux_enabled()
  but that's a fairly expensive call which does all sorts of funny
  things and probably doesn't work at all in the average chroot
- Lua-scripts dont currently honor scriptFd and have no use for selinux
  but pass the info there too as an early step towards supporting
  scriptFd with Lua
- makes rpmScriptRun() even more of an argument monster, some of this
  should probably go into rpmScript struct...

14 years agoSimplify chroot handling wrt scriptlets
Panu Matilainen [Wed, 26 May 2010 07:15:06 +0000 (10:15 +0300)]
Simplify chroot handling wrt scriptlets
- switch root if necessary on entry and exit to psm already, nothing
  inside the psm needs access to outside chroot
- eliminate chroot handling from scriptlet machinery, dealing with
  chroot is a job for higher levels
- Lua scriptlets can change our cwd, always ensure we return to previous
  cwd after executing by saving and restoring the cwd

14 years agoMove scriptlet statistics collection (back) inside psm
Panu Matilainen [Tue, 25 May 2010 12:38:15 +0000 (15:38 +0300)]
Move scriptlet statistics collection (back) inside psm
- removes one rpmts dependency from scriptlets

14 years agoPut the macro evaluation in spec comments back.
Jindrich Novy [Mon, 24 May 2010 07:39:54 +0000 (09:39 +0200)]
Put the macro evaluation in spec comments back.
- '#' at the beginning doesn't need to always represent comment in spec
  but can be part of the embedded bash script (RhBug:594672 - comment 6)

14 years agoMove the lone hashFunctionString() into misc.[ch], eliminate rpmhash.[ch]
Panu Matilainen [Fri, 21 May 2010 12:36:03 +0000 (15:36 +0300)]
Move the lone hashFunctionString() into misc.[ch], eliminate rpmhash.[ch]
- Besides there not being much point in having a separate source + header
  for a small single function, this fixes build on case-insensitive
  systems such as Mac OS X.

14 years agoDo not evaluate macros in spec comments (RhBug:594672)
Jindrich Novy [Fri, 21 May 2010 11:12:02 +0000 (13:12 +0200)]
Do not evaluate macros in spec comments (RhBug:594672)

14 years agoSearch all locale dirs in find-lang.sh, not just those under share/ (#159)
Till Maas [Thu, 20 May 2010 08:35:16 +0000 (11:35 +0300)]
Search all locale dirs in find-lang.sh, not just those under share/ (#159)

14 years agoUse pgpValString() for :pgpsig header formatting (RhBug:587755)
Panu Matilainen [Wed, 19 May 2010 12:33:52 +0000 (15:33 +0300)]
Use pgpValString() for :pgpsig header formatting (RhBug:587755)
- instead of copy-slopping (and forgetting to do so whenever something
  changes) just use the values we know from pgpVals..

14 years agoAdd public pgpValString() function + enum for the various types
Panu Matilainen [Wed, 19 May 2010 12:32:54 +0000 (15:32 +0300)]
Add public pgpValString() function + enum for the various types
- The equivalent used to be possible in 4.4.x era as the value tables
  were all exported, but this way we need to export far less
  and the implementation details stay internal.

14 years agoBury struct pgpValTbl_s definition inside rpmpgp.c
Panu Matilainen [Wed, 19 May 2010 11:59:02 +0000 (14:59 +0300)]
Bury struct pgpValTbl_s definition inside rpmpgp.c
- as all the value tables are static inside rpmpgp.c, exposing this
  is pointless (should've been unexported long time ago)

14 years agoHandle non-existent dependency sets in python (RhBug:593553)
Panu Matilainen [Wed, 19 May 2010 07:12:43 +0000 (10:12 +0300)]
Handle non-existent dependency sets in python (RhBug:593553)
- rpmdsNew() returns NULL if the requested dependency type doesn't
  exist in the header. The C-side API can handle NULL to all rpmds
  "methods" and this is how librpm deals with non-existent sets rather
  than waste memory on for empty ds structures. However the python side
  wasn't expecting NULL for legal requests (but not setting error either)
  and thus blowing up with SystemError exception.
- Raise TypeError on illegal arguments to rpm.ds constructor, and present
  non-existent dependency sets as empty rpm.ds objects to python. This
  lets python callers use iteration over ds items regardless of whether
  the dependency actually exists or not. The alternative of returning
  None (or raising exceptions) would break existing code for no
  particularly good reason.

14 years agoFix return from chroot() on verify (RhBug:590588)
Panu Matilainen [Tue, 18 May 2010 07:39:22 +0000 (10:39 +0300)]
Fix return from chroot() on verify (RhBug:590588)
- a couple of important steps in chroot() in and out sequence missing,
  causing "No such file or directory" whining on return from chroot()
  unless cwd happened to be /

14 years agoMake debugedit -i recompute build ID only when any DWARF was actually changed.
Roland McGrath [Tue, 11 May 2010 03:05:48 +0000 (20:05 -0700)]
Make debugedit -i recompute build ID only when any DWARF was actually changed.

14 years agoWhitespace fixups for tools/debugedit.c
Roland McGrath [Tue, 11 May 2010 00:53:07 +0000 (17:53 -0700)]
Whitespace fixups for tools/debugedit.c

14 years agoPlug dumb memleak in rpmpsMerge()
Panu Matilainen [Fri, 7 May 2010 17:24:01 +0000 (20:24 +0300)]
Plug dumb memleak in rpmpsMerge()

14 years agoFix breakage from removedPackages changing to hash
Panu Matilainen [Fri, 7 May 2010 17:18:58 +0000 (20:18 +0300)]
Fix breakage from removedPackages changing to hash
- tsmem->delta is still needed for tsmem->order reallocation,
  zero delta causes funny effects on larger package sets (test suite
  doesnt trigger this)

14 years agoRevert back to rpmdbRemove() taking instance number instead of actual header
Panu Matilainen [Fri, 7 May 2010 12:25:38 +0000 (15:25 +0300)]
Revert back to rpmdbRemove() taking instance number instead of actual header
- On package reinstall (ie --replacepkgs) we only know the old header
  by the instance number, and grabbing the header from the db in
  psm as a special case for that is more trouble than just doing what
  we always did.
- Reverts commit e16695e932e294ec600e673d38c41bde20931204 and unbreaks
  the --replacepkgs test case

14 years agoConvert rpmte internals to use the transaction pointer from element itself
Panu Matilainen [Fri, 7 May 2010 11:31:25 +0000 (14:31 +0300)]
Convert rpmte internals to use the transaction pointer from element itself

14 years agoStore pointer to transaction set in transaction elements
Panu Matilainen [Fri, 7 May 2010 11:07:39 +0000 (14:07 +0300)]
Store pointer to transaction set in transaction elements
- unused now but allows various new things and more element "independency"
- eliminate the unused dboffset argument while at it

14 years agoFix compiler warning in rpmhash Resize()
Florian Festi [Fri, 7 May 2010 11:06:40 +0000 (13:06 +0200)]
Fix compiler warning in rpmhash Resize()

14 years agoRemove no longer needed function intcmp()
Florian Festi [Thu, 6 May 2010 14:31:53 +0000 (16:31 +0200)]
Remove no longer needed function intcmp()

14 years agoConvert tsmem->removedPackages to a hash table and remove rpmdbPruneIterator from...
Florian Festi [Wed, 5 May 2010 10:49:16 +0000 (12:49 +0200)]
Convert tsmem->removedPackages to a hash table and remove rpmdbPruneIterator from the API

14 years agorpmhash: new Empty() function to remove all entries
Florian Festi [Thu, 6 May 2010 13:30:01 +0000 (15:30 +0200)]
rpmhash: new Empty() function to remove all entries

14 years agorpmhash: Accessor functions for the size and usage
Florian Festi [Wed, 5 May 2010 10:48:41 +0000 (12:48 +0200)]
rpmhash: Accessor functions for the size and usage

14 years agorpmhash: Grow when hash table gets too full
Florian Festi [Thu, 25 Mar 2010 11:06:22 +0000 (12:06 +0100)]
rpmhash: Grow when hash table gets too full

Add some statistics to be able to find out how full the hash is

14 years agoMove header filecount retrieve from addTE() to rpmfsNew()
Panu Matilainen [Thu, 6 May 2010 12:12:41 +0000 (15:12 +0300)]
Move header filecount retrieve from addTE() to rpmfsNew()

14 years agoTolerate NULL in rpmfsFree() and rpmfsFC()
Panu Matilainen [Thu, 6 May 2010 11:55:38 +0000 (14:55 +0300)]
Tolerate NULL in rpmfsFree() and rpmfsFC()
- both are "can't happen" situations but easy to handle cleanly here...

14 years agoMinor cleanup to rpmfsNew()
Panu Matilainen [Thu, 6 May 2010 11:51:48 +0000 (14:51 +0300)]
Minor cleanup to rpmfsNew()
- use xcalloc() to ensure clean state, no need to manually do it all
- group non-conditional and conditional operations together

14 years agoMove delTE() inline to rpmteFree()
Panu Matilainen [Thu, 6 May 2010 11:14:16 +0000 (14:14 +0300)]
Move delTE() inline to rpmteFree()
- no point splitting this up, its just straightforward freeing of stuff
- dont bother with tonne of assigning everything to NULL, it gets
  zeroed out by memset() anyway

14 years agoUnexport rpmteNew() and rpmteFree()
Panu Matilainen [Thu, 6 May 2010 10:20:26 +0000 (13:20 +0300)]
Unexport rpmteNew() and rpmteFree()
- the only meaningful way to create transaction elements is by adding things
  to a transaction through rpmtsAddFooElement(), there's no need to
  expose these and restrict our ability to change the API when needed

14 years agoMinor cleanup to rpmReSign()
Panu Matilainen [Thu, 6 May 2010 09:32:08 +0000 (12:32 +0300)]
Minor cleanup to rpmReSign()
- headerNew() cannot fail, dont bother checking
- initialize variables on declaration

14 years agoFix minor header iterator leak in rpmReSign()
Panu Matilainen [Thu, 6 May 2010 09:28:23 +0000 (12:28 +0300)]
Fix minor header iterator leak in rpmReSign()
- fix dumb double-initialization error introduced somewhere between
  4.4 and 4.6, also while-loop is more natural here than for-loop

14 years agoClean up rpmcliImportPubkeys() a bit, no functional changes
Panu Matilainen [Thu, 6 May 2010 09:16:20 +0000 (12:16 +0300)]
Clean up rpmcliImportPubkeys() a bit, no functional changes
- remove questionable rpmtsClean() call remnants from rpm 4.4.x days
  when it used to clean the signature/digest data in ts but also
  clean a pile of completely unrelated items
- rearrange the error code handling so we can get by with single place
  of freeing the temp allocations
- move local variables to the scope where needed and eliminate unnecessary
  ones
- remove redundant NULL check on argv, this is already done by caller
- remove unused qva argument (static function so no API implications)

14 years agoDon't process desktop files without Type=Application and Exec= line
Pavol Rusnak [Wed, 17 Mar 2010 15:02:46 +0000 (16:02 +0100)]
Don't process desktop files without Type=Application and Exec= line

14 years agoRename python module version symbol to __version__, add __version_info__
Panu Matilainen [Tue, 4 May 2010 06:05:23 +0000 (09:05 +0300)]
Rename python module version symbol to __version__, add __version_info__
- This seems to be a de-facto standard in python land, as rpm.version
  hasn't been in any released version we can still change this easily.
  Suggestion from James Antill.

14 years agoDoh, dont shadow the rpmtsVerifyDB() return value
Panu Matilainen [Thu, 29 Apr 2010 12:47:59 +0000 (15:47 +0300)]
Doh, dont shadow the rpmtsVerifyDB() return value

14 years agoFixes missing __fxstat64 symbol on mac.
Giulio Eulisse [Tue, 20 Apr 2010 09:42:10 +0000 (11:42 +0200)]
Fixes missing __fxstat64 symbol on mac.

14 years agoFix a few uninitialized variable cases found by clang-analyzer
Panu Matilainen [Wed, 28 Apr 2010 09:31:14 +0000 (12:31 +0300)]
Fix a few uninitialized variable cases found by clang-analyzer

14 years agol10n: Updates to Portuguese (Brazilian) (pt_BR) translation
Taylon Silmer [Tue, 27 Apr 2010 18:21:27 +0000 (18:21 +0000)]
l10n: Updates to Portuguese (Brazilian) (pt_BR) translation

New status: 721 messages complete with 1 fuzzy and 0 untranslated.

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

14 years agoProtect rpmtsVerifyDB() with transaction lock
Panu Matilainen [Thu, 22 Apr 2010 10:48:58 +0000 (13:48 +0300)]
Protect rpmtsVerifyDB() with transaction lock
- BDB docs state that db->verify() doesn't perform any locking even
  when used within an environment, and should only be used on files
  that are not being modified by another thread of control. Grabbing
  the transaction lock while verifying mostly ensures nobodys writing
  to the db behind our back.

14 years agoDitch "fcntl_locking" bdb config option
Panu Matilainen [Thu, 22 Apr 2010 09:49:03 +0000 (12:49 +0300)]
Ditch "fcntl_locking" bdb config option
- This is an undocumented BDB interface (only documented in the db.h header),
  and its not something users should be messing around with

14 years agoMake transaction lock path per-transaction
Panu Matilainen [Thu, 22 Apr 2010 09:23:24 +0000 (12:23 +0300)]
Make transaction lock path per-transaction
- Although it doesn't really happen in practise, rpm's API permits several
  transactions with possibly differing roots within process lifetime.
  Previously the lock path was calculated just once globally so we could
  easily be locking in a completely wrong place (eg locking in a previously
  accessed chroot when system rpmdb should be transaction-locked)

14 years agoFurther generalize the rpmlock interface
Panu Matilainen [Thu, 22 Apr 2010 08:01:27 +0000 (11:01 +0300)]
Further generalize the rpmlock interface
- Move transaction lock path handling into rpmts.c, export new low
  level rpmlockAcquire() function to actually grab a lock
- Rename rpmtsFreeLock() to rpmlockFree() and return NULL in the
  general rpm style

14 years agoGeneralize rpmlock_new() by moving transaction lock path calculation out
Panu Matilainen [Thu, 22 Apr 2010 07:44:38 +0000 (10:44 +0300)]
Generalize rpmlock_new() by moving transaction lock path calculation out

14 years agoMake rpmlock type visible inside rpm, use instead of void*
Panu Matilainen [Thu, 22 Apr 2010 07:37:51 +0000 (10:37 +0300)]
Make rpmlock type visible inside rpm, use instead of void*

14 years agoLose the useless header refcounting debug junk
Panu Matilainen [Wed, 21 Apr 2010 10:00:43 +0000 (13:00 +0300)]
Lose the useless header refcounting debug junk
- one more of these still left behind.. pff

14 years agoEliminate unused "known problems" based filtering from rpmtsRun()
Rakesh Pandit [Wed, 14 Apr 2010 11:14:52 +0000 (16:44 +0530)]
Eliminate unused "known problems" based filtering from rpmtsRun()
- This mechanism has never been used by anything at all, which suggests
  its not a particularly useful feature
- Removing unused rpmpsTrim() from rpmps
- Marking okProbs parameter of rpmtsRun() function as unused to avoid
  unnecessary breakage

14 years agorpmdb.c (dbiOpen): fix dbix condition
Alexey Tourbin [Wed, 21 Apr 2010 07:10:15 +0000 (11:10 +0400)]
rpmdb.c (dbiOpen): fix dbix condition

In the loop, dbix is always initialized to 0, so checking (dbix < 0)
is uselss.  Insetead, we sould check (dbix >= dbiTagsMax).

14 years agoOnly check the type of dependency requested in checkInstDeps()
Panu Matilainen [Thu, 15 Apr 2010 07:24:03 +0000 (10:24 +0300)]
Only check the type of dependency requested in checkInstDeps()
- This gets called separately for requires, conflicts and obsoletes,
  wth should it loop over conflicts when looking for requires?

14 years agoAdd a basic reinstall test to test-suite
Panu Matilainen [Wed, 14 Apr 2010 09:24:37 +0000 (12:24 +0300)]
Add a basic reinstall test to test-suite
- this currently fails due to commit e16695e932e294ec600e673d38c41bde20931204,
  on reinstall element header vs db header mismatch, adding this as
  a reminder to fix it...

14 years ago...but make sure the pre-requisite isn't also an erasure-dependency
Panu Matilainen [Wed, 14 Apr 2010 06:22:07 +0000 (09:22 +0300)]
...but make sure the pre-requisite isn't also an erasure-dependency
- fixes eg Requires(pre,postun) case which must not be filtered out here

14 years agoPre-requisites of installed packages dont need to be verified (RhBug:223642)
Panu Matilainen [Wed, 14 Apr 2010 06:05:55 +0000 (09:05 +0300)]
Pre-requisites of installed packages dont need to be verified (RhBug:223642)

14 years agoUpdate a few tag descriptions + visibility
Panu Matilainen [Tue, 13 Apr 2010 05:50:08 +0000 (08:50 +0300)]
Update a few tag descriptions + visibility
- RPMTAG_CAPABILITY and RPMTAG_RHNPLATFORM are truly obsolete and
  should've been taken out a long time ago

14 years agoUse correct tag for NOPATCH
Panu Matilainen [Tue, 13 Apr 2010 05:35:45 +0000 (08:35 +0300)]
Use correct tag for NOPATCH
- dumb copy-paste error from commit a317eaadc3f7b9b4ec373719e7d60fb8b98e2c21

14 years agoRPMTAG_NOSOURCE and NOPATCH aren't internal, they end up in nosrc headers
Panu Matilainen [Tue, 13 Apr 2010 05:32:49 +0000 (08:32 +0300)]
RPMTAG_NOSOURCE and NOPATCH aren't internal, they end up in nosrc headers

14 years agoGnu tar sometimes prints a "tar: Record size = 16" message, breaking
Michael Schroeder [Mon, 12 Apr 2010 10:12:46 +0000 (12:12 +0200)]
Gnu tar sometimes prints a "tar: Record size = 16" message, breaking
rpmbuild -ta.

14 years agoAdapt the Makefile as rpmdb_svc can no longer be built.
Michael Schroeder [Mon, 12 Apr 2010 10:11:56 +0000 (12:11 +0200)]
Adapt the Makefile as rpmdb_svc can no longer be built.

14 years agoNew gcc versions comlpain about undefined behaviour...
Michael Schroeder [Mon, 12 Apr 2010 10:11:05 +0000 (12:11 +0200)]
New gcc versions comlpain about undefined behaviour...

14 years agoreadLineFromOFI may modify the fileStack, thus we have to re-set
Michael Schroeder [Mon, 12 Apr 2010 10:10:20 +0000 (12:10 +0200)]
readLineFromOFI may modify the fileStack, thus we have to re-set
ofi after calling it

14 years agoDo not load keyring if signature checking is disabled.
Michael Schroeder [Mon, 12 Apr 2010 10:09:04 +0000 (12:09 +0200)]
Do not load keyring if signature checking is disabled.

14 years agoSeems like a change was made to make %attr(-) go back to the
Michael Schroeder [Mon, 12 Apr 2010 10:07:01 +0000 (12:07 +0200)]
Seems like a change was made to make %attr(-) go back to the
defattr setting. Unfortunatelly this broke %defattr(-).

14 years agoClean up dbiOpen() a bit
Panu Matilainen [Fri, 9 Apr 2010 13:36:17 +0000 (16:36 +0300)]
Clean up dbiOpen() a bit
- eliminate now redundant rc-condition, move local variables to the
  scope their used in

14 years agoMove environment open "refcounting" to db_init() / db_fini()
Panu Matilainen [Fri, 9 Apr 2010 12:52:29 +0000 (15:52 +0300)]
Move environment open "refcounting" to db_init() / db_fini()

14 years agoAnd now lose db_use_env from rpmdb struct
Panu Matilainen [Fri, 9 Apr 2010 12:06:59 +0000 (15:06 +0300)]
And now lose db_use_env from rpmdb struct
- Environment is always used, shared if possible private otherwise

14 years agoSimplify the dbenv->open() flags shuffle
Panu Matilainen [Fri, 9 Apr 2010 11:53:31 +0000 (14:53 +0300)]
Simplify the dbenv->open() flags shuffle
- We always create an environment. If we dont have permissions to create
  or join a shared environment, we use a private environment. Instead
  of trying to figure out what to do beforehand, retry dbenv->open()
  with different flags to see if it succeeds. This eliminates some
  potential races when others might create/remove the environment
  while we're pondering about appropriate flags.
- Lose the "create" bdb config option, this is something we always
  want to decide internally.
- Remove "force" bdb config option, DB_FORCE is dbenv->remove() option
  and its value clashes with DB_CREATE...

14 years agoMove dbi_use_dbenv from dbi to rpmdb, this is a per-rpmdb setting
Panu Matilainen [Fri, 9 Apr 2010 08:16:37 +0000 (11:16 +0300)]
Move dbi_use_dbenv from dbi to rpmdb, this is a per-rpmdb setting

14 years agoMove dbhome directory create/verify to openDatabase()
Panu Matilainen [Fri, 9 Apr 2010 07:50:32 +0000 (10:50 +0300)]
Move dbhome directory create/verify to openDatabase()
- all db opens must go through openDatabase(), no need to track this
  with a separate variable on each index open

14 years agoEliminate DB_JOINENV usage and config option
Panu Matilainen [Thu, 8 Apr 2010 13:15:16 +0000 (16:15 +0300)]
Eliminate DB_JOINENV usage and config option
- DB_JOINENV is a no-op since BDB >= 4.4

14 years agoEliminate "thread" BDB option
Panu Matilainen [Thu, 8 Apr 2010 13:07:58 +0000 (16:07 +0300)]
Eliminate "thread" BDB option
- this is not something that users should be tweaking
- its never been enabled, leave it that way for now

14 years agoLose redundant dbi_use_env check
Panu Matilainen [Thu, 8 Apr 2010 13:04:37 +0000 (16:04 +0300)]
Lose redundant dbi_use_env check
- its always enabled when we get here, but might get turned off
  in the initialization process (at least for now)

14 years agoA little bit of sanity to dbiNew()
Panu Matilainen [Thu, 8 Apr 2010 13:01:20 +0000 (16:01 +0300)]
A little bit of sanity to dbiNew()
- lose the hysterical dbi_use_env condition and usedbenv option
  this is always enabled
- ensure mpool is always initialized, lose the config option (this
  is a mandatory BDB subsystem, not a bleeping configurable)
- let pagesize be what it is even when no configuration is present
- avoid overriding dbi_mmapsize and dbi_cachesize if set in the configuratio
- these are all per-environment, not per-dbi settings but for now...

14 years agoEliminate exclusive and rdonly BDB configuration options
Panu Matilainen [Thu, 8 Apr 2010 11:39:07 +0000 (14:39 +0300)]
Eliminate exclusive and rdonly BDB configuration options
- we never want DB_CREATE to cause failure - let BDB create the
  db if it needs to, otherwise DB_CREATE doesn't do anything
- rdonly is decided elsewhere, not in bleeping configuration

14 years agoMop up ancient BDB leftovers
Panu Matilainen [Thu, 8 Apr 2010 11:37:51 +0000 (14:37 +0300)]
Mop up ancient BDB leftovers

14 years agoEliminate BDB transaction tuning knobs from configuration
Panu Matilainen [Thu, 8 Apr 2010 11:36:55 +0000 (14:36 +0300)]
Eliminate BDB transaction tuning knobs from configuration
- we dont support transactions yet, and this stuff doesn't
  belong to "user configuration" anyhow, these are just useless