tools/librpm-tizen.git
13 years agostrstr() considered harmful, part 541
Panu Matilainen [Tue, 21 Sep 2010 10:14:20 +0000 (13:14 +0300)]
strstr() considered harmful, part 541
- buf isn't const here, it's modified through pointer acquired through
  strstr() which silently casts away the const.

13 years agoUse RPMTAG_NOT_FOUND instead of for "invalid tag" value
Panu Matilainen [Tue, 21 Sep 2010 10:11:56 +0000 (13:11 +0300)]
Use RPMTAG_NOT_FOUND instead of for "invalid tag" value

13 years agoMove RPMTAG_NOT_FOUND into rpmTag enumeration
Panu Matilainen [Tue, 21 Sep 2010 10:02:53 +0000 (13:02 +0300)]
Move RPMTAG_NOT_FOUND into rpmTag enumeration
- Permits presenting "invalid tag" cleanly via the rpmTag enum type
  on function returns etc

13 years agoMove rpmHeaderTagFunc() a bit to avoid unnecessary forward declaration
Panu Matilainen [Tue, 21 Sep 2010 09:49:46 +0000 (12:49 +0300)]
Move  rpmHeaderTagFunc() a bit to avoid unnecessary forward declaration

13 years agoMove format extension table a bit to avoid unnecessary forward declaration
Panu Matilainen [Tue, 21 Sep 2010 09:45:53 +0000 (12:45 +0300)]
Move format extension table a bit to avoid unnecessary forward declaration

13 years agoUse the new tag type/return type getters everywhere
Panu Matilainen [Tue, 21 Sep 2010 09:40:33 +0000 (12:40 +0300)]
Use the new tag type/return type getters everywhere
- Instead of masking and bitfiddling all over the place, use the
  new getters to get the exact (enum) type directly. rpmTagGetType()
  is now unused within rpm but leaving around for backwards compatibility

13 years agoAdd yet more rpmTagTagTagFoo() functions
Panu Matilainen [Tue, 21 Sep 2010 09:30:05 +0000 (12:30 +0300)]
Add yet more rpmTagTagTagFoo() functions
- Two stupid new getters: one for the real tag type, and another
  for the return type. rpmTagGetType() returns both requiring bitmasking
  all over the place

13 years agoSplit tag type and return type to separate fields in tag table
Panu Matilainen [Tue, 21 Sep 2010 09:27:27 +0000 (12:27 +0300)]
Split tag type and return type to separate fields in tag table
- rpmTagType is a pure enum really, avoid mixing it up unnecessarily

13 years agoUse the enum name instead of value when generating the tagtable source
Panu Matilainen [Tue, 21 Sep 2010 09:26:23 +0000 (12:26 +0300)]
Use the enum name instead of value when generating the tagtable source
- This makes the table populated with actual enums instead of the
  numbers they present

13 years agoUse proper types for tag and format extension functions
Panu Matilainen [Tue, 21 Sep 2010 09:23:18 +0000 (12:23 +0300)]
Use proper types for tag and format extension functions
- Stuff the tag prototypes into misc.h in lack of better place
- Actually use the headerTagFooFunction prototypes instead of void *

13 years agoDifferentiate between the possible te types and iterator selector values
Panu Matilainen [Tue, 21 Sep 2010 09:15:44 +0000 (12:15 +0300)]
Differentiate between the possible te types and iterator selector values
- Transaction elements can only be of one type (hence the enum),
  but the transaction set iteration permits selecting more than
  one. Add a new typedef dummy for this purpose only.

13 years agoChange fdstat functions to take fdOpx enum to fix int/enum mismatches
Panu Matilainen [Tue, 21 Sep 2010 09:07:27 +0000 (12:07 +0300)]
Change fdstat functions to take fdOpx enum to fix int/enum mismatches

13 years agoFix up silly int/enum and type vs variable name mixups in urlPath()
Panu Matilainen [Tue, 21 Sep 2010 09:06:24 +0000 (12:06 +0300)]
Fix up silly int/enum and type vs variable name mixups in urlPath()

13 years agoUse actual rpmTags in place of the old HEADER_FOO defines everywhere
Panu Matilainen [Tue, 21 Sep 2010 08:58:08 +0000 (11:58 +0300)]
Use actual rpmTags in place of the old HEADER_FOO defines everywhere

13 years agoRename specdFlags to remove unnecessary type vs variable name confusion
Panu Matilainen [Tue, 21 Sep 2010 08:40:49 +0000 (11:40 +0300)]
Rename specdFlags to remove unnecessary type vs variable name confusion

13 years agoFix up bunch of silly int vs rpmRC return code mismatches
Panu Matilainen [Tue, 21 Sep 2010 08:37:21 +0000 (11:37 +0300)]
Fix up bunch of silly int vs rpmRC return code mismatches

13 years agoStop abusing enum typedefs for bitfield types
Panu Matilainen [Tue, 21 Sep 2010 08:10:14 +0000 (11:10 +0300)]
Stop abusing enum typedefs for bitfield types
- Enums are fine for defining the bitfield flags, but the bitfield
  itself is not an enumeration. Add a separate typedef on "rpmFlags"
  type (presenting a bitfield of flags) for all of these. Compilers
  hardly care, but the typedefs give a nice visual clue for
  us humans using these flags far away from ho^H^H definitions.

13 years agoExpel Tarjan from his nest
Panu Matilainen [Fri, 17 Sep 2010 06:03:34 +0000 (09:03 +0300)]
Expel Tarjan from his nest
- Nested functions are a gcc-extension and very non-portable. Refactor
  to eliminate the nesting by passing the "global" variables via
  a struct from detectSCCs().

13 years agoDont check source packages against installed obsoletes
Panu Matilainen [Wed, 15 Sep 2010 08:54:11 +0000 (11:54 +0300)]
Dont check source packages against installed obsoletes
- Regression originating from somewhere around commit
  781cfed0fd9c9651a2dd49175a85536f0b34b95b, obsoletes from installed
  packages were matched against the package being built.
  Building obsoleted packages needs to be possible, they could be for
  an older distro for example.

13 years agoPlug memleak from rpmSpecCheckDeps()
Panu Matilainen [Tue, 14 Sep 2010 06:44:06 +0000 (09:44 +0300)]
Plug memleak from rpmSpecCheckDeps()
- We need to call rpmtsEmpty(), not rpmtsClean() to purge the
  transaction elements in the set...

13 years agol10n: Updated Spanish (Castilian) (es) translation to 100%
Héctor Daniel Cabrera [Mon, 13 Sep 2010 15:33:00 +0000 (15:33 +0000)]
l10n: Updated Spanish (Castilian) (es) translation to 100%

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

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

13 years agol10n: Updated Portuguese (Brazilian) (pt_BR) translation to 100%
Taylon Silmer [Mon, 13 Sep 2010 13:30:27 +0000 (13:30 +0000)]
l10n: Updated Portuguese (Brazilian) (pt_BR) translation to 100%

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

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

13 years agoReplace dbi walking copy-slop with an internal helper function
Panu Matilainen [Mon, 13 Sep 2010 12:03:18 +0000 (15:03 +0300)]
Replace dbi walking copy-slop with an internal helper function

13 years agoRearrange newRpmdb() a bit for clarity
Panu Matilainen [Mon, 13 Sep 2010 11:16:44 +0000 (14:16 +0300)]
Rearrange newRpmdb() a bit for clarity
- Avoid allocating the structure until we know its ok.

13 years agoEliminate broken "can't happen" early return
Panu Matilainen [Mon, 13 Sep 2010 11:05:02 +0000 (14:05 +0300)]
Eliminate broken "can't happen" early return
- Opening RPMDBI_PACKAGES should indeed never fail, but if it does
  this would return way too early, leaking memory and references
  left and right. Also the dbi is rarely used for anything, only
  the rewrite mode used by markReplacedFiles() needs it, dbi
  is actually unused on dbiCclose()

13 years agoRearrange rpmdbInitIterator() a bit for clarity
Panu Matilainen [Mon, 13 Sep 2010 10:46:15 +0000 (13:46 +0300)]
Rearrange rpmdbInitIterator() a bit for clarity
- Avoid allocating the iterator until we know it's not an error.
  Doing the chaining earlier doesn't help anything here as the
  cursor used here wasn't linked to the mi at this point, and avoids
  having to free up partially initialized structure in case of errors.
- Group the mi initialization to make the actual initialization
  stand out from the (unnecessary) zeroing of the calloc()'ed struct.

13 years agoEliminate all fooUnlink() functions out of the API
Panu Matilainen [Mon, 13 Sep 2010 10:08:33 +0000 (13:08 +0300)]
Eliminate all fooUnlink() functions out of the API
- These are internal helpers only, all refcount users need to use
  fooFree() or similar for correct operation. Add fwd declarations
  where necessary to avoid moving code around unnecessarily.
- We could add these back later as aliases to fooFree() but for now,
  just get them out of the way.

13 years agoUnify header creation between headerNew() and headerLoad()
Panu Matilainen [Mon, 13 Sep 2010 10:06:31 +0000 (13:06 +0300)]
Unify header creation between headerNew() and headerLoad()
- Use internal helper instead of copy-slop code to allocate + init
  the structure

13 years agoFix some broken fooUnlink() usages
Panu Matilainen [Mon, 13 Sep 2010 10:05:55 +0000 (13:05 +0300)]
Fix some broken fooUnlink() usages
- unreferencing should always go through fooFree() which does
  the real refcounting and frees when references go out

13 years agoLift header verifying out of rpmdbNextIterator()
Panu Matilainen [Mon, 13 Sep 2010 08:25:24 +0000 (11:25 +0300)]
Lift header verifying out of rpmdbNextIterator()
- No functional changes, just splicing up the ugly function

13 years agoMinor optimizations on DBT initializations
Panu Matilainen [Mon, 13 Sep 2010 07:44:14 +0000 (10:44 +0300)]
Minor optimizations on DBT initializations
- Move the DBT key+data to local scope where possible, only bother
  zeroing them if they're actually going to be accessed.

13 years ago...and now eliminate the unnecessary pointer variables
Panu Matilainen [Mon, 13 Sep 2010 07:27:42 +0000 (10:27 +0300)]
...and now eliminate the unnecessary pointer variables
- Also check for NULL keyp in rpmdbExtendIterator() early to
  avoid unnecessary zeroing + potential segfault from strlen(NULL)

13 years agoEliminate mi_key and mi_data from match iterator structure
Panu Matilainen [Mon, 13 Sep 2010 07:16:50 +0000 (10:16 +0300)]
Eliminate mi_key and mi_data from match iterator structure
- These are not used to hold iterator state but just for temporary
  storage. Temporary data belongs to temporary variables.
- Assimilate rpmdbGrowIterator() into rpmdbExtendIterator() which
  was just (ab)using mi_key for passing arguments into rpmdbGrowIterator()
  and pass as argument instead.
- Declare local structs + pointers to them for this step to keep changes
  minimal and "obvious"

13 years agoAdd test for manifest query in testsuite
Panu Matilainen [Wed, 8 Sep 2010 10:52:30 +0000 (13:52 +0300)]
Add test for manifest query in testsuite

13 years agoFix _USE_LIBIO test
Panu Matilainen [Wed, 8 Sep 2010 10:41:03 +0000 (13:41 +0300)]
Fix _USE_LIBIO test
- Commit 05b2d979e8097d648f91c773f2535a1f6013cb79 caused the
  _USE_LIBIO test in rpmio.c to always fail as <stdio.h> wasn't included
  yet at the time of the check, causing silent fallback to not
  using libio even if actually available. Which in turn revealed
  funky other little bugs, addressed in commits
  d960e8c18764f7206ad723963f407e960dfb8ad9 and
  be3c34dd15814d70a410b6fd646a2be7de14a1b5. Ptooey.

13 years agoDifferentiate between IO-errors and non-package "error" in rpmgi foo
Panu Matilainen [Wed, 8 Sep 2010 10:31:25 +0000 (13:31 +0300)]
Differentiate between IO-errors and non-package "error" in rpmgi foo
- rpmgiLoadReadHeader() tested errno, but this isn't realiable:
  rpmgiReadHeader() didn't differentiate between IO and other errors
  properly so errno would be tested even when no errors (other than
  not being a header) were present. This could be pretty much whatever
  when no IO errors occurred in rpmgiReadHeader() but the file just
  wasn't a header. With libio errno was typically EBADF, causing the
  remaining code to execute, but without libio this happened to be
  ENOENTRY, causing a silent failure on manifest query.
- This junk needs to die, really.

13 years agoFix rpmReadPackageManifest() on non-fpio FD when libio isn't available
Panu Matilainen [Wed, 8 Sep 2010 10:01:57 +0000 (13:01 +0300)]
Fix rpmReadPackageManifest() on non-fpio FD when libio isn't available
- With libio, fdGetFILE() works on any io-type, but that's not the
  case when libio isn't available. Using fdopen() makes it work
  on both.

13 years agoTurn rpmQueryVerify() into query iterator initializer
Panu Matilainen [Tue, 7 Sep 2010 20:15:08 +0000 (23:15 +0300)]
Turn rpmQueryVerify() into query iterator initializer
- Eliminates quite a bunch of redundant error code return hoop-jumping
  and makes the iterator init + frees nicely paired all together
  inside rpmcliArgIter().

13 years agoLift the remaining oddball case out of rpmQueryVerify()
Panu Matilainen [Tue, 7 Sep 2010 20:04:12 +0000 (23:04 +0300)]
Lift the remaining oddball case out of rpmQueryVerify()
- specfile queries are handled differently from everything else,
  handle the special case in rpmcliArgIter()

13 years agoEliminate qva_mi and qva_gi from rpmQVKArguments
Panu Matilainen [Tue, 7 Sep 2010 19:52:26 +0000 (22:52 +0300)]
Eliminate qva_mi and qva_gi from rpmQVKArguments
- These are internal only stuff and have no business being exported
  in the API. Pass the iterators around in, duh, arguments as needed.

13 years agoEliminate some dozen redundant rpmcliShowMatches() calls
Panu Matilainen [Tue, 7 Sep 2010 19:39:14 +0000 (22:39 +0300)]
Eliminate some dozen redundant rpmcliShowMatches() calls
- Simply call it once at the end, its common for all the cases

13 years agoCut some extra twists from the query maze
Panu Matilainen [Tue, 7 Sep 2010 19:22:25 +0000 (22:22 +0300)]
Cut some extra twists from the query maze
- RPMQV_ALL and RPMQV_RPM do nothing but call rpmcli/giShowMatches()
  in rpmQueryVerify(), call them directly from rpmcliArgIter() instead
- Make iterator allocation + deallocation symmetric: both
  rpmcliArgIter() and rpmQueryVerify() now free what they alloced,
  rpmfooShowMatches() is a weird place for freeing

13 years agoEliminate rpmQueryVerify() from librpm API
Panu Matilainen [Tue, 7 Sep 2010 19:02:53 +0000 (22:02 +0300)]
Eliminate rpmQueryVerify() from librpm API
- This is an inconsistent oddball interface which only works for
  limited query types, "cli" level API users are better off calling
  rpmcliQuery() / rpmcliArgIter() instead

13 years agoUrk, mixed up in branches and wrong stuff getting pushed. Revert.
Panu Matilainen [Wed, 8 Sep 2010 04:48:04 +0000 (07:48 +0300)]
Urk, mixed up in branches and wrong stuff getting pushed. Revert.
- This reverts commits 9ac127c35272772e0fc862608f4bde9748862b3d and
  7abc26e300afd4da71f220db496f813571a37f5a

13 years agoBeat a little bit of sense into rpmQueryVerify()
Panu Matilainen [Tue, 7 Sep 2010 18:32:17 +0000 (21:32 +0300)]
Beat a little bit of sense into rpmQueryVerify()
- Single point of exit, assume failure
- Replace about a dozen rpmcliShowMatches() calls with one at the
  bottom.

13 years agoMark ts argument unused in bunch of query APIs
Panu Matilainen [Tue, 7 Sep 2010 18:13:34 +0000 (21:13 +0300)]
Mark ts argument unused in bunch of query APIs
- The ts argument used to be necessary and used for rpmfiNew() and spec
  query but not any more...

13 years agoEliminate rpmcliShowMatches() from librpm API
Panu Matilainen [Tue, 7 Sep 2010 17:44:59 +0000 (20:44 +0300)]
Eliminate rpmcliShowMatches() from librpm API
- This is really just an internal helper which only even works with
  limited set of queries.

13 years agoAdd bunch of verification tests to the test suite
Panu Matilainen [Tue, 7 Sep 2010 08:14:56 +0000 (11:14 +0300)]
Add bunch of verification tests to the test suite
- Basic tests for dependency, file and verifyscript error + success
  behavior.
- Using lua for verifyscript to avoid issues with empty test-root

13 years agoFix error code on verify scriptlet failure
Panu Matilainen [Tue, 7 Sep 2010 06:49:29 +0000 (09:49 +0300)]
Fix error code on verify scriptlet failure
- Verify scriptlet failures were only logged but didn't reflect error
  codes as they were considered "warn only" along with most others

13 years agol10n: Updated Polish (pl) translation to 100%
Piotr Drąg [Sat, 4 Sep 2010 06:49:44 +0000 (06:49 +0000)]
l10n: Updated Polish (pl) translation to 100%

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

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

13 years agoAnd yet another translation update to pick up stuff moving around
Panu Matilainen [Fri, 3 Sep 2010 14:19:04 +0000 (17:19 +0300)]
And yet another translation update to pick up stuff moving around

13 years agoRip IAM_RPMDB, ie --initdb, --rebuilddb etc modes out of rpmqv.c and librpm
Panu Matilainen [Fri, 3 Sep 2010 13:57:50 +0000 (16:57 +0300)]
Rip IAM_RPMDB, ie --initdb, --rebuilddb etc modes out of rpmqv.c and librpm
- Add popt exec aliases to rpmdb for backwards compatibility
- Change test-suite to use 'rpmdb --initdb' instead of 'rpm --initdb'
  as popt exec aliases with absolute paths dont play very well
  with the test-suite, duh...

13 years agoAdd a brand new rpmdb utility for rpmdb maintenance (dejavu again)
Panu Matilainen [Fri, 3 Sep 2010 13:48:21 +0000 (16:48 +0300)]
Add a brand new rpmdb utility for rpmdb maintenance (dejavu again)
- rpmdb maintenance only requires privileges on the rpmdb directory,
  not elsewhere on the system. Splitting to separate tool allows
  finer grained SELinux policies and makes adding new db-specific
  switches saner.

13 years agoRip IAM_RPMK, ie --import and --checksig modes out of rpmqv.c + librpm
Panu Matilainen [Fri, 3 Sep 2010 13:31:13 +0000 (16:31 +0300)]
Rip IAM_RPMK, ie --import and --checksig modes out of rpmqv.c + librpm
- Add popt exec aliases to rpmkeys for backwards compatibility

13 years agoAdd a brand new rpmkeys utility for keyring operations
Panu Matilainen [Fri, 3 Sep 2010 13:09:47 +0000 (16:09 +0300)]
Add a brand new rpmkeys utility for keyring operations
- Keyring operations (adding/viewing/removing keys and verifying
  packages against a given keyring) are different from main rpm operations
  in that they only need access to the rpm keyring, and no write access
  anywhere else in the system. At the moment the rpm keyring happens
  to be the rpmdb but that's just an implementation detail that is
  likely to change sooner or later. Besides paving way to separating
  the rpm keyring from the rpmdb, splitting this to a small, separate
  utility allows limiting its required access from SELinux POV etc.
- For now, this only implements what's already in rpm: --import and
  --checksig, remaining operations like listing and manipulating
  keyring contents is left as an exercise for another day...

13 years agoFurther simplify rpmcliVerifySignatures()
Panu Matilainen [Fri, 3 Sep 2010 12:57:14 +0000 (15:57 +0300)]
Further simplify rpmcliVerifySignatures()
- Since this is a rpmcliFoo() function, we can assume rpmcliInit()
  is used and the verify disabling bits are set through the common
  rpmcliQueryFlags set, making qva argument unnecessary.

13 years agoUpdate translations again again to pick up changes from recent churn
Panu Matilainen [Fri, 3 Sep 2010 12:18:17 +0000 (15:18 +0300)]
Update translations again again to pick up changes from recent churn

13 years agoPut the rpmLookupSignature() and rpmGetPassPhrase() out of their misery
Panu Matilainen [Fri, 3 Sep 2010 12:08:01 +0000 (15:08 +0300)]
Put the rpmLookupSignature() and rpmGetPassPhrase() out of their misery

13 years agoRrrriiip the addsign/resign/delsign bits out of rpmqv.c + friends
Panu Matilainen [Fri, 3 Sep 2010 12:01:47 +0000 (15:01 +0300)]
Rrrriiip the addsign/resign/delsign bits out of rpmqv.c + friends
- Add popt exec aliases to rpmsign for backwards compatibility (dejavu...)

13 years agoAdd a brand new rpmsign utility for package signing
Panu Matilainen [Fri, 3 Sep 2010 11:40:18 +0000 (14:40 +0300)]
Add a brand new rpmsign utility for package signing
- Signing (and deleting) are different from everything else in rpm
  in that it needs very little of rpm's facilities. For example access
  to the rpmdb is not needed at all. Splitting this to a separate,
  small utility allows various possibilities, like severely limiting
  its access from SELinux POV, control of signature generation with
  cli arguments (the main rpm executable is already overcrowded with
  options). It's also the first step to allow reasonably splitting
  rpm signing to a separate package; not everybody needs to sign
  packages, yet signing support needs to drag in GPG and whatnot.
- Reimplement / refactor various librpm signature generation helpers
  into somewhat saner internal versions.

13 years agoLookup signature type from cli utility already
Panu Matilainen [Fri, 3 Sep 2010 11:03:48 +0000 (14:03 +0300)]
Lookup signature type from cli utility already
- Avoid relying on the murky rpmLookupSignatureType() foobar on
  low API level, pass the wanted tag explicitly from caller
- rpmLookupSignature(), rpmGetPassPhrase() + the bits they rely on
  are now free of users within librpm itself

13 years agorpmcliSign() only creates or deletes signatures
Panu Matilainen [Fri, 3 Sep 2010 09:02:17 +0000 (12:02 +0300)]
rpmcliSign() only creates or deletes signatures
- Lose the "this has got something to do with signatures and stuff"
  dispatcher mode, rpmcliSign() now only does what it says. It also
  doesn't need transaction set for anything. It doesn't need much
  else than files to operate on, what to do and possibly a passphrase.
  It probably will need more when rpmLookupSignatureType()
  is put out of its misery, but this'll do for now.
- Lose the now unnecessary passPhrase member from QVA_t

13 years agoSplit argv loop out of the actual signing function, sanitize args
Panu Matilainen [Fri, 3 Sep 2010 08:35:35 +0000 (11:35 +0300)]
Split argv loop out of the actual signing function, sanitize args
- The signing monster is big enough without extra loops. Also
  signing as such doesn't need any of the QVA foo, just the package,
  whether its adding or deleting and passhprase. Make it so.
- Remove some now unnecessary double cleanup of intermediate target

13 years agoSigning doesn't need transaction set, eliminate the unused argument
Panu Matilainen [Fri, 3 Sep 2010 08:18:27 +0000 (11:18 +0300)]
Signing doesn't need transaction set, eliminate the unused argument

13 years agoSplit package signing out of rpmchecksig.c
Panu Matilainen [Fri, 3 Sep 2010 08:11:55 +0000 (11:11 +0300)]
Split package signing out of rpmchecksig.c
- No functional changes, supposedly

13 years agoUse rpmcliVerifySignatures() directly from rpmqv.c main
Panu Matilainen [Fri, 3 Sep 2010 07:54:09 +0000 (10:54 +0300)]
Use rpmcliVerifySignatures() directly from rpmqv.c main

13 years agoExport the cli-level signature checking as rpmcliVerifySignatures()
Panu Matilainen [Fri, 3 Sep 2010 07:38:38 +0000 (10:38 +0300)]
Export the cli-level signature checking as rpmcliVerifySignatures()
- Signature verification is completely different from package signing,
  another step towards making rpmcliSign() do what it's named after

13 years agoUse rpmcliImportPubkeys() for importing instead of rpmcliSign()
Panu Matilainen [Fri, 3 Sep 2010 07:08:49 +0000 (10:08 +0300)]
Use rpmcliImportPubkeys() for importing instead of rpmcliSign()
- Add some more IamYourDaddy modes to rpmqv.c for now. We'll need to
  add junk to get rid of others, sigh...

13 years agoExport rpmcliImportPubkeys() (again) in the public API
Panu Matilainen [Fri, 3 Sep 2010 06:39:14 +0000 (09:39 +0300)]
Export rpmcliImportPubkeys() (again) in the public API
- Key import is completely different from package signing, first
  step in detaching key import from rpmcliSign()

13 years agoRemove hysterically useless RPMSIGN_NONE + --sign popt leftovers
Panu Matilainen [Fri, 3 Sep 2010 06:28:57 +0000 (09:28 +0300)]
Remove hysterically useless RPMSIGN_NONE + --sign popt leftovers

13 years agoEliminate unused rootdir member from rpmInstallArguments
Panu Matilainen [Fri, 3 Sep 2010 06:01:29 +0000 (09:01 +0300)]
Eliminate unused rootdir member from rpmInstallArguments

13 years agoEliminate unused qva_prefix and qva_verbose from rpmQVKArguments
Panu Matilainen [Fri, 3 Sep 2010 05:59:39 +0000 (08:59 +0300)]
Eliminate unused qva_prefix and qva_verbose from rpmQVKArguments

13 years agoUse the common rpmcliQueryFlags for signature verify options in rpm cli too
Panu Matilainen [Fri, 3 Sep 2010 05:17:57 +0000 (08:17 +0300)]
Use the common rpmcliQueryFlags for signature verify options in rpm cli too
- Technically this changes the rpmcliQuery() and rpmcliVerify() API
  in the sense that we no longer honor the qva->qva_flags for the
  --nosignature and others, but we assume anybody using these (as if
  anybody was using the "cli" API) uses rpmcliInit() which takes
  care of these common bits... shrug.
- Ditch ancient and hidden --nopgp --nogpg switches along with the
  dishwater which are simply alias to --nosignature.
- Eliminate now unused qva_flags from rpmInstallArguments (along with
  a double vsflags goo from rpmgraph)

13 years agoUse the common rpmcliQueryFlags for signature verify options in rpmbuild
Panu Matilainen [Fri, 3 Sep 2010 04:49:37 +0000 (07:49 +0300)]
Use the common rpmcliQueryFlags for signature verify options in rpmbuild
- The various --nosignature etc verification switches are common to
  everything, and have been available through rpmcliQueryFlags via
  the common popt table since 2002. Might as well finally use it
  to limit the amount of duplicate popt goo.

13 years agoPermit passing spec parse flags in python too
Panu Matilainen [Thu, 2 Sep 2010 13:14:46 +0000 (16:14 +0300)]
Permit passing spec parse flags in python too
- The preferred flags default would be RPMSPEC_NONE, but it would break
  compatibility with older rpm versions where rpm.spec() doesn't accept
  flags.

13 years agoAdd an experimental low-level build method to python spec
Panu Matilainen [Thu, 2 Sep 2010 12:21:20 +0000 (15:21 +0300)]
Add an experimental low-level build method to python spec
- This is mostly just a toy for now, but serves as a kind of yardstick
  for what is missing in librpmbuild to be generally useful for
  building stuff.

13 years agoAdd the various spec + build flags to python
Panu Matilainen [Thu, 2 Sep 2010 11:51:51 +0000 (14:51 +0300)]
Add the various spec + build flags to python

13 years agoCosmetics: use an enum instead of #defines for source type bits
Panu Matilainen [Thu, 2 Sep 2010 11:47:33 +0000 (14:47 +0300)]
Cosmetics: use an enum instead of #defines for source type bits

13 years agoClarify RPMBUILD_STRINGBUF comment
Panu Matilainen [Thu, 2 Sep 2010 11:44:02 +0000 (14:44 +0300)]
Clarify RPMBUILD_STRINGBUF comment

13 years agoSwap rpmSpecBuild() arguments for consistency with other APIs
Panu Matilainen [Thu, 2 Sep 2010 11:39:11 +0000 (14:39 +0300)]
Swap rpmSpecBuild() arguments for consistency with other APIs
- What we're building comes first, /how/ we're building comes second
- Update the sole caller, doesn't matter as this is a new interface...

13 years agoUpdate translations again to pick up strings moving around etc
Panu Matilainen [Thu, 2 Sep 2010 11:31:08 +0000 (14:31 +0300)]
Update translations again to pick up strings moving around etc

13 years agoOops, forgot to update POTFILES.in on poptBT.c removal
Panu Matilainen [Thu, 2 Sep 2010 11:30:36 +0000 (14:30 +0300)]
Oops, forgot to update POTFILES.in on poptBT.c removal

13 years agoAdd a new public function for retrieving build dependencies from spec
Panu Matilainen [Thu, 2 Sep 2010 11:25:30 +0000 (14:25 +0300)]
Add a new public function for retrieving build dependencies from spec
- Not needed by rpmbuild itself currently, but permits retrieving the
  build dependency information in a format that's better suited for
  further processing than an rpm problem set.

13 years agoMove build dependency checking from cli tool to librpmbuild
Panu Matilainen [Thu, 2 Sep 2010 11:13:28 +0000 (14:13 +0300)]
Move build dependency checking from cli tool to librpmbuild
- Add new public rpmSpecCheckDeps() function which can be used for
  checking build dependencies of a spec against a transaction set.
- Change checkSpec() in rpmbuild cli to use the new interface
- rpmbuild.c is now free of direct spec structure accesses

13 years agoReturn NULL from rpmtsProblems() if no problems exist
Panu Matilainen [Thu, 2 Sep 2010 11:12:42 +0000 (14:12 +0300)]
Return NULL from rpmtsProblems() if no problems exist
- Avoids callers having to separately test for number of problems
  and freeing when no problems exist

13 years agoCosmetics: update comments + use a specific type for buildAmount
Panu Matilainen [Thu, 2 Sep 2010 11:12:25 +0000 (14:12 +0300)]
Cosmetics: update comments + use a specific type for buildAmount

13 years agoEliminate specFlags from rpmBuildArguments
Panu Matilainen [Thu, 2 Sep 2010 11:08:08 +0000 (14:08 +0300)]
Eliminate specFlags from rpmBuildArguments
- Spec parse flags are specific to parsing a spec, not building it.
  This could be relevant again if a higher level build API is added
  to the library but not ATM.

13 years agoEliminate targets from rpmBuildArguments
Panu Matilainen [Thu, 2 Sep 2010 10:31:44 +0000 (13:31 +0300)]
Eliminate targets from rpmBuildArguments
- Targets are obviously relevant for building but not in the
  context of rpmSpecBuild which expects the environment to be set up
  already. If/when we add a higher level build interface to librpmbuild
  this comes relevant again, until then bury inside the cli-tool.
- Simplify the target parsery by using argvSplit() and friends.

13 years agoEliminate buildMode and buildChar from rpmBuildArguments
Panu Matilainen [Thu, 2 Sep 2010 10:07:01 +0000 (13:07 +0300)]
Eliminate buildMode and buildChar from rpmBuildArguments
- The mode letters are only relevant for the rpmbuild cli tool. If/when
  some of the related build logic is moved from the cli tool to the
  library, we'll need a better way of expressing these combinations
  than letters.

13 years agoEliminate verify flags from rpmBuildArguments
Panu Matilainen [Thu, 2 Sep 2010 09:52:56 +0000 (12:52 +0300)]
Eliminate verify flags from rpmBuildArguments
- Transaction set verification bits are not relevant to building,
  bury inside the rpmbuild cli utility.
- Also the type was wrong, its rpmVerifyFlags, not rpmQueryFlags, duh

13 years agoEliminate noDeps and shortCircuit from rpmBuildArguments struct
Panu Matilainen [Thu, 2 Sep 2010 09:46:21 +0000 (12:46 +0300)]
Eliminate noDeps and shortCircuit from rpmBuildArguments struct
- Both of these are only relevant to the rpmbuild cli utility,
  eg checking for build-requires is up to caller, not librpmbuild.

13 years agoEliminate popt goo from librpmbuild
Panu Matilainen [Thu, 2 Sep 2010 09:26:23 +0000 (12:26 +0300)]
Eliminate popt goo from librpmbuild
- Move the cli-switch manouvering into rpmbuild.c cli utility where
  it belongs.

13 years agoEliminate _noDirTokens from librpmbuild API+ABI
Panu Matilainen [Thu, 2 Sep 2010 09:12:46 +0000 (12:12 +0300)]
Eliminate _noDirTokens from librpmbuild API+ABI
- Add another flag set to control package generation, passing around
  as necessary. Use this to implement --nodirtokens functionality
  in a cleaner manner.

13 years agoEliminate freeNames() from librpmbuild ABI
Panu Matilainen [Thu, 2 Sep 2010 08:19:46 +0000 (11:19 +0300)]
Eliminate freeNames() from librpmbuild ABI
- Call freeNames() at end of buildSpec() instead of requiring API
  users to clean up after us. This does mean losing some of the
  supposed caching advantage when building on more than one spec,
  but hardly matters, one spec at a time is the typical build usage
  anyway.

13 years agoDetect short-circuited build based on executed build steps from buildSpec()
Panu Matilainen [Thu, 2 Sep 2010 08:01:15 +0000 (11:01 +0300)]
Detect short-circuited build based on executed build steps from buildSpec()
- Avoids having to access rpmBTArgs from deep packageBinaries(),
  API changing is not an issue anymore...

13 years agoHandle --nobuild as another buildAmount flag
Panu Matilainen [Thu, 2 Sep 2010 07:23:57 +0000 (10:23 +0300)]
Handle --nobuild as another buildAmount flag

13 years agol10n: Updated Polish (pl) translation to 100%
Piotr Drąg [Wed, 1 Sep 2010 20:07:32 +0000 (20:07 +0000)]
l10n: Updated Polish (pl) translation to 100%

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

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

13 years agoHandle spec flags parse option figuring in popt callback already
Panu Matilainen [Wed, 1 Sep 2010 15:18:10 +0000 (18:18 +0300)]
Handle spec flags parse option figuring in popt callback already

13 years agoHandle --nolang as another spec parse flag
Panu Matilainen [Wed, 1 Sep 2010 15:07:19 +0000 (18:07 +0300)]
Handle --nolang as another spec parse flag

13 years agoCombine spec parsing options into a common flag bitfield
Panu Matilainen [Wed, 1 Sep 2010 15:03:05 +0000 (18:03 +0300)]
Combine spec parsing options into a common flag bitfield