pck-update: do not check for missing build requirements and source files when pck-update is invoked with the option --list-check
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
This commit is contained in:
parent
75bf9e1ed6
commit
a191a40d35
@ -6,6 +6,11 @@ Changes in version 1.12.2
|
|||||||
Add a few more examples for 'autospec -u' and add a short comment before
|
Add a few more examples for 'autospec -u' and add a short comment before
|
||||||
each example.
|
each example.
|
||||||
|
|
||||||
|
+ update
|
||||||
|
* pck-update - Davide Madrisan:
|
||||||
|
Do not check for missing build requirements and source files when
|
||||||
|
pck-update is invoked with the option '--list-check'.
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
|
|
||||||
Changes in version 1.12.1
|
Changes in version 1.12.1
|
||||||
|
@ -1854,102 +1854,104 @@ specfile is newer than srpm (according to modification date)"
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# download and install all the needed build requirements...
|
# download and install all the needed build requirements...
|
||||||
|
if [ "$list_check" = 0 ]; then
|
||||||
# note: it's not possible to directly use the features provided by
|
# note: it's not possible to directly use the features provided by
|
||||||
# rpmlib because they'are bugged (at least in the version 4.0.4)
|
# rpmlib because they'are bugged (at least in the version 4.0.4)
|
||||||
# so we install the necessary 'BuildRequirement's looking at the
|
# so we install the necessary 'BuildRequirement's looking at the
|
||||||
# specfile preamble
|
# specfile preamble
|
||||||
[ "$(sed -n '/^BuildRequires/p' $SRPM_SPECFILE_WITH_PATH)" ] &&
|
[ "$(sed -n '/^BuildRequires/p' $SRPM_SPECFILE_WITH_PATH)" ] &&
|
||||||
notify.debug "\
|
notify.debug "\
|
||||||
[BuildRequires]
|
[BuildRequires]
|
||||||
$(sed -n '/^BuildRequires/{s,.*, &,p}' $SRPM_SPECFILE_WITH_PATH)"
|
$(sed -n '/^BuildRequires/{s,.*, &,p}' $SRPM_SPECFILE_WITH_PATH)"
|
||||||
|
|
||||||
local f rpm_provided_by buildrequirements_to_install
|
local f rpm_provided_by buildrequirements_to_install
|
||||||
for f in ${SPEC_BUILDREQUIRES[@]}; do
|
for f in ${SPEC_BUILDREQUIRES[@]}; do
|
||||||
rpm_provided_by="$(rpm -q $rpm_root_opts --whatprovides $f)"
|
rpm_provided_by="$(rpm -q $rpm_root_opts --whatprovides $f)"
|
||||||
[ $? -eq 0 ] || unset rpm_provided_by
|
[ $? -eq 0 ] || unset rpm_provided_by
|
||||||
|
|
||||||
notify.note " * "$"\
|
notify.note " * "$"\
|
||||||
build requirement found"": \`${NOTE}$f${NORM}' ""\
|
build requirement found"": \`${NOTE}$f${NORM}' ""\
|
||||||
(${NOTE}$rpm_provided_by${NORM})"
|
(${NOTE}$rpm_provided_by${NORM})"
|
||||||
|
|
||||||
# the build requirement is already installed
|
# the build requirement is already installed
|
||||||
[[ "$rpm_provided_by" ]] && continue
|
[[ "$rpm_provided_by" ]] && continue
|
||||||
|
|
||||||
buildreqs_to_install[${#buildreqs_to_install[*]}]="$f"
|
buildreqs_to_install[${#buildreqs_to_install[*]}]="$f"
|
||||||
done
|
done
|
||||||
|
|
||||||
# remove duplicates
|
# remove duplicates
|
||||||
buildreqs_to_install=(
|
buildreqs_to_install=(
|
||||||
$(for f in ${buildreqs_to_install[@]}; do echo $f; done | sort -u))
|
$(for f in ${buildreqs_to_install[@]}; do echo $f; done | sort -u))
|
||||||
|
|
||||||
# install missing build requirements
|
# install missing build requirements
|
||||||
if [[ "${buildreqs_to_install[@]}" ]]; then
|
if [[ "${buildreqs_to_install[@]}" ]]; then
|
||||||
if [ -n "$rpm_download_and_install" ]; then
|
if [ -n "$rpm_download_and_install" ]; then
|
||||||
for f in ${buildreqs_to_install[@]}; do
|
for f in ${buildreqs_to_install[@]}; do
|
||||||
notify.note " * "$"\
|
notify.note " * "$"\
|
||||||
installing missing build requirement"": \`${NOTE}$f${NORM}'"
|
installing missing build requirement"": \`${NOTE}$f${NORM}'"
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -n "$proxy" ]; then
|
if [ -n "$proxy" ]; then
|
||||||
[[ "$debug_print_private_user_infos" = "1" ||
|
[[ "$debug_print_private_user_infos" = "1" ||
|
||||||
-z "$proxy_user" ]] && notify.debug "\
|
-z "$proxy_user" ]] && notify.debug "\
|
||||||
{http,ftp}_proxy=\"{http,ftp}://${proxy_user:+${proxy_user}@}${proxy}\""
|
{http,ftp}_proxy=\"{http,ftp}://${proxy_user:+${proxy_user}@}${proxy}\""
|
||||||
|
|
||||||
http_proxy="http://${proxy_user:+${proxy_user}@}${proxy}" \
|
http_proxy="http://${proxy_user:+${proxy_user}@}${proxy}"\
|
||||||
ftp_proxy="ftp://${proxy_user:+${proxy_user}@}${proxy}" \
|
ftp_proxy="ftp://${proxy_user:+${proxy_user}@}${proxy}"\
|
||||||
$rpm_download_and_install ${buildreqs_to_install[*]}
|
$rpm_download_and_install ${buildreqs_to_install[*]}
|
||||||
else
|
else
|
||||||
$rpm_download_and_install ${buildreqs_to_install[*]}
|
$rpm_download_and_install ${buildreqs_to_install[*]}
|
||||||
fi
|
fi
|
||||||
[ $? -eq 0 ] || notify.error $"\
|
[ $? -eq 0 ] || notify.error $"\
|
||||||
cannot install the needed build requirements"
|
cannot install the needed build requirements"
|
||||||
else
|
else
|
||||||
notify.error $"\
|
notify.error $"\
|
||||||
found ${NOTE}missing BuildRequirement${NORM} \`${NOTE}$f${NORM}'"
|
found ${NOTE}missing BuildRequirement${NORM} \`${NOTE}$f${NORM}'"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# automatically download the missing source and patch files...
|
# automatically download the missing source and patch files...
|
||||||
|
if [ "$list_check" = 0 ]; then
|
||||||
|
# get the list of URLs for the source files to download
|
||||||
|
specfile.getvars -s $SRPM_SPECFILE_WITH_PATH --verbatim SPEC_SOURCE
|
||||||
|
|
||||||
# get the list of URLs for the source files to download
|
local filenum totfilenum fullURL sdflag
|
||||||
specfile.getvars -s $SRPM_SPECFILE_WITH_PATH --verbatim SPEC_SOURCE
|
|
||||||
|
|
||||||
local filenum totfilenum fullURL sdflag
|
[ "$force_download" = 1 ] && sdflag="--force"
|
||||||
|
|
||||||
[ "$force_download" = 1 ] && sdflag="--force"
|
let "totfilenum = 0"
|
||||||
|
for filenum in `seq 1 1 ${#SPEC_SOURCE_VERBATIM[@]}`; do
|
||||||
|
let "totfilenum += 1"
|
||||||
|
fullURL=${SPEC_SOURCE_VERBATIM[$filenum-1]}
|
||||||
|
notify.debug "fullURL = $fullURL"
|
||||||
|
|
||||||
let "totfilenum = 0"
|
fullURL=$(\
|
||||||
for filenum in `seq 1 1 ${#SPEC_SOURCE_VERBATIM[@]}`; do
|
|
||||||
let "totfilenum += 1"
|
|
||||||
fullURL=${SPEC_SOURCE_VERBATIM[$filenum-1]}
|
|
||||||
notify.debug "fullURL = $fullURL"
|
|
||||||
|
|
||||||
fullURL=$(\
|
|
||||||
rpmvars.solve "$fullURL" "$SRPM_SPECFILE_WITH_PATH")
|
rpmvars.solve "$fullURL" "$SRPM_SPECFILE_WITH_PATH")
|
||||||
notify.debug "fullURL = $fullURL"
|
notify.debug "fullURL = $fullURL"
|
||||||
|
|
||||||
curl.download --options "$curl_options" $sdflag \
|
curl.download --options "$curl_options" $sdflag \
|
||||||
${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \
|
${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \
|
||||||
--exit-on-err --filenum="$totfilenum" --destdir="$source_dir" "$fullURL"
|
--exit-on-err --filenum="$totfilenum" --destdir="$source_dir" "$fullURL"
|
||||||
done
|
done
|
||||||
|
|
||||||
# get the list of URLs for the patch files to download
|
# get the list of URLs for the patch files to download
|
||||||
specfile.getvars -s $SRPM_SPECFILE_WITH_PATH --verbatim SPEC_PATCH
|
specfile.getvars -s $SRPM_SPECFILE_WITH_PATH --verbatim SPEC_PATCH
|
||||||
|
|
||||||
for filenum in `seq 1 1 ${#SPEC_PATCH_VERBATIM[@]}`; do
|
for filenum in `seq 1 1 ${#SPEC_PATCH_VERBATIM[@]}`; do
|
||||||
let "totfilenum += 1"
|
let "totfilenum += 1"
|
||||||
fullURL=${SPEC_PATCH_VERBATIM[$filenum-1]}
|
fullURL=${SPEC_PATCH_VERBATIM[$filenum-1]}
|
||||||
notify.debug "fullURL = $fullURL"
|
notify.debug "fullURL = $fullURL"
|
||||||
|
|
||||||
fullURL=$(\
|
fullURL=$(\
|
||||||
rpmvars.solve "$fullURL" "$SRPM_SPECFILE_WITH_PATH")
|
rpmvars.solve "$fullURL" "$SRPM_SPECFILE_WITH_PATH")
|
||||||
notify.debug "fullURL = $fullURL"
|
notify.debug "fullURL = $fullURL"
|
||||||
|
|
||||||
curl.download --options "$curl_options" $sdflag \
|
curl.download --options "$curl_options" $sdflag \
|
||||||
${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \
|
${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \
|
||||||
--exit-on-err --filenum="$totfilenum" --destdir="$source_dir" "$fullURL"
|
--exit-on-err --filenum="$totfilenum" --destdir="$source_dir" "$fullURL"
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
local rpmbuild_opts="\
|
local rpmbuild_opts="\
|
||||||
--define=\"%_srcrpmdir $srpms_dir\" \
|
--define=\"%_srcrpmdir $srpms_dir\" \
|
||||||
|
Loading…
Reference in New Issue
Block a user