platform/upstream/rpm.git
14 years agoTolerate NULL args in argvSplitString()
Panu Matilainen [Tue, 5 Oct 2010 06:11:13 +0000 (09:11 +0300)]
Tolerate NULL args in argvSplitString()

14 years agoAdd cli switches to override signing key and digest algorithm
Panu Matilainen [Mon, 4 Oct 2010 13:04:47 +0000 (16:04 +0300)]
Add cli switches to override signing key and digest algorithm

14 years agoAdjust rpm.pc private libraries
Panu Matilainen [Mon, 4 Oct 2010 11:35:08 +0000 (14:35 +0300)]
Adjust rpm.pc private libraries
- we no longer have sqlite3 lib ever, but we might have lzma/xz libs

14 years agoFurther streamline rpmcliArgIter() and friends
Panu Matilainen [Mon, 4 Oct 2010 11:02:53 +0000 (14:02 +0300)]
Further streamline rpmcliArgIter() and friends
- Turn applyFilters() into match iterator initializer which optionally
  applies filters if present
- Handle NULL iterator error codes centrally in rpmcliShowMatches()

14 years agoLift specfile query out of main rpm(query) into separate binary
Panu Matilainen [Mon, 4 Oct 2010 10:33:18 +0000 (13:33 +0300)]
Lift specfile query out of main rpm(query) into separate binary
- Avoids having to link /bin/rpm with librpmbuild and everything it
  might bring in (eg libmagic) which are not needed for core operation.
- Minimally preserve backwards compatibility with popt exec alias

14 years agoSimplify queryformat popt callback handling
Panu Matilainen [Mon, 4 Oct 2010 09:51:32 +0000 (12:51 +0300)]
Simplify queryformat popt callback handling
- No need to separate single vs multiple queryformats,
  rstrcat() works for both cases. Whether catenating multiply specified
  queryformats make sense is another question though...
- This can't get called with NULL arg (or then popt screwed up its
  argument checking), dont bother checking.

14 years agol10n: Updated Polish (pl) translation to 100%
Piotr Drąg [Mon, 4 Oct 2010 09:32:46 +0000 (09:32 +0000)]
l10n: Updated Polish (pl) translation to 100%

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

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

14 years agol10n: Updated Italian (it) translation to 100%
Guido Grazioli [Sun, 3 Oct 2010 20:05:32 +0000 (20:05 +0000)]
l10n: Updated Italian (it) translation to 100%

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

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

14 years agoAnd now python bindings are really free of librpmbuild internals
Panu Matilainen [Fri, 1 Oct 2010 12:30:31 +0000 (15:30 +0300)]
And now python bindings are really free of librpmbuild internals
- Just one leftover offender in the form of forgotten type rename
  from commit 675bfca5cc300105f7859f028cc00ea036e72966

14 years agoKill spec.buildRoot from python
Panu Matilainen [Fri, 1 Oct 2010 12:28:40 +0000 (15:28 +0300)]
Kill spec.buildRoot from python
- We /could/ of course add a getter for this but ... sorry folks, what
  rpm happens to use as buildroot internally isn't anybody elses
  business.

14 years agoUse the new spec section getter in python bindings
Panu Matilainen [Fri, 1 Oct 2010 12:23:27 +0000 (15:23 +0300)]
Use the new spec section getter in python bindings
- Whee, for a change more lines removed than added...

14 years agoAdd getter for spec script sections too, bah...
Panu Matilainen [Fri, 1 Oct 2010 12:14:34 +0000 (15:14 +0300)]
Add getter for spec script sections too, bah...
- Pretty dumb and all, but to avoid breaking some python users
  (some folks apparently have found /some/ use for these...)

14 years agoUse the new spec src/pkg API in python instead of direct access to spec
Panu Matilainen [Fri, 1 Oct 2010 12:05:35 +0000 (15:05 +0300)]
Use the new spec src/pkg API in python instead of direct access to spec

14 years agoAdd minimal API for spec packages and sources
Panu Matilainen [Fri, 1 Oct 2010 12:03:22 +0000 (15:03 +0300)]
Add minimal API for spec packages and sources
- Iterators for both (these could easily done as self-iteration over
  ->next but to keep the api similar to other rpm iterators...)
- Minimal getters to satisfy python bindings needs

14 years agoUse namespaced names for spec pkg and source opaque typedefs
Panu Matilainen [Fri, 1 Oct 2010 10:32:28 +0000 (13:32 +0300)]
Use namespaced names for spec pkg and source opaque typedefs
- Leaving the painful and somewhat pointless exercise of changing
  all the Package and Source references for another rainy day

14 years agoFinish off our librpmbuild API mass-murder by turning everything opaque
Panu Matilainen [Fri, 1 Oct 2010 10:25:38 +0000 (13:25 +0300)]
Finish off our librpmbuild API mass-murder by turning everything opaque
- These huge structs have no business being visible to the public.
  Just brute-force split all remaining spec internal structures into
  another internal header, including where needed.
- The only thing accessing these structs outside of librpmbuild is
  the python spec bindings. Temporarily permit direct access to
  rpmspec_internal.h until we have the necessary API in place.

14 years agorpmfcGenerateDepends() is internal, move away from public header
Panu Matilainen [Fri, 1 Oct 2010 10:21:00 +0000 (13:21 +0300)]
rpmfcGenerateDepends() is internal, move away from public header

14 years agoA few missing internal markers on librpm side too
Panu Matilainen [Fri, 1 Oct 2010 08:46:00 +0000 (11:46 +0300)]
A few missing internal markers on librpm side too

14 years agoWhoops, missing RPM_GNUC_INTERNAL on stashSt()
Panu Matilainen [Fri, 1 Oct 2010 08:32:31 +0000 (11:32 +0300)]
Whoops, missing RPM_GNUC_INTERNAL on stashSt()

14 years agoStuff fts into a convenience library in misc/
Panu Matilainen [Fri, 1 Oct 2010 08:22:13 +0000 (11:22 +0300)]
Stuff fts into a convenience library in misc/
- This is not really native rpm code but a copy of (glibc?) FTS
  implementation, with slight modification to avoid symbol name
  collisions. Stick it where the sun don't shine, we'd eventually
  like to get rid of such bundled external code.

14 years agoLose rpmio-url leftovers from fts
Panu Matilainen [Fri, 1 Oct 2010 08:17:24 +0000 (11:17 +0300)]
Lose rpmio-url leftovers from fts
- We never pass url's here, just plain old local paths

14 years agoForce shared build of python extension
Panu Matilainen [Fri, 1 Oct 2010 08:05:45 +0000 (11:05 +0300)]
Force shared build of python extension
- Other than seeing "does it compile", statically linked python
  extensions make no sense as they're unusable to python.

14 years agoAdd configure switch to disable plugins build
Panu Matilainen [Fri, 1 Oct 2010 07:43:55 +0000 (10:43 +0300)]
Add configure switch to disable plugins build
- For now this is really just to allow building statically while
  hacking, for "real world" use this has implications on collections
  support etc which is not handled by this patch.

14 years agoHandle enable/disable python to configure.ac more sanely
Panu Matilainen [Fri, 1 Oct 2010 07:34:36 +0000 (10:34 +0300)]
Handle enable/disable python to configure.ac more sanely
- Conditionalize the python subdir on toplevel make instead of
  python subdir makefile.

14 years agoRemove configuration for no longer existing db indexes
Panu Matilainen [Wed, 29 Sep 2010 13:44:19 +0000 (16:44 +0300)]
Remove configuration for no longer existing db indexes

14 years agoAnd now sighdrPut() can be buried back into signature.c
Panu Matilainen [Wed, 29 Sep 2010 13:15:04 +0000 (16:15 +0300)]
And now sighdrPut() can be buried back into signature.c

14 years agoEliminate some redundancy in signature sanity checking
Panu Matilainen [Wed, 29 Sep 2010 13:05:07 +0000 (16:05 +0300)]
Eliminate some redundancy in signature sanity checking
- Combine validation + actual insertion to header: rename validatePGPSig()
  to putSignature() and move the details of parsing gpg generated
  packet, validating them and finally inserting to header in there.
- The signature generation code is mostly now in reasonably sized
  chunks, although there's room for further sanity here - the call
  chain is ridiculously long.

14 years agoSimplify the signature generation somewhat
Panu Matilainen [Wed, 29 Sep 2010 12:39:10 +0000 (15:39 +0300)]
Simplify the signature generation somewhat
- makeGPGSignature() callers only used the numerous return values
  for passing them into headerPut() through sighdrPut(), might as
  well have makeGPGSignature() do that part. It can also decide
  the necessary tags by itself, it just needs to know whether its
  a header-only signature or legacy header+payload signature.

14 years agoSplit the setup + running of gpg helper to a separate function
Panu Matilainen [Wed, 29 Sep 2010 12:07:21 +0000 (15:07 +0300)]
Split the setup + running of gpg helper to a separate function
- No functional changes (supposedly...), just refactoring
  makeGPGSignature() to smaller bits

14 years agoEliminate the pointless switch-case from makeHDRSignature()
Panu Matilainen [Wed, 29 Sep 2010 10:37:26 +0000 (13:37 +0300)]
Eliminate the pointless switch-case from makeHDRSignature()
- If we can't trust our own code to supply appropriate tag here...

14 years agoStart ripping through the hysterical signature generation tangle
Panu Matilainen [Wed, 29 Sep 2010 10:26:46 +0000 (13:26 +0300)]
Start ripping through the hysterical signature generation tangle
- rpmGenSignature() only ever gets called with RPMSIGTAG_GPG, eliminate
  the pointless argument.
- Eliminate the useless switch-case in rpmGenSignature(), nothing
  ever directly called it with RPMSIGTAG_DSA/RSA, those got generated
  as a side-effect of the RPMSIGTAG_GPG/PGP. So we just need to generate
  the, duh, signature.

14 years agoClean up makeHDRDigest() a bit
Panu Matilainen [Wed, 29 Sep 2010 09:47:06 +0000 (12:47 +0300)]
Clean up makeHDRDigest() a bit
- No need to separately free this stuff (at least anymore), it
  gets done on exit anyway.

14 years agoMake rpmGenSignature() static
Panu Matilainen [Wed, 29 Sep 2010 09:38:16 +0000 (12:38 +0300)]
Make rpmGenSignature() static
- Having it in signature.h is just wrong as it lives in a different
  library now, and nothing outside rpmgensig.c needs it anymore.
  Should've really been in commit 23a9d64ea40cfb526d0a12ba7350918dc335a305.

14 years agoWhoops, couple of includes gone missing in the shuffle
Panu Matilainen [Wed, 29 Sep 2010 10:09:31 +0000 (13:09 +0300)]
Whoops, couple of includes gone missing in the shuffle

14 years agoUpdate translations to pick up stuff moving about etc
Panu Matilainen [Wed, 29 Sep 2010 09:26:38 +0000 (12:26 +0300)]
Update translations to pick up stuff moving about etc

14 years agoAnd finally split the signing support into a separate library
Panu Matilainen [Wed, 29 Sep 2010 09:01:49 +0000 (12:01 +0300)]
And finally split the signing support into a separate library
- For a library with just one public function this might seem like
  a huge overkill but it permits cleanly separating dependencies:
  nothing but package signing requires GnuPG. This lets the signing
  support be stuffed into a separate package, avoiding having to
  drag gpg in on every installation (signing isn't something everybody
  does) and without having potentially broken interfaces in the API,
  essentially solving RhBug:624585.

  It also liberates signing to use libraries that might be off-limits
  for the core rpm, such as perhaps in the future doing signing
  by ourselves with the help of something like gpgme (which requires
  far too many things to drag into core rpm).

14 years agoLift the signature generation in all its g(l)ory to rpmgensig.c
Panu Matilainen [Wed, 29 Sep 2010 08:27:26 +0000 (11:27 +0300)]
Lift the signature generation in all its g(l)ory to rpmgensig.c
- signature.c is now entirely free of all actual signing activities,
  which requires stuff that like gpg that nothing else needs.

14 years agoMove sighdrPut() to inline function in signature.h
Panu Matilainen [Wed, 29 Sep 2010 08:21:07 +0000 (11:21 +0300)]
Move sighdrPut() to inline function in signature.h
- Avoids having to expose this in the ABI in the next steps

14 years agoSplit signature and digest generation to separate functions
Panu Matilainen [Wed, 29 Sep 2010 07:48:59 +0000 (10:48 +0300)]
Split signature and digest generation to separate functions
- Similar in spirit to commit 825691afb2a8e2c0b3c6a031950f3c7855dc4c6e,
  these have fairly little in common really.
- Change the function names to force breakage on users (these are exported
  in ABI but not in public headers so "users" are internal uses in
  practise): the automatically generated bits in signature header are
  not signatures, but digests (even size is a checksum of sorts) ...
  and fix the couple of internal uses.

14 years agoSplit internal header signature and digest generation to separate functions
Panu Matilainen [Wed, 29 Sep 2010 07:29:18 +0000 (10:29 +0300)]
Split internal header signature and digest generation to separate functions
- These have fairly little in common in reality: one is always
  automatically created on package generation, the other is optional
  extra step requiring passphrases and all sorts of other things.
- The switch-cases are now fairly hysterical but leaving them for
  later spring-clean to keep changes minimal for this step.
- No functional changes (supposedly ;)

14 years agoSigner id is not sufficient measure for signature sameness (RhBug:608608)
Panu Matilainen [Wed, 29 Sep 2010 06:36:08 +0000 (09:36 +0300)]
Signer id is not sufficient measure for signature sameness (RhBug:608608)
- We used to only check whether signer ID matches for determining whether
  a package needs resigning or can it be skipped, but this is nowhere
  near sufficient as the same ID can be used with different algorithms
  and even packet version etc. Compare all/most (?) relevant parameters
  for signature identicality.

14 years agoMake RPMFILE_STATE_MISSING part of the rpmfileState enum
Panu Matilainen [Tue, 28 Sep 2010 20:06:29 +0000 (23:06 +0300)]
Make RPMFILE_STATE_MISSING part of the rpmfileState enum
- Shuts up couple of "not in enum" complaints from gcc, and actually
  "no state" is a perfectly valid state for one case: non-installed
  packages (so remove the "not valid" comment from formats.c)
- OTOH, this created a new complaint for not handled case in a switch.
  Oh well, fix it up too...

14 years agoFix a rpmTag/rpmSigTag mismatch by using the more appropriate type
Panu Matilainen [Tue, 28 Sep 2010 19:52:49 +0000 (22:52 +0300)]
Fix a rpmTag/rpmSigTag mismatch by using the more appropriate type
- This wouldn't make c++ any happier as the mismatch now occurs
  with headerGet() and friends instead of the comparison, but will do for now.

14 years agoEliminate silly leftover switch-case from _tagType()
Panu Matilainen [Tue, 28 Sep 2010 19:47:44 +0000 (22:47 +0300)]
Eliminate silly leftover switch-case from _tagType()
- Anybody calling rpmTagGetType() with RPMDBI_PACKAGES deserves to
  wait for the search to figure there's no such thing and return
  RPM_NULL_TYPE like with the switch case. Eliminates another
  enum comparison mismatch warning.

14 years agoRemove leftover trap for RPMRC_FAIL errors where none should be seen
Panu Matilainen [Tue, 28 Sep 2010 19:35:10 +0000 (22:35 +0300)]
Remove leftover trap for RPMRC_FAIL errors where none should be seen
- Been 2.5 years now without seeing that trap trigger, should be safe
  to remove now ... to silence a warning about comparing to non-existent
  enumeration value.

14 years agoWrong enum type used for psm goal, gcc 4.5 complains (which is nice)
Panu Matilainen [Tue, 28 Sep 2010 19:16:33 +0000 (22:16 +0300)]
Wrong enum type used for psm goal, gcc 4.5 complains (which is nice)

14 years agoWhoops, wrong enum type used for pubkey algorithm
Panu Matilainen [Tue, 28 Sep 2010 19:13:25 +0000 (22:13 +0300)]
Whoops, wrong enum type used for pubkey algorithm
- dumb thinko/typo from commit 0e143cfe9f11abc42733d2265dc6d61cb716e5a4

14 years agoEliminate %_signature from man pages too
Panu Matilainen [Tue, 28 Sep 2010 13:33:17 +0000 (16:33 +0300)]
Eliminate %_signature from man pages too

14 years agoRip the useless %_signature macro and everything around it
Panu Matilainen [Tue, 28 Sep 2010 13:28:21 +0000 (16:28 +0300)]
Rip the useless %_signature macro and everything around it

14 years agoFix the broken existing signature checking on add/resign (RhBug:488953)
Panu Matilainen [Tue, 28 Sep 2010 13:09:30 +0000 (16:09 +0300)]
Fix the broken existing signature checking on add/resign (RhBug:488953)
- The previously used %_signature macro for determining the generated
  signature type is utterly useless as gpg can generate both DSA and RSA
  signatures just fine. Generate the new signature and compare with the
  previous one in the header (if any) for real results. This is ugly
  hackery around limitations in the lower level signature functions but
  to keep this remotely backportable for now...

14 years agoDecide header sigtag based on what was actually written
Panu Matilainen [Tue, 28 Sep 2010 11:55:29 +0000 (14:55 +0300)]
Decide header sigtag based on what was actually written
- makeGPGSignature() figures the signature type by parsing the
  created signature, use that instead of the rather bogus tag
  based on %_signature macro value passed from the cli level.

14 years agoHandle non-terminated substrings centrally in expandMacro()
Panu Matilainen [Mon, 27 Sep 2010 14:15:15 +0000 (17:15 +0300)]
Handle non-terminated substrings centrally in expandMacro()
- expandMacro() is big and ugly already, but handling the non-terminated
  substrings there once and for all avoids having to ping-pong recurse
  through couple of helpers to get there.

14 years agoDynamic expansion buffer reallocation for lua macros too
Panu Matilainen [Mon, 27 Sep 2010 13:32:15 +0000 (16:32 +0300)]
Dynamic expansion buffer reallocation for lua macros too

14 years agoWhoops, fix typo/thinko from commit dc258bac41e32e754b15a413d844160f34b6a12e
Panu Matilainen [Mon, 27 Sep 2010 13:22:38 +0000 (16:22 +0300)]
Whoops, fix typo/thinko from commit dc258bac41e32e754b15a413d844160f34b6a12e

14 years agoEliminate the internal in-place-expansion buffer limitation
Panu Matilainen [Mon, 27 Sep 2010 13:03:56 +0000 (16:03 +0300)]
Eliminate the internal in-place-expansion buffer limitation
- Return the dynamically allocated expansion buffer to callers from
  expandU(), except using a slightly less cryptic expandThis() name
  for it now. Also deal with non-terminated strings centrally in
  expandThis() instead of doing alloc + copy to terminate in every caller.

14 years agoSimplify / sanitize expandU() a bit
Panu Matilainen [Mon, 27 Sep 2010 11:22:56 +0000 (14:22 +0300)]
Simplify / sanitize expandU() a bit
- Instead of saving and restoring the bits we'll mess with, just
  make a temporary expansion state struct with non-buffer state
  copied from "parent".

14 years agoDynamically reallocate macro expansion buffer (ticket #45)
Panu Matilainen [Mon, 27 Sep 2010 11:05:37 +0000 (14:05 +0300)]
Dynamically reallocate macro expansion buffer (ticket #45)
- Eliminate the underlying limitation of macro expansion limit by
  growing the buffer as needed when adding characters to it. This
  doesn't fix the entire issue yet however: expandU() and expandMacros()
  are still limited to caller-specified buffer size, and output
  from lua-macros isn't dynamically resized. One step at a time...

14 years agoLet expandMacro() allocate its own buffer
Panu Matilainen [Mon, 27 Sep 2010 10:05:37 +0000 (13:05 +0300)]
Let expandMacro() allocate its own buffer
- More pre-requisites for dynamic buffer resizing, callers have no
  clue how much expandMacro() is going to need.

14 years agoTrack current expansion point via distance to buffer start
Panu Matilainen [Mon, 27 Sep 2010 09:19:13 +0000 (12:19 +0300)]
Track current expansion point via distance to buffer start
- Supposedly no functional changes, just paving way for dynamic
  buffer resizing which is impossible when accessing pointers directly.

14 years agoPush the macro buffer size limit down by one level
Panu Matilainen [Fri, 24 Sep 2010 09:48:15 +0000 (12:48 +0300)]
Push the macro buffer size limit down by one level
- Turn expandMacros() into a wrapper around internal doExpandMacros()
  which returns the expanded string in a newly allocated buffer, use
  the internal version for rpmExpand() too.

14 years agoEliminate unused spec field from macro expansion state struct
Panu Matilainen [Mon, 27 Sep 2010 07:02:17 +0000 (10:02 +0300)]
Eliminate unused spec field from macro expansion state struct

14 years agoAvoid calloc() in macro findEntry()
Panu Matilainen [Mon, 27 Sep 2010 06:33:35 +0000 (09:33 +0300)]
Avoid calloc() in macro findEntry()
- It's just the macro name we're grabbing here, that ought to fit
  on stack comfortably enough.

14 years agoAvoid unnecessary round-trip through expandT() where possible
Panu Matilainen [Fri, 24 Sep 2010 07:49:19 +0000 (10:49 +0300)]
Avoid unnecessary round-trip through expandT() where possible
- In the cases where expandT() was called with strlen(source) we can
  now just bypass it and call expandMacro() directly, avoiding an
  unnecessary string copy.

14 years agoUse function arguments to pass, duh, arguments into functions. Duh.
Panu Matilainen [Fri, 24 Sep 2010 07:42:38 +0000 (10:42 +0300)]
Use function arguments to pass, duh, arguments into functions. Duh.
- No functional changes, just eliminating mindless save-and-restore
  ping-pong through macro expansion state struct.

14 years agoFix segfault in rpmdeps (RhBug:637357)
Jindrich Novy [Sun, 26 Sep 2010 16:45:34 +0000 (18:45 +0200)]
Fix segfault in rpmdeps (RhBug:637357)

14 years agoEliminate separate fileIndexEntry from rpmal
Panu Matilainen [Wed, 22 Sep 2010 13:37:12 +0000 (16:37 +0300)]
Eliminate separate fileIndexEntry from rpmal
- This is exactly the same structure as availableIndexEntry, no need
  for a different struct for it.

14 years agoUse headerNextTag() for header format iteration
Panu Matilainen [Wed, 22 Sep 2010 11:28:32 +0000 (14:28 +0300)]
Use headerNextTag() for header format iteration
- Doesn't really win anything performance-wise but makes the code nicer

14 years agoUse HEADER_MAGIC_FOO enums instead of 0/1 in python header code
Panu Matilainen [Wed, 22 Sep 2010 06:46:25 +0000 (09:46 +0300)]
Use HEADER_MAGIC_FOO enums instead of 0/1 in python header code

14 years agoRemove double const in urlstring struct
Panu Matilainen [Wed, 22 Sep 2010 06:19:07 +0000 (09:19 +0300)]
Remove double const in urlstring struct

14 years agoMake rpmsqAction compatible to sa_sigaction
Panu Matilainen [Wed, 22 Sep 2010 06:14:12 +0000 (09:14 +0300)]
Make rpmsqAction compatible to sa_sigaction

14 years agol10n: Updated Japanese (ja) translation to 100%
Hajime Taira [Tue, 21 Sep 2010 22:27:34 +0000 (22:27 +0000)]
l10n: Updated Japanese (ja) translation to 100%

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

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

14 years agoRemove double const on rpmrc tables
Panu Matilainen [Tue, 21 Sep 2010 13:57:08 +0000 (16:57 +0300)]
Remove double const on rpmrc tables

14 years agoFix rpmRC/int return mismatch by counting errors from handleOneTrigger
Panu Matilainen [Tue, 21 Sep 2010 13:43:46 +0000 (16:43 +0300)]
Fix rpmRC/int return mismatch by counting errors from handleOneTrigger

14 years agoUse rpmTag as psm scriptTag for type correctness
Panu Matilainen [Tue, 21 Sep 2010 13:39:59 +0000 (16:39 +0300)]
Use rpmTag as psm scriptTag for type correctness

14 years agoDefault to the common case wrt dir name/index tags, not relocation
Panu Matilainen [Tue, 21 Sep 2010 13:35:10 +0000 (16:35 +0300)]
Default to the common case wrt dir name/index tags, not relocation
- Avoids an unnecessary extra initialization in the common case, and
  also avoids int/enum mismatch from initializing to 0.

14 years agoMove PTOK type enum out of the sprintfToken struct
Panu Matilainen [Tue, 21 Sep 2010 13:28:34 +0000 (16:28 +0300)]
Move PTOK type enum out of the sprintfToken struct
- While legal in C++, the enum and its values are only visible within
  the scope it was declared in, making it invisible to the rest of
  the program.

14 years agoRemove bunch of double consts in librpmbuild
Panu Matilainen [Tue, 21 Sep 2010 13:18:22 +0000 (16:18 +0300)]
Remove bunch of double consts in librpmbuild

14 years agoInitialize nametag to RPMTAG_NOT_FOUND in parseRCPOT()
Panu Matilainen [Tue, 21 Sep 2010 12:55:02 +0000 (15:55 +0300)]
Initialize nametag to RPMTAG_NOT_FOUND in parseRCPOT()
- Doesn't matter what the value is, the switch (somewhat hysterically)
  makes it default to RPMTAG_REQUIRENAME in unknown cases anyway

14 years agoConst pedantry: taropts only ever points to string constants
Panu Matilainen [Tue, 21 Sep 2010 12:53:38 +0000 (15:53 +0300)]
Const pedantry: taropts only ever points to string constants

14 years agoMove expression type enum out of the struct
Panu Matilainen [Tue, 21 Sep 2010 12:38:41 +0000 (15:38 +0300)]
Move expression type enum out of the struct
- While legal in C++, the enum and its values are only visible within
  the scope it was declared in, making it invisible to the rest of
  the program.

14 years agoUse actual enum values in tag table sentinel to avoid int/enum mismatch
Panu Matilainen [Tue, 21 Sep 2010 12:25:53 +0000 (15:25 +0300)]
Use actual  enum values in tag table sentinel to avoid int/enum mismatch
- tagLoadIndex() looks for NULL in tag name, the other values aren't
  looked at so it doesn't matter...

14 years agoAdd "c++ protection" to (hopefully) all of our internal headers
Panu Matilainen [Tue, 21 Sep 2010 12:21:12 +0000 (15:21 +0300)]
Add "c++ protection" to (hopefully) all of our internal headers

14 years agoMissing c++ end marker in rpmdb_internal.h, oops
Panu Matilainen [Tue, 21 Sep 2010 12:17:46 +0000 (15:17 +0300)]
Missing c++ end marker in rpmdb_internal.h, oops

14 years agoAdd "C++ protection" to the public rpmutil.h header, oops...
Panu Matilainen [Tue, 21 Sep 2010 12:13:02 +0000 (15:13 +0300)]
Add "C++ protection" to the public rpmutil.h header, oops...

14 years agovoid stepping on toes of relatives, part 5
Panu Matilainen [Tue, 21 Sep 2010 12:11:04 +0000 (15:11 +0300)]
void stepping on toes of relatives, part 5
- Eliminate remaining (hopefully) C++ reserved keywords in rpmbuild cli tool

14 years agoAvoid stepping on toes of relatives, part 4
Panu Matilainen [Tue, 21 Sep 2010 12:08:08 +0000 (15:08 +0300)]
Avoid stepping on toes of relatives, part 4
- Eliminate remaining (hopefully) C++ reserved keywords in librpm

14 years agoAvoid stepping on toes of relatives, part 3
Panu Matilainen [Tue, 21 Sep 2010 12:07:08 +0000 (15:07 +0300)]
Avoid stepping on toes of relatives, part 3
- Eliminate remaining (hopefully) C++ reserved keywords in librpmbuild

14 years agoAvoid stepping on toes of relatives, part 2
Panu Matilainen [Tue, 21 Sep 2010 12:02:43 +0000 (15:02 +0300)]
Avoid stepping on toes of relatives, part 2
- Eliminate uses of "class" which is a reserved keyword in C++

14 years agoAvoid stepping on toes of relatives, part 1
Panu Matilainen [Tue, 21 Sep 2010 11:55:03 +0000 (14:55 +0300)]
Avoid stepping on toes of relatives, part 1
- Eliminate uses of "this" which is a reserved keyword in C++

14 years agoQueryformat string sanity in queryArgCallback()
Panu Matilainen [Tue, 21 Sep 2010 11:50:40 +0000 (14:50 +0300)]
Queryformat string sanity in queryArgCallback()
- Use our string helper functions instead of manual length calculations
  and allocations

14 years agoUse rasprintf() instead of manual alloc + sprintf()
Panu Matilainen [Tue, 21 Sep 2010 11:49:36 +0000 (14:49 +0300)]
Use rasprintf() instead of manual alloc + sprintf()

14 years agoRename tagtbl.c -> tagtbl.C
Panu Matilainen [Tue, 21 Sep 2010 11:47:46 +0000 (14:47 +0300)]
Rename tagtbl.c -> tagtbl.C
- This isn't a regular source file: its not compiled as such but only
  included from tagname.c. Rename to disambiguate, and make it similar
  to rpmhash.[CH]

14 years agoUse the macro allocator variants within librpm*
Panu Matilainen [Tue, 21 Sep 2010 11:47:14 +0000 (14:47 +0300)]
Use the macro allocator variants within librpm*

14 years agoUse _free() instead of rfree() where "return value" is assigned
Panu Matilainen [Tue, 21 Sep 2010 11:33:57 +0000 (14:33 +0300)]
Use _free() instead of rfree() where "return value" is assigned

14 years agoReturn explicit NULL from various fooFree() functions everywhere
Panu Matilainen [Tue, 21 Sep 2010 11:26:29 +0000 (14:26 +0300)]
Return explicit NULL from various fooFree() functions everywhere

14 years agoReturn typed pointers from rpmluaFree() and rpmluavFree()
Panu Matilainen [Tue, 21 Sep 2010 11:22:29 +0000 (14:22 +0300)]
Return typed pointers from rpmluaFree() and rpmluavFree()

14 years agoReturn typed pointer from headerformat cacheFree()
Panu Matilainen [Tue, 21 Sep 2010 11:19:11 +0000 (14:19 +0300)]
Return typed pointer from headerformat cacheFree()

14 years agoReturn typed pointer from freeHardLink()
Panu Matilainen [Tue, 21 Sep 2010 11:16:23 +0000 (14:16 +0300)]
Return typed pointer from freeHardLink()

14 years agoUse typed instead of void pointer for fsm dnl iterator
Panu Matilainen [Tue, 21 Sep 2010 11:14:29 +0000 (14:14 +0300)]
Use typed instead of void pointer for fsm dnl iterator
- Passing a void pointer for an internal helper function which
  casts to the destination is just ... pfff.

14 years agoUse typed instead of void pointer for fsm map iterator
Panu Matilainen [Tue, 21 Sep 2010 11:12:55 +0000 (14:12 +0300)]
Use typed instead of void pointer for fsm map iterator
- Passing a void pointer for an internal helper function which
  casts to the destination is just ... pfff.