diff --git a/scripts/allow-apt-repository-changes.sh b/scripts/allow-apt-repository-changes.sh new file mode 100644 index 000000000..afb0c5596 --- /dev/null +++ b/scripts/allow-apt-repository-changes.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +if [ ! -f "/etc/apt/apt.conf.d/99allow-repository-change" ]; then + echo "Configuring APT to allow repository label and other metadata changes..." + + cat << EOF | sudo tee /etc/apt/apt.conf.d/99allow-repository-change +Acquire::AllowReleaseInfoChange::Label "true"; +Acquire::AllowReleaseInfoChange::Suite "true"; +Acquire::AllowReleaseInfoChange::Version "true"; +Acquire::AllowReleaseInfoChange::Codename "true"; +EOF + + echo "APT configuration for repository changes completed." +else + echo "APT already configured to handle repository changes." +fi diff --git a/scripts/homestead.rb b/scripts/homestead.rb index 1fd98ecaf..f199365d0 100644 --- a/scripts/homestead.rb +++ b/scripts/homestead.rb @@ -270,6 +270,8 @@ def self.configure(config, settings) end end + config.vm.provision "allow_apt_changes", type: "shell", path: script_dir + "/allow-apt-repository-changes.sh" + config.vm.provision "apt_update", type: "shell", inline: "apt-get update" # Ensure we have PHP versions used in sites in our features