tools/librpm-tizen.git
14 years agoRemove redundant NULL-check
Panu Matilainen [Tue, 22 Dec 2009 11:11:00 +0000 (13:11 +0200)]
Remove redundant NULL-check

14 years agoEliminate unnecessary url parsing from rpmtsRootDir()
Panu Matilainen [Tue, 22 Dec 2009 11:01:36 +0000 (13:01 +0200)]
Eliminate unnecessary url parsing from rpmtsRootDir()
- url's in transaction root hasn't been permitted since rpm 4.6.0 days

14 years agoLose the now empty header_internal.c source
Panu Matilainen [Tue, 22 Dec 2009 10:34:19 +0000 (12:34 +0200)]
Lose the now empty header_internal.c source

14 years agoMove htonll() into header.c and make static, not needed elsewhere
Panu Matilainen [Tue, 22 Dec 2009 10:33:16 +0000 (12:33 +0200)]
Move htonll() into header.c and make static, not needed elsewhere

14 years agoMove the legacy compatibility goo into legacy.c
Panu Matilainen [Tue, 22 Dec 2009 10:30:45 +0000 (12:30 +0200)]
Move the legacy compatibility goo into legacy.c
- no functional changes
- headerGetRawEntry() hasn't had a public prototype since rpm 4.0 days
  but there are some 3rd party users still (sigh), leave it alone as
  exposing the proto now would only cause *more* trouble to the external
  users

14 years agoMove the higher level convenience functions out of header.c
Panu Matilainen [Tue, 22 Dec 2009 10:11:42 +0000 (12:11 +0200)]
Move the higher level convenience functions out of header.c
- header.c is big enough as it is, and none of these things needs
  header struct internals for anything
- no functional changes, just moving stuff around

14 years agoRename hdrNVR.c to more obvious and generic headerutil.c
Panu Matilainen [Tue, 22 Dec 2009 10:07:12 +0000 (12:07 +0200)]
Rename hdrNVR.c to more obvious and generic headerutil.c
- no functional changes
- remove it from translation list, there's nothing here to translate...

14 years agoWork on tsortinfo instead of ts elements when ordering everywhere
Panu Matilainen [Mon, 21 Dec 2009 13:01:27 +0000 (15:01 +0200)]
Work on tsortinfo instead of ts elements when ordering everywhere
- ...except addRelation() which still needs rpmteTSI() for grabbing
  tsort info from elements in rpmal

14 years agoWork on tsortInfo nodes directly when detecting SCC's
Panu Matilainen [Mon, 21 Dec 2009 12:13:35 +0000 (14:13 +0200)]
Work on tsortInfo nodes directly when detecting SCC's
- pass the local order info struct to detectSCC() and work on that
  instead of ping-ponging to the TSI's through transaction elements

14 years agoRecord relations to tsortInfos instead of transaction elements
Panu Matilainen [Mon, 21 Dec 2009 10:59:38 +0000 (12:59 +0200)]
Record relations to tsortInfos instead of transaction elements

14 years agoSave pointer to ts element in the tsort info struct
Panu Matilainen [Mon, 21 Dec 2009 10:30:04 +0000 (12:30 +0200)]
Save pointer to ts element in the tsort info struct

14 years agoAvoid a bunch of redundant rpmteTSI() calls
Panu Matilainen [Mon, 21 Dec 2009 10:18:22 +0000 (12:18 +0200)]
Avoid a bunch of redundant rpmteTSI() calls

14 years agoEliminate unnecessary depth member from tsortinfo
Panu Matilainen [Mon, 21 Dec 2009 10:12:29 +0000 (12:12 +0200)]
Eliminate unnecessary depth member from tsortinfo
- its only used for debug log formatting and we can calculate it from
  the number of parents in the debug case

14 years agoEliminate unnecessary npreds member from tsort info
Panu Matilainen [Mon, 21 Dec 2009 08:41:03 +0000 (10:41 +0200)]
Eliminate unnecessary npreds member from tsort info
- this is the same as tsi_count

14 years agoEliminate unused tree index and degree from ordering calculations
Panu Matilainen [Mon, 21 Dec 2009 08:37:48 +0000 (10:37 +0200)]
Eliminate unused tree index and degree from ordering calculations

14 years agoAvoid a few unnecessary rpmteTSI() calls in addRelation()
Panu Matilainen [Mon, 21 Dec 2009 06:17:05 +0000 (08:17 +0200)]
Avoid a few unnecessary rpmteTSI() calls in addRelation()

14 years agoRemove unused ordering related members from rpmts struct
Panu Matilainen [Fri, 18 Dec 2009 13:28:36 +0000 (15:28 +0200)]
Remove unused ordering related members from rpmts struct

14 years agoBury ordering structures and their alloc+free inside order.c
Panu Matilainen [Mon, 21 Dec 2009 07:20:09 +0000 (09:20 +0200)]
Bury ordering structures and their alloc+free inside order.c
- nothing outside order.c needs this stuff, TSI alloc+free routines
  have no business being exported
- for now we need to store a pointer to tsortInfo in the elements,
  its just an opaque pointer for ping-ponging the data through ts elements
- all allocation + freeing is local to ordering code

14 years agoEliminate the rpmte tsort info manipulation public API
Panu Matilainen [Fri, 18 Dec 2009 10:20:05 +0000 (12:20 +0200)]
Eliminate the rpmte tsort info manipulation public API
- its not useful outside the ordering internals and API users have no
  business messing with it

14 years agoConvert rpmtsOrder() to manipulate the tsort data from tsortInfo directly
Panu Matilainen [Fri, 18 Dec 2009 10:16:25 +0000 (12:16 +0200)]
Convert rpmtsOrder() to manipulate the tsort data from tsortInfo directly

14 years agoConvert addRelation() to manipulate the tsort data from tsortInfo directly
Panu Matilainen [Fri, 18 Dec 2009 10:12:44 +0000 (12:12 +0200)]
Convert addRelation() to manipulate the tsort data from tsortInfo directly

14 years agoConvert collectTE() to manipulate the tsort data from tsortInfo directly
Panu Matilainen [Fri, 18 Dec 2009 10:10:01 +0000 (12:10 +0200)]
Convert collectTE() to manipulate the tsort data from tsortInfo directly

14 years agoAvoid some unnecessary rpmteTSI() calls in collectTE()
Panu Matilainen [Fri, 18 Dec 2009 10:05:30 +0000 (12:05 +0200)]
Avoid some unnecessary rpmteTSI() calls in collectTE()
- we have q's TSI in local variable already, use it
- also rename tsi -> q_tsi so it's obvious which one we're manipulating

14 years agoMove tsort data out of rpmte into, duh, tsortInfo
Panu Matilainen [Fri, 18 Dec 2009 09:56:04 +0000 (11:56 +0200)]
Move tsort data out of rpmte into, duh, tsortInfo

14 years agoMove transaction element iterator into rpmts.c where it logically belongs
Panu Matilainen [Fri, 18 Dec 2009 07:04:57 +0000 (09:04 +0200)]
Move transaction element iterator into rpmts.c where it logically belongs
- make rpmtsi_s really opaque, move rpmtsi typedef to rpmtypes.h
  along with all the other commonly used types

14 years agoEliminate unused and unnecessary rpmteBreadth() and rpmteSetBreadth()
Panu Matilainen [Thu, 17 Dec 2009 15:33:05 +0000 (17:33 +0200)]
Eliminate unused and unnecessary rpmteBreadth() and rpmteSetBreadth()

14 years agoEliminate unnecessary rpmtsiOc()
Panu Matilainen [Thu, 17 Dec 2009 15:28:37 +0000 (17:28 +0200)]
Eliminate unnecessary rpmtsiOc()
- it used to be called from ordering code but now there's precisely
  one caller which used it as a fancy way to do increment an integer... rip

14 years agoEliminate unused + unnecessary transaction element iterator mode
Panu Matilainen [Thu, 17 Dec 2009 14:47:12 +0000 (16:47 +0200)]
Eliminate unused + unnecessary transaction element iterator mode

14 years agoEliminate unnecessary ts ping-pong inside rpmte
Panu Matilainen [Thu, 17 Dec 2009 14:17:45 +0000 (16:17 +0200)]
Eliminate unnecessary ts ping-pong inside rpmte
- rpmteNew() and the stuff it calls doesn't need the transaction set
  for anything since a long time
- document ts argument to be unused

14 years agoFix ts element package file size on large packages
Panu Matilainen [Thu, 17 Dec 2009 14:10:37 +0000 (16:10 +0200)]
Fix ts element package file size on large packages
- RPMTAG_SIGSIZE is limited to 4GB, grab RPMTAG_LONGSIGSIZE through
  headerGetNumber() grabs the correct tag automatically and simplifies
  the code a bit

14 years agoEliminate now unnecessary rpmteFd()
Panu Matilainen [Thu, 17 Dec 2009 13:51:58 +0000 (15:51 +0200)]
Eliminate now unnecessary rpmteFd()
- ...which should've never been exported in the first place

14 years agoMove payload open into rpmte (internal) method
Panu Matilainen [Thu, 17 Dec 2009 13:50:09 +0000 (15:50 +0200)]
Move payload open into rpmte (internal) method
- the transaction element has all the necessary info to do this,
  having it in psm just requires exposing otherwise unnecessary methods

14 years agoHardwire lead major version to 3 (RhBug:546663)
Panu Matilainen [Thu, 17 Dec 2009 09:35:11 +0000 (11:35 +0200)]
Hardwire lead major version to 3 (RhBug:546663)
- besides the logic being backwards wrt intended --nodirtokens linkage,
  LSB wants this to be 3 and .. it just makes no difference whatsover
  anyway

14 years agoUse grep -E and grep -F instead of egrep and fgrep.
Ville Skyttä [Wed, 16 Dec 2009 21:14:04 +0000 (23:14 +0200)]
Use grep -E and grep -F instead of egrep and fgrep.

egrep and fgrep are deprecated in GNU grep and "historical" in POSIX.

14 years agoMove python ts element key refcounting back to C-side of things
Panu Matilainen [Thu, 17 Dec 2009 08:38:08 +0000 (10:38 +0200)]
Move python ts element key refcounting back to C-side of things
- it's really the C-side that needs this, doing it in C avoids nasty
  surprises when subclassing rpm.ts
- partial revert of commit 92d18d1d7139b37065ea742cfe0e8cee5e9c3500

14 years agoPermit unexpanded macros to slip through spec tag sanity checks (RhBug:547997)
Panu Matilainen [Thu, 17 Dec 2009 06:43:31 +0000 (08:43 +0200)]
Permit unexpanded macros to slip through spec tag sanity checks (RhBug:547997)
- For now, let %{} characters through our valid character set checks
  on specs. This isn't right really, but unexpanded, unrelated macros
  in spec can now cause failure to parse out buildrequires which would
  allow those macros to be expanded. This needs a better fix.

14 years agoAvoid mucking with fsm->rdbuf in fsmRmdirs() and fsmMkdirs()
Panu Matilainen [Wed, 16 Dec 2009 08:30:17 +0000 (10:30 +0200)]
Avoid mucking with fsm->rdbuf in fsmRmdirs() and fsmMkdirs()
- we already calculate the string length, just use a variable local array

14 years agoRemove now unnecessary const-avoidance construct
Panu Matilainen [Wed, 16 Dec 2009 08:09:26 +0000 (10:09 +0200)]
Remove now unnecessary const-avoidance construct

14 years agoConst-correctness on fsmRmdirs() and fsmMkdirs()
Panu Matilainen [Wed, 16 Dec 2009 07:52:59 +0000 (09:52 +0200)]
Const-correctness on fsmRmdirs() and fsmMkdirs()
- both functions need to copy the data anyway as they modify, just use
  a helper variable to cleanly avoid the const strings from iterator

14 years agoRemove bogus const from fsm [o]path members and use of _constfree()
Panu Matilainen [Wed, 16 Dec 2009 07:43:55 +0000 (09:43 +0200)]
Remove bogus const from fsm [o]path members and use of _constfree()
- in reality the paths point to allocated memory at all times

14 years agoSimplify fsmFsPath()
Panu Matilainen [Wed, 16 Dec 2009 07:25:55 +0000 (09:25 +0200)]
Simplify fsmFsPath()

14 years agoKill of ancient unused kludgery over buggy packages
Panu Matilainen [Tue, 15 Dec 2009 12:43:40 +0000 (14:43 +0200)]
Kill of ancient unused kludgery over buggy packages

14 years agoKill off stillborn fsm threading stuff
Panu Matilainen [Tue, 15 Dec 2009 12:42:12 +0000 (14:42 +0200)]
Kill off stillborn fsm threading stuff

14 years agoKill off stillborn "not yet" code from 2001
Panu Matilainen [Tue, 15 Dec 2009 12:39:57 +0000 (14:39 +0200)]
Kill off stillborn "not yet" code from 2001

14 years agoEliminate transaction disk space checking functions from the API
Panu Matilainen [Mon, 14 Dec 2009 13:23:28 +0000 (15:23 +0200)]
Eliminate transaction disk space checking functions from the API
- The DSI stuff runs from deep inside rpmtsRun() with no chance for
  API users to do anything with it. Bury into transaction.c and
  make static to let us change the way it works without API constraints...

14 years agoFix memleak in python ts.hdrFromFdno()
Panu Matilainen [Wed, 9 Dec 2009 13:11:39 +0000 (15:11 +0200)]
Fix memleak in python ts.hdrFromFdno()
- the python object holds reference to header here, decref the header
  so it gets freed eventually

14 years agoFix a few list-related memleaks in python bindings
Panu Matilainen [Wed, 9 Dec 2009 12:42:03 +0000 (14:42 +0200)]
Fix a few list-related memleaks in python bindings
- PyList_Append() bumps the object reference count, callers need to
  explicitly decref them... oops :)

14 years agoKick out one remaining sqlite reference (in the translations)
Panu Matilainen [Wed, 9 Dec 2009 09:17:04 +0000 (11:17 +0200)]
Kick out one remaining sqlite reference (in the translations)

14 years agoRemove sqlite hacks from rpmdb.c
Florian Festi [Wed, 9 Dec 2009 08:50:58 +0000 (09:50 +0100)]
Remove sqlite hacks from rpmdb.c

14 years agoAvoid exposing libmagic dependency in public headers
Panu Matilainen [Tue, 8 Dec 2009 14:22:42 +0000 (16:22 +0200)]
Avoid exposing libmagic dependency in public headers

14 years agoAvoid noise from python bytecompile on non-python pkgs (RhBug:539635)
Panu Matilainen [Tue, 8 Dec 2009 13:58:51 +0000 (15:58 +0200)]
Avoid noise from python bytecompile on non-python pkgs (RhBug:539635)
- If a pattern doesn't match, we'd prefer an empty list instead of
  unexpanded garbage thank you... nullglob shell option is just what the
  doctor ordered but unfortunately its a bash-specific thing. Otoh there
  are number of other bash-specific scripts in rpm so probably not
  much of an issue...

14 years agoRemoved obsolete "db3" entry in dbi_config_default
Florian Festi [Thu, 3 Dec 2009 12:56:00 +0000 (13:56 +0100)]
Removed obsolete "db3" entry in dbi_config_default

14 years agoRemove support for sqlite based rpm database
Florian Festi [Thu, 3 Dec 2009 12:50:37 +0000 (13:50 +0100)]
Remove support for sqlite based rpm database
Also remove abstraction layer between rpmdb.h and the back end
in lib/backend/

14 years agoPreparing for 4.8.0-beta1
Panu Matilainen [Mon, 7 Dec 2009 11:51:48 +0000 (13:51 +0200)]
Preparing for 4.8.0-beta1

14 years agoBump soname for all our libraries
Panu Matilainen [Mon, 7 Dec 2009 11:35:53 +0000 (13:35 +0200)]
Bump soname for all our libraries
- while the "really public" API of librpmio has only been enhanced,
  librpm and librpmbuild use some supposedly internal bits which *have*
  changed considerably, so just to prevent anybody thinking they can
  combine librpmio from rpm 4.7 and librpm from this...
- librpmbuild hasn't seen much real change but some (unfortunately)
  exposed struct members have changed so...
- librpm is mostly compatible but as rpmal has become internal API,
  we need to bump (annoyingly, as nothing actually uses rpmal ... sigh)

14 years agots.check() is supposed to return empty list when no problems
Panu Matilainen [Mon, 7 Dec 2009 10:38:39 +0000 (12:38 +0200)]
ts.check() is supposed to return empty list when no problems

14 years agoDisable the entire rpm.td type for now
Panu Matilainen [Mon, 7 Dec 2009 09:32:51 +0000 (11:32 +0200)]
Disable the entire rpm.td type for now
- need to figure out saner semantics & stuff...

14 years agoMake python header iterator return keys, not values
Panu Matilainen [Mon, 7 Dec 2009 09:21:14 +0000 (11:21 +0200)]
Make python header iterator return keys, not values
- this is how python built-in dictionary works, be consistent with that
- also avoids having to decide what to do with rpm.td type right now...

14 years agoAlways return malloced data from i18n extensions for consistency
Panu Matilainen [Mon, 7 Dec 2009 07:12:44 +0000 (09:12 +0200)]
Always return malloced data from i18n extensions for consistency

14 years agoBump up the python version requirement to match reality
Panu Matilainen [Sat, 5 Dec 2009 09:05:39 +0000 (11:05 +0200)]
Bump up the python version requirement to match reality
- Python >= 2.6 is known to work, 2.5 might be possible with __future__
  imports but until somebody tests it...

14 years agoFix the posix chown test for selinux enabled systems (RhBug:543035)
Panu Matilainen [Wed, 2 Dec 2009 13:30:27 +0000 (15:30 +0200)]
Fix the posix chown test for selinux enabled systems (RhBug:543035)
- on selinux enabled systems, 'ls -l' mode string is longer than
  expected here, just trim the ls output to our expected length

14 years agoBack out overly strict file type check on %ghost files
Panu Matilainen [Wed, 2 Dec 2009 11:22:11 +0000 (13:22 +0200)]
Back out overly strict file type check on %ghost files
- we currently only support creating regular files for %ghosts which
  dont exist in the buildroot, but for files that do exist in the buildroot
  there's no reason to place such limits (eg its perfectly ok to have
  symlinks marked as %ghosts)

14 years agoUse AS_HELP_STRING() for configure option output
Panu Matilainen [Fri, 27 Nov 2009 13:57:44 +0000 (15:57 +0200)]
Use AS_HELP_STRING() for configure option output

14 years agoRemove pointless message translation from check-buildroot
Panu Matilainen [Fri, 27 Nov 2009 13:12:52 +0000 (15:12 +0200)]
Remove pointless message translation from check-buildroot
- these scripts aren't processed for translation and unlikely to ever be...
- fixes the remaining complaint from ticket #62

14 years agoRemove ancient broken scripts from the repository
Panu Matilainen [Fri, 27 Nov 2009 13:10:57 +0000 (15:10 +0200)]
Remove ancient broken scripts from the repository
- also eliminates one more "bashism" complaint of ticket #62

14 years agoFiddling with ulimit settings does not belong to dep extractor scripts
Panu Matilainen [Fri, 27 Nov 2009 12:55:12 +0000 (14:55 +0200)]
Fiddling with ulimit settings does not belong to dep extractor scripts
- fixes one of the bashisms in ticket #62

14 years agoCorrectly pass optional tag argument from hdr.dsFromHeader() (ticket #108)
Panu Matilainen [Fri, 27 Nov 2009 07:28:11 +0000 (09:28 +0200)]
Correctly pass optional tag argument from hdr.dsFromHeader() (ticket #108)

14 years agoDont try to pass anything to rpm.fi() from hdr.fiFromHeader()
Panu Matilainen [Fri, 27 Nov 2009 07:15:56 +0000 (09:15 +0200)]
Dont try to pass anything to rpm.fi() from hdr.fiFromHeader()
- hdr.fiFromHeader() is just a deprecated backwards compatibility dummy
  and doesn't need to pass anything as there were no meaningful
  parameters in older versions

14 years agoDont fail build on unrecognized non-executable files (ticket #105)
Panu Matilainen [Thu, 26 Nov 2009 08:22:41 +0000 (10:22 +0200)]
Dont fail build on unrecognized non-executable files (ticket #105)
- Generally only executable files are critical for dependency extraction,
  whereas oddball application data files can cause unnecessary build
  failure due to libmagic misdetections etc, so just let non-executables
  pass with a warning and mark them as unknown data

14 years agoJust use autoreconf in autogen.sh (ticket #109)
Panu Matilainen [Thu, 26 Nov 2009 07:46:48 +0000 (09:46 +0200)]
Just use autoreconf in autogen.sh (ticket #109)
- instead of doing stuff by "hand" and getting it wrong, let autoreconf
  worry about getting it right (if nothing else, we can then blame
  autoreconf instead of ourselves ;)

14 years agoFix signature password checking result on abnormal conditions (RhBug:496754)
Panu Matilainen [Wed, 25 Nov 2009 14:42:43 +0000 (16:42 +0200)]
Fix signature password checking result on abnormal conditions (RhBug:496754)
- Execve() failure wasn't returning an error code, causing rpm to
  think the password was ok when we couldn't even try verifying
- Stricter return code checking from the password checking child:
  the password can only be ok if the child exits with WIFEXITED() *and*
  WIFEXITCODE() of 0. Also WIFEXITCODE() should only be called if
  WIFEXITED() returns true.

14 years agoWe can't handle OpenPGP subkeys or secret keys, so dont even try
Panu Matilainen [Wed, 25 Nov 2009 13:07:17 +0000 (15:07 +0200)]
We can't handle OpenPGP subkeys or secret keys, so dont even try
- parsing subkeys ends up overwriting data in the main key, causing
  bogus signature checking failures
- this is the final missing piece of RhBug:436812, short of adding
  proper support for subkeys (maybe someday...)

14 years agoDont blow up on headers without requireflags in rpmdsNew()
Panu Matilainen [Tue, 24 Nov 2009 14:57:46 +0000 (16:57 +0200)]
Dont blow up on headers without requireflags in rpmdsNew()

14 years agoNuke leftover debug junk
Panu Matilainen [Tue, 24 Nov 2009 12:36:03 +0000 (14:36 +0200)]
Nuke leftover debug junk

14 years agoSupport constructing header data from python
Panu Matilainen [Tue, 24 Nov 2009 12:27:49 +0000 (14:27 +0200)]
Support constructing header data from python
- no proper i18n string support yet, just the basic types
- basic data type validation only, no overflow checking for integer types
- for lists, validate all items before trying to insert anything
- duplicate tag creation not permitted
- appending not permitted, only assignment (and deletion already)
- there are probably bugs...
- watch out for librpm bugs when passed incomplete headers, ugh

14 years agoDisable rpm.td type for now
Panu Matilainen [Tue, 24 Nov 2009 12:02:52 +0000 (14:02 +0200)]
Disable rpm.td type for now
- its not that clear that exporting the td type is really useful
  (certainly not in its current form), avoid exporting an interface we
  might not want to support

14 years agoFix hdrContains() return value on error
Panu Matilainen [Mon, 23 Nov 2009 14:45:09 +0000 (16:45 +0200)]
Fix hdrContains() return value on error

14 years agoRemove bogus rpmpopt.pot file (ticket #77)
Panu Matilainen [Mon, 23 Nov 2009 13:12:04 +0000 (15:12 +0200)]
Remove bogus rpmpopt.pot file (ticket #77)
- this is supposed to automatically generated on update-po time from
  toplevel rpmpopt file and merged into rpm.pot but has been broken for
  a long long time and also the $ translation marking has been deprecated
  for security reasons

14 years agoRemove hdr.has_key() method, support 'key in h' style instead
Panu Matilainen [Sat, 21 Nov 2009 09:31:50 +0000 (11:31 +0200)]
Remove hdr.has_key() method, support 'key in h' style instead
- Python 3 removed has_key() from dictionaries, as the 'in' way is the
  way of the future support that from the start (has_key() is not in
  any released rpm version so its safe to remove)

14 years agoRemove unnecessary hdr.instance() method
Panu Matilainen [Sat, 21 Nov 2009 09:07:29 +0000 (11:07 +0200)]
Remove unnecessary hdr.instance() method
- this is available through tag extension now, no point having a
  separate method for it

14 years agoTypos in exception messages
Panu Matilainen [Sat, 21 Nov 2009 08:55:24 +0000 (10:55 +0200)]
Typos in exception messages

14 years agoError out early trying to install on readonly fs (ticket #99, RhBug:464750)
Panu Matilainen [Fri, 20 Nov 2009 14:00:06 +0000 (16:00 +0200)]
Error out early trying to install on readonly fs (ticket #99, RhBug:464750)
- simply make readonly filesystems appear as full, preventing install
  early instead of failing with cpio errors in middle of transaction

14 years agoConvert French man page to Unix line-endings
Panu Matilainen [Fri, 20 Nov 2009 09:49:05 +0000 (11:49 +0200)]
Convert French man page to Unix line-endings

14 years agoFix build with binutils-gold (ticket #107)
Panu Matilainen [Fri, 20 Nov 2009 09:12:39 +0000 (11:12 +0200)]
Fix build with binutils-gold (ticket #107)
- patch from Michal Čihař

14 years agoAdd RPMTAG_EPOCHNUM tag extension
Panu Matilainen [Fri, 20 Nov 2009 08:32:47 +0000 (10:32 +0200)]
Add RPMTAG_EPOCHNUM tag extension
- return RPMTAG_EPOCH but convert non-existent epoch to 0, as rpm internals
  treat it

14 years agoAdd spec package type with access to headers to python rpmb module
Panu Matilainen [Thu, 19 Nov 2009 08:51:23 +0000 (10:51 +0200)]
Add spec package type with access to headers to python rpmb module
- permits python to access parsed headers from spec files
- ticket #14, RhBug:462726

14 years agoPermit header object generation from PyCObjects
Panu Matilainen [Thu, 19 Nov 2009 08:16:15 +0000 (10:16 +0200)]
Permit header object generation from PyCObjects
- needed for generating header objects from other extension modules &
  might be handy in some other cases too
- patently type-unsafe but as long as python doesn't provide a better
  way, not really our headache

14 years agoLose the silly specFromSpec()
Panu Matilainen [Wed, 18 Nov 2009 15:41:39 +0000 (17:41 +0200)]
Lose the silly specFromSpec()
- its our own private data structure we're accessing here, no need
  for extra wrappers and nothing outside spec-py.c needs this

14 years agoTurn current python spec methods into read-only attributes via getseters
Panu Matilainen [Wed, 18 Nov 2009 15:28:13 +0000 (17:28 +0200)]
Turn current python spec methods into read-only attributes via getseters
- incompatible, but nobody is really using the spec bindings for
  anything as there's been very little you've been able do with them
- having the stuff accessible as getseters means we dont need 50 different
  fooSet() methods if/when we permit modifying these from python

14 years agoSanitize python spec.sources()
Panu Matilainen [Wed, 18 Nov 2009 15:16:45 +0000 (17:16 +0200)]
Sanitize python spec.sources()
- spec without sources is perfectly valid, just return an empty list
  instead of invalid NULL return without exception set and simplify

14 years agoPut a bit of sanity into python spec methods
Panu Matilainen [Wed, 18 Nov 2009 15:03:32 +0000 (17:03 +0200)]
Put a bit of sanity into python spec methods
- prep, build etc missing from spec are not errors
- instead of returning NULLs (with no exception set!), just return None
  for anything that doesn't exist
- dont bother with NULL checks, if s->spec is NULL then something else
  has screwed up big time

14 years agoOops, tp_dealloc doesn't return anything
Panu Matilainen [Wed, 18 Nov 2009 10:21:41 +0000 (12:21 +0200)]
Oops, tp_dealloc doesn't return anything

14 years agoFix rpmProblem reference counting in python bindings
Panu Matilainen [Wed, 18 Nov 2009 09:33:57 +0000 (11:33 +0200)]
Fix rpmProblem reference counting in python bindings

14 years agoDeclare a few python functions only taking one argument as such
Panu Matilainen [Wed, 18 Nov 2009 09:22:55 +0000 (11:22 +0200)]
Declare a few python functions only taking one argument as such

14 years agoRip python checkSignals() wtf'ery
Panu Matilainen [Wed, 18 Nov 2009 09:17:51 +0000 (11:17 +0200)]
Rip python checkSignals() wtf'ery
- since the function takes no arguments, declare it as such...

14 years agoPython archscore() only ever takes one argument, simplify
Panu Matilainen [Wed, 18 Nov 2009 08:54:58 +0000 (10:54 +0200)]
Python archscore() only ever takes one argument, simplify

14 years agoMake python ts.problems() return a python list, not rpm.ps object
Panu Matilainen [Wed, 18 Nov 2009 08:41:26 +0000 (10:41 +0200)]
Make python ts.problems() return a python list, not rpm.ps object
- rpm.ps object only supports iteration and subscript (with wonderfully
  wacko semantics), returning a regular list serves us better
- rip the now useless rpm.ps object type

14 years agoRemove unused psFromPs()
Panu Matilainen [Wed, 18 Nov 2009 07:40:30 +0000 (09:40 +0200)]
Remove unused psFromPs()

14 years agoEliminate broken rpmps append() method from python bindings (RhBug:538218)
Panu Matilainen [Wed, 18 Nov 2009 07:35:41 +0000 (09:35 +0200)]
Eliminate broken rpmps append() method from python bindings (RhBug:538218)
- The code to insert new problems has been using invalid conversion code
  causing crashes since 2004 and nobody noticed, safe to say this is an
  unused interface. Additionally the method argument flags were wrong, it
  was declared as METH_VARARGS but actually expected METH_O semantics. RIP.

14 years agoAdd in-memory hash for caching rpmdb dependency lookups
Panu Matilainen [Fri, 30 Oct 2009 11:31:01 +0000 (13:31 +0200)]
Add in-memory hash for caching rpmdb dependency lookups
- worst case behavior for uncached dependency lookups can be disastrous,
  eg > 35s vs < 1s on my laptop for trying to remove /bin/sh provider
- we only bother caching rpmdb lookups, the other cases plenty fast already
- using in-memory cache avoids nasty in vs out of chroot issues with
  temporary db files, which otherwise were about as fast