Panu Matilainen [Thu, 10 Sep 2009 12:03:13 +0000 (15:03 +0300)]
Rip the broken asynchronous psm machinery
- it was only "used" for the ldconfig optimization and actually been
completely broken since the ordering rewrite
Panu Matilainen [Thu, 10 Sep 2009 12:02:36 +0000 (15:02 +0300)]
Rip the broken ldconfig optimization hack (RhBug:513224)
- it doesn't optimize much and what's worse, it sometimes optimizes out
calls that would've been necessary
Panu Matilainen [Thu, 10 Sep 2009 11:14:49 +0000 (14:14 +0300)]
Rip unnecessary headerDump() and the last ancient artifacts using it
- xml format dump gives an output that can actually be further processed
Panu Matilainen [Thu, 10 Sep 2009 11:05:08 +0000 (14:05 +0300)]
Rip unused and useless headerGetLangs()
- nothing in the world uses it and the info is available through
regular headerGet() anyway
Panu Matilainen [Thu, 10 Sep 2009 11:04:18 +0000 (14:04 +0300)]
Rip unused and useless headerUsageCount()
Panu Matilainen [Wed, 9 Sep 2009 11:19:20 +0000 (14:19 +0300)]
Eliminate unused goo from findEntry()
Panu Matilainen [Wed, 9 Sep 2009 09:17:10 +0000 (12:17 +0300)]
Handle NULL header in doHeaderUnload()
- avoids having to separately check elsewhere and avoids segfaulting
on headerUnload() and headerReload() on NULL headers
Panu Matilainen [Wed, 9 Sep 2009 08:52:47 +0000 (11:52 +0300)]
Eliminate pointless increment
Panu Matilainen [Wed, 9 Sep 2009 08:47:59 +0000 (11:47 +0300)]
Eliminate yet more unused calculations from header code...
Panu Matilainen [Wed, 9 Sep 2009 08:42:18 +0000 (11:42 +0300)]
Eliminate unused pad calculations from header code
Panu Matilainen [Wed, 9 Sep 2009 08:38:28 +0000 (11:38 +0300)]
Eliminate yet another unused variable in header code
Panu Matilainen [Wed, 9 Sep 2009 08:10:41 +0000 (11:10 +0300)]
Eliminate last remaining leftovers from "8/98 bug" workaround
- the ieprev calculations aren't used for anything, should've been in
commit
4d0d54492c7d539cc806ca9e7fa59e919c28e45d really
Panu Matilainen [Wed, 9 Sep 2009 08:06:45 +0000 (11:06 +0300)]
Eliminate unnecessary variable & related goo from regionSwab()
Panu Matilainen [Tue, 8 Sep 2009 11:11:59 +0000 (14:11 +0300)]
Initialize diff on declaration where it fits comfortably on one line
Panu Matilainen [Tue, 8 Sep 2009 11:10:34 +0000 (14:10 +0300)]
Move variable to block local scope, not needed elsewhere
Panu Matilainen [Tue, 8 Sep 2009 11:07:52 +0000 (14:07 +0300)]
Remove unnecessary assignment, diff is block local scope here
Panu Matilainen [Tue, 8 Sep 2009 11:05:16 +0000 (14:05 +0300)]
Reduce the number of exit points in parseFormat() to error and ok cases
- avoid a dozen redundant freeFormat() calls and dont bother NULLing
local variable at the end
Panu Matilainen [Mon, 7 Sep 2009 15:41:32 +0000 (18:41 +0300)]
Add -Wempty-body to default options if gcc supports it
- ...to help protect against screwups like
2ee45ef12aaa958b78c56b6d83bb18aa6a477d15
Panu Matilainen [Mon, 7 Sep 2009 14:50:43 +0000 (17:50 +0300)]
Eliminate unused variable
Panu Matilainen [Mon, 7 Sep 2009 14:39:39 +0000 (17:39 +0300)]
Eliminate unused variable
Panu Matilainen [Mon, 7 Sep 2009 14:10:12 +0000 (17:10 +0300)]
Minor rpmfcGenerateDependsHelper() cleanups
- initialize at declaration time, remove unnecessary variables etc
Panu Matilainen [Mon, 7 Sep 2009 14:00:49 +0000 (17:00 +0300)]
Move rl to the scope where its needed, dont bother assigning NULL
Panu Matilainen [Mon, 7 Sep 2009 13:59:01 +0000 (16:59 +0300)]
Single point of exit for doPatch() to clean up freeing
Panu Matilainen [Mon, 7 Sep 2009 13:39:40 +0000 (16:39 +0300)]
Eliminate bogus variable initialization
- i isn't used outside the loop at the end, move it there...
Panu Matilainen [Mon, 7 Sep 2009 13:34:20 +0000 (16:34 +0300)]
Add noreturn annotations to javadeps
Panu Matilainen [Mon, 7 Sep 2009 13:23:32 +0000 (16:23 +0300)]
Help compilers/analyzers a bit with luaL_error()
- luaL_error() never returns but as other tools dont know this it
raises false alarms
Panu Matilainen [Mon, 7 Sep 2009 12:52:36 +0000 (15:52 +0300)]
Add noreturn annotations to argerror() helper functions
Panu Matilainen [Mon, 7 Sep 2009 12:07:12 +0000 (15:07 +0300)]
Add noreturn annotation to die() .. which itself should die
Panu Matilainen [Mon, 7 Sep 2009 12:04:01 +0000 (15:04 +0300)]
Avoid theoretical NULL pointer dereference
- if sbp ends up not set it's an "internal error" really, dont bother
with error message
Panu Matilainen [Mon, 7 Sep 2009 11:54:45 +0000 (14:54 +0300)]
Avoid couple of (theoretical) NULL pointer dereferences
Panu Matilainen [Mon, 7 Sep 2009 11:42:04 +0000 (14:42 +0300)]
Remove bogus non-null check
- rpmdsInit() only returns NULL if passed NULL, which can't happen
as ods is already verified to be non-NULL
Panu Matilainen [Mon, 7 Sep 2009 11:15:56 +0000 (14:15 +0300)]
Ugh, erroneously introduced ; busting the conditional
- broken long time ago in commit
2ee45ef12aaa958b78c56b6d83bb18aa6a477d15
Panu Matilainen [Mon, 7 Sep 2009 11:03:47 +0000 (14:03 +0300)]
Avoid potentially calling a NULL function pointer
Panu Matilainen [Mon, 7 Sep 2009 10:19:23 +0000 (13:19 +0300)]
Eliminate unused calculations
Panu Matilainen [Mon, 7 Sep 2009 10:17:47 +0000 (13:17 +0300)]
Eliminate unused variable
Panu Matilainen [Mon, 7 Sep 2009 09:23:21 +0000 (12:23 +0300)]
Eliminate bunch of unused variables
Panu Matilainen [Mon, 7 Sep 2009 09:17:07 +0000 (12:17 +0300)]
Eliminate unused variable and pointless null-check
Panu Matilainen [Mon, 7 Sep 2009 09:05:10 +0000 (12:05 +0300)]
Fix dumb some dumb leaks in python spec code
Panu Matilainen [Mon, 7 Sep 2009 08:49:25 +0000 (11:49 +0300)]
Eliminate unused counter variable
Panu Matilainen [Mon, 7 Sep 2009 08:44:44 +0000 (11:44 +0300)]
Remove unused initialization
Panu Matilainen [Mon, 7 Sep 2009 08:42:28 +0000 (11:42 +0300)]
Remove redundant reinitialization, cleanup
Panu Matilainen [Mon, 7 Sep 2009 08:16:16 +0000 (11:16 +0300)]
Add RPM_GNUC_NONNULL macro for portable use of gcc nonnull attribute
- gcc itself can only warn on literal NULL's passed where nonnull is
expected but static analyzers can make better use of the info
Panu Matilainen [Fri, 4 Sep 2009 10:38:58 +0000 (13:38 +0300)]
Fix memleak in headerGetDumber() .. err .. Number()
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
Panu Matilainen [Wed, 2 Sep 2009 12:34:35 +0000 (15:34 +0300)]
Use %{nvra} as default query format, much simpler...
Panu Matilainen [Wed, 2 Sep 2009 11:43:00 +0000 (14:43 +0300)]
Panu Matilainen [Wed, 2 Sep 2009 11:08:57 +0000 (14:08 +0300)]
Take advantage of headerGetNumber() to get buildtime..
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
Panu Matilainen [Wed, 2 Sep 2009 10:47:02 +0000 (13:47 +0300)]
Deprecate headerGetColor(), implement using headerGetNumber()
Panu Matilainen [Wed, 2 Sep 2009 10:46:23 +0000 (13:46 +0300)]
Eliminate headerGetColor() uses everywhere
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
Panu Matilainen [Wed, 2 Sep 2009 10:27:18 +0000 (13:27 +0300)]
Add convenience function for retrieving numeric header data
Panu Matilainen [Wed, 2 Sep 2009 10:24:59 +0000 (13:24 +0300)]
Oops, dont leak memory on invalid types to headerGet[As]String()
Panu Matilainen [Wed, 2 Sep 2009 10:06:25 +0000 (13:06 +0300)]
Take advantage of new header string getters
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
Panu Matilainen [Wed, 2 Sep 2009 09:43:24 +0000 (12:43 +0300)]
Take 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
Panu Matilainen [Wed, 2 Sep 2009 09:38:20 +0000 (12:38 +0300)]
Take advantage of new header string 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
Panu Matilainen [Wed, 2 Sep 2009 09:24:01 +0000 (12:24 +0300)]
Simplify rpmVersionCompare() a bit
Panu Matilainen [Wed, 2 Sep 2009 09:19:15 +0000 (12:19 +0300)]
Simplify headerCheckPayloadFormat() a bit
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
Panu Matilainen [Wed, 2 Sep 2009 09:06:34 +0000 (12:06 +0300)]
Eliminate uses of headerNVR() and friends in librpm (and python) code
Panu Matilainen [Wed, 2 Sep 2009 08:55:42 +0000 (11:55 +0300)]
Eliminate uses of headerNVR() and friends in librpmbuild code
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
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
Panu Matilainen [Tue, 1 Sep 2009 12:08:58 +0000 (15:08 +0300)]
Add dbinstance tag extension (port from rpm5.org)
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
Panu Matilainen [Tue, 1 Sep 2009 08:38:06 +0000 (11:38 +0300)]
Triggerprein has been implemented since January 2008, update comment
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
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
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
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
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
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
Panu Matilainen [Mon, 31 Aug 2009 09:46:59 +0000 (12:46 +0300)]
Use rpmFileHasSuffix() instead of doing the same manually
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
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
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
Panu Matilainen [Mon, 31 Aug 2009 09:15:16 +0000 (12:15 +0300)]
sameProblem() return value is illogical, reverse it
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
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
Panu Matilainen [Mon, 31 Aug 2009 08:20:40 +0000 (11:20 +0300)]
Ugh, fix brokenness from previous commit
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
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
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"
Panu Matilainen [Mon, 31 Aug 2009 07:19:45 +0000 (10:19 +0300)]
Eliminate now unnecessary compressor -> ioflags conversions
Panu Matilainen [Mon, 31 Aug 2009 06:44:52 +0000 (09:44 +0300)]
Accept direct compressor names as Fopen() modes too
Panu Matilainen [Mon, 31 Aug 2009 06:39:16 +0000 (09:39 +0300)]
Switch rpmio mode checking to use rstreq()
Panu Matilainen [Mon, 31 Aug 2009 06:33:52 +0000 (09:33 +0300)]
Add two helper functions for comparing string equality
Panu Matilainen [Fri, 28 Aug 2009 12:43:07 +0000 (15:43 +0300)]
Eliminate unused result code 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
Panu Matilainen [Fri, 28 Aug 2009 07:52:49 +0000 (10:52 +0300)]
Don't try to incref NULL ds
Panu Matilainen [Thu, 20 Aug 2009 11:10:41 +0000 (14:10 +0300)]
Remove extra trailing } copy-paste error from python_foo macros, duh
Panu Matilainen [Thu, 20 Aug 2009 10:04:21 +0000 (13:04 +0300)]
We always add EVR and Flags to dependencies, remove bogus condition
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
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
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
Panu Matilainen [Mon, 17 Aug 2009 12:06:39 +0000 (15:06 +0300)]
Eliminate unused code (leftover from ordering rewrite)
Panu Matilainen [Mon, 17 Aug 2009 11:40:39 +0000 (14:40 +0300)]
Don't bother relocating packages no files
- fixes a small memleak