minor adjustments

This commit is contained in:
Louis Abel 2023-09-03 16:38:07 -07:00
parent 258466c0e3
commit 3c4bc461e2
Signed by: label
GPG Key ID: B37E62D143879B36
3 changed files with 58 additions and 2 deletions

View File

@ -3,7 +3,7 @@ import sys
class common:
def rlver(self, rlver, stream=False, all_repo=False):
default = "Not Supported"
if stream and all_repo:
if (stream and all_repo):
print("incompatible options used")
sys.exit(1)
@ -54,6 +54,12 @@ class common:
}
return REPOS
def rl8all(self):
REPOS = {
'dist-rocky8-lookahead-build': ['aarch64', 'x86_64', 'i386'],
}
return REPOS
def rl9all(self):
REPOS = {
'all': ['aarch64', 'ppc64le', 's390x', 'x86_64'],
@ -85,4 +91,10 @@ class common:
}
return REPOS
def r8lh(self):
REPOS = {
'dist-rocky8-lookahead-build': ['aarch64', 'i386', 'x86_64'],
}
return REPOS
switcher = common()

View File

@ -0,0 +1,43 @@
#!/bin/bash
# Parses a koji tag for a branch out
#set -x
if [ -n "$1" ]; then
MAJOR=$1
else
echo "Major version not specified"
exit 1
fi
export RLVER=$MAJOR
source common
drop="${PREPOPDROP}"
current=$(pwd)
tmpdir=$(mktemp -d)
tag_template="dist-rocky${MAJOR}-lookahead-build"
str_template="dist-rocky${MAJOR}-lookahead-build"
stream_repo_url="https://kojidev.rockylinux.org/kojifiles/repos/${tag_template}/latest"
pushd "${tmpdir}" || { echo "Could not change directory"; exit 1; }
for y in x86_64 aarch64 i386; do
repodatas=( $(dnf reposync --repofrompath ${str_template},${stream_repo_url}/${y} --download-metadata --repoid=${str_template} -p ${str_template}/${y} --forcearch ${y} --norepopath --remote-time --assumeyes -u | grep repodata) )
mkdir -p "${str_template}/${y}/repodata"
pushd "${str_template}/${y}/repodata" || { echo "Could not change directory"; exit 1; }
for z in "${repodatas[@]}"; do
wget -q -nc "${z}"
done
wget -q -nc "${stream_repo_url}/${y}/repodata/repomd.xml"
popd || { echo "Could not change back..."; exit 1; }
done
/usr/bin/python3 "${current}/prepopulate_parser.py" --version $RLVER --all
ret_val=$?
popd || { echo "Could not change back..."; exit 1; }
if [ "$ret_val" -ne "0" ]; then
echo "There was an error running through the parser."
exit 1
fi
#sed -i "s|${tag_template}|branched|g" $drop
echo "File located at: $drop"

View File

@ -23,11 +23,12 @@ parser = argparse.ArgumentParser()
parser.add_argument('--version', type=str, required=True)
parser.add_argument("--pungi", help="local pungi is here", action='store_true')
parser.add_argument('--stream', action='store_true', help="Stream koji only")
parser.add_argument('--all', action='store_true', help="All repo")
results = parser.parse_args()
REPOS = switcher.rlver(results.version,
stream=results.stream)
stream=results.stream, all_repo=results.all)
if results.pungi:
APPEND_TO_PATH = '/os'