platform/upstream/rpm.git
13 years agoPython bindings dont need our debug.h for anything
Panu Matilainen [Wed, 9 Mar 2011 13:06:11 +0000 (15:06 +0200)]
Python bindings dont need our debug.h for anything

13 years agoVerify some properties of replaced and wrong-colored files (RhBug:528383)
Panu Matilainen [Wed, 9 Mar 2011 08:25:29 +0000 (10:25 +0200)]
Verify some properties of replaced and wrong-colored files (RhBug:528383)
- We can't verify any properties of replaced files, but we can and
  should still see if it exists at all.
- Files skipped due to wrong color are supposed to share some of
  the attributes with the file that got actually installed, such
  as permissions and whether it exists at all. Verify what we can
  instead of silently ignoring.

13 years agoTake file state into account for file dependencies
Panu Matilainen [Wed, 9 Mar 2011 07:39:32 +0000 (09:39 +0200)]
Take file state into account for file dependencies
- Files which are not installed, have been replaced or are of wrong
  color can not actually satisfy a dependency despite what the package's
  file list says.
- This prevents breaking the system despite seemingly correct dependencies
  in some situations, such as on multilib systems where a colored
  files can appear to be shared between primary and secondary architecture
  packages, but only the file from primary arch package is physically
  present, and removing the primary arch package would remove the
  file and silently break any dependencies on such files in practise.
  Similarly replaced files become owned by the replacing package in
  practise, so the original package whose files were replaced can no
  longer satisfy dependency on those files.

13 years agoClean up rpmfcExec()
Jindrich Novy [Wed, 9 Mar 2011 07:16:46 +0000 (08:16 +0100)]
Clean up rpmfcExec()

13 years agoImprove the dependency loop debug message a bit
Panu Matilainen [Tue, 8 Mar 2011 14:20:20 +0000 (16:20 +0200)]
Improve the dependency loop debug message a bit
- Fix one-off in the SCC numbering
- Fix wording to talk about number of external dependencies, not packages
- Show number of members in the SCC

13 years agoPreferred color pkgs should be erased last
Panu Matilainen [Tue, 8 Mar 2011 11:28:32 +0000 (13:28 +0200)]
Preferred color pkgs should be erased last
- On install we need to queue preferred colored pkgs before others
  to account for the way colored files get laid on disk. On erase,
  we need to revert this for the same reason. Most of the time
  dependencies take care of this, but the queue placement matters in
  cases such as RhBug:680261 where the order is not dependency-driven.

13 years agoClean up rpmgiGlobArgv() a bit
Panu Matilainen [Mon, 7 Mar 2011 07:03:04 +0000 (09:03 +0200)]
Clean up rpmgiGlobArgv() a bit
- Check for NULL early once to avoid having to deal with it later
- Check for rpmGlob() return code and only append on success
- Count args centrally on exit

13 years agoMake peace with autoconf-2.68
Panu Matilainen [Fri, 4 Mar 2011 16:34:01 +0000 (18:34 +0200)]
Make peace with autoconf-2.68

13 years agoMerge branch 'master' of ssh://rpm.org/srv/projects/rpm/git/rpm
Panu Matilainen [Fri, 4 Mar 2011 16:21:29 +0000 (18:21 +0200)]
Merge branch 'master' of ssh://rpm.org/srv/projects/rpm/git/rpm

13 years agoRemove unused return code variable
Panu Matilainen [Fri, 4 Mar 2011 14:00:29 +0000 (16:00 +0200)]
Remove unused return code variable
- The return codes from these iteratator functions aren't interesting
  in this context, don't bother saving them either.

13 years agoDon't bother storing irrelevant return codes
Panu Matilainen [Fri, 4 Mar 2011 13:51:16 +0000 (15:51 +0200)]
Don't bother storing irrelevant return codes
- PSM_NOTIFY doesn't return anything of interest, rpmdbSetIteratorRE()
  doesn't return errors for RPMMIRE_STRCMP and Fclose() errors we
  just can't do anything about (and we were throwing all these
  away anyhow)

13 years agoRemove unused variable in debugedit
Panu Matilainen [Fri, 4 Mar 2011 12:50:30 +0000 (14:50 +0200)]
Remove unused variable in debugedit

13 years agoDon't bother checking for rasprintf() return codes in rpmProblemString()
Panu Matilainen [Fri, 4 Mar 2011 12:42:38 +0000 (14:42 +0200)]
Don't bother checking for rasprintf() return codes in rpmProblemString()
- We dont check them elsewhere either and there's little that could
  actually fail here

13 years agoThrow an exception from Fseek() errors in python rpmfd.seek()
Panu Matilainen [Fri, 4 Mar 2011 12:33:35 +0000 (14:33 +0200)]
Throw an exception from Fseek() errors in python rpmfd.seek()

13 years agoYet remove some unused variables to suppress warnings
Jindrich Novy [Fri, 4 Mar 2011 12:34:29 +0000 (13:34 +0100)]
Yet remove some unused variables to suppress warnings

13 years agoRemove unused return code variable
Panu Matilainen [Fri, 4 Mar 2011 11:49:16 +0000 (13:49 +0200)]
Remove unused return code variable
- rpmdsRpmlib() can return errors but not really applicaple here

13 years agoRemove pointless return code from handleInstInstalledFiles()
Panu Matilainen [Fri, 4 Mar 2011 11:46:06 +0000 (13:46 +0200)]
Remove pointless return code from handleInstInstalledFiles()
- There are no errors to return here... so it might as well be void

13 years agoRemove unused return code variable
Panu Matilainen [Fri, 4 Mar 2011 11:38:34 +0000 (13:38 +0200)]
Remove unused return code variable
- None of the error exits from rpmdbSetIteratorRE() apply to the
  use in rpmtsInitIterator() so there's no point storing or checking
  its return

13 years agoEliminate unused variable
Panu Matilainen [Fri, 4 Mar 2011 11:27:15 +0000 (13:27 +0200)]
Eliminate unused variable
- We're not expecting anything in return from rpmtsNotify() in
  fsm either, so just ignore the returns...

13 years agoEliminate unused variables
Panu Matilainen [Fri, 4 Mar 2011 11:24:38 +0000 (13:24 +0200)]
Eliminate unused variables
- We're not expecting anything in return from rpmtsNotify() in psm,
  so just ignore the returns...

13 years agoEliminate pointless xx unused error code variable in rpmShowRC()
Panu Matilainen [Fri, 4 Mar 2011 11:11:22 +0000 (13:11 +0200)]
Eliminate pointless xx unused error code variable in rpmShowRC()
- An error here from rpmdsRpmlib() would be very much a "can't happen"
  situtation, and there's no point handling it in any special way,
  the loop will silently fall through anyway.

13 years agoReturn error codes from rpmdsRpmlib()
Panu Matilainen [Fri, 4 Mar 2011 11:08:17 +0000 (13:08 +0200)]
Return error codes from rpmdsRpmlib()
- It can fail with eg NULL dsp passed, might as well return something
  which also silences gcc

13 years agoMake rpmspecQuery() return match the description
Panu Matilainen [Fri, 4 Mar 2011 10:51:32 +0000 (12:51 +0200)]
Make rpmspecQuery() return match the description
- It's supposed to return the number of errors, instead of silently
  ignoring errors from qva->qva_showPackage() to unused variable,
  count them. That qva->qva_showPackage() currently never returns
  errors is another story...

13 years agoRemove unused xx error code variable
Panu Matilainen [Fri, 4 Mar 2011 10:45:06 +0000 (12:45 +0200)]
Remove unused xx error code variable
- headerDel() only fails if the tag doesn't exist in the header, which
  is not an error here. Nor could we return an error if it was...

13 years agoRemove unused nowtm variable
Panu Matilainen [Fri, 4 Mar 2011 10:32:49 +0000 (12:32 +0200)]
Remove unused nowtm variable

13 years agoEliminate popt wtf'ery in rpmcliInit()
Panu Matilainen [Fri, 4 Mar 2011 09:33:24 +0000 (11:33 +0200)]
Eliminate popt wtf'ery in rpmcliInit()
- In order to get inside the loop, rc has to be non-zero so the
  switch-case is just very very pointless (the whole check seems
  dubious but .. shrug)
- Remove unused optArg - if we don't look at it then no point
  retrieving it either

13 years agoActually propagare failure when addOrAppendListEntry() fails,
Jindrich Novy [Fri, 4 Mar 2011 04:38:32 +0000 (05:38 +0100)]
Actually propagare failure when addOrAppendListEntry() fails,
add missing headerGet() check.

13 years agoDefine variables in processBinaryPolicies() only if they are needed
Jindrich Novy [Fri, 4 Mar 2011 03:56:26 +0000 (04:56 +0100)]
Define variables in processBinaryPolicies() only if they are needed

13 years agoAdd missing exit status check for waitpid() while executing scriptlets
Jindrich Novy [Fri, 4 Mar 2011 03:43:32 +0000 (04:43 +0100)]
Add missing exit status check for waitpid() while executing scriptlets

13 years agoRemove leftover error case from the nineties
Panu Matilainen [Thu, 3 Mar 2011 16:50:52 +0000 (18:50 +0200)]
Remove leftover error case from the nineties
- rpmtsAddInstallElement() doesn't check for rpmlib() dependencies
  or anything like that, nor does it return 2 ever (anymore)

13 years agoEliminate unused-but-set warning from gcc on hashes without datatype
Panu Matilainen [Thu, 3 Mar 2011 15:44:28 +0000 (17:44 +0200)]
Eliminate unused-but-set warning from gcc on hashes without datatype
- b_addr is unused if HTDATATYPE isn't defined, more ifdef's yay
- Initialize the local variables on declaration to save one ifdef

13 years agoEliminate useless 'I dont care about the return code' variables in tagnames
Panu Matilainen [Thu, 3 Mar 2011 14:20:34 +0000 (16:20 +0200)]
Eliminate useless 'I dont care about the return code' variables in tagnames

13 years agoEliminate unused variable + calculations in pgpPubkeyFingerprint()
Panu Matilainen [Thu, 3 Mar 2011 13:32:24 +0000 (15:32 +0200)]
Eliminate unused variable + calculations in pgpPubkeyFingerprint()

13 years agoFix uninitialized variable in fsm
Tero Aho [Wed, 2 Mar 2011 06:43:46 +0000 (08:43 +0200)]
Fix uninitialized variable in fsm

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
13 years agoSilence error callback during from BDB during environment open
Panu Matilainen [Wed, 2 Mar 2011 06:28:35 +0000 (08:28 +0200)]
Silence error callback during from BDB during environment open
- EACCES from actually opening the environment is returned only
  through dbenv->open() return code, but annoyingly the EACCESS
  from trying to create a missing environment is "leaked" to the
  errcall, causing pesky "permission denied" errors for regular users
  if the environment doesn't (yet) exist. Enable errcall in time
  for dbenv->failchk() though to get all the details if something
  goes wrong there.

13 years agoTag reservation for MeeGo's security framework (from Tero Aho)
Panu Matilainen [Tue, 1 Mar 2011 10:10:23 +0000 (12:10 +0200)]
Tag reservation for MeeGo's security framework (from Tero Aho)
- As per http://lists.rpm.org/pipermail/rpm-maint/2011-January/002988.html,
  reserving the MSSF tags (but marked unimplemented for now)

13 years agoMention %bcond_with* in conditional build doc.
Ville Skyttä [Fri, 18 Feb 2011 20:12:43 +0000 (22:12 +0200)]
Mention %bcond_with* in conditional build doc.

13 years agoMan page syntax fixes.
Ville Skyttä [Tue, 22 Feb 2011 20:07:18 +0000 (22:07 +0200)]
Man page syntax fixes.

13 years agoDocumentation spelling fixes.
Ville Skyttä [Fri, 18 Feb 2011 20:22:07 +0000 (22:22 +0200)]
Documentation spelling fixes.

13 years agoFix db cursor double-open, causing yum to hang on reinstall (RhBug:678644)
Panu Matilainen [Mon, 21 Feb 2011 08:55:02 +0000 (10:55 +0200)]
Fix db cursor double-open, causing yum to hang on reinstall (RhBug:678644)
- A refactoring error in commit 475391dc581bf5ba72b6d59d16d875505b45bd51
  causes us to open a double cursor on the Package db. This doesn't
  seem to affect much in rpm context, but Yum is being naughty and holding
  two different handles to the same db simultaneously, which causes
  to deadlock on trying to lock the same record twice from two different
  handles .. or something to that effect.

13 years agoFix braindamage in the depgen helper collector loop (RhBug:675002)
Panu Matilainen [Mon, 21 Feb 2011 06:47:52 +0000 (08:47 +0200)]
Fix braindamage in the depgen helper collector loop (RhBug:675002)
- Read any remaining data before exiting on SIGCHLD
- Only perform one read() per loop, otherwise it could block
- Handle EINTR while read()'ing

13 years agoAllow both string + unicode in python addInstall() / addErase()
Panu Matilainen [Sun, 20 Feb 2011 20:33:47 +0000 (22:33 +0200)]
Allow both string + unicode in python addInstall() / addErase()

13 years agoAllow installation of self-conflicting packages (ticket #806, RhBug:651951)
Panu Matilainen [Tue, 15 Feb 2011 13:07:02 +0000 (15:07 +0200)]
Allow installation of self-conflicting packages (ticket #806, RhBug:651951)
- Besides fixing the stupid situation where we happily create package(s)
  that can under no circumstances be installed, this makes it possible
  to create "singleton" packages which can be useful in some cases, eg
  http://lists.rpm.org/pipermail/rpm-maint/2010-April/002719.html

13 years agoFix corner-case behavior on dependency matching when release not present
Michael Schroeder [Tue, 15 Feb 2011 12:55:55 +0000 (14:55 +0200)]
Fix corner-case behavior on dependency matching when release not present
- The idea behind the patch is that a missing release is handled
  as "all/any release". Nothing changes for "foo < 1.2" or
  "foo > 1.2", it still just compares the version. But "foo = 1.2"
  means "everything with version 1.2". Thus, any match against
  a package with version "1.2" a any non-empty release must
  return true.
- Update test-suite expectations to the new behavior.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
13 years agoAllow uncompressed payload in packages
Michael Schroeder [Tue, 15 Feb 2011 12:39:29 +0000 (14:39 +0200)]
Allow uncompressed payload in packages
- An example of a package where uncompressed payload is useful is
  out "installation-images" package. It's a meta package that is
  not shipped to customers, but used for image creation purposes.
  Compression just slows down the build process.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
13 years agoImport the C-level ts python object as TransactionSetCore
Panu Matilainen [Tue, 15 Feb 2011 11:49:44 +0000 (13:49 +0200)]
Import the C-level ts python object as TransactionSetCore
- The previous _rpmts name suggests its some scary internal stuff
  that shouldn't be used when that's not the case, it's just a
  lower level interface to the same thing.

13 years agoAvoid emitting empty perl() module deps.
Ville Skyttä [Sat, 12 Feb 2011 10:24:50 +0000 (12:24 +0200)]
Avoid emitting empty perl() module deps.

Test case from DOM.pm (perl-CSS-DOM 0.13):

use   # to keep CPANTS happy :-)
   strict;
use   # same here
   warnings;

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
13 years agoCallback argument mismatch from previous commit, meh
Panu Matilainen [Mon, 7 Feb 2011 10:28:30 +0000 (12:28 +0200)]
Callback argument mismatch from previous commit, meh

13 years agoAdd + use a db error callback function
Panu Matilainen [Mon, 7 Feb 2011 08:43:03 +0000 (10:43 +0200)]
Add + use a db error callback function
- Commit 7309f7498134f7b62f27624a4cdb91e1c6b82578 caused loss of
  some BDB error messages due misreading the docs: we used to explicitly
  set errfile to stderr through some hoops, and errcall to what
  always was NULL. But calling set_errcall() disables any output to
  the db errfile, and since we're no longer calling errfile...
- Removing the set_errcall() would restore output on stderr, but
  making it go through rpmlog() seems more consistent and lets
  API users catch it through rpmlog callback (in theory at least)

13 years agoFix segfault when building more than one rpm (RhBug:675565)
Panu Matilainen [Mon, 7 Feb 2011 07:15:29 +0000 (09:15 +0200)]
Fix segfault when building more than one rpm (RhBug:675565)
- Remember to set the static string cache pointer to NULL on free, duh

13 years agoAdjust OCaml detection rule for libmagic 5.04 -> 5.05 string change
Panu Matilainen [Sun, 6 Feb 2011 07:57:03 +0000 (09:57 +0200)]
Adjust OCaml detection rule for libmagic 5.04 -> 5.05 string change

13 years agoMark the identical signature warning as translatable
Panu Matilainen [Mon, 31 Jan 2011 11:01:26 +0000 (13:01 +0200)]
Mark the identical signature warning as translatable

13 years agoArgh, yet more mono dependency generation braindamage
Panu Matilainen [Mon, 31 Jan 2011 08:14:57 +0000 (10:14 +0200)]
Argh, yet more mono dependency generation braindamage
- Unlike some other scripts, mono-find-foo do not have .sh suffix, meh

13 years agoEww, mono rules both buggy AND missing from tarballs, doh.
Panu Matilainen [Mon, 31 Jan 2011 07:21:32 +0000 (09:21 +0200)]
Eww, mono rules both buggy AND missing from tarballs, doh.

13 years agoComment spelling fix.
Ville Skyttä [Sun, 23 Jan 2011 20:35:24 +0000 (22:35 +0200)]
Comment spelling fix.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
13 years agoAdd an error message + comments on open(".") behavior (RhBug:672576)
Panu Matilainen [Fri, 28 Jan 2011 11:15:09 +0000 (13:15 +0200)]
Add an error message + comments on open(".") behavior (RhBug:672576)
- Bail out early and complain if current directory can't be open()'ed,
  as we'll need it for reliable cwd restoration after running Lua
  scripts.
- Technically we'd only need open(".") succeeding for chroot operations
  and running Lua-scripts, but there's no easy way to determine whether
  a transaction will run Lua-scripts. They could be in-db triggers
  which will only be evaluated in the middle of transaction, better
  to fail early for consistent behavior.

13 years agoTeach rpm about post-transaction dependencies
Panu Matilainen [Tue, 25 Jan 2011 13:27:28 +0000 (15:27 +0200)]
Teach rpm about post-transaction dependencies
- %posttrans dependencies have their own peculiar semantics, they're
  install-only dependencies which have no implications on ordering.

13 years agoDon't try to remove existing environment when using private environment
Panu Matilainen [Fri, 21 Jan 2011 13:20:01 +0000 (15:20 +0200)]
Don't try to remove existing environment when using private environment

13 years agoPlug potential division by zero in the rpmdb size calculation (RhBug:671056)
Panu Matilainen [Fri, 21 Jan 2011 12:02:28 +0000 (14:02 +0200)]
Plug potential division by zero in the rpmdb size calculation (RhBug:671056)
- This smells like treating the symptom instead of the disease, add
  a reminder comment to figure out what's going on here...

13 years agoFix rpmdb index match iteration termination with NULL keyp (#671149)
Panu Matilainen [Fri, 21 Jan 2011 11:52:17 +0000 (13:52 +0200)]
Fix rpmdb index match iteration termination with NULL keyp (#671149)
- When iterating secondary indexes with NULL keyp, the last entry
  was being returned twice as dbiAppendSet() would get called
  even when dbiGet() returned non-zero.

13 years agoAvoid automatic index generation on db rebuild
Panu Matilainen [Fri, 21 Jan 2011 11:43:12 +0000 (13:43 +0200)]
Avoid automatic index generation on db rebuild
- The rebuild walks through it all anyway, calling buildIndexes()
  while in middle of db rebuild ends up in first header added
  twice to indexes

13 years agoFix python documentation wrt dbIndex()
Panu Matilainen [Fri, 21 Jan 2011 11:41:02 +0000 (13:41 +0200)]
Fix python documentation wrt dbIndex()

13 years agoRestore default SIGPIPE handling for build scriptlets (RhBug:651463)
Panu Matilainen [Fri, 21 Jan 2011 07:57:36 +0000 (09:57 +0200)]
Restore default SIGPIPE handling for build scriptlets (RhBug:651463)

13 years agoPermit queries from rpmdb on read-only media (RhBug:671200)
Panu Matilainen [Fri, 21 Jan 2011 07:32:58 +0000 (09:32 +0200)]
Permit queries from rpmdb on read-only media (RhBug:671200)

13 years agoAdd switch to allow printing only soname dependencies to elfdeps helper
Panu Matilainen [Thu, 13 Jan 2011 08:14:25 +0000 (10:14 +0200)]
Add switch to allow printing only soname dependencies to elfdeps helper

13 years agoFix rpmsign --key-id popt alias typo
Panu Matilainen [Mon, 10 Jan 2011 12:09:57 +0000 (14:09 +0200)]
Fix rpmsign --key-id popt alias typo

13 years agoHonor --root in rpmkeys too
Panu Matilainen [Fri, 7 Jan 2011 10:06:37 +0000 (12:06 +0200)]
Honor --root in rpmkeys too

13 years agoHide --verifydb switch again
Panu Matilainen [Wed, 5 Jan 2011 13:22:00 +0000 (15:22 +0200)]
Hide --verifydb switch again
- It got exposed in the rpmdb tool splitup, but the functionality in
  it's current form is still just as dubious as it always was, hide
  it out of sight again.

13 years agoTweak up BDB flags to avoid breakage from --verifydb
Panu Matilainen [Wed, 5 Jan 2011 11:26:11 +0000 (13:26 +0200)]
Tweak up BDB flags to avoid breakage from --verifydb
- db->verify() has semantics unlike anything else in BDB and does
  strange things to a shared environment (causes persistent ENOMEM
  failures in the environment after a couple of attemps). Use a private
  environment and no CDB when verifying.
- The whole --verifydb is rather useless, perhaps the better option
  would be deleting the lot...

13 years agoUpdate translations yet again to pick up string removals
Panu Matilainen [Wed, 5 Jan 2011 08:10:10 +0000 (10:10 +0200)]
Update translations yet again to pick up string removals

13 years agoA largish man-page update
Panu Matilainen [Wed, 5 Jan 2011 08:05:33 +0000 (10:05 +0200)]
A largish man-page update
- Remove rpmquery and rpmverify manuals for now, the functionality
  didn't get split to separate binaries afterall and the manpages
  were in a rather bad shape afterall.
- Add some missing options, remove no longer existing options
- Remove rpmdb, rpmkeys, rpmsign and rpmspec related switches from
  man rpm manual, add them to the "see also"-section instead
- Adjust database file list on main rpm manual, remove it from rpmbuild man.

13 years agoBump up default BDB cache- and allowed mmap size considerably
Panu Matilainen [Mon, 3 Jan 2011 13:49:50 +0000 (15:49 +0200)]
Bump up default BDB cache- and allowed mmap size considerably
- The former defaults come from nearly a decade ago, things have
  changed a bit since then... Even BDB's own default cache size is
  much larger (8MB) now than what we've been setting.
- Using 64MB cache improves cache hit rate (and performance) massively.
  Last-gasp default to roughly BDB's own current defaults, higher
  settings in the default macro setup.

13 years agoRequire %files section for package generation again
Panu Matilainen [Thu, 23 Dec 2010 07:24:25 +0000 (09:24 +0200)]
Require %files section for package generation again
- Turns out this change does more harm than good, people are actually
  relying on this behavior to avoid zillion conditionals in the spec.
  We'll want a saner way to conditionally disable/enable packages
  but until we have that, revert to the former longstanding behavior.
- This effectively reverts commit d010ec1c9026b35f5b2521be965c03c826894ce8

13 years agoOnly sepolicy-plugin needs linking to libsemanage
Panu Matilainen [Wed, 22 Dec 2010 12:58:11 +0000 (14:58 +0200)]
Only sepolicy-plugin needs linking to libsemanage

13 years agoMake rpmplugins.h private for now
Panu Matilainen [Wed, 22 Dec 2010 11:11:40 +0000 (13:11 +0200)]
Make rpmplugins.h private for now
- We'll probably want to make some changes to the plugin type system
  before considered "ready", the current plugin slots are limited
  to 32 and Meego folks apparently want to use a largish number
  of slots. So we might want something like separate plugin type
  (collection, security... etc) and then have 32 slots per each type.
  Making this private for now to avoid having to potentially break
  the API shortly after introduction.

13 years agoMove rpmtsSELabelFoo() functions to an internal-only header
Panu Matilainen [Tue, 21 Dec 2010 09:01:22 +0000 (11:01 +0200)]
Move rpmtsSELabelFoo() functions to an internal-only header
- The sepolicy plugin needs them so the symbols can't be hidden, but
  these are not something external API-users should be messing with.
- Ultimately we'll want to push the actual labeling from FSM to
  the plugin, insulating rpm from all SELinux specifics, this is
  just a band-aid temporary "solution" to keep this out of the API.

13 years agoFree up a bunch of bits from rpmtransFlags_e
Panu Matilainen [Mon, 20 Dec 2010 10:10:21 +0000 (12:10 +0200)]
Free up a bunch of bits from rpmtransFlags_e
- With all this unused junk gone from the bitfield, we suddenly
  have plenty of bits to play with...
- Preserving the symbols, just defined to 0, to avoid unnecessarily
  breaking compilation of stuff that refers to the old
  unused/unimplemented flags

13 years agoMark two more unused rpmts flags as such
Panu Matilainen [Mon, 20 Dec 2010 09:58:44 +0000 (11:58 +0200)]
Mark two more unused rpmts flags as such

13 years agoRip the remains of --aid and --nosuggest, except for the callback
Panu Matilainen [Mon, 20 Dec 2010 09:50:30 +0000 (11:50 +0200)]
Rip the remains of --aid and --nosuggest, except for the callback
- Only thing ever using RPMTRANS_FLAG_ADDINDEPS and _NOSUGGEST was
  rpm itself, and we haven't had an in-rpm implementation for this
  since the broken "rpmdb as repo format" was ripped out in 4.6.0.
  We dont need these special flags to support the operation anyway,
  IF somebody sets the solve callback, it will be used and the one
  implementing the callback gets to deal with whether those bits
  should be added to transaction or not.

13 years agoRip the stillborn, broken apply/commit transaction goo
Panu Matilainen [Mon, 20 Dec 2010 09:38:21 +0000 (11:38 +0200)]
Rip the stillborn, broken apply/commit transaction goo
- This was beginnings of something ten years ago, and that something
  was long since abandoned. These never did anything useful
  that --justdb/--noscripts wouldn't do.

13 years agoYet another pile of depmatch tests + added commentary
Panu Matilainen [Fri, 17 Dec 2010 09:00:41 +0000 (11:00 +0200)]
Yet another pile of depmatch tests + added commentary

13 years agoAdd pile of further dependency match testcases
Panu Matilainen [Fri, 17 Dec 2010 07:19:48 +0000 (09:19 +0200)]
Add pile of further dependency match testcases
- Test for provide ranges, versionless dependencies and different names
- Tabify the test-table for readability + editability

13 years agoAdd a pile of dependency matching tests for "obvious" cases
Panu Matilainen [Thu, 16 Dec 2010 15:39:00 +0000 (17:39 +0200)]
Add a pile of dependency matching tests for "obvious" cases

13 years agoMove python test-suite macros to local.at, rename
Panu Matilainen [Thu, 16 Dec 2010 15:18:21 +0000 (17:18 +0200)]
Move python test-suite macros to local.at, rename
- We'll want to use these in other test parts than just python. Make
  available everywhere and use "namespace" to avoid potential future
  clashes.

13 years agoPermit comparison operator strings (<, >= etc) in python ds constructor
Panu Matilainen [Thu, 16 Dec 2010 12:11:25 +0000 (14:11 +0200)]
Permit comparison operator strings (<, >= etc) in python ds constructor
- Creating ('foo', '>=', '1.2') dependency is much nicer than
  or'ing rpm.RPMSENSE_FOO for flags. Allow (but validate) the string
  usage, ints get passed as is.

13 years agoUnbreak file user/groupname handling in build
Panu Matilainen [Thu, 16 Dec 2010 07:35:08 +0000 (09:35 +0200)]
Unbreak file user/groupname handling in build
- Fixes regression from commit a2d002a34bc567e8ce88c9ed30270d55d7c904fd,
  the librpmbuild "name cache" was used for unique string storage too
  and not just user/group-info lookup cache, duh.
- At least for now, making this separation explicit in the code
  by separating the "stash this string" operation from the actual
  user/group lookups.

13 years agoAdd a "unique string cache" to rpmug
Panu Matilainen [Thu, 16 Dec 2010 07:31:20 +0000 (09:31 +0200)]
Add a "unique string cache" to rpmug
- Used for storing unique strings just once

13 years agoSupport GetEntry() for hashes without datatype too
Panu Matilainen [Thu, 16 Dec 2010 07:28:34 +0000 (09:28 +0200)]
Support GetEntry() for hashes without datatype too

13 years agoEliminate ancient dependency loop whiteout mechanism
Panu Matilainen [Wed, 15 Dec 2010 09:34:50 +0000 (11:34 +0200)]
Eliminate ancient dependency loop whiteout mechanism
- Nobody has been relying on this for ages, and with the new ordering
  code since rpm 4.8.x loops are handled much more gracefully than
  before. RIP.

13 years agoUpdate translations to pick up dropped messages
Panu Matilainen [Wed, 15 Dec 2010 07:48:35 +0000 (09:48 +0200)]
Update translations to pick up dropped messages

13 years agoRemove the now unused user/group caching code
Panu Matilainen [Wed, 15 Dec 2010 07:42:03 +0000 (09:42 +0200)]
Remove the now unused user/group caching code

13 years agoUnify the user+group caching between librpm and librpmbuild
Panu Matilainen [Wed, 15 Dec 2010 07:30:56 +0000 (09:30 +0200)]
Unify the user+group caching between librpm and librpmbuild
- The build version has getUidS() and getGidS() for which there is
  no counterpart in the rpmug api but there's not much point to them:
  they check whether the user/groupname exists but return our own
  string back to us even if it doesn't.
- The build version also caches more than current rpmug, but has an ugly
  hardwired limit causing (in theory) errors that can't be nicely
  handled, and is the last piece relying on RPMLOG_CRIT actually
  terminating the process. The librpm version doesn't fail, in the
  worst case its just a bit slower. And that can be fixed anytime by
  making it to use hash tables for caching.

13 years agoSplit user+group caching to separate source (again), rename
Panu Matilainen [Tue, 14 Dec 2010 09:34:34 +0000 (11:34 +0200)]
Split user+group caching to separate source (again), rename
- We'll want to unify this and the similar caching done in librpmbuild,
  so we need to expose these in the ABI at least, rename to get
  them namespaced and use a separate source module (again) as
  this is a pretty distinct functionality.
- This would really belong to librpmio but leaving here for now...

13 years agoRemove hardcoded lock and mail group id's
Panu Matilainen [Tue, 14 Dec 2010 10:51:12 +0000 (12:51 +0200)]
Remove hardcoded lock and mail group id's
- Rpm has no business making assumptions about arbitrary group id's,
  if these are not available through getgrname() when needed,
  that's a packaging problem.

13 years agoCut down the initial db checked hash allocation somewhat
Panu Matilainen [Mon, 13 Dec 2010 12:53:35 +0000 (14:53 +0200)]
Cut down the initial db checked hash allocation somewhat
- The instance numbers are often much much bigger than the number
  of actual packages, and the hash table grows automatically as needed
  so there's no need to over-allocate at the start. Apply some
  (fairly arbitrary) heuristics to limit the initial allocation size.

13 years agoReplace verified header tracking bitfield with a hash table
Panu Matilainen [Mon, 13 Dec 2010 12:23:02 +0000 (14:23 +0200)]
Replace verified header tracking bitfield with a hash table
- No functional changes, but allows getting rid of yet another custom
  (re)allocation scheme + ugly bitfield manipulation macros. Also the
  header instance numbers can be rather sparse, making hash a natural
  fit for the purpose.

13 years agoImplement transaction ordering hinting
Panu Matilainen [Mon, 13 Dec 2010 10:03:18 +0000 (12:03 +0200)]
Implement transaction ordering hinting
- Add support for new "OrderWithRequires: foo" spec syntax
  which has "if and only if foo is present in transaction, order
  the transaction as if this package required foo" semantics.
  While it looks, and in some ways is, a soft dependency, this
  is not the same as recommends/suggests etc: those have unknown
  depsolver policy dependent semantics attached to them, whereas
  ordering hints have a clear definition and is only relevant for rpm
  itself, depsolvers should not even look at the data.
- This allows packages to express correct ordering for optional
  functionality, such as

      %post
      if [ -x %{_bindir}/register-component ]; then
          %{_bindir}/register-component %{name}
      fi

  If the package containing %{_bindir}/register-component is included
  in the same transaction, it makes sense to have it installed before the
  package(s) that use it. But as it is fully optional, Requires would
  not be appropriate. Using OrderWithRequires allows this to be expressed
  without dragging in extraneous dependencies for optional functionality.

13 years agoImplement filtering of autogenerated dependencies
Panu Matilainen [Fri, 10 Dec 2010 14:18:15 +0000 (16:18 +0200)]
Implement filtering of autogenerated dependencies
- This allows both excluding entire paths from dependency generation
  and also excluding individual generated dependencies by regexes
  settable from spec or other configuration.
- %__(provides|requires)_exclude regex controls is matched against
  generated dependencies, %__(provides|requires)_exclude_from is
  matched against the currently processed path, with buildroot
  stripped out.
- We'll probably want some "higher level" macros to go with this,
  but the mechanism is usable as-is already.

13 years agoSome further preliminaries for next bits
Panu Matilainen [Fri, 10 Dec 2010 14:12:06 +0000 (16:12 +0200)]
Some further preliminaries for next bits
- Add a helper function for freeing regex pointers
- Move regMatch() to top of rpmfc.c, we'll need it shortly

13 years agoRefactor the helper execution out of rpmfcHelper()
Panu Matilainen [Fri, 10 Dec 2010 12:14:44 +0000 (14:14 +0200)]
Refactor the helper execution out of rpmfcHelper()
- Split the macro name generation and grabbing of argv-style output
  into yet another helper to reduce the clutter in rpmfcHelper()
  before adding more stuff in there.