Skip to content

cve feed: make apt silent for better investigation of failure #159

@mtardy

Description

@mtardy

We had an issue and the logs were not super helpful because too verbose, would be nice to clean that up.

Here are a few informations from manpages.

-q, --quiet
Quiet. Produces output suitable for logging, omitting progress indicators. More q's will produce more quiet up to a maximum of two. You can also use -q=# to set the quiet level, overriding the configuration file. Note that quiet level 2 implies -y, you should never use -qq without a no-action modifier such as -d, --print-uris or -s as APT may decided to do something you did not expect.
Configuration Item: quiet.
[..]
-y, --yes, --assume-yes
Automatic yes to prompts. Assume "yes" as answer to all prompts and run non-interactively. If an undesirable situation, such as changing a held package or removing an essential package, occurs then apt-get will abort.

This is the part where we would like to change so that the error is more obvious in the logs:

# install python-pip3
apt-get update
apt-get install -y python3-pip

It could look a little bit like this in the end, just make sure it properly print a simple error message in case of error (because we need to understand):

DEBIAN_FRONTEND=noninteractive apt-get -y -qq

Metadata

Metadata

Assignees

Labels

good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions