| |
@@ -2,7 +2,7 @@
|
| |
# It is possible to add .repo file to /etc/yum.repos.d/ and install required
|
| |
# packages.
|
| |
shell: |
|
| |
- # This code was traslitirated from /usr/lib/yum-plugins/copr.py
|
| |
+ # This code was traslitirated from dnf-plugins/copr.py
|
| |
# item == mvadkert/beakerlib-libraries
|
| |
PROJECT="{{ item }}"
|
| |
REPO_FILE="${PROJECT//\//-}"
|
| |
@@ -12,19 +12,11 @@
|
| |
exit
|
| |
fi
|
| |
VERSION_ID="$(source /etc/os-release; echo $VERSION_ID)" # 7, 27, Rawhide has: next release
|
| |
- VERSION="$(source /etc/os-release; echo $VERSION)" # "7 (Core)" "27 (Atomic Host)" "29 (Rawhide)"
|
| |
+ REDHAT_SUPPORT_PRODUCT_VERSION="$(source /etc/os-release; echo $REDHAT_SUPPORT_PRODUCT_VERSION)" # rawhide, 7, 26
|
| |
ID="$(source /etc/os-release; echo $ID)" # centos, fedora
|
| |
- ARCH="$(uname -m)"
|
| |
- CHROOT="epel-$VERSION_ID-$ARCH"
|
| |
+ CHROOT="epel-$VERSION_ID"
|
| |
if [ "$ID" = "fedora" ]; then
|
| |
- case "$VERSION" in
|
| |
- *Rawhide*)
|
| |
- CHROOT="fedora-rawhide-$ARCH"
|
| |
- ;;
|
| |
- *)
|
| |
- CHROOT="fedora-$VERSION_ID-$ARCH"
|
| |
- ;;
|
| |
- esac
|
| |
+ CHROOT="fedora-$REDHAT_SUPPORT_PRODUCT_VERSION"
|
| |
fi
|
| |
URL="http://copr.fedoraproject.org/coprs/$PROJECT/repo/$CHROOT/"
|
| |
echo "$URL"
|
| |
More info can be found at:
Signed-off-by: Andrei Stepanov astepano@redhat.com