pck-update (action 3,5): preliminary support for source files updates from a git repository

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
This commit is contained in:
Davide Madrisan 2012-10-29 23:15:58 +01:00
parent dfbd94458e
commit 7cc90d2efb
2 changed files with 20 additions and 2 deletions

View File

@ -55,6 +55,10 @@ Changes in version 1.12.6
+ update
* lib/libnetwork.lib - Davide Madrisan:
New helper function: 'git.download()'.
+ improvement
* pck-update - Davide Madrisan:
Action 3,5: support source files update from a git repository.
-------------------------------------------------------------------------------

View File

@ -1122,9 +1122,16 @@ echo $fullURL | sed "s,%[{]*version[}]*,$pck_newver,g")
rpmvars.solve "$fullURL_new" "$SRPM_SPECFILE_WITH_PATH")
notify.debug "fullURL_new = $fullURL_new"
curl.download --options "$curl_options" $sdflag \
case "$fullURL_new" in
git://*|http://*.git|https://*.git)
git.download \
--destdir="$source_dir" "$fullURL_new"
;;
*) curl.download --options "$curl_options" $sdflag \
${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \
--exit-on-err --filenum="$totfilenum" --destdir="$source_dir" "$fullURL_new"
;;
esac
done
# get the list of URL of all the patches (usually local files)...
@ -1946,9 +1953,16 @@ found ${NOTE}missing BuildRequirement${NORM} \`${NOTE}$f${NORM}'"
rpmvars.solve "$fullURL" "$SRPM_SPECFILE_WITH_PATH")
notify.debug "fullURL = $fullURL"
curl.download --options "$curl_options" $sdflag \
case "$fullURL_new" in
git://*|http://*.git|https://*.git)
git.download \
--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"
;;
esac
done
# get the list of URLs for the patch files to download