Skip to content

Commit

Permalink
scripts: Update script to download RPM packages
Browse files Browse the repository at this point in the history
Since the script was originally written, a few things such as

  * location of the Fedora repositories
  * format of HTML page

has changed. This leads to errors when setting up cross build
environment for arm64.

Fix these issues by updating the repo url and the regular expression
used to parse the package version.

Note: The mechanism to download the packages is a little fragile and
may break again in the future. Hopefully, all this can go away once
the build system has been migrated to use the native distro packages.

Signed-off-by: Punit Agrawal <pagrawal@lynx.com>
  • Loading branch information
Punit Agrawal committed Nov 3, 2020
1 parent 3e898f4 commit 8eac5bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/download_rpm_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ arch=aarch64

letter=${package:0:1}

main_repo_url="http://mirrors.kernel.org/fedora/releases/$release/Everything/$arch/os/Packages/$letter/"
version=$(wget -t 1 -qO- $main_repo_url | grep "${package}-[0-9].*$arch" | grep -Po ">.*<" | sed -e "s/>${package}-\(.*\)\.$arch\.rpm</\1/g" | tail -l)
main_repo_url="https://download-ib01.fedoraproject.org/pub/fedora/linux/releases/$release/Everything/$arch/os/Packages/$letter/"
version=$(wget -t 1 -qO- $main_repo_url | grep "${package}-[0-9].*$arch" | grep -Po "href=\".*\"" | sed -e "s/href=\"${package}-\(.*\)\.$arch\.rpm\"/\1/g" | tail -l)

archive_repo_url="http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/$release/Everything/$arch/os/Packages/$letter/"
if [[ "${version}" != "" ]]; then
Expand Down

0 comments on commit 8eac5bf

Please sign in to comment.