Panu Matilainen [Sun, 16 Dec 2007 19:21:31 +0000 (21:21 +0200)]
More const removals
- both username cache and log records are fully contained within their
modules...
Panu Matilainen [Sun, 16 Dec 2007 19:20:05 +0000 (21:20 +0200)]
More constfree for spec exposed stuff for now
- openfileinfo seems easily made opaque, revisit later
Panu Matilainen [Sun, 16 Dec 2007 18:58:44 +0000 (20:58 +0200)]
Much of spec internals is exposed, let them be const for now
Panu Matilainen [Sun, 16 Dec 2007 18:46:56 +0000 (20:46 +0200)]
Remove couple of bogus const uses in temp variables
Panu Matilainen [Sun, 16 Dec 2007 18:39:46 +0000 (20:39 +0200)]
Unconstify FileListRec and AttrRec contents
- not exposed outside files.c
Panu Matilainen [Sun, 16 Dec 2007 18:04:30 +0000 (20:04 +0200)]
Unconstify rpmrc internal tables
- not exposed outside rpmrc, "protection" buys nothing
Panu Matilainen [Sun, 16 Dec 2007 17:00:07 +0000 (19:00 +0200)]
Fix default queryformat setting when _query_all_fmt not set
- \n in the rpmExpand() causes the result to always be non-null...
- also avoid unnecessary const free
Panu Matilainen [Sun, 16 Dec 2007 14:25:09 +0000 (16:25 +0200)]
Remove const from rpmMkTempFile file name parameter
- the temp name is malloced and needs to be freed by caller
Panu Matilainen [Sun, 16 Dec 2007 13:58:40 +0000 (15:58 +0200)]
Refactor rpmReSign() and associated file "management" a bit
- remove unused + useless "rc" parameter from manageFile()
- remove tempfile handling from manageFile(), create + open a tempfile
explicitly in rpmReSign()
- both copyFile() and manageFile() now require file names to be passed always
- split file closing into separate closeFile() function
Panu Matilainen [Sun, 16 Dec 2007 13:51:09 +0000 (15:51 +0200)]
Stupid reversed-logic thinko..
Panu Matilainen [Sun, 16 Dec 2007 11:02:27 +0000 (13:02 +0200)]
Remove const from bunch of error message return types
- headerCheck(), rpmReadHeader() and rpmReadSignature() return malloced
error messages the caller needs to free, shouldn't be const
- adjust rpmdb hdrchk callbacks accordingly
Panu Matilainen [Sun, 16 Dec 2007 10:20:45 +0000 (12:20 +0200)]
IDT* structures are exposed, let them use constfree for now..
Panu Matilainen [Sat, 15 Dec 2007 19:17:59 +0000 (21:17 +0200)]
And yet more bogus const removals...
Panu Matilainen [Sat, 15 Dec 2007 19:14:44 +0000 (21:14 +0200)]
Couple of bogus const removals from rpmgi and rpmds structs
- in both cases the data is already directly inaccessible from outside,
no further protection necessary
Panu Matilainen [Sat, 15 Dec 2007 16:33:28 +0000 (18:33 +0200)]
Make bunch of build internal code take const parameters
Panu Matilainen [Sat, 15 Dec 2007 15:15:39 +0000 (17:15 +0200)]
Further bogus const removals...
Panu Matilainen [Sat, 15 Dec 2007 15:08:18 +0000 (17:08 +0200)]
Fix incorrect rpmCleanPath() retval comment
Panu Matilainen [Sat, 15 Dec 2007 14:03:18 +0000 (16:03 +0200)]
Another bunch of bogus const removals
Panu Matilainen [Sat, 15 Dec 2007 13:59:07 +0000 (15:59 +0200)]
Avoid mixing local malloc with const parameter pointer
Panu Matilainen [Sat, 15 Dec 2007 11:43:40 +0000 (13:43 +0200)]
Use _constfree() for freeing urlinfo contents
Panu Matilainen [Sat, 15 Dec 2007 11:41:58 +0000 (13:41 +0200)]
Expose compiler warnings from freeing data declared as const
- _free() is just a wrapper to free() which additionally returns NULL
- add _constfree() for use in the cases where const is used to protect
malloced "read-only" data in long-lived otherwise exposed structures etc
Panu Matilainen [Sat, 15 Dec 2007 09:47:47 +0000 (11:47 +0200)]
Remove bogus const from rpmProblemString() return type
- its malloced so it needs to be freed
- fix all users to actually free
Panu Matilainen [Sat, 15 Dec 2007 09:03:46 +0000 (11:03 +0200)]
Remove bogus const from rpmGenPath() temporary targets
Panu Matilainen [Sat, 15 Dec 2007 08:39:15 +0000 (10:39 +0200)]
Remove bogus const from rpmGetPath() temporary targets
Panu Matilainen [Sat, 15 Dec 2007 07:39:32 +0000 (09:39 +0200)]
Remove bogus const from rpmGenPath and rpmGetPath return type
- both return malloced strings you're supposed to free
Panu Matilainen [Fri, 14 Dec 2007 17:52:11 +0000 (19:52 +0200)]
Bogus const removal continued...
Panu Matilainen [Fri, 14 Dec 2007 15:55:31 +0000 (17:55 +0200)]
Another bunch of bogus const removals
Panu Matilainen [Fri, 14 Dec 2007 13:50:17 +0000 (15:50 +0200)]
Remove bogus consts..
Panu Matilainen [Fri, 14 Dec 2007 13:17:59 +0000 (15:17 +0200)]
Bunch of const char* corrections
- functions returning string constants as char * etc...
Panu Matilainen [Fri, 14 Dec 2007 11:39:52 +0000 (13:39 +0200)]
Bunch of silly ssize_t casts
- cuts down the amount of spurious warnings from inlined code...
Panu Matilainen [Fri, 14 Dec 2007 11:38:58 +0000 (13:38 +0200)]
Oops, major + minor are not dev_t...
Panu Matilainen [Fri, 14 Dec 2007 10:54:35 +0000 (12:54 +0200)]
Yet more type-pedantry...
- use rpm_tag_t for signature tag types too
- size_t, not rpm_count_t in signature generation
- add couple of explicit casts to rpmpgp.h to avoid spurious noise from
inlined functions
Panu Matilainen [Fri, 14 Dec 2007 09:38:20 +0000 (11:38 +0200)]
More size_t type pedantry
Panu Matilainen [Fri, 14 Dec 2007 09:36:48 +0000 (11:36 +0200)]
Oops, rpmpsi index needs to be signed type
Panu Matilainen [Fri, 14 Dec 2007 08:30:46 +0000 (10:30 +0200)]
More misc size_t issues
Panu Matilainen [Fri, 14 Dec 2007 08:30:01 +0000 (10:30 +0200)]
Use dev_t instead of ints..
Panu Matilainen [Fri, 14 Dec 2007 07:35:06 +0000 (09:35 +0200)]
Couple of more size_t uses + related format string fixes
Panu Matilainen [Thu, 13 Dec 2007 19:18:37 +0000 (21:18 +0200)]
Big bunch of int -> size_t corrections for various signature items
Panu Matilainen [Thu, 13 Dec 2007 18:35:33 +0000 (20:35 +0200)]
Use rpm_tagtype_t everywhere for rpm (header) tagtype type
- typedef'ed as uint32_t, doesn't matter much but negative types dont exist
- easy to grep, easy to change...
- define RPM_FORCEFREE_TYPE instead of -1 "magic" for forcing
headerFreeData (ugh), easier to grep for and change than "-1"
Panu Matilainen [Thu, 13 Dec 2007 17:32:37 +0000 (19:32 +0200)]
Use rpm_tag_t everywhere for rpm (header) tag type
- typedef'ed as int32_t for now, negative values used in some places for
error cases
- easy to grep, easy to change...
- add RPMTAG_NOT_FOUND define, used in place of -1 "magic",
Panu Matilainen [Thu, 13 Dec 2007 16:16:39 +0000 (18:16 +0200)]
Use rpm_count_t everywhere for header data count
- typedef'ed as uint32_t as that's the key size limit imposed by BDB,
relevant for RPM_BIN_TYPE
- easy to change to whatever later on as it's now consistent everywhere
- explicit casts where needed to avoid new warnings from signedness
Panu Matilainen [Thu, 13 Dec 2007 07:25:10 +0000 (09:25 +0200)]
Use rpm_count_t everywhere for header data count
- typedef'ed as uint32_t as that's the key size limit imposed by BDB,
relevant for RPM_BIN_TYPE
- easy to change to whatever later on as it's now consistent everywhere
Panu Matilainen [Wed, 12 Dec 2007 12:33:56 +0000 (14:33 +0200)]
Install the new fancy perldep extractor
Panu Matilainen [Tue, 11 Dec 2007 12:18:50 +0000 (14:18 +0200)]
Register the new SCRIPT_ERROR callback value to python
Panu Matilainen [Tue, 11 Dec 2007 11:50:20 +0000 (13:50 +0200)]
Silly thinko/typo causing source rpms to provide their nvr..
Ralf Corsépius [Tue, 11 Dec 2007 08:12:12 +0000 (09:12 +0100)]
test == is a bashism.
Panu Matilainen [Tue, 11 Dec 2007 06:51:54 +0000 (08:51 +0200)]
OS X Leopard fixes from Giulio Eulisse
Panu Matilainen [Mon, 10 Dec 2007 14:06:22 +0000 (16:06 +0200)]
Add python method for for retrieving (without setting) ts vsflags
Panu Matilainen [Sat, 8 Dec 2007 14:12:10 +0000 (16:12 +0200)]
Drop non-existing librpmmisc from rpm.pc
Panu Matilainen [Sat, 8 Dec 2007 12:02:32 +0000 (14:02 +0200)]
Switch to <rpm/foo.h> style for public headers
- adjust include paths accordingly
Panu Matilainen [Fri, 7 Dec 2007 14:19:21 +0000 (16:19 +0200)]
Add RPMCALLBACK_SCRIPT_ERROR callback type
- TS callback has a better chance at doing something semi-intelligent
on scriptlet failure than rpmlog callback
- Hijack "amount" for script tag that failed, "total" for exit code
which might be pretty much anything: waitpid child, actual exit status or
lua error... not probably very useful in the callback but...
- Notify before logging so users can catch the actual error message
on next rpmlog callback.. or something
Panu Matilainen [Fri, 7 Dec 2007 13:32:11 +0000 (15:32 +0200)]
Scriptlet (name) handling tweaks
- look up scriptlet names just once inside runScript()
- map trigger types to their real names too
Panu Matilainen [Fri, 7 Dec 2007 12:00:34 +0000 (14:00 +0200)]
Add getter methods for rpmlogRec items (message + level)
Panu Matilainen [Fri, 7 Dec 2007 11:31:31 +0000 (13:31 +0200)]
Rename RPMLOG_CONT to RPMLOG_DEFAULT to make purpose clearer (hopefully ;)
Panu Matilainen [Fri, 7 Dec 2007 11:16:45 +0000 (13:16 +0200)]
Logging enhancements
- add parameters to rpmlogCallback: current log record pointer +
optional user data
- callback return flags to enable/disable default logging behavior and
to perform exit() after cleaning up
- add method for retrieving prefix string for a given message priority
- move default logging behavior out of rpmlog() proper
Panu Matilainen [Fri, 7 Dec 2007 09:43:06 +0000 (11:43 +0200)]
Make rpmLogRec opaque
Panu Matilainen [Fri, 7 Dec 2007 09:34:33 +0000 (11:34 +0200)]
Fix misleading indentation
Panu Matilainen [Fri, 7 Dec 2007 09:33:18 +0000 (11:33 +0200)]
Don't do tilde expansion if HOME not set
- If you dont have a home, glob() will go out of its way to give you one,
even a wrong one. This isn't good when daemons etc have purposefully
unset HOME...
Panu Matilainen [Fri, 7 Dec 2007 08:57:39 +0000 (10:57 +0200)]
More rpmerr.h removal fallout
- use rpmRC types where appropriate
Panu Matilainen [Fri, 7 Dec 2007 08:43:53 +0000 (10:43 +0200)]
Yet more rpmbuild fixups from rpmerr.h removal (partly from rpm5.org)
- additionally use rpmRC return types instead of numbers where appropriate
Panu Matilainen [Fri, 7 Dec 2007 07:53:53 +0000 (09:53 +0200)]
rpm5.org: fixup spec parsing from rpmerr.h removal
- renumber rpmParseState enums to leave room for error codes
Panu Matilainen [Fri, 7 Dec 2007 07:28:39 +0000 (09:28 +0200)]
rpm5.org: fixup various places in rpmbuild from rpmerr.h elimination
Panu Matilainen [Fri, 7 Dec 2007 07:01:25 +0000 (09:01 +0200)]
rpm5.org: use pid_t, not int in build doScript
Panu Matilainen [Wed, 5 Dec 2007 13:56:18 +0000 (15:56 +0200)]
Fix query return codes (rhbz#244236)
- count + skip over errors in rpmgiNext() instead of stopping iteration
- add rpmgiNumErrors() for retrieving errors, use it in query
Panu Matilainen [Wed, 5 Dec 2007 10:57:07 +0000 (12:57 +0200)]
Only platform.in is to be included in dist, dont use wildcard
Panu Matilainen [Wed, 5 Dec 2007 09:56:33 +0000 (11:56 +0200)]
Rename apidocs to hackingdocs, only build on request
Panu Matilainen [Wed, 5 Dec 2007 09:27:50 +0000 (11:27 +0200)]
base64.h missing from librpmio sources
Panu Matilainen [Wed, 5 Dec 2007 08:37:38 +0000 (10:37 +0200)]
Update potfiles wrt recent changes, regenerate translations
Panu Matilainen [Tue, 4 Dec 2007 09:28:16 +0000 (11:28 +0200)]
Match filestage strings with the fact that we dont use "rpc" anymore
Panu Matilainen [Tue, 4 Dec 2007 09:25:46 +0000 (11:25 +0200)]
Eliminate debug junk from the API
- add some helper macros to accomplish the same, easy to enable / disable
as needed
Panu Matilainen [Mon, 3 Dec 2007 16:47:40 +0000 (18:47 +0200)]
Document rpmtsScoreGetEntry() parameter to please doxygen
Panu Matilainen [Mon, 3 Dec 2007 16:44:48 +0000 (18:44 +0200)]
Remove double documentation from header methods to make doxygen shut up
Panu Matilainen [Mon, 3 Dec 2007 16:39:56 +0000 (18:39 +0200)]
Fix couple of doxygen file paths, remove obsolete comment
Panu Matilainen [Mon, 3 Dec 2007 14:58:16 +0000 (16:58 +0200)]
Rename _rpmdbMatchIterator -> rpmdbMatchIterator_s
- consistency with other similar constructs
Panu Matilainen [Mon, 3 Dec 2007 08:47:25 +0000 (10:47 +0200)]
Split RPMTAG_* and related functions out of rpmlib.h to rpmtag.h
Panu Matilainen [Mon, 3 Dec 2007 08:15:46 +0000 (10:15 +0200)]
Split rpmte internals to separate header
- avoid unnecessary include-order issues
- stop define-games for internals access
Panu Matilainen [Mon, 3 Dec 2007 08:09:37 +0000 (10:09 +0200)]
Duh, remember to add rpmfi_internal.h to sources..
Panu Matilainen [Sun, 2 Dec 2007 21:02:33 +0000 (23:02 +0200)]
Move rpmprobFilterFlag enums to rpmps where they logically belong
Panu Matilainen [Sun, 2 Dec 2007 20:59:38 +0000 (22:59 +0200)]
Move rpmsenseFlag enums to rpmds where they logically belong
Panu Matilainen [Sun, 2 Dec 2007 20:54:14 +0000 (22:54 +0200)]
Move rpmtransFlags enums to rpmts.h where it logically belongs
Panu Matilainen [Sun, 2 Dec 2007 20:50:55 +0000 (22:50 +0200)]
Move file action enums to rpmfi where they logically belong
Panu Matilainen [Sun, 2 Dec 2007 20:00:18 +0000 (22:00 +0200)]
Move RPMFILE_* file attributes to rpmfi.h
Panu Matilainen [Mon, 3 Dec 2007 07:46:51 +0000 (09:46 +0200)]
Split rpmfi internals to separate header
Panu Matilainen [Sun, 2 Dec 2007 10:19:24 +0000 (12:19 +0200)]
Move file state defs to rpmfi where they logically belong
Panu Matilainen [Sun, 2 Dec 2007 10:11:46 +0000 (12:11 +0200)]
Move file type enums to rpmfi where it logically belongs
Panu Matilainen [Mon, 3 Dec 2007 14:35:33 +0000 (16:35 +0200)]
Drop RPC from apidocs..
Panu Matilainen [Mon, 3 Dec 2007 14:33:18 +0000 (16:33 +0200)]
Use regular POSIX functions instead of "RPC" clones
- we only care about local files
Panu Matilainen [Sat, 1 Dec 2007 19:06:00 +0000 (21:06 +0200)]
More rpmlead exorcizing
- remove unnecessary type parameter to writeRPM(), header knows what it is
- remove unnecessary lead argument to readRPM(), it's unused anyway
- drop lead from cpioSourceArchive struct
Panu Matilainen [Sat, 1 Dec 2007 19:01:51 +0000 (21:01 +0200)]
Erm, stuff headerIsSource() implementation to hdrNVR with other cruft
- avoid dragging rpmlib for RPMTAG_* into header.h
Panu Matilainen [Sat, 1 Dec 2007 17:29:57 +0000 (19:29 +0200)]
Use headerIsSource() everywhere for determining package type
Panu Matilainen [Sat, 1 Dec 2007 17:25:10 +0000 (19:25 +0200)]
Silly helper method for determining if a header is source or binary
Panu Matilainen [Sat, 1 Dec 2007 16:41:14 +0000 (18:41 +0200)]
Lose leftover davRead() related hack
Panu Matilainen [Sat, 1 Dec 2007 16:31:09 +0000 (18:31 +0200)]
Make rpmlead opaque, add methods to deal with it
- rename methods to rpmLead*() for easy grepping
- populate lead from header where necessary
- add rpmLeadCheck() method for minimal compatibility checking to get
rid of duplicate code in several places
- conditionalize lead version on dirtokens
Panu Matilainen [Sat, 1 Dec 2007 10:47:30 +0000 (12:47 +0200)]
Include sanity
- don't pull in rpmio into rpmpgp.h
- make rpmpgp.h standalone (needs rpmints and stdio)
- rpmfileutil needs rpmio (makes sense, huh...)
Panu Matilainen [Sat, 1 Dec 2007 10:32:30 +0000 (12:32 +0200)]
Make rpmDoDigest() honor algorithm parameter
Panu Matilainen [Sat, 1 Dec 2007 08:42:22 +0000 (10:42 +0200)]
Don't include idtx.h in rpmcli.h
- nothing needs it there, include directly where needed instead
Panu Matilainen [Sat, 1 Dec 2007 08:31:20 +0000 (10:31 +0200)]
Move headerN(E)VR(A) declarations from rpmlib.h to header.h
Panu Matilainen [Sat, 1 Dec 2007 08:29:44 +0000 (10:29 +0200)]
Move hGet*() funcs from rpmts, rename to headerGet*()
Panu Matilainen [Sat, 1 Dec 2007 08:16:20 +0000 (10:16 +0200)]
Add bunch of missing rpmts doxygen groupings
Panu Matilainen [Sat, 1 Dec 2007 08:09:54 +0000 (10:09 +0200)]
(no)dirtokens is just a build-time option now