Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Fix APT repository label change issues #1997

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions scripts/allow-apt-repository-changes.sh
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions scripts/homestead.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down