summaryrefslogtreecommitdiff
path: root/lib/rpmcallback.h
AgeCommit message (Collapse)AuthorFilesLines
2012-01-05Add enum for RPMCALLBACK_INST_STOP callback eventPanu Matilainen1-0/+1
- Unused atm but we'll be adding this shortly
2012-01-03Implement scriptlet start and stop callbacks (RhBug:606239)Panu Matilainen1-1/+3
- Adds two new transaction callbacks: RPMCALLBACK_SCRIPT_START and RPMCALLBACK_SCRIPT_STOP which get issued for every scriptlet we run. - On script start, callback can optionally return an FD which will override transaction-wide script fd to make it easier to accurately collect per-scriptlet output (eg per-scriptlet temporary file). Callback is also responsible for closing the fd if it returns one. - For both callbacks, "amount" holds the script tag number. On stop callback, "total" holds the scriptlet exit status mapped into OK/NOTFOUND/FAIL for success/non-fatal/fatal errors. Abusing "notfound" for warning result is ugly but differentiating it from the other cases allows callers to ignore SCRIPT_ERROR if they choose to implement stop and start.
2008-06-09Use rpm_loff_t for transaction callback amount+total argumentsPanu Matilainen1-2/+2
- ought to be safe as data is only ever automatically converted to larger type on notify calls
2008-03-17Remove repackage support to finish off with rollbackPanu Matilainen1-3/+3
The two main classes of rollback/repackage need are 1) Gimme back the previous version, this broke XYZ on my system. This is better handled by downgrading to the previous version of original package instead of repackaged garbage. We should maintain real package (version) history somewhere. 2) Upgrade messed up my configuration. Instead of repackaging everything we could be far more intelligent wrt config files, stick them into real version control or at least have hooks to do so. RPMCALLBACK_REPACKAGE_* and RPMTRANS_FLAG_REPACKAGE definitions left around to avoid needlessly breaking everybodys callbacks (for now)
2008-02-04Add rpm_off_t type for file size types, use where spottedPanu Matilainen1-2/+2
- preliminaries for bumping up the max size, use rpm-specific type as off_t size varies, header data needs fixed size
2008-01-30Stick rpmCallbackType to rpmtypes too..Panu Matilainen1-4/+2
2008-01-30Move fnpyKey typedef to rpmtypes, its widely used...Panu Matilainen1-2/+0
2007-12-07Add RPMCALLBACK_SCRIPT_ERROR callback typePanu Matilainen1-1/+2
- 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-01Add separate public header for callback declarationsPanu Matilainen1-0/+50
- rpmmessages is empty, lose it - adjust includes