mirror of
https://tvoygit.ru/Djam/r11-builder-agent.git
synced 2025-02-23 02:12:46 +00:00
enable all repos
This commit is contained in:
parent
c82341f3ef
commit
55cf64cd9f
2 changed files with 46 additions and 0 deletions
|
@ -225,6 +225,9 @@ test_rpm() {
|
|||
$MOCK_BIN -v --init --configdir $config_dir --install $(ls "$OUTPUT_FOLDER"/*.rpm | grep -v .src.rpm) >> "${test_log}" 2>&1
|
||||
test_code=$?
|
||||
if [ $test_code == 0 ]; then
|
||||
# enable all repos first
|
||||
# needed for debug packages mostly
|
||||
python /mdv/enable_all_repos.py $chroot_path http://abf-downloads.rosalinux.ru/${platform_name}/repository/${platform_arch}/
|
||||
echo '--> Checking if same or newer version of the package already exists in repositories' >> $test_log 2>&1
|
||||
python /mdv/check_newer_versions.py $chroot_path >> $test_log 2>&1
|
||||
test_code=$?
|
||||
|
|
43
enable_all_repos.py
Executable file
43
enable_all_repos.py
Executable file
|
@ -0,0 +1,43 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
#
|
||||
# Enable all repositories inside the chroot using given mirrorlist
|
||||
#
|
||||
# Arguments: chroot_path, mirrorlist
|
||||
#
|
||||
|
||||
import sys
|
||||
import glob
|
||||
import os.path
|
||||
|
||||
if len(sys.argv) < 3:
|
||||
sys.exit('Usage: %s chroot_path mirrorlist_url' % sys.argv[0])
|
||||
|
||||
chroot_path = sys.argv[1]
|
||||
mirrorlist = sys.argv[2]
|
||||
|
||||
# Add all distribution media
|
||||
print(" ... updating distribution list from " + mirrorlist)
|
||||
os.system("sudo chroot " + chroot_path + " urpmi.addmedia --xml-info=always --wget --wget-options --auth-no-challenge --debug --distrib --all-media --mirrorlist " + mirrorlist)
|
||||
|
||||
# No need in this - '--all-media' option should enable all repositories
|
||||
# Enable and update ignored media
|
||||
#active_media = os.popen("sudo chroot " + chroot_path + " urpmq --wget --wget-options --auth-no-challenge --debug --list-media active").readlines()
|
||||
#p = os.popen("sudo chroot " + chroot_path + " urpmq --wget --wget-options --auth-no-challenge --debug --list-media")
|
||||
#for rep in p.readlines():
|
||||
# if rep not in active_media:
|
||||
# rep = rep.rstrip()
|
||||
# os.system("sudo chroot " + chroot_path + " urpmi.update --wget --wget-options --auth-no-challenge --debug --no-ignore '" + rep + "'")
|
||||
# os.system("sudo chroot " + chroot_path + " urpmi.update --wget --wget-options --auth-no-challenge --debug '" + rep + "'")
|
||||
|
||||
# Add SRPMS media
|
||||
p = os.popen("sudo chroot " + chroot_path + " urpmq --wget --wget-options --auth-no-challenge --list-url")
|
||||
for rep in p.readlines():
|
||||
url = rep.split(" ")[-1]
|
||||
rep = rep.replace(url,"")
|
||||
url = url.replace("i586/media","SRPMS")
|
||||
url = url.replace("x86_64/media","SRPMS")
|
||||
os.system("sudo chroot " + chroot_path + " urpmi.addmedia --xml-info=always --wget --wget-options --auth-no-challenge --debug '" + rep + " srpms' " + url)
|
||||
|
||||
print("The following repositories will be used to look for dependent packages:")
|
||||
os.system("sudo chroot " + chroot_path + " urpmq --wget --wget-options --auth-no-challenge --list-url")
|
Loading…
Add table
Reference in a new issue