From b31a6089e69a76c6c8330bff6bd164f74d87be1d Mon Sep 17 00:00:00 2001 From: "Ward Nakchbandi (Cosmic Fusion)" <83735213+CosmicFusion@users.noreply.github.com> Date: Wed, 31 Jul 2024 11:43:29 +0000 Subject: [PATCH] try fixing bin name resolve for millionth time --- gen-apt-config.py | 9 +++++++-- gen-apt-config.sh | 2 ++ get-bin-name-from-src.sh | 2 ++ setup.sh | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 get-bin-name-from-src.sh diff --git a/gen-apt-config.py b/gen-apt-config.py index ec9d208..fd1ce28 100755 --- a/gen-apt-config.py +++ b/gen-apt-config.py @@ -4,7 +4,12 @@ import os, errno import json import subprocess -_APT_CONFIG_PIN="""Package:{PACKAGES} +_APT_CONFIG_PIN=""" +Package: * +Pin: release a=experimental +Pin-Priority: 390 + +Package:{PACKAGES} Pin: release a=experimental Pin-Priority: 600 """ @@ -25,7 +30,7 @@ for file in srcnames_files: for line in file.readlines(): srcname = line.strip() srcname_lines.append(srcname) - result = subprocess.run([current_path + "/apt_experiments", '-n', srcname], stdout=subprocess.PIPE) + result = subprocess.run([current_path + "/get-bin-name-from-src.sh', srcname], stdout=subprocess.PIPE) stdout = result.stdout.decode('utf-8') for line in stdout.splitlines(): if line != "": diff --git a/gen-apt-config.sh b/gen-apt-config.sh index 92774d4..33efbf5 100755 --- a/gen-apt-config.sh +++ b/gen-apt-config.sh @@ -1,4 +1,6 @@ #! /bin/bash echo -e "Package: *\nPin: release a=experimental\nPin-Priority: 600" > /etc/apt/preferences.d/0-pika-debian-settings +chmod +x ./get-bin-name-from-src.sh +chmod +x ./gen-apt-config.py apt-get update -y ./gen-apt-config.py \ No newline at end of file diff --git a/get-bin-name-from-src.sh b/get-bin-name-from-src.sh new file mode 100644 index 0000000..5ce8095 --- /dev/null +++ b/get-bin-name-from-src.sh @@ -0,0 +1,2 @@ +#! /bin/bash +sudo apt showsrc "$1" | grep -E "^Binary:" | cut -d":" -f2- | sed 's/\,/\n/g' | sed 's/\ /\n/g' | sed '/^$/d' \ No newline at end of file diff --git a/setup.sh b/setup.sh index 0e29a52..a9dbcba 100644 --- a/setup.sh +++ b/setup.sh @@ -71,7 +71,7 @@ Pin-Priority: 600 # Give pika lowest priority because we don't want it sources overwriting Package: * Pin: release a=pika,c=canary -Pin-Priority: 390 +Pin-Priority: 380 Package: pika-abi-bridge* *exiv2* Pin: release a=pika,c=canary