On Tue, 2 Aug 2022, Victor Sudakov wrote:
David Wright wrote:On Tue 02 Aug 2022 at 18:27:22 (+0000), Victor Sudakov wrote:I'm trying to quiet apt's output by using `apt-get -qqy` in a CI/CD pipeline, however I still see ugly stuff like this in my CI/CD log: Selecting previously unselected package php-common. (Reading database ... (Reading database ... 5%[ ? ]and this: Scanning processes... [ ] Scanning processes... [= ][ ? ]Don't you think the `-qq` modifier should spare me these things? 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?The packages installed and the terminal output are logged in /var/log/apt/{history,term}.log respectively (which I never rotate).Which will be lost in a CI/CD environment because the VM image is ephemeral. BTW I've tried setting `sudo DEBIAN_FRONTEND=noninteractive apt-get -qqy --no-install-recommends install ...` and `sudo apt-get -qqy -o Dpkg::Use-Pty=0 ...` to no avail, the rubbish is still there.
something strange - I see this in my console log: $ less essential-phase1-sid-i386.log /bin/sh: 0: can't access tty; job control turned off # # # Get:1 http://ftp.uk.debian.org/debian sid InRelease [192 kB] Get:2 http://ftp.uk.debian.org/debian sid/main Sources [9857 kB] Get:3 http://ftp.uk.debian.org/debian sid/main i386 Packages [9185 kB] Get:4 http://ftp.uk.debian.org/debian sid/main Translation-en [6861 kB] Fetched 26.1 MB in 20s (1311 kB/s) Reading package lists... # # Reading package lists... Building dependency tree... Reading state information... Calculating upgrade... The following packages will be upgraded: apt base-files libc-bin util-linux 4 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 3690 kB of archives. After this operation, 0 B of additional disk space will be used. Get:1 http://ftp.uk.debian.org/debian sid/main i386 base-files i386 12.2 [70.1 kB] Get:2 http://ftp.uk.debian.org/debian sid/main i386 util-linux i386 2.38-6 [1258 kB] Get:3 http://ftp.uk.debian.org/debian sid/main i386 apt i386 2.5.2 [1522 kB] Get:4 http://ftp.uk.debian.org/debian sid/main i386 libc-bin i386 2.33-8 [840 kB] debconf: delaying package configuration, since apt-utils is not installed Fetched 3690 kB in 2s (1981 kB/s) E: Can not write log (Is /dev/pts mounted?) - posix_openpt (2: No such file or directory) (Reading database ... 6645 files and directories currently installed.) Preparing to unpack .../base-files_12.2_i386.deb ... Unpacking base-files (12.2) over (12.2~tjw) ... Setting up base-files (12.2) ... (Reading database ... 6645 files and directories currently installed.) ... Which is coming from: chroot ${workdir} <<CHEOF set -eu export DEBIAN_FRONTEND=noninteractive apt-get update echo "man-db man-db/auto-update boolean false" | debconf-set-selections apt-get -o APT::Install-Recommends=false -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y upgrade </dev/null