try fixing bin name resolve for millionth time

This commit is contained in:
Ward Nakchbandi (Cosmic Fusion) 2024-07-31 11:43:29 +00:00 committed by GitHub
parent 5c99ab4f92
commit b31a6089e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 12 additions and 3 deletions

View File

@ -4,7 +4,12 @@ import os, errno
import json import json
import subprocess 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: release a=experimental
Pin-Priority: 600 Pin-Priority: 600
""" """
@ -25,7 +30,7 @@ for file in srcnames_files:
for line in file.readlines(): for line in file.readlines():
srcname = line.strip() srcname = line.strip()
srcname_lines.append(srcname) 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') stdout = result.stdout.decode('utf-8')
for line in stdout.splitlines(): for line in stdout.splitlines():
if line != "": if line != "":

View File

@ -1,4 +1,6 @@
#! /bin/bash #! /bin/bash
echo -e "Package: *\nPin: release a=experimental\nPin-Priority: 600" > /etc/apt/preferences.d/0-pika-debian-settings 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 apt-get update -y
./gen-apt-config.py ./gen-apt-config.py

2
get-bin-name-from-src.sh Normal file
View File

@ -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'

View File

@ -71,7 +71,7 @@ Pin-Priority: 600
# Give pika lowest priority because we don't want it sources overwriting # Give pika lowest priority because we don't want it sources overwriting
Package: * Package: *
Pin: release a=pika,c=canary Pin: release a=pika,c=canary
Pin-Priority: 390 Pin-Priority: 380
Package: pika-abi-bridge* *exiv2* Package: pika-abi-bridge* *exiv2*
Pin: release a=pika,c=canary Pin: release a=pika,c=canary