Age | Commit message (Collapse) | Author | Files | Lines |
|
- Unused atm but we'll be adding this shortly
|
|
- 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.
|
|
- ought to be safe as data is only ever automatically converted to larger
type on notify calls
|
|
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)
|
|
- preliminaries for bumping up the max size, use rpm-specific type
as off_t size varies, header data needs fixed size
|
|
|
|
|
|
- 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
|
|
- rpmmessages is empty, lose it
- adjust includes
|