Univention Bugzilla – Attachment 10852 Details for
Bug 48891
apt-get --force-yes is deprecated
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
new atp-get options
0001-Bug-48891-apt-get-force-yes-option-is-deprecated.patch (text/plain), 9.76 KB, created by
Nikola Radovanovic
on 2021-11-04 10:11 CET
(
hide
)
Description:
new atp-get options
Filename:
MIME Type:
Creator:
Nikola Radovanovic
Created:
2021-11-04 10:11 CET
Size:
9.76 KB
patch
obsolete
>From 32ea78b3ac8254fc41aa3fd585c59a65491fb7e4 Mon Sep 17 00:00:00 2001 >From: Nikola Radovanovic <radovanovic.extern@univention.de> >Date: Thu, 4 Nov 2021 10:05:30 +0100 >Subject: [PATCH] #Bug 48891: apt-get --force-yes option is deprecated > >--- > base/univention-updater/script/postup.sh | 4 ++-- > base/univention-updater/script/preup.sh | 2 +- > .../debian/tests/lxc-ucs | 2 +- > ...autotest-201-ucsschool-singleserver-s4.cfg | 4 ++-- > .../autotest-203-ucsschool-multiserver-s4.cfg | 4 ++-- > ...t-206-ucsschool-update-singleserver-s4.cfg | 4 ++-- > ...st-208-ucsschool-update-multiserver-s4.cfg | 4 ++-- > test/utils/base_appliance.sh | 20 +++++++++---------- > 8 files changed, 22 insertions(+), 22 deletions(-) > >diff --git a/base/univention-updater/script/postup.sh b/base/univention-updater/script/postup.sh >index fde345688e..db36422070 100644 >--- a/base/univention-updater/script/postup.sh >+++ b/base/univention-updater/script/postup.sh >@@ -38,7 +38,7 @@ die () { > exit 1 > } > install () { >- 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 "$@" >&3 2>&3 >+ DEBIAN_FRONTEND=noninteractive apt-get -o DPkg::Options::=--force-confold -o DPkg::Options::=--force-overwrite -o DPkg::Options::=--force-overwrite-dir -y --allow-unauthenticated --allow-downgrades --allow-remove-essential --allow-change-held-packages install "$@" >&3 2>&3 > } > reinstall () { > install --reinstall "$@" >@@ -87,7 +87,7 @@ basesystem) die "The server role '$server_role' is not supported anymore with UC > esac > > if ! is_ucr_true update50/skip/autoremove; then >- DEBIAN_FRONTEND=noninteractive apt-get -y --force-yes autoremove >&3 2>&3 >+ DEBIAN_FRONTEND=noninteractive apt-get -y --allow-unauthenticated --allow-downgrades --allow-remove-essential --allow-change-held-packages autoremove >&3 2>&3 > fi > > # removes temporary sources list (always required) >diff --git a/base/univention-updater/script/preup.sh b/base/univention-updater/script/preup.sh >index 548a382530..98aa48bedc 100644 >--- a/base/univention-updater/script/preup.sh >+++ b/base/univention-updater/script/preup.sh >@@ -186,7 +186,7 @@ esac > > # autoremove before the update > if ! is_ucr_true update50/skip/autoremove; then >- DEBIAN_FRONTEND=noninteractive apt-get -y --force-yes autoremove >&3 2>&3 >+ DEBIAN_FRONTEND=noninteractive apt-get -y --allow-unauthenticated --allow-downgrades --allow-remove-essential --allow-change-held-packages autoremove >&3 2>&3 > fi > > [ -f /etc/apt/preferences.d/99ucs500.pref ] || >diff --git a/management/univention-directory-listener/debian/tests/lxc-ucs b/management/univention-directory-listener/debian/tests/lxc-ucs >index 6a5f37c869..23d838be58 100755 >--- a/management/univention-directory-listener/debian/tests/lxc-ucs >+++ b/management/univention-directory-listener/debian/tests/lxc-ucs >@@ -189,7 +189,7 @@ install_packages() > > chroot "${rootfs}" apt-get update > if [ -n "${packages}" ]; then >- chroot "${rootfs}" apt-get install --force-yes -y --no-install-recommends ${packages} >+ chroot "${rootfs}" apt-get install --assume-yes -y --no-install-recommends ${packages} > fi > } > >diff --git a/test/scenarios/autotest-201-ucsschool-singleserver-s4.cfg b/test/scenarios/autotest-201-ucsschool-singleserver-s4.cfg >index 28d3250f95..5414a1541d 100644 >--- a/test/scenarios/autotest-201-ucsschool-singleserver-s4.cfg >+++ b/test/scenarios/autotest-201-ucsschool-singleserver-s4.cfg >@@ -80,8 +80,8 @@ command7: > command8: > . utils.sh; install_ucs_test > . utils.sh; install_apps_test_packages ucsschool >- univention-install -y --force-yes ucs-school-roleshares >- univention-install -y --force-yes ucs-school-radius-802.1x >+ univention-install -y --assume-yes ucs-school-roleshares >+ univention-install -y --assume-yes ucs-school-radius-802.1x > . utils.sh; run_join_scripts > command9: > # Wait for possible postruns from the run_join_scripts command >diff --git a/test/scenarios/autotest-203-ucsschool-multiserver-s4.cfg b/test/scenarios/autotest-203-ucsschool-multiserver-s4.cfg >index ab110245ab..a4e264bfdc 100644 >--- a/test/scenarios/autotest-203-ucsschool-multiserver-s4.cfg >+++ b/test/scenarios/autotest-203-ucsschool-multiserver-s4.cfg >@@ -187,8 +187,8 @@ command6: > command7: > . utils.sh; install_ucs_test > . utils.sh; install_apps_test_packages ucsschool >- univention-install -y --force-yes ucs-school-roleshares >- univention-install -y --force-yes ucs-school-radius-802.1x >+ univention-install -y --assume-yes ucs-school-roleshares >+ univention-install -y --assume-yes ucs-school-radius-802.1x > . utils.sh; run_join_scripts > command8: > # Wait for possible postruns from the run_join_scripts command >diff --git a/test/scenarios/autotest-206-ucsschool-update-singleserver-s4.cfg b/test/scenarios/autotest-206-ucsschool-update-singleserver-s4.cfg >index b69b32d3b9..371848832c 100644 >--- a/test/scenarios/autotest-206-ucsschool-update-singleserver-s4.cfg >+++ b/test/scenarios/autotest-206-ucsschool-update-singleserver-s4.cfg >@@ -54,8 +54,8 @@ command2: > . utils.sh; install_apps ucsschool > . utils.sh; run_join_scripts > . utils.sh; prevent_ucstest_on_fail python2.7 /root/schoolinstaller.py -uAdministrator -p univention -o School1 -S -s 4 >- univention-install -y --force-yes ucs-school-roleshares >- univention-install -y --force-yes ucs-school-radius-802.1x >+ univention-install -y --assume-yes ucs-school-roleshares >+ univention-install -y --assume-yes ucs-school-radius-802.1x > . utils.sh; run_join_scripts > . utils.sh; TARGET_VERSION="[ENV:OLD_VERSION]" RELEASE_UPDATE=public jenkins_updates > command3: >diff --git a/test/scenarios/autotest-208-ucsschool-update-multiserver-s4.cfg b/test/scenarios/autotest-208-ucsschool-update-multiserver-s4.cfg >index 5b0cd92244..4f207eff64 100644 >--- a/test/scenarios/autotest-208-ucsschool-update-multiserver-s4.cfg >+++ b/test/scenarios/autotest-208-ucsschool-update-multiserver-s4.cfg >@@ -176,8 +176,8 @@ command2: > . utils.sh; set_administrator_dn_for_ucs_test; set_administrator_password_for_ucs_test univention > ASYNC . utils.sh; TARGET_VERSION="[ENV:OLD_VERSION]" RELEASE_UPDATE=public jenkins_updates > command3: >- univention-install -y --force-yes ucs-school-radius-802.1x >- univention-install -y --force-yes ucs-school-roleshares >+ univention-install -y --assume-yes ucs-school-radius-802.1x >+ univention-install -y --assume-yes ucs-school-roleshares > # update from old ucs version to new ucs version, use school devel scope if specified in UCSSCHOOL_RELEASE > . utils.sh; run_join_scripts > . utils.sh; activate_ucsschool_repositories >diff --git a/test/utils/base_appliance.sh b/test/utils/base_appliance.sh >index 6e02cb0779..752ec5533d 100644 >--- a/test/utils/base_appliance.sh >+++ b/test/utils/base_appliance.sh >@@ -43,13 +43,13 @@ check_returnvalue () > > install_vmware_packages () > { >- univention-install -y --force-yes open-vm-tools >+ univention-install -y --assume-yes open-vm-tools > } > > install_virtualbox_packages () > { > ucr set repository/online/unmaintained="yes" >- univention-install -y --force-yes virtualbox-guest-x11 >+ univention-install -y --assume-yes virtualbox-guest-x11 > ucr set repository/online/unmaintained="no" > } > >@@ -57,7 +57,7 @@ install_activation_packages () > { > if "$1" > then >- univention-install -y --force-yes univention-system-activation >+ univention-install -y --assume-yes univention-system-activation > ucr set --force auth/sshd/user/root=yes > ucr set appliance/activation/enabled=true > else >@@ -270,7 +270,7 @@ if [ "$close_fds" = "TRUE" ]; then > exec 1> /dev/null > exec 2> /dev/null > fi >-\$update_commands_install -y --force-yes -o="APT::Get::AllowUnauthenticated=1;" $packages || die >+\$update_commands_install -y --assume-yes -o="APT::Get::AllowUnauthenticated=1;" $packages || die > univention-app register --do-it ${ucsversion}/${app}=${version} > > uid="\$(custom_username Administrator)" >@@ -687,8 +687,8 @@ uninstall_packages () > # if upgraded, u-basesystem will be installed by postup.sh > state="$(dpkg --get-selections univention-basesystem 2>/dev/null | awk '{print $2}')" > if [ "$state" = "install" ]; then >- apt-get purge -y --force-yes univention-basesystem >- apt-get -y --force-yes autoremove >+ apt-get purge -y --assume-yes univention-basesystem >+ apt-get -y --assume-yes autoremove > fi > > univention-prune-kernels -v >@@ -740,7 +740,7 @@ __EOF__ > /usr/lib/univention-system-setup/scripts/setup-join.sh 2>&1 | tee /var/log/univention/setup.log > echo "root:univention" | chpasswd > # We still need u-s-s-boot, so reinstall it >- univention-install -y --force-yes --reinstall univention-system-setup-boot >+ univention-install -y --assume-yes --reinstall univention-system-setup-boot > > register_app_components "$main_app" > >@@ -755,7 +755,7 @@ __EOF__ > packages="$(get_app_attr "${app}" DefaultPackages) $(get_app_attr "${app}" DefaultPackagesMaster)" > if [ -n "$packages" ]; then > # shellcheck disable=SC2154,SC2086 >- $update_commands_install -y --force-yes -o="APT::Get::AllowUnauthenticated=1;" $packages >+ $update_commands_install -y --assume-yes -o="APT::Get::AllowUnauthenticated=1;" $packages > fi > univention-run-join-scripts > fi >@@ -794,7 +794,7 @@ setup_appliance () > > uninstall_packages > >- univention-install -y --force-yes --reinstall univention-system-setup-boot >+ univention-install -y --assume-yes --reinstall univention-system-setup-boot > > # shrink appliance image size > rm -f /etc/apt/sources.list.d/05univention-system-setup.list >@@ -1116,7 +1116,7 @@ install_appreport () > repository/online/component/appreport/version="4.0" > cat >/usr/lib/univention-system-setup/appliance-hooks.d/install-appreport <<__EOF__ > #!/bin/sh >-univention-install -y --force-yes univention-appreport >+univention-install -y --assume-yes univention-appreport > __EOF__ > chmod +x /usr/lib/univention-system-setup/appliance-hooks.d/install-appreport > } >-- >2.32.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 48891
: 10852