Univention Bugzilla – Bug 48891
apt-get --force-yes is deprecated
Last modified: 2022-03-09 13:43:40 CET
/var/log/univention/updater.log ... W: --force-yes is deprecated, use one of the options starting with --allow instead. base/univention-updater/script/postup.sh:37: DEBIAN_FRONTEND=noninteractive apt-get -o DPkg::Options::=--force-confold -o DPkg::Options::=--force-overwrite -o DPkg::Options::=--force-overwrite-dir -y --force-yes install "$@" >>"$UPDATER_LOG" 2>&1 base/univention-updater/script/postup.sh:105: DEBIAN_FRONTEND=noninteractive apt-get -y --force-yes autoremove >>"$UPDATER_LOG" 2>&1 base/univention-updater/script/preup.sh:219: DEBIAN_FRONTEND=noninteractive xargs -r apt-get -o DPkg::Options::=--force-confold -y --force-yes purge base/univention-updater/script/preup.sh:456: DEBIAN_FRONTEND=noninteractive apt-get -y --force-yes autoremove >&3 2>&3 management/univention-directory-listener/debian/tests/lxc-ucs:192: chroot "${rootfs}" apt-get install --force-yes -y --no-install-recommends ${packages} test/scenarios/autotest-201-ucsschool-singleserver-s4.cfg:84: univention-install -y --force-yes ucs-school-roleshares test/scenarios/autotest-201-ucsschool-singleserver-s4.cfg:85: univention-install -y --force-yes ucs-school-radius-802.1x test/scenarios/autotest-203-ucsschool-multiserver-s4.cfg:127: univention-install -y --force-yes univention-appcenter test/scenarios/autotest-203-ucsschool-multiserver-s4.cfg:182: univention-install -y --force-yes univention-appcenter test/scenarios/autotest-203-ucsschool-multiserver-s4.cfg:197: univention-install -y --force-yes ucs-school-roleshares test/scenarios/autotest-203-ucsschool-multiserver-s4.cfg:198: univention-install -y --force-yes ucs-school-radius-802.1x test/scenarios/autotest-206-ucsschool-update-singleserver-s4.cfg:88: univention-install -y --force-yes ucs-school-roleshares test/scenarios/autotest-206-ucsschool-update-singleserver-s4.cfg:89: univention-install -y --force-yes ucs-school-radius-802.1x test/scenarios/autotest-208-ucsschool-update-multiserver-s4.cfg:215: univention-install -y --force-yes ucs-school-roleshares test/scenarios/autotest-208-ucsschool-update-multiserver-s4.cfg:216: univention-install -y --force-yes ucs-school-radius-802.1x test/scenarios/cloud-init-image.cfg:27: univention-install -y --force-yes univention-cloud-init test/scenarios/fbest/autotest-201-ucsschool-singleserver-s4.cfg:81: univention-install -y --force-yes ucs-school-roleshares test/scenarios/fbest/autotest-201-ucsschool-singleserver-s4.cfg:82: univention-install -y --force-yes ucs-school-radius-802.1x test/ucs-test/univention/testing/coverage.py:40: print >> sys.stderr, "use: ucr set repository/online/unmaintained='yes'; univention-install -y --force-yes python-pip; pip install coverage" test/utils/base_appliance.sh:47: univention-install -y --force-yes open-vm-tools test/utils/base_appliance.sh:53: univention-install -y --force-yes virtualbox-guest-x11 test/utils/base_appliance.sh:59: univention-install -y --force-yes univention-system-activation test/utils/base_appliance.sh:232:\$update_commands_install -y --force-yes -o="APT::Get::AllowUnauthenticated=1;" $packages || die test/utils/base_appliance.sh:606: apt-get purge -y --force-yes univention-basesystem test/utils/base_appliance.sh:607: apt-get -y --force-yes autoremove test/utils/base_appliance.sh:612: DEBIAN_FRONTEND=noninteractive apt-get purge -y --force-yes ${kernel} test/utils/base_appliance.sh:666: univention-install -y --force-yes --reinstall univention-system-setup-boot test/utils/base_appliance.sh:678: $update_commands_install -y --force-yes -o="APT::Get::AllowUnauthenticated=1;" $packages test/utils/base_appliance.sh:715: univention-install -y --force-yes --reinstall univention-system-setup-boot test/utils/base_appliance.sh:1054:univention-install -y --force-yes univention-appreport
I doubt --force-yes is required anywhere there, except maybe for the updater.
(In reply to Florian Best from comment #1) > I doubt --force-yes is required anywhere there, except maybe for the updater. Wrong, --assume-yes is required is most cases.
(In reply to Philipp Hahn from comment #2) > (In reply to Florian Best from comment #1) > > I doubt --force-yes is required anywhere there, except maybe for the updater. > > Wrong, --assume-yes is required is most cases. Yes, but --assume-yes is "-y" and not "--force-yes". While --force-yes is equal to "--allow-unauthenticated --allow-downgrades, --allow-remove-essential --allow-change-held-packages". And I think this is not required in most of the cases.
My impression is that we need to dissect the problems here: * In univention-updater we should be totally conservative, because it's the most essential package that we must not break to not use the possibility to ship updates to customers. Thus, we should postpone behavior changing changes to Release-Updates and avoid doing that in Errata-Updates * In ucs-test we can be more experimental, we can fix things quickly if the nightly tests show, that we made a mistake. So I think we should do the following steps: 1. Adjust univention-updater to use the exact equivalent options mentioned in the man page of apt-get, which says: "replaced by --allow-unauthenticated , --allow-downgrades , --allow-remove-essential , --allow-change-held-packages in 1.1." Note that other versions of apt-get seem to leave out the "--allow-unauthenticated" option. See point 3 below. 2. Adjust ucs-test cases to use --assume-yes instead of --force-yes 3. Clone this Bug to check if we actually want to reduce the "--allow-*" options in the updater, which we should schedule for a release update
Created attachment 10852 [details] new atp-get options
https://git.knut.univention.de/univention/ucs/-/merge_requests/160
ea185b43cb | apt-get --force-yes option is deprecated a775e30204 | Advisory update
Verified: * Code review * Jenkins update tests from 4.4-8 to 5.0-1 * Advisory
<https://errata.software-univention.de/#/?erratum=5.0x242>