# HG changeset patch # User Franz Glasner # Date 1511004652 -3600 # Node ID 1537aff795c5b535a94cc35862cb6221d50ec1d0 # Parent 37f003c9f4e25238194923839a2406940ef830a4 FIX: Quote all variables used for labels because they can contain a '?' character and thus is influenced by the shell's automatic filename expansion. If a file with a one character name exists in the current directory then the output of check-ports was as if the version label was this filename. diff -r 37f003c9f4e2 -r 1537aff795c5 bin/check-ports --- a/bin/check-ports Sat Nov 18 11:53:41 2017 +0100 +++ b/bin/check-ports Sat Nov 18 12:30:52 2017 +0100 @@ -49,7 +49,7 @@ eval _rversions=\"\${remote_${_repo}_versions}\" while read _rfqp _rl _rdescr ; do if [ ${_rfqp%-*} = ${_name} ] ; then - eval remote_${_repo}_label=\${_rl} + eval remote_${_repo}_label=\"\${_rl}\" eval remote_${_repo}_descr=\"\${_rdescr}\" return 0 fi @@ -167,14 +167,14 @@ get_remote_repo_data ${LOCAL_REPO} ${_installed_name} get_remote_repo_data ${LOCALBSDPORTS_REPO} ${_installed_name} get_remote_repo_data ${FREEBSD_REPO} ${_installed_name} - if [ \( -n "${alldata_flag}" \) -o \( ${llabel} != '?' -a ${llabel} != '=' \) -o \( ${remote_FreeBSD_label} != '?' -a ${remote_FreeBSD_label} != '=' \) -o \( ${remote_LocalBSDPorts_label} != '?' -a ${remote_LocalBSDPorts_label} != '=' \) -o \( ${remote_LocalRepo_label} != '?' -a ${remote_LocalRepo_label} != '=' \) ] ; then + if [ \( -n "${alldata_flag}" \) -o \( "${llabel}" != '?' -a "${llabel}" != '=' \) -o \( "${remote_FreeBSD_label}" != '?' -a "${remote_FreeBSD_label}" != '=' \) -o \( "${remote_LocalBSDPorts_label}" != '?' -a "${remote_LocalBSDPorts_label}" != '=' \) -o \( "${remote_LocalRepo_label}" != '?' -a "${remote_LocalRepo_label}" != '=' \) ] ; then print_title "${lfqp}" "${repository}" echo " INDEX: ${llabel} ${ldescr}" echo " FreeBSD: ${remote_FreeBSD_label} ${remote_FreeBSD_descr}" - if [ \( -n "${alldata_LocalBSDPorts_flag}" \) -o \( ${remote_LocalBSDPorts_label} != '?' \) ] ; then + if [ \( -n "${alldata_LocalBSDPorts_flag}" \) -o \( "${remote_LocalBSDPorts_label}" != '?' \) ] ; then echo " LocalBSDPorts: ${remote_LocalBSDPorts_label} ${remote_LocalBSDPorts_descr}" fi - if [ \( -n "${alldata_LocalRepo_flag}" \) -o \( ${remote_LocalRepo_label} != '?' \) ] ; then + if [ \( -n "${alldata_LocalRepo_flag}" \) -o \( "${remote_LocalRepo_label}" != '?' \) ] ; then echo " LocalRepo: ${remote_LocalRepo_label} ${remote_LocalRepo_descr}" fi fi