[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: apt-get -qq install



On 8/2/22 15:53, Victor Sudakov wrote:
David Christensen wrote:

I don't actually like the idea of redirecting apt-get's output to
/dev/null because I want to see the list of packages installed, but without
these pseudographics. Do you think it's possible? Any ideas?


I prefer the idea of collecting all of the data and then writing queries
and reports to print the interesting bits.  If you keep all of the data,
you can apply future queries and reports to past data.  But if you
filter the data up front and save one report format, your future options
are limited.

(Un)fortunately this is a CI/CD pipeline, the VM and its data will be
gone forever after the build. Unless I care to keep apt output as an
artifact somewhere which is IMHO an overkill. I just want an concise
CI/CD log without interactive bells and whistles like progress
indicators.


Without seeing your CI/CD pipeine -- create a patterns file containing regular expressions that match the lines you want removed, then add a grep(1) filter into the pipeline:

2022-08-02 16:58:46 dpchrist@laalaa ~
$ cat remove-patterns.txt
bar
quux

2022-08-02 16:58:50 dpchrist@laalaa ~
$ echo -e "foo\nbar\nbaz\nquux" | egrep -v -f remove-patterns.txt
foo
baz


David


Reply to: