GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix apt cleanup trap replacement · setup-php/setup-php@25b6ac8

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src/scripts
    • linux.sh
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/scripts/linux.sh‎

Copy file name to clipboardExpand all lines: src/scripts/linux.sh
+2-6Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,12 @@ self_hosted_helper() {
3030

3131
# Function to fix broken packages.
3232
fix_broken_packages() {
33-
sudo apt --fix-broken install >/dev/null 2>&1
33+
sudo apt --fix-broken install -o Dpkg::Options::=--force-confnew >/dev/null 2>&1
3434
}
3535

3636
# Function to install a package
3737
install_packages() {
3838
packages=("$@")
39-
if ! [ -e /etc/dpkg/dpkg.cfg.d/force-confnew ]; then
40-
echo "force-confnew" | sudo tee /etc/dpkg/dpkg.cfg.d/force-confnew >/dev/null 2>&1
41-
trap "sudo rm -f /etc/dpkg/dpkg.cfg.d/force-confnew 2>/dev/null" exit
42-
fi
4339
$apt_install "${packages[@]}" >/dev/null 2>&1 || (update_lists && fix_broken_packages && $apt_install "${packages[@]}" >/dev/null 2>&1)
4440
}
4541

@@ -357,7 +353,7 @@ version=${1:-'8.5'}
357353
ini=${2:-'production'}
358354
src=${0%/*}/..
359355
debconf_fix="DEBIAN_FRONTEND=noninteractive"
360-
apt_install="sudo $debconf_fix apt-fast install -y --no-install-recommends"
356+
apt_install="sudo $debconf_fix apt-fast install -y --no-install-recommends -o Dpkg::Options::=--force-confnew"
361357
scripts="$src"/scripts
362358

363359
add_sudo >/dev/null 2>&1

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.