Commit Graph

7270 Commits

Author SHA1 Message Date
Panu Matilainen 179ebc1745 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
2007-12-07 16:19:21 +02:00
Panu Matilainen b67d678e2a Scriptlet (name) handling tweaks
- look up scriptlet names just once inside runScript()
- map trigger types to their real names too
2007-12-07 15:32:11 +02:00
Panu Matilainen 80f76a471c Add getter methods for rpmlogRec items (message + level) 2007-12-07 14:00:34 +02:00
Panu Matilainen 037ceff668 Rename RPMLOG_CONT to RPMLOG_DEFAULT to make purpose clearer (hopefully ;) 2007-12-07 13:31:31 +02:00
Panu Matilainen a5f65886f8 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
2007-12-07 13:16:45 +02:00
Panu Matilainen ca9ff17a4d Make rpmLogRec opaque 2007-12-07 11:43:06 +02:00
Panu Matilainen e98903dbb1 Fix misleading indentation 2007-12-07 11:34:33 +02:00
Panu Matilainen 8769e540f1 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...
2007-12-07 11:33:18 +02:00
Panu Matilainen 2cce0653a1 More rpmerr.h removal fallout
- use rpmRC types where appropriate
2007-12-07 10:57:39 +02:00
Panu Matilainen d4622b5135 Yet more rpmbuild fixups from rpmerr.h removal (partly from rpm5.org)
- additionally use rpmRC return types instead of numbers where appropriate
2007-12-07 10:43:53 +02:00
Panu Matilainen 23bba68b56 rpm5.org: fixup spec parsing from rpmerr.h removal
- renumber rpmParseState enums to leave room for error codes
2007-12-07 09:53:53 +02:00
Panu Matilainen 2a9c146f31 rpm5.org: fixup various places in rpmbuild from rpmerr.h elimination 2007-12-07 09:28:39 +02:00
Panu Matilainen 79fed162ac rpm5.org: use pid_t, not int in build doScript 2007-12-07 09:01:25 +02:00
Panu Matilainen 9f34c32443 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
2007-12-05 15:56:18 +02:00
Panu Matilainen c54001150f Only platform.in is to be included in dist, dont use wildcard 2007-12-05 12:57:07 +02:00
Panu Matilainen d4cc1de207 Rename apidocs to hackingdocs, only build on request 2007-12-05 11:56:33 +02:00
Panu Matilainen 882f390585 base64.h missing from librpmio sources 2007-12-05 11:27:50 +02:00
Panu Matilainen 8ddd81d0d4 Update potfiles wrt recent changes, regenerate translations 2007-12-05 10:37:38 +02:00
Panu Matilainen 131cadaec4 Match filestage strings with the fact that we dont use "rpc" anymore 2007-12-04 11:28:16 +02:00
Panu Matilainen dbdbe8010c Eliminate debug junk from the API
- add some helper macros to accomplish the same, easy to enable / disable
  as needed
2007-12-04 11:25:46 +02:00
Panu Matilainen 422fa0dbea Document rpmtsScoreGetEntry() parameter to please doxygen 2007-12-03 18:47:40 +02:00
Panu Matilainen 2db7896a34 Remove double documentation from header methods to make doxygen shut up 2007-12-03 18:44:48 +02:00
Panu Matilainen 6d37b9782d Fix couple of doxygen file paths, remove obsolete comment 2007-12-03 18:39:56 +02:00
Panu Matilainen ee9cd5176f Rename _rpmdbMatchIterator -> rpmdbMatchIterator_s
- consistency with other similar constructs
2007-12-03 16:58:16 +02:00
Panu Matilainen a96f817d50 Split RPMTAG_* and related functions out of rpmlib.h to rpmtag.h 2007-12-03 10:47:25 +02:00
Panu Matilainen 6bdbbefbec Split rpmte internals to separate header
- avoid unnecessary include-order issues
- stop define-games for internals access
2007-12-03 10:15:46 +02:00
Panu Matilainen 1929c68ea3 Duh, remember to add rpmfi_internal.h to sources.. 2007-12-03 10:09:37 +02:00
Panu Matilainen 7b98c02efb Move rpmprobFilterFlag enums to rpmps where they logically belong 2007-12-02 23:02:33 +02:00
Panu Matilainen 249113b17a Move rpmsenseFlag enums to rpmds where they logically belong 2007-12-02 22:59:38 +02:00
Panu Matilainen b2a11e0351 Move rpmtransFlags enums to rpmts.h where it logically belongs 2007-12-02 22:54:14 +02:00
Panu Matilainen 361a8e697b Move file action enums to rpmfi where they logically belong 2007-12-02 22:50:55 +02:00
Panu Matilainen bb7e7862e5 Move RPMFILE_* file attributes to rpmfi.h 2007-12-02 22:00:18 +02:00
Panu Matilainen 2c3ce0c8b0 Split rpmfi internals to separate header 2007-12-03 09:46:51 +02:00
Panu Matilainen 9ae6424a40 Move file state defs to rpmfi where they logically belong 2007-12-02 12:19:24 +02:00
Panu Matilainen 432467a793 Move file type enums to rpmfi where it logically belongs 2007-12-02 12:11:46 +02:00
Panu Matilainen c36bef96bb Drop RPC from apidocs.. 2007-12-03 16:35:33 +02:00
Panu Matilainen 9cbf0349b8 Use regular POSIX functions instead of "RPC" clones
- we only care about local files
2007-12-03 16:33:18 +02:00
Panu Matilainen fb90b8b4eb 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
2007-12-01 21:06:00 +02:00
Panu Matilainen c4f116eec3 Erm, stuff headerIsSource() implementation to hdrNVR with other cruft
- avoid dragging rpmlib for RPMTAG_* into header.h
2007-12-01 21:01:51 +02:00
Panu Matilainen 5219448fa1 Use headerIsSource() everywhere for determining package type 2007-12-01 19:29:57 +02:00
Panu Matilainen 935df9b81e Silly helper method for determining if a header is source or binary 2007-12-01 19:25:10 +02:00
Panu Matilainen 3ec04bd5ad Lose leftover davRead() related hack 2007-12-01 18:41:14 +02:00
Panu Matilainen 92698df723 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
2007-12-01 18:31:09 +02:00
Panu Matilainen 89ecfb96d0 Include sanity
- don't pull in rpmio into rpmpgp.h
- make rpmpgp.h standalone (needs rpmints and stdio)
- rpmfileutil needs rpmio (makes sense, huh...)
2007-12-01 12:47:30 +02:00
Panu Matilainen 656732848a Make rpmDoDigest() honor algorithm parameter 2007-12-01 12:32:30 +02:00
Panu Matilainen 50b21a8a07 Don't include idtx.h in rpmcli.h
- nothing needs it there, include directly where needed instead
2007-12-01 10:42:22 +02:00
Panu Matilainen d7e484237a Move headerN(E)VR(A) declarations from rpmlib.h to header.h 2007-12-01 10:31:20 +02:00
Panu Matilainen 82a9632d4f Move hGet*() funcs from rpmts, rename to headerGet*() 2007-12-01 10:29:44 +02:00
Panu Matilainen 9169947ebd Add bunch of missing rpmts doxygen groupings 2007-12-01 10:16:20 +02:00
Panu Matilainen 2f7c913723 (no)dirtokens is just a build-time option now 2007-12-01 10:09:54 +02:00