tools/librpm-tizen.git
16 years agoMake parseChangeLog() return PART_ERROR on errors
Panu Matilainen [Mon, 5 May 2008 07:42:41 +0000 (10:42 +0300)]
Make parseChangeLog() return PART_ERROR on errors
- streamline exits, fixing memleak from stringbuf on various paths

16 years agoMake parseBuildInstallClean() return PART_ERROR on errors, streamline exits
Panu Matilainen [Mon, 5 May 2008 07:34:33 +0000 (10:34 +0300)]
Make parseBuildInstallClean() return PART_ERROR on errors, streamline exits

16 years agoMake parsePrep() return PART_ERROR on errors
Panu Matilainen [Mon, 5 May 2008 07:24:22 +0000 (10:24 +0300)]
Make parsePrep() return PART_ERROR on errors

16 years agoStreamline parsePreamble() exists
Panu Matilainen [Mon, 5 May 2008 07:08:33 +0000 (10:08 +0300)]
Streamline parsePreamble() exists
- assume failure, single point of exit
- fixes memleak from NVR
- use PART_ERROR for error exits

16 years agoStart cleaning up the rpmerr removal mess of build/ return codes
Panu Matilainen [Mon, 5 May 2008 06:51:14 +0000 (09:51 +0300)]
Start cleaning up the rpmerr removal mess of build/ return codes
- define PART_ERROR for error returns from various parse bits,
  teach parseSpec() about it
- streamline parseSpec() exists

16 years agoRemove obsolete parseForRegexLang()
Jindrich Novy [Mon, 5 May 2008 06:12:04 +0000 (08:12 +0200)]
Remove obsolete parseForRegexLang()
- no use for it since _langpatt is now gone

16 years agomacros.in cleanup
Jindrich Novy [Mon, 5 May 2008 06:05:50 +0000 (08:05 +0200)]
macros.in cleanup
- really deprecate _langpatt
- obsolete _package_version
- use paths more conforming to FHS
- fix typos

16 years agoUse fprintf() for writing PGP passphrase (like we do for GPG)
Panu Matilainen [Mon, 5 May 2008 05:38:57 +0000 (08:38 +0300)]
Use fprintf() for writing PGP passphrase (like we do for GPG)
- avoids having two separate write()'s to check
- ...if we actually checked the result, gcc doesn't whine about
  unchecked fprintf() return...

16 years agoCheck for pipe() returns on GPG and PGP signature creation
Panu Matilainen [Mon, 5 May 2008 05:27:07 +0000 (08:27 +0300)]
Check for pipe() returns on GPG and PGP signature creation

16 years agoCheck for pipe() returns in rpmfc helper output reading
Panu Matilainen [Mon, 5 May 2008 05:23:24 +0000 (08:23 +0300)]
Check for pipe() returns in rpmfc helper output reading

16 years agoSilence bogus warning on memset()
Panu Matilainen [Mon, 5 May 2008 05:15:17 +0000 (08:15 +0300)]
Silence bogus warning on memset()
- gcc doesn't realize shrank == 0 would terminate the process via error()
  before reaching memset(), work around...

16 years agoCheck for pipe() return code on --pipe
Panu Matilainen [Mon, 5 May 2008 04:37:50 +0000 (07:37 +0300)]
Check for pipe() return code on --pipe

16 years agoAdd missing include
Panu Matilainen [Sat, 3 May 2008 09:44:16 +0000 (12:44 +0300)]
Add missing include

16 years agoInitialize nb before use
Panu Matilainen [Sat, 3 May 2008 09:43:37 +0000 (12:43 +0300)]
Initialize nb before use

16 years agoCreate signature target rpm in same directory as original
Panu Matilainen [Sat, 3 May 2008 09:38:02 +0000 (12:38 +0300)]
Create signature target rpm in same directory as original
- rename() doesn't work across devices, oops...

16 years agoTemp file handling tweaks
Panu Matilainen [Sat, 3 May 2008 09:34:19 +0000 (12:34 +0300)]
Temp file handling tweaks
- rename rpmMkTemp() (back) to rpmMkTempFile()
- rpmMkTemp() is now a lower level thin wrapper around mkstemp()

16 years agorpmReSign() doesn't return rpmRC codes, make it more obvious
Panu Matilainen [Sat, 3 May 2008 07:36:00 +0000 (10:36 +0300)]
rpmReSign() doesn't return rpmRC codes, make it more obvious
- cleanup "rc = RPMRC_FAIL" copy-paste leftovers

16 years agoEliminate static sized string buffer frpm rpmReSign()
Panu Matilainen [Sat, 3 May 2008 07:27:16 +0000 (10:27 +0300)]
Eliminate static sized string buffer frpm rpmReSign()
- use rpmMkTemp() for creating the temp file instead of insecure
  close(mkstemp())

16 years agoCheck for arch compatibility on multilib too
Panu Matilainen [Fri, 2 May 2008 08:48:27 +0000 (11:48 +0300)]
Check for arch compatibility on multilib too

16 years agoEnsure default SIGPIPE handler for --pipe (rhbz#444389)
Panu Matilainen [Fri, 2 May 2008 08:40:29 +0000 (11:40 +0300)]
Ensure default SIGPIPE handler for --pipe (rhbz#444389)

16 years agoRIP alloca()
Panu Matilainen [Wed, 30 Apr 2008 11:38:09 +0000 (14:38 +0300)]
RIP alloca()

16 years agoRewrite xmlFormat() and remove useless xmlstrlen() and xmlstrcpy()
Jindrich Novy [Wed, 30 Apr 2008 11:24:51 +0000 (13:24 +0200)]
Rewrite xmlFormat() and remove useless xmlstrlen() and xmlstrcpy()

16 years agoKill of alloca() from tufdio tests
Panu Matilainen [Wed, 30 Apr 2008 10:34:28 +0000 (13:34 +0300)]
Kill of alloca() from tufdio tests
- yes it leaks, who cares

16 years agoLazily copy basenames in relocation if needed
Panu Matilainen [Wed, 30 Apr 2008 10:30:54 +0000 (13:30 +0300)]
Lazily copy basenames in relocation if needed
- couple of tiny array helper funcs to push stuff out of relocateFileList()
  instead of adding yet more gunk
- use the helpers for dirnames too

16 years agoSimplify relocation directory name manipulation
Panu Matilainen [Wed, 30 Apr 2008 09:45:16 +0000 (12:45 +0300)]
Simplify relocation directory name manipulation

16 years agoDon't use alloca in rpmal.c
Jindrich Novy [Wed, 30 Apr 2008 09:39:49 +0000 (11:39 +0200)]
Don't use alloca in rpmal.c

16 years agoAllocate relocation dirnames on heap, not stack
Panu Matilainen [Wed, 30 Apr 2008 09:29:40 +0000 (12:29 +0300)]
Allocate relocation dirnames on heap, not stack

16 years agoDon't use alloca() in fpsCompare()
Jindrich Novy [Wed, 30 Apr 2008 08:32:33 +0000 (10:32 +0200)]
Don't use alloca() in fpsCompare()

16 years agoBegin untangling relocation alloca()'s
Panu Matilainen [Wed, 30 Apr 2008 07:32:57 +0000 (10:32 +0300)]
Begin untangling relocation alloca()'s
- allocate rpmRelocation paths on heap, not stack

16 years agoKill the remaining alloca in fp doLookup()
Panu Matilainen [Wed, 30 Apr 2008 07:05:48 +0000 (10:05 +0300)]
Kill the remaining alloca in fp doLookup()

16 years agoOne alloca() down in fp doLookup()
Panu Matilainen [Wed, 30 Apr 2008 06:47:25 +0000 (09:47 +0300)]
One alloca() down in fp doLookup()
- single point of exit from the point where buf gets allocated

16 years agoPlug a memleak in lzclose()
Panu Matilainen [Tue, 29 Apr 2008 14:38:21 +0000 (17:38 +0300)]
Plug a memleak in lzclose()

16 years agoPlug memleak in parseSimplePart()
Panu Matilainen [Tue, 29 Apr 2008 14:09:07 +0000 (17:09 +0300)]
Plug memleak in parseSimplePart()

16 years agoPlug memleak in macro doFoo()
Panu Matilainen [Tue, 29 Apr 2008 14:04:08 +0000 (17:04 +0300)]
Plug memleak in macro doFoo()

16 years agoDon't use alloca in rpmGenPath()
Jindrich Novy [Tue, 29 Apr 2008 14:08:19 +0000 (16:08 +0200)]
Don't use alloca in rpmGenPath()

16 years agoCalm down compiler warnings due to fsm->patch being const
Jindrich Novy [Tue, 29 Apr 2008 13:40:20 +0000 (15:40 +0200)]
Calm down compiler warnings due to fsm->patch being const

16 years agoMerge branch 'master' of ssh://login.linux.duke.edu/home/groups/rpm/git/rpm
Jindrich Novy [Tue, 29 Apr 2008 13:01:53 +0000 (15:01 +0200)]
Merge branch 'master' of ssh://login.linux.duke.edu/home/groups/rpm/git/rpm

16 years agoAvoid general ETXBSY and allow it for HP-UX exclusively
Jindrich Novy [Tue, 29 Apr 2008 13:01:05 +0000 (15:01 +0200)]
Avoid general ETXBSY and allow it for HP-UX exclusively
- for more info: http://www.uwsg.iu.edu/hypermail/linux/kernel/9808.3/0883.html
- remove the rest of alloca()s

16 years agoRemove useless alloca_strdup()
Jindrich Novy [Tue, 29 Apr 2008 12:59:18 +0000 (14:59 +0200)]
Remove useless alloca_strdup()
- and yet more alloca usage in writeFile()

16 years agoRemove unused alloca_strdup() define
Panu Matilainen [Tue, 29 Apr 2008 12:50:43 +0000 (15:50 +0300)]
Remove unused alloca_strdup() define

16 years agoAllocate directory names on heap in compressFilelist()
Panu Matilainen [Tue, 29 Apr 2008 12:08:47 +0000 (15:08 +0300)]
Allocate directory names on heap in compressFilelist()

16 years agoUse rpmGetPath() to construct full dbpath in db3open()
Panu Matilainen [Tue, 29 Apr 2008 11:44:28 +0000 (14:44 +0300)]
Use rpmGetPath() to construct full dbpath in db3open()
- another alloca() bites the dust...

16 years agoOops, one more alloca() in rpmtsOrder()
Panu Matilainen [Tue, 29 Apr 2008 11:17:09 +0000 (14:17 +0300)]
Oops, one more alloca() in rpmtsOrder()

16 years agoRemove alloca() from rpmtsOrder()
Panu Matilainen [Tue, 29 Apr 2008 11:13:59 +0000 (14:13 +0300)]
Remove alloca() from rpmtsOrder()

16 years agoDead code elimination
Panu Matilainen [Tue, 29 Apr 2008 11:02:06 +0000 (14:02 +0300)]
Dead code elimination

16 years agoRemove alloca() from rpmvercmp()
Panu Matilainen [Tue, 29 Apr 2008 10:49:53 +0000 (13:49 +0300)]
Remove alloca() from rpmvercmp()
- use variable array instead, versions had better be short enough to fit
  on stack safely

16 years agoAvoid alloca() in headerLoad()
Panu Matilainen [Tue, 29 Apr 2008 10:33:09 +0000 (13:33 +0300)]
Avoid alloca() in headerLoad()
- REGION_TAG_COUNT is a constant so local array would do even without
  C99..

16 years agoAvoid alloca() in findTag()
Panu Matilainen [Tue, 29 Apr 2008 10:17:33 +0000 (13:17 +0300)]
Avoid alloca() in findTag()
- instead of putting RPMTAG_ into strings where it's not present,
  do it the other way around
- avoids a string copy and redundant string comparisons on the RPMTAG_ part

16 years agoAvoid alloca() in shescapeFormat()
Panu Matilainen [Tue, 29 Apr 2008 09:59:20 +0000 (12:59 +0300)]
Avoid alloca() in shescapeFormat()

16 years agoAvoid alloca() in headerAddI18NString()
Panu Matilainen [Tue, 29 Apr 2008 09:45:51 +0000 (12:45 +0300)]
Avoid alloca() in headerAddI18NString()

16 years agoThis code has been commented out since -99, time to let go...
Panu Matilainen [Tue, 29 Apr 2008 09:40:03 +0000 (12:40 +0300)]
This code has been commented out since -99, time to let go...

16 years agoEliminate remaining alloca() in rpmAddSignature()
Panu Matilainen [Tue, 29 Apr 2008 08:54:44 +0000 (11:54 +0300)]
Eliminate remaining alloca() in rpmAddSignature()

16 years agoPlug memleaks in signature generation
Panu Matilainen [Tue, 29 Apr 2008 08:53:13 +0000 (11:53 +0300)]
Plug memleaks in signature generation

16 years agoAvoid alloca() in rpmtsSetRootDir()
Panu Matilainen [Tue, 29 Apr 2008 08:35:30 +0000 (11:35 +0300)]
Avoid alloca() in rpmtsSetRootDir()

16 years agoAvoid alloca() in rpmDetectPGPVersion()
Panu Matilainen [Tue, 29 Apr 2008 08:26:00 +0000 (11:26 +0300)]
Avoid alloca() in rpmDetectPGPVersion()
- the whole detection is hysterical and could/should probably be killed
  but what the heck...

16 years agoAvoid alloca() in makeGPGSignature()
Panu Matilainen [Tue, 29 Apr 2008 08:24:25 +0000 (11:24 +0300)]
Avoid alloca() in makeGPGSignature()

16 years agoAvoid unchecked stpcpy() to static sized buf from alloca()
Panu Matilainen [Tue, 29 Apr 2008 08:16:46 +0000 (11:16 +0300)]
Avoid unchecked stpcpy() to static sized buf from alloca()

16 years agoAvoid alloca() in rpmtsInitIterator()
Panu Matilainen [Tue, 29 Apr 2008 08:12:15 +0000 (11:12 +0300)]
Avoid alloca() in rpmtsInitIterator()

16 years agoRead "canonvendor" macros by default again
Panu Matilainen [Tue, 29 Apr 2008 08:02:41 +0000 (11:02 +0300)]
Read "canonvendor" macros by default again
- the whole vendor etc stuff needs rethinking etc, but for now this "works"

16 years agoAvoid alloca() in legacyRetrofit()
Panu Matilainen [Tue, 29 Apr 2008 07:40:56 +0000 (10:40 +0300)]
Avoid alloca() in legacyRetrofit()

16 years agoUse rpmioSlurp() for reading in rpmrc's
Panu Matilainen [Tue, 29 Apr 2008 07:34:54 +0000 (10:34 +0300)]
Use rpmioSlurp() for reading in rpmrc's
- have doReadRC() do the opening of files instead of caller
- always expand rc filename on entry, simplifies includes too
- streamline exit paths

16 years agoUse rpmGlob() for expanding rcfiles globs
Panu Matilainen [Tue, 29 Apr 2008 06:59:56 +0000 (09:59 +0300)]
Use rpmGlob() for expanding rcfiles globs
- avoids static filename buffer and simplifies things quite a bit

16 years agoRewrite rpmioMkpath()
Jindrich Novy [Mon, 28 Apr 2008 15:30:25 +0000 (17:30 +0200)]
Rewrite rpmioMkpath()

16 years agogenCpioListAndHeader() indentation fixes, no other changes
Panu Matilainen [Mon, 28 Apr 2008 19:25:47 +0000 (22:25 +0300)]
genCpioListAndHeader() indentation fixes, no other changes

16 years agoAllocate buffer for %doc filenames dynamically
Panu Matilainen [Mon, 28 Apr 2008 18:58:26 +0000 (21:58 +0300)]
Allocate buffer for %doc filenames dynamically

16 years agoRemove unnecessary block which just messes up indentation
Panu Matilainen [Mon, 28 Apr 2008 18:37:47 +0000 (21:37 +0300)]
Remove unnecessary block which just messes up indentation

16 years agoSet processingFailed just once
Panu Matilainen [Mon, 28 Apr 2008 18:35:26 +0000 (21:35 +0300)]
Set processingFailed just once

16 years agoDon't leak memory on failure in checkForValidArchitectures()
Panu Matilainen [Mon, 28 Apr 2008 18:18:00 +0000 (21:18 +0300)]
Don't leak memory on failure in checkForValidArchitectures()

16 years agoRemove unused alloca_strdup() macro
Panu Matilainen [Mon, 28 Apr 2008 17:05:07 +0000 (20:05 +0300)]
Remove unused alloca_strdup() macro

16 years agoRemove alloca() from strntoul() helper in cpio
Panu Matilainen [Mon, 28 Apr 2008 16:10:25 +0000 (19:10 +0300)]
Remove alloca() from strntoul() helper in cpio
- only small (< 10 chars) buffers from struct cpioCrcPhysicalHeader are
  ever passed in, tmp buffer on stack is safe

16 years agoGet rid of string hackery in rpmdb-py.c
Jindrich Novy [Mon, 28 Apr 2008 13:59:46 +0000 (15:59 +0200)]
Get rid of string hackery in rpmdb-py.c

16 years agoRemove alloca() from argv.c
Jindrich Novy [Mon, 28 Apr 2008 13:42:04 +0000 (15:42 +0200)]
Remove alloca() from argv.c

16 years agoOops...
Panu Matilainen [Mon, 28 Apr 2008 13:22:33 +0000 (16:22 +0300)]
Oops...

16 years ago..and for parseForLang()
Panu Matilainen [Mon, 28 Apr 2008 13:03:44 +0000 (16:03 +0300)]
..and for parseForLang()
- return rpmRC like the others
- avoid alloca()
- streamline exit paths

16 years ago..and the same for parseForConfig()
Panu Matilainen [Mon, 28 Apr 2008 13:00:16 +0000 (16:00 +0300)]
..and the same for parseForConfig()
- streamline exists, avoid alloca()

16 years agoparseForAttr() tweaks
Panu Matilainen [Mon, 28 Apr 2008 12:57:32 +0000 (15:57 +0300)]
parseForAttr() tweaks
- streamline exit paths a bit
- replace alloca() with xmalloc()
- avoid messing q value while checking for white space
- return rpmRC like the others

16 years agoAvoid alloca() in parseForVerify(), streamline exit paths a bit
Panu Matilainen [Mon, 28 Apr 2008 12:50:15 +0000 (15:50 +0300)]
Avoid alloca() in parseForVerify(), streamline exit paths a bit

16 years agoAvoid alloca() in parseForDev()
Panu Matilainen [Mon, 28 Apr 2008 12:41:55 +0000 (15:41 +0300)]
Avoid alloca() in parseForDev()

16 years agoOops, simplified it a little bit much, fixing
Jindrich Novy [Mon, 28 Apr 2008 12:08:35 +0000 (14:08 +0200)]
Oops, simplified it a little bit much, fixing

16 years agoAvoid alloca() in rpmGetFilesystemUsage()
Panu Matilainen [Mon, 28 Apr 2008 11:47:12 +0000 (14:47 +0300)]
Avoid alloca() in rpmGetFilesystemUsage()

16 years agoAvoid alloca() in getFilesystemList()
Panu Matilainen [Mon, 28 Apr 2008 11:42:10 +0000 (14:42 +0300)]
Avoid alloca() in getFilesystemList()

16 years agoRemove remaining alloca() from rpmdb.c
Jindrich Novy [Mon, 28 Apr 2008 11:41:45 +0000 (13:41 +0200)]
Remove remaining alloca() from rpmdb.c

16 years agoSimplify dirName handling in rpmdbFindByFile()
Jindrich Novy [Mon, 28 Apr 2008 11:40:56 +0000 (13:40 +0200)]
Simplify dirName handling in rpmdbFindByFile()

16 years agoDrop va_copy check, it's already done by C99 checks
Panu Matilainen [Mon, 28 Apr 2008 10:56:31 +0000 (13:56 +0300)]
Drop va_copy check, it's already done by C99 checks

16 years agoRequire C99 capable compiler in configure
Panu Matilainen [Mon, 28 Apr 2008 10:53:35 +0000 (13:53 +0300)]
Require C99 capable compiler in configure
- also enable C99 mode if not on by default

16 years agoRemove alloca() ussage from rpmcache.c
Jindrich Novy [Mon, 28 Apr 2008 10:50:24 +0000 (12:50 +0200)]
Remove alloca() ussage from rpmcache.c

16 years agoRemove unused alloca'd variable
Jindrich Novy [Mon, 28 Apr 2008 10:50:01 +0000 (12:50 +0200)]
Remove unused alloca'd variable

16 years agoRemove alloca() from build()
Jindrich Novy [Mon, 28 Apr 2008 10:38:32 +0000 (12:38 +0200)]
Remove alloca() from build()

16 years agoEliminate pointless alloca() of hsa struct
Panu Matilainen [Mon, 28 Apr 2008 09:31:51 +0000 (12:31 +0300)]
Eliminate pointless alloca() of hsa struct

16 years agoRemove bogus/misleading return value of hsaInit() and hsaFini()
Panu Matilainen [Mon, 28 Apr 2008 09:25:25 +0000 (12:25 +0300)]
Remove bogus/misleading return value of hsaInit() and hsaFini()
- they don't (de)allocate anything, just modify contents of hsa arg

16 years agoRemove useless hsa != NULL checks
Panu Matilainen [Mon, 28 Apr 2008 09:22:33 +0000 (12:22 +0300)]
Remove useless hsa != NULL checks
- hsa has been already dereferenced before it's even checked for NULL in
  both hsaInit() and hsaNext()
- they're just internal interfaces with limited number of callers, we know
  hsa can't be NULL

16 years agoRemove unused variable
Panu Matilainen [Mon, 28 Apr 2008 07:59:42 +0000 (10:59 +0300)]
Remove unused variable

16 years agoEliminate pointless alloca() of entryInfo and indexEntry structs
Panu Matilainen [Sat, 26 Apr 2008 11:41:58 +0000 (14:41 +0300)]
Eliminate pointless alloca() of entryInfo and indexEntry structs

16 years agoEliminate pointless alloca() of local DBT structs
Panu Matilainen [Sat, 26 Apr 2008 12:05:50 +0000 (15:05 +0300)]
Eliminate pointless alloca() of local DBT structs

16 years agoEliminate pointless alloca() of struct fileIndexEntry struct
Panu Matilainen [Sat, 26 Apr 2008 12:02:33 +0000 (15:02 +0300)]
Eliminate pointless alloca() of struct fileIndexEntry struct

16 years agoEliminate pointless alloca() of availableIndexEntry struct.
Panu Matilainen [Sat, 26 Apr 2008 11:59:09 +0000 (14:59 +0300)]
Eliminate pointless alloca() of availableIndexEntry struct.

16 years agoEliminate pointless alloca()'s of local dirInfo struct
Panu Matilainen [Sat, 26 Apr 2008 11:51:20 +0000 (14:51 +0300)]
Eliminate pointless alloca()'s of local dirInfo struct

16 years agoEliminate pointless alloca() of entryInfo and indexEntry structs
Panu Matilainen [Sat, 26 Apr 2008 11:27:30 +0000 (14:27 +0300)]
Eliminate pointless alloca() of entryInfo and indexEntry structs

16 years agoEliminate pointless alloca() of local DBT structs.
Panu Matilainen [Sat, 26 Apr 2008 11:21:22 +0000 (14:21 +0300)]
Eliminate pointless alloca() of local DBT structs.

16 years agoRevert bunch of alloca() -> xcalloc() changes in rpmdb routines
Panu Matilainen [Fri, 25 Apr 2008 17:29:14 +0000 (20:29 +0300)]
Revert bunch of alloca() -> xcalloc() changes in rpmdb routines
- reverts the following commits:
  0b0dcd114028e1e2a00870917cf07a27858a30b1
  71018d6d2d67b0e17c737e7a90cc6bb704e224ba
  f6134083c29c6cbb3be255fadae47a03d35b09f1