platform/upstream/rpm.git
13 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.

13 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.

13 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

13 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

13 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).

13 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.

13 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

13 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.

13 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 ;)

13 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.

13 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...

13 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.

13 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.

13 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.

13 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)

13 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

13 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

13 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

13 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...

13 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.

13 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.

13 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

13 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

13 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.

13 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".

13 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...

13 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.

13 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.

13 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.

13 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

13 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.

13 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.

13 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.

13 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)

13 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.

13 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

13 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

13 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

13 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

13 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).

13 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

13 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

13 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

13 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.

13 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.

13 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

13 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

13 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

13 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.

13 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...

13 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

13 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

13 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...

13 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

13 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

13 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

13 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++

13 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++

13 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

13 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()

13 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]

13 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*

13 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

13 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

13 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()

13 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()

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

13 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.

13 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.

13 years agoAdjust pgpMpiSet() dest type to match actual use
Panu Matilainen [Tue, 21 Sep 2010 11:04:44 +0000 (14:04 +0300)]
Adjust pgpMpiSet() dest type to match actual use

13 years agoError string is const char *, not void pointer
Panu Matilainen [Tue, 21 Sep 2010 11:03:43 +0000 (14:03 +0300)]
Error string is const char *, not void pointer

13 years agoAdjust internal io read, write and digest update to take buf as void pointer
Panu Matilainen [Tue, 21 Sep 2010 10:43:48 +0000 (13:43 +0300)]
Adjust internal io read, write and digest update to take buf as void pointer
- This matches ffread() and read() much better, avoiding pile of casts.
- By some stroke of genious, glibc cookie interfaces disagree with the
  other file stream protos by using char * for buf. Argh. Add explicit
  cast for the schizophrenia.

13 years agoAvoid using void pointer when we have a real type for the memfail function
Panu Matilainen [Tue, 21 Sep 2010 10:41:25 +0000 (13:41 +0300)]
Avoid using void pointer when we have a real type for the memfail function

13 years agoMove the RPMVERSION constant among its friends in depends.c
Panu Matilainen [Tue, 21 Sep 2010 10:39:25 +0000 (13:39 +0300)]
Move the RPMVERSION constant among its friends in depends.c
- Doesn't make any difference, just grouping similar goo in one spot.

13 years agostrrchr() family considered harmful, part 666
Panu Matilainen [Tue, 21 Sep 2010 10:29:01 +0000 (13:29 +0300)]
strrchr() family considered harmful, part 666
- strrchr() was silently casting away a const on a string coming
  from rpmtdGetString(). Add an explicit cast and warning/fixme commentary
  to the compressFilelist() hack which modifies (and then restores) the
  const string.

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()