tests: test00_specsyntax: add debug info for curl command line used

This commit is contained in:
Silvan 2024-10-12 20:36:47 +02:00
parent b789b54c9c
commit 94a21a8788
2 changed files with 12 additions and 14 deletions

View File

@ -1,3 +1,8 @@
# Italian translation.
# Copyright (C) 2004-2013 Davide Madrisan
# This file is distributed under the same license as the autospec package.
# Davide Madrisan <davide.madrisan@gmail.com>, 2004-2013.
#
msgid "this script requires bash version 2 or better"
msgstr "questo script richiede bash versione 2 o superiore"
@ -930,6 +935,9 @@ msgstr "sembra un modulo python (in questo caso usa \\`-t python')"
msgid "created specfile"
msgstr "creato specfile"
msgid "checking Source URL with: "
msgstr "controllo della URL sorgente con: "
msgid "redirect detected: replacing from \\`$SPEC_URL' to "
"\\`${http_effective_url}'"
msgstr "redirezione rilevata: sostituzione da \\`$SPEC_URL' a "
@ -956,11 +964,6 @@ msgstr "manca almeno una direttiva \\`%defattr'"
msgid "use rpm macros if possible:"
msgstr "utilizzare le macro rpm quando possibile:"
# Italian translation.
# Copyright (C) 2004-2013 Davide Madrisan
# This file is distributed under the same license as the autospec package.
# Davide Madrisan <davide.madrisan@gmail.com>, 2004-2013.
#
msgid ""
msgstr "Project-Id-Version: autospec 1.16.4\n"
"Report-Msgid-Bugs-To: davide.madrisan@gmail.com\n"
@ -1099,12 +1102,3 @@ msgid "${NOTE}Security checks: ${#rpmpkg_name[@]} package(s) checked: "
"${NORM}${WARN}$total_issues${NORM}${NOTE} warning(s).${NORM}"
msgstr "${NOTE}Controlli di sicurezza: pacchetti rpm: ${#rpmpkg_name[@]}; "
"problemi riscontrati: ${NORM}${WARN}$total_issues${NORM}"
#~ msgid "replacing the AUTOBUILDREQ block by:"
#~ msgstr "sostituzione del blocco AUTOBUILDREQ con:"
#~ msgid "server unreachable"
#~ msgstr "server non raggiungibile"
#~ msgid "invalid version number"
#~ msgstr "numero di versione non valido"

View File

@ -49,6 +49,10 @@ function specfile.checksyntax() {
notify.note "$(test.num2str). ${NOTE}"\
"url""${NORM}..."
if [[ "$SPEC_URL" ]]; then
{ notify.debug "\
\`url': "$"checking Source URL with: ""\`curl -s -o /dev/null -w \"%{http_code}\" -A \"${user_agent}\" $SPEC_URL'"
}
http_code=`curl -s -o /dev/null -w "%{http_code}" -A "${user_agent}" $SPEC_URL`
if [ "$http_code" != "200" ]; then
if [ "${http_code:0:2}" == "30" ]; then