pck-update.in: fix http+git and https+git protocols with preserve_dot_git support

This commit is contained in:
Silvan Calarco 2021-02-24 17:48:03 +01:00
parent bb706d3ef4
commit c3e90a144f

View File

@ -1204,11 +1204,20 @@ rpmvars.solve "$fullURL_new" "$SRPM_SPECFILE_WITH_PATH")
notify.debug "fullURL_new = $fullURL_new"
case "$fullURL_new" in
git://*|http://*.git/*|https://*.git/*|http+git://*|https+git://*)
http+git://*|https+git://*)
fullURL_new="${fullURL_new/+git}"
git.download \
--pck-version "$pck_newver" \
--destdir="$source_dir" "$fullURL_new"
[ -e "${source_dir}/${fullURL/*\/}" -a "$force_download" != "1" ] || \
git.download \
--pck-version "$pck_newver" \
--destdir="$source_dir" "$fullURL_new" \
--preserve-dot-git 1
;;
git://*|http://*.git/*|https://*.git/*)
fullURL_new="${fullURL_new/+git}"
[ -e "${source_dir}/${fullURL/*\/}" -a "$force_download" != "1" ] || \
git.download \
--pck-version "$pck_newver" \
--destdir="$source_dir" "$fullURL_new"
;;
*) curl.download --options "$curl_options" $sdflag \
${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \
@ -2052,13 +2061,6 @@ rpmvars.solve "$fullURL" "$SRPM_SPECFILE_WITH_PATH")
notify.debug "fullURL = $fullURL"
case "$fullURL" in
git://*|http://*.git/*|https://*.git/*)
fullURL="${fullURL/+git}"
[ -e "${source_dir}/${fullURL/*\/}" -a "$force_download" != "1" ] || \
git.download \
--pck-version "$pck_rpmversion" \
--destdir="$source_dir" "$fullURL"
;;
http+git://*|https+git://*)
fullURL="${fullURL/+git}"
[ -e "${source_dir}/${fullURL/*\/}" -a "$force_download" != "1" ] || \
@ -2067,6 +2069,13 @@ rpmvars.solve "$fullURL" "$SRPM_SPECFILE_WITH_PATH")
--destdir="$source_dir" "$fullURL" \
--preserve-dot-git 1
;;
git://*|http://*.git/*|https://*.git/*)
fullURL="${fullURL/+git}"
[ -e "${source_dir}/${fullURL/*\/}" -a "$force_download" != "1" ] || \
git.download \
--pck-version "$pck_rpmversion" \
--destdir="$source_dir" "$fullURL"
;;
*) curl.download --options "$curl_options" $sdflag \
${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \
--exit-on-err --filenum="$totfilenum" --destdir="$source_dir" "$fullURL"