platform/upstream/rpm.git
15 years agoHandle .desktop files with spaces in filename (rhbz#520920)
Jindrich Novy [Thu, 3 Sep 2009 05:57:34 +0000 (07:57 +0200)]
Handle .desktop files with spaces in filename (rhbz#520920)
- thanks to Edward Sheldrake

15 years agoUse %{nvra} as default query format, much simpler...
Panu Matilainen [Wed, 2 Sep 2009 12:34:35 +0000 (15:34 +0300)]
Use %{nvra} as default query format, much simpler...

15 years agoFix dumb thinko from commit 4177fdffd6e7414123062e8716afb22596608531
Panu Matilainen [Wed, 2 Sep 2009 11:43:00 +0000 (14:43 +0300)]
Fix dumb thinko from commit 4177fdffd6e7414123062e8716afb22596608531

15 years agoTake advantage of headerGetNumber() to get buildtime..
Panu Matilainen [Wed, 2 Sep 2009 11:08:57 +0000 (14:08 +0300)]
Take advantage of headerGetNumber() to get buildtime..

15 years agoFurther simplify rpmVersionCompare()
Panu Matilainen [Wed, 2 Sep 2009 10:53:27 +0000 (13:53 +0300)]
Further simplify rpmVersionCompare()
- headerGetNumber() side-effect of returning zero on errors fits this
  job perfectly, simplifying things somewhat

15 years agoDeprecate headerGetColor(), implement using headerGetNumber()
Panu Matilainen [Wed, 2 Sep 2009 10:47:02 +0000 (13:47 +0300)]
Deprecate headerGetColor(), implement using headerGetNumber()

15 years agoEliminate headerGetColor() uses everywhere
Panu Matilainen [Wed, 2 Sep 2009 10:46:23 +0000 (13:46 +0300)]
Eliminate headerGetColor() uses everywhere

15 years agoAdd header color tag extension, ie headerGetColor()
Panu Matilainen [Wed, 2 Sep 2009 10:57:54 +0000 (13:57 +0300)]
Add header color tag extension, ie headerGetColor()
- use common numeric tag generation helper for header color
  and dbinstance tags

15 years agoAdd convenience function for retrieving numeric header data
Panu Matilainen [Wed, 2 Sep 2009 10:27:18 +0000 (13:27 +0300)]
Add convenience function for retrieving numeric header data

15 years agoOops, dont leak memory on invalid types to headerGet[As]String()
Panu Matilainen [Wed, 2 Sep 2009 10:24:59 +0000 (13:24 +0300)]
Oops, dont leak memory on invalid types to headerGet[As]String()

15 years agoTake advantage of new header string getters
Panu Matilainen [Wed, 2 Sep 2009 10:06:25 +0000 (13:06 +0300)]
Take advantage of new header string getters

15 years agoClean up rpmtsAddInstallElement() a bit
Panu Matilainen [Wed, 2 Sep 2009 10:00:59 +0000 (13:00 +0300)]
Clean up rpmtsAddInstallElement() a bit
- only bother retrieving os, arch and colors if actually needed
- obsoletes are never colored, remove the related cruft

15 years agoTake advantage of new header string getters
Panu Matilainen [Wed, 2 Sep 2009 09:43:24 +0000 (12:43 +0300)]
Take advantage of new header string getters

15 years agoTake advantage of new header string getters
Panu Matilainen [Wed, 2 Sep 2009 09:39:06 +0000 (12:39 +0300)]
Take advantage of new header string getters

15 years agoTake advantage of new header string getters
Panu Matilainen [Wed, 2 Sep 2009 09:38:20 +0000 (12:38 +0300)]
Take advantage of new header string getters

15 years agoSimplify rpmpsmStage() and srpm install a bit with the new getters
Panu Matilainen [Wed, 2 Sep 2009 09:34:21 +0000 (12:34 +0300)]
Simplify rpmpsmStage() and srpm install a bit with the new getters

15 years agoSimplify rpmVersionCompare() a bit
Panu Matilainen [Wed, 2 Sep 2009 09:24:01 +0000 (12:24 +0300)]
Simplify rpmVersionCompare() a bit

15 years agoSimplify headerCheckPayloadFormat() a bit
Panu Matilainen [Wed, 2 Sep 2009 09:19:15 +0000 (12:19 +0300)]
Simplify headerCheckPayloadFormat() a bit

15 years agoDeprecate headerNVR() and friends
Panu Matilainen [Wed, 2 Sep 2009 09:08:33 +0000 (12:08 +0300)]
Deprecate headerNVR() and friends
- reimplement using the new generic getters to simplify
- mark as deprecated, no uses inside rpm remain

15 years agoEliminate uses of headerNVR() and friends in librpm (and python) code
Panu Matilainen [Wed, 2 Sep 2009 09:06:34 +0000 (12:06 +0300)]
Eliminate uses of headerNVR() and friends in librpm (and python) code

15 years agoEliminate uses of headerNVR() and friends in librpmbuild code
Panu Matilainen [Wed, 2 Sep 2009 08:55:42 +0000 (11:55 +0300)]
Eliminate uses of headerNVR() and friends in librpmbuild code

15 years agoAdd tag extensions for common name-[epoch:]version-release[.arch] combos
Panu Matilainen [Wed, 2 Sep 2009 07:24:20 +0000 (10:24 +0300)]
Add tag extensions for common name-[epoch:]version-release[.arch] combos
- RPMTAG_NVRA same as rpm5.org, others are new tags

15 years agoAdd two new convenience functions for header string data
Panu Matilainen [Tue, 1 Sep 2009 14:10:18 +0000 (17:10 +0300)]
Add two new convenience functions for header string data
- headerGetString() for retrieving const strings directly from header memory
- headerGetAsString() for converting any non-array tag to string

15 years agoAdd dbinstance tag extension (port from rpm5.org)
Panu Matilainen [Tue, 1 Sep 2009 12:08:58 +0000 (15:08 +0300)]
Add dbinstance tag extension (port from rpm5.org)

15 years agoGroup tag inheritance doesn't need special treatment, just copy with others
Panu Matilainen [Tue, 1 Sep 2009 10:31:20 +0000 (13:31 +0300)]
Group tag inheritance doesn't need special treatment, just copy with others

15 years agoTriggerprein has been implemented since January 2008, update comment
Panu Matilainen [Tue, 1 Sep 2009 08:38:06 +0000 (11:38 +0300)]
Triggerprein has been implemented since January 2008, update comment

15 years agoAdd provide-extractors for fonts and desktop files
Panu Matilainen [Tue, 1 Sep 2009 07:52:12 +0000 (10:52 +0300)]
Add provide-extractors for fonts and desktop files
- extract mime handler capabilities from application .desktop files
- extract font family names and supported languages from font files
- both are used by PackageKit for on-demand installing of fonts and
  applications, but are useful for other things too

15 years agoFurther file-classifier tweaks
Panu Matilainen [Tue, 1 Sep 2009 07:40:50 +0000 (10:40 +0300)]
Further file-classifier tweaks
- disable "known tokens" lookups in ascii files, this is way too unreliable
  to do anything but cause pain
- consider text files as RPMFC_TEXT consistently
- font metrics files are not fonts

15 years agoMake internal file classifier look into compressed files
Panu Matilainen [Tue, 1 Sep 2009 07:31:44 +0000 (10:31 +0300)]
Make internal file classifier look into compressed files
- prerequisite for various things like font provide extraction
- at least libmagic from file-5.00 leaked fd's with MAGIC_COMPRESS,
  this has been fixed as of file-5.03

15 years agoReplace equal/not equal uses of str[n]cmp() with rstreq[n] in python code
Panu Matilainen [Mon, 31 Aug 2009 10:00:18 +0000 (13:00 +0300)]
Replace equal/not equal uses of str[n]cmp() with rstreq[n] in python code

15 years agoReplace equal/not equal uses of str[n]cmp() with rstreq[n] in binaries
Panu Matilainen [Mon, 31 Aug 2009 09:55:33 +0000 (12:55 +0300)]
Replace equal/not equal uses of str[n]cmp() with rstreq[n] in binaries

15 years agoReplace equal/not equal uses of str[n]cmp() with rstreq[n] in main ts code
Panu Matilainen [Mon, 31 Aug 2009 10:03:53 +0000 (13:03 +0300)]
Replace equal/not equal uses of str[n]cmp() with rstreq[n] in main ts code

15 years agoUse rpmFileHasSuffix() instead of doing the same manually
Panu Matilainen [Mon, 31 Aug 2009 09:46:59 +0000 (12:46 +0300)]
Use rpmFileHasSuffix() instead of doing the same manually

15 years agoReplace equal/not equal uses of str[n]cmp() with rstreq[n] in header code
Panu Matilainen [Mon, 31 Aug 2009 09:43:02 +0000 (12:43 +0300)]
Replace equal/not equal uses of str[n]cmp() with rstreq[n] in header code

15 years agoReplace equal/not equal uses of str[n]cmp() with rstreq[n] in misc helpers
Panu Matilainen [Mon, 31 Aug 2009 09:29:56 +0000 (12:29 +0300)]
Replace equal/not equal uses of str[n]cmp() with rstreq[n] in misc helpers

15 years agoReplace equal/not equal uses of str[n]cmp() with rstreq[n] in fsm & psm
Panu Matilainen [Mon, 31 Aug 2009 09:22:53 +0000 (12:22 +0300)]
Replace equal/not equal uses of str[n]cmp() with rstreq[n] in fsm & psm

15 years agosameProblem() return value is illogical, reverse it
Panu Matilainen [Mon, 31 Aug 2009 09:15:16 +0000 (12:15 +0300)]
sameProblem() return value is illogical, reverse it

15 years agoReplace equal/not equal uses of str[n]cmp() with rstreq[n] in rpmrc code
Panu Matilainen [Mon, 31 Aug 2009 08:30:53 +0000 (11:30 +0300)]
Replace equal/not equal uses of str[n]cmp() with rstreq[n] in rpmrc code

15 years agoReplace equal/not equal uses of str[n]cmp() with rstreq[n] in backend code
Panu Matilainen [Mon, 31 Aug 2009 08:22:47 +0000 (11:22 +0300)]
Replace equal/not equal uses of str[n]cmp() with rstreq[n] in backend code

15 years agoUgh, fix brokenness from previous commit
Panu Matilainen [Mon, 31 Aug 2009 08:20:40 +0000 (11:20 +0300)]
Ugh, fix brokenness from previous commit

15 years agoReplace equal/not equal uses of str[n]cmp() with rstreq[n] in io code
Panu Matilainen [Mon, 31 Aug 2009 08:15:16 +0000 (11:15 +0300)]
Replace equal/not equal uses of str[n]cmp() with rstreq[n] in io code

15 years agoReplace equal/not equal uses of str[n]cmp() with rstreq[n] in build code
Panu Matilainen [Mon, 31 Aug 2009 08:08:05 +0000 (11:08 +0300)]
Replace equal/not equal uses of str[n]cmp() with rstreq[n] in build code

15 years agoHum, rename rstrneq() to rstreqn() to avoid confusing neq with "not equal"
Panu Matilainen [Mon, 31 Aug 2009 07:44:35 +0000 (10:44 +0300)]
Hum, rename rstrneq() to rstreqn() to avoid confusing neq with "not equal"

15 years agoEliminate now unnecessary compressor -> ioflags conversions
Panu Matilainen [Mon, 31 Aug 2009 07:19:45 +0000 (10:19 +0300)]
Eliminate now unnecessary compressor -> ioflags conversions

15 years agoAccept direct compressor names as Fopen() modes too
Panu Matilainen [Mon, 31 Aug 2009 06:44:52 +0000 (09:44 +0300)]
Accept direct compressor names as Fopen() modes too

15 years agoSwitch rpmio mode checking to use rstreq()
Panu Matilainen [Mon, 31 Aug 2009 06:39:16 +0000 (09:39 +0300)]
Switch rpmio mode checking to use rstreq()

15 years agoAdd two helper functions for comparing string equality
Panu Matilainen [Mon, 31 Aug 2009 06:33:52 +0000 (09:33 +0300)]
Add two helper functions for comparing string equality

15 years agoEliminate unused result code from psm struct
Panu Matilainen [Fri, 28 Aug 2009 12:43:07 +0000 (15:43 +0300)]
Eliminate unused result code from psm struct

15 years agoEliminate payload file handle from psm struct
Panu Matilainen [Fri, 28 Aug 2009 12:36:07 +0000 (15:36 +0300)]
Eliminate payload file handle from psm struct
- it's only needed locally inside PSM_PROCESS on PSM_INSTALL

15 years agoDon't try to incref NULL ds
Panu Matilainen [Fri, 28 Aug 2009 07:52:49 +0000 (10:52 +0300)]
Don't try to incref NULL ds

15 years agoRemove extra trailing } copy-paste error from python_foo macros, duh
Panu Matilainen [Thu, 20 Aug 2009 11:10:41 +0000 (14:10 +0300)]
Remove extra trailing } copy-paste error from python_foo macros, duh

15 years agoWe always add EVR and Flags to dependencies, remove bogus condition
Panu Matilainen [Thu, 20 Aug 2009 10:04:21 +0000 (13:04 +0300)]
We always add EVR and Flags to dependencies, remove bogus condition

15 years agoFix duplicate dependency checking on build
Panu Matilainen [Thu, 20 Aug 2009 10:02:05 +0000 (13:02 +0300)]
Fix duplicate dependency checking on build
- Broken by commit af8b41c64af39ce07d85fcd92fa78d566747d815 which
  simplified too much.
- There's no guarantee that rpmdsNew() returns a sorted dependency set
  so rpmdsFind() doesn't work correctly here. Walk the ds manually instead.
- With multiple triggers of same type, identical trigger conditions on
  different trigger script were seen as duplicates (RhBug:490378)
- Split the duplicate checking to separate helper function for clarity

15 years agoCopy BUGURL to source rpm's too
Panu Matilainen [Tue, 18 Aug 2009 08:46:12 +0000 (11:46 +0300)]
Copy BUGURL to source rpm's too
- should've been in commit 86032bfbb61f1bdee9ac42989a14ea40bed0deec, duh

15 years agoAdd some commonly used python macros (ticket #83)
Panu Matilainen [Tue, 18 Aug 2009 06:20:45 +0000 (09:20 +0300)]
Add some commonly used python macros (ticket #83)
- macros to determine python version and library paths

15 years agoEliminate unused code (leftover from ordering rewrite)
Panu Matilainen [Mon, 17 Aug 2009 12:06:39 +0000 (15:06 +0300)]
Eliminate unused code (leftover from ordering rewrite)

15 years agoDon't bother relocating packages no files
Panu Matilainen [Mon, 17 Aug 2009 11:40:39 +0000 (14:40 +0300)]
Don't bother relocating packages no files
- fixes a small memleak

15 years agoAvoid adding Lua sources and patches twice when recursing (ticket #82)
Panu Matilainen [Mon, 17 Aug 2009 09:07:48 +0000 (12:07 +0300)]
Avoid adding Lua sources and patches twice when recursing (ticket #82)
- parseSpec() operates on newly created empty spec structures even when
  "recursing" but the lua variables are global and need recursion
  protection to avoid adding multiple times

15 years agoAdd default %clean section unless overridden in spec (ticket #81)
Panu Matilainen [Mon, 17 Aug 2009 08:22:16 +0000 (11:22 +0300)]
Add default %clean section unless overridden in spec (ticket #81)
- avoids silly clutter in every specfile in the regular case but permits
  overriding if needed for whatever reason
- it's a spec behavior change but mostly backwards compatible:
  existing specs will do whatever the %clean does, and if you need to avoid
  calling %clean for whatever reason just keep an empty %clean in the spec

15 years agoAdd -d option to %patch.
Ville Skyttä [Tue, 16 Jun 2009 19:25:02 +0000 (22:25 +0300)]
Add -d option to %patch.

15 years agoAdd isSource() method to python header object (ticket #32)
Panu Matilainen [Fri, 14 Aug 2009 08:30:07 +0000 (11:30 +0300)]
Add isSource() method to python header object (ticket #32)

15 years agoAdd %make_install macro that does the "right thing" wrt modern autotools
Panu Matilainen [Fri, 14 Aug 2009 08:27:57 +0000 (11:27 +0300)]
Add %make_install macro that does the "right thing" wrt modern autotools
- old %makeinstall for broken/ancient autotools left untouched for
  backwards compatibility

15 years agoAdd bug URL macro so that it could be set distro-wide (rhbz#512774)
Jindrich Novy [Fri, 14 Aug 2009 07:36:26 +0000 (09:36 +0200)]
Add bug URL macro so that it could be set distro-wide (rhbz#512774)

15 years agoUpdate querytags test to match current output
Panu Matilainen [Thu, 13 Aug 2009 14:22:53 +0000 (17:22 +0300)]
Update querytags test to match current output
- should've been in commit 86032bfbb61f1bdee9ac42989a14ea40bed0deec, duh

15 years agoBuild script environment tweaks to improve reproducability
Panu Matilainen [Thu, 13 Aug 2009 14:11:47 +0000 (17:11 +0300)]
Build script environment tweaks to improve reproducability
- unset CDPATH (RhBug:426955) and DISPLAY environment variables
- always run in C locale

15 years agoDon't set --target in %configure (RhBug:458648)
Panu Matilainen [Thu, 13 Aug 2009 13:46:18 +0000 (16:46 +0300)]
Don't set --target in %configure (RhBug:458648)
- --target is only ever useful for handful of compiler toolchain packages
  and cross-compiler packages are better off setting it themselves if
  necessary, rpm messing here only gets in the way

15 years agoNuke long since dead version of %configure macro + update commentary
Panu Matilainen [Thu, 13 Aug 2009 13:44:59 +0000 (16:44 +0300)]
Nuke long since dead version of %configure macro + update commentary

15 years agoAdd an option bug reporting URL tag to packages (RhBug:512774)
Panu Matilainen [Thu, 13 Aug 2009 12:45:56 +0000 (15:45 +0300)]
Add an option bug reporting URL tag to packages (RhBug:512774)

15 years agoAdd missing <pthread.h> include in rpmsq.h (ticket #87)
Panu Matilainen [Thu, 13 Aug 2009 08:46:56 +0000 (11:46 +0300)]
Add missing <pthread.h> include in rpmsq.h (ticket #87)
- patch from Michal Čihař

15 years agoBump version to appear newer than 4.7.x branch
Panu Matilainen [Thu, 13 Aug 2009 07:35:01 +0000 (10:35 +0300)]
Bump version to appear newer than 4.7.x branch

15 years agorpmbuild won't segfault when %including spec with zero size
Jindrich Novy [Wed, 12 Aug 2009 14:06:08 +0000 (16:06 +0200)]
rpmbuild won't segfault when %including spec with zero size

15 years agoAdd *.xz and *.lzma recompress support to brp-compress.
Ville Skyttä [Mon, 3 Aug 2009 21:34:31 +0000 (00:34 +0300)]
Add *.xz and *.lzma recompress support to brp-compress.

15 years agoCorrectly inherit default %attr(-,-,-) attributes from %defattr (rhbz#515685)
Jindrich Novy [Thu, 6 Aug 2009 12:16:02 +0000 (14:16 +0200)]
Correctly inherit default %attr(-,-,-) attributes from %defattr (rhbz#515685)

15 years agoKill off lclint remnants everywhere
Panu Matilainen [Thu, 23 Jul 2009 09:24:10 +0000 (12:24 +0300)]
Kill off lclint remnants everywhere
- remove ancient and likely irrelevant LCL comments and bogus NULL checks

15 years agoFix memory allocation for token array
Lubomir Rintel [Mon, 22 Jun 2009 22:49:17 +0000 (00:49 +0200)]
Fix memory allocation for token array

This fixes a memory corruption due to write access out of
bounds of token array, whose size was computed incorrectly.
It was assumed that only '%' characters separate tokens,
which could lead to crashes on useless uses of '[' tokens,
such as "rpm -qa --qf '[]lalala'".

15 years agoLog an error on short lead (RhBug:511101)
Panu Matilainen [Tue, 14 Jul 2009 11:25:58 +0000 (14:25 +0300)]
Log an error on short lead (RhBug:511101)
- if lead read returns short without it being an IO error, treat it
  as a case of "not an rpm package"

15 years agoHonor --nofiledigest on install too (RhBug:508021)
Panu Matilainen [Tue, 14 Jul 2009 10:56:27 +0000 (13:56 +0300)]
Honor --nofiledigest on install too (RhBug:508021)
- query and install options clash, use popt callback to enable processing

15 years agoDocument --nodeps in rpmbuild manual (RhBug:482921)
Panu Matilainen [Tue, 14 Jul 2009 08:54:43 +0000 (11:54 +0300)]
Document --nodeps in rpmbuild manual (RhBug:482921)

15 years agoDont accept '-' in manifests (RhBug:461353)
Panu Matilainen [Tue, 14 Jul 2009 08:24:02 +0000 (11:24 +0300)]
Dont accept '-' in manifests (RhBug:461353)

15 years agoDont treat filenames starting with - as stdin
Panu Matilainen [Tue, 14 Jul 2009 08:15:30 +0000 (11:15 +0300)]
Dont treat filenames starting with - as stdin

15 years agoOops, missing include for dirname()
Panu Matilainen [Thu, 9 Jul 2009 12:07:38 +0000 (15:07 +0300)]
Oops, missing include for dirname()

15 years agoCreate the directory used for transaction lock if necessary
Panu Matilainen [Thu, 9 Jul 2009 11:40:17 +0000 (14:40 +0300)]
Create the directory used for transaction lock if necessary
- otherwise at least rpm --initdb can fail due to transaction locking failing

15 years agoFix package relocatability checking, broken since forever
Panu Matilainen [Thu, 9 Jul 2009 11:01:13 +0000 (14:01 +0300)]
Fix package relocatability checking, broken since forever
- at the time relocation problems are added, ts problem set is NULL
  and rpmtsCheck() wipes it out anyway so the problems from relocation
  are never seen anywhere
- The header isn't available at transaction prepare stage where most
  problems are checked for, so we can't validate the prefixes at that
  point. Add a per-element problem set to carry the problem data and
  merge it to ts problem set when checking for other problem types.

15 years agoMake rpmpsUnlink() behave the other fooUnlink() functions
Panu Matilainen [Thu, 9 Jul 2009 10:43:10 +0000 (13:43 +0300)]
Make rpmpsUnlink() behave the other fooUnlink() functions
- pretty much everything else in rpm returns NULL from unreference functions,
  make be more consistent here...
- also tolerate NULL in both reference and unreference

15 years agoAdd reference counting to rpmProblems
Panu Matilainen [Thu, 9 Jul 2009 10:39:55 +0000 (13:39 +0300)]
Add reference counting to rpmProblems

15 years agoUnbreak --excludepath (RhBug:409637)
Panu Matilainen [Thu, 9 Jul 2009 08:03:54 +0000 (11:03 +0300)]
Unbreak --excludepath (RhBug:409637)
- excluded paths aren't counted as actual relocations, dont bother
  checkig addPrefixes() return

15 years agoFix compiler warning on const free
Panu Matilainen [Thu, 9 Jul 2009 06:28:45 +0000 (09:28 +0300)]
Fix compiler warning on const free
- we dont need popt to set the file variable as we manually process

15 years agoMake verify result not depend on verbosity level, uff... (RhBug:510213)
Panu Matilainen [Wed, 8 Jul 2009 13:20:06 +0000 (16:20 +0300)]
Make verify result not depend on verbosity level, uff... (RhBug:510213)

15 years agoAdd an index for obsoletes (RhBug:507702)
Panu Matilainen [Fri, 3 Jul 2009 12:12:07 +0000 (15:12 +0300)]
Add an index for obsoletes (RhBug:507702)

15 years agoUnify extension + header data getter calling conventions
Panu Matilainen [Fri, 3 Jul 2009 11:46:06 +0000 (14:46 +0300)]
Unify extension + header data getter calling conventions
- simplifies headerGet() & friends a bit and reduces redundancy
- also just return an error instead of dying with assert on NULL td argument

15 years agoPass headerGet flags to extensions too (unused for now)
Panu Matilainen [Fri, 3 Jul 2009 11:21:01 +0000 (14:21 +0300)]
Pass headerGet flags to extensions too (unused for now)

15 years agoEliminate unused calculations originating from the "8/98 bug"
Panu Matilainen [Fri, 3 Jul 2009 10:11:35 +0000 (13:11 +0300)]
Eliminate unused calculations originating from the "8/98 bug"
- the tl calculation has been unused since commit
  5994a308bc062fff53ff0184b8dea15d19fcfb63 in 2001 and we dont even
  read rpm 2.x packages anyway...

15 years agoRe-enable rdlen vs dl header check
Panu Matilainen [Fri, 3 Jul 2009 09:13:54 +0000 (12:13 +0300)]
Re-enable rdlen vs dl header check
- we dont even read packages from the "8/98 bug" era anymore, hardly relevant

15 years agoBand-aid to dependency caching misbehaving with chrooted verify (RhBug:508074)
Panu Matilainen [Wed, 1 Jul 2009 10:59:53 +0000 (13:59 +0300)]
Band-aid to dependency caching misbehaving with chrooted verify (RhBug:508074)
- disable dependency caching on chrooted verify to avoid ugly spew
  from paths containing outside paths while we're actually inside the
  root during verification
- correct fix would be to fix the temporary db path calculation

15 years agoHandle hook unregistering itself
Panu Matilainen [Fri, 26 Jun 2009 13:24:55 +0000 (16:24 +0300)]
Handle hook unregistering itself

15 years agoFix rpm.unregister() Lua extension
Panu Matilainen [Fri, 26 Jun 2009 13:07:50 +0000 (16:07 +0300)]
Fix rpm.unregister() Lua extension
- hook data is userdata, not light userdata

15 years agoAdd base64 encode and decode extensions to the lua interface
Panu Matilainen [Fri, 26 Jun 2009 12:39:20 +0000 (15:39 +0300)]
Add base64 encode and decode extensions to the lua interface

15 years agoBase64-encode %policy files to ensure it can be presented as strings
Panu Matilainen [Fri, 26 Jun 2009 09:31:57 +0000 (12:31 +0300)]
Base64-encode %policy files to ensure it can be presented as strings
- RPMTAG_POLICIES is a string array but there's no guarantee that
  something marked %policy is a plaintext file that can be represented
  as \0-terminated string, base64-encoding them fixes that. Baby steps
  towards making %policy remotely usable, related to RhBug:505066.
- Also remove unnecessary failure code setting, processMetadataFile()
  assumes failure already, and dont try to insert NULL strings in case
  b64encode() or pgpArmorWrap() fails

15 years agoKick out silly constfree() use
Panu Matilainen [Thu, 25 Jun 2009 14:17:16 +0000 (17:17 +0300)]
Kick out silly constfree() use

15 years agoSimplify logging a bit
Panu Matilainen [Wed, 24 Jun 2009 12:16:25 +0000 (15:16 +0300)]
Simplify logging a bit
- precalculate the message length, relying on C99 vsnprintf() semantics
- generate the log message and rest of the record in rpmlog() already,
  and just pass the record to lower level to do actual logging
- also something was wrong in the old version as valgrind complained
  about illegal reads, that is also cured here