• [PATCH] dpkg: Add --no-scripts

    From Cameron Katri@21:1/5 to All on Sun Mar 28 21:20:01 2021
    Allows installing a package without running maintscripts but still mark
    as fully installed
    ---
    man/dpkg.pod | 4 ++++
    src/main.c | 3 +++
    src/main.h | 1 +
    src/script.c | 24 ++++++++++++++++++++++++
    4 files changed, 32 insertions(+)

    diff --git a/man/dpkg.pod b/man/dpkg.pod
    index 712f4608f..a7a1e152b 100644
    --- a/man/dpkg.pod
    +++ b/man/dpkg.pod
    @@ -1023,6 +1023,10 @@ output will be modified to make it easier to parse.

    The only currently supported command is B<--version>.

    +=item B<--no-scripts>
    +
    +Skips the running of maintainer scripts but still marks the package as fully installed
    +
    =item B<--no-pager>

    Disables the use of any pager when showing information (since dpkg 1.19.2). diff --git a/src/main.c b/src/main.c
    index 04b5799f8..4ba0eb1cc 100644
    --- a/src/main.c
    +++ b/src/main.c
    @@ -171,6 +171,7 @@ usage(const struct cmdinfo *ci, const char *value)
    " --refuse-<thing>[,...] Ditto.\n"
    " --abort-after <n> Abort after encountering <n> errors.\n"
    " --robot Use machine-readable output on some commands.\n" +" --no-script