Package: dpkg
Version: 1.19.6
Severity: normal

Scenario

$ dpkg -l firefox
...
ii  firefox        67.0~b18-0   amd64        Mozilla Firefox web browser

$ sudo dpkg --refuse-downgrade -i firefox_66.0.4-1_amd64.deb
dpkg: will not downgrade firefox from 67.0~b18-0 to 66.0.4-1, skipping

This is expected behaviour. Now but --refuse-downgrade into a config file.

$ grep -r downgrade /etc/dpkg
/etc/dpkg/dpkg.cfg:refuse-downgrade

Try again:

$ sudo dpkg -i firefox_66.0.4-1_amd64.deb
dpkg: warning: downgrading firefox from 67.0~b18-0 to 66.0.4-1
(Reading database ... 262020 files and directories currently installed.)
Preparing to unpack firefox_66.0.4-1_amd64.deb ...
Unpacking firefox (66.0.4-1) over (67.0~b18-0) ...
Setting up firefox (66.0.4-1) ...

dpkg should have refused as before.



-- Package-specific info:

-- System Information:
Debian Release: 10.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.0.0-trunk-amd64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages dpkg depends on:
ii  libbz2-1.0   1.0.6-9
ii  libc6        2.28-10
ii  liblzma5     5.2.4-1
ii  libselinux1  2.8-1+b1
ii  tar          1.30+dfsg-6
ii  zlib1g       1:1.2.11.dfsg-1

dpkg recommends no packages.

Versions of packages dpkg suggests:
ii  apt            1.8.1
pn  debsig-verify  <none>

-- Configuration Files:
/etc/dpkg/dpkg.cfg changed:
no-debsig
log /var/log/dpkg.log
refuse-downgrade


-- no debconf information

Reply via email to