Bug 48891 - apt-get --force-yes is deprecated
apt-get --force-yes is deprecated
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Update - univention-updater
UCS 4.4
Other Linux
: P5 normal (vote)
: UCS 5.0-1-errata
Assigned To: Nikola Radovanovic
Arvid Requate
https://git.knut.univention.de/univen...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-03-06 20:22 CET by Philipp Hahn
Modified: 2022-03-09 13:43 CET (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 5: Will affect all installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.086
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments
new atp-get options (9.76 KB, patch)
2021-11-04 10:11 CET, Nikola Radovanovic
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2019-03-06 20:22:37 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
Comment 1 Florian Best univentionstaff 2020-08-17 17:13:06 CEST
I doubt --force-yes is required anywhere there, except maybe for the updater.
Comment 2 Philipp Hahn univentionstaff 2020-08-24 08:42:42 CEST
(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.
Comment 3 Florian Best univentionstaff 2020-08-24 10:47:16 CEST
(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.
Comment 4 Arvid Requate univentionstaff 2021-11-03 12:20:51 CET
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
Comment 5 Nikola Radovanovic univentionstaff 2021-11-04 10:11:54 CET
Created attachment 10852 [details]
new atp-get options
Comment 7 Nikola Radovanovic univentionstaff 2022-02-23 11:35:18 CET
ea185b43cb | apt-get --force-yes option is deprecated
a775e30204 | Advisory update
Comment 8 Arvid Requate univentionstaff 2022-03-08 11:30:11 CET
Verified:
* Code review
* Jenkins update tests from 4.4-8 to 5.0-1
* Advisory