[MacPorts] #14452: python_select produce unneeded warnings when the only option is "-n"
#14452: python_select produce unneeded warnings when the only option is "-n" -------------------------------+-------------------------------------------- Reporter: ebgssth@gmail.com | Owner: macports-tickets@lists.macosforge.org Type: enhancement | Status: new Priority: Normal | Milestone: Port Enhancements Component: ports | Version: 1.6.0 Keywords: | -------------------------------+-------------------------------------------- {{{ $ python_select -n /opt/local/bin/python_select: line 83: [: ==: unary operator expected /opt/local/bin/python_select: line 83: [: ==: unary operator expected /opt/local/bin/python_select: line 83: [: ==: unary operator expected /opt/local/bin/python_select: line 83: [: ==: unary operator expected version "" is invalid! }}} easy fix would be {{{ - if [ ${1} == ${version} ]; then + if [ x${1} == x${version} ]; then }}} might be better to stop script when python_select called with -n only -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/14452> MacPorts </projects/macports> Ports system for Mac OS
#14452: python_select produce unneeded warnings when the only option is "-n" --------------------------------+------------------------------------------- Reporter: ebgssth@gmail.com | Owner: macports-tickets@lists.macosforge.org Type: enhancement | Status: new Priority: Normal | Milestone: Port Enhancements Component: ports | Version: 1.6.0 Resolution: | Keywords: --------------------------------+------------------------------------------- Comment (by ebgssth@gmail.com): attached a patch for this. also added -e option to sh so that any error causes script stop -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/14452#comment:1> MacPorts </projects/macports> Ports system for Mac OS
#14452: python_select produce unneeded warnings when the only option is "-n" --------------------------------+------------------------------------------- Reporter: ebgssth@gmail.com | Owner: raimue@macports.org Type: enhancement | Status: new Priority: Normal | Milestone: Port Enhancements Component: ports | Version: 1.6.0 Resolution: | Keywords: --------------------------------+------------------------------------------- Changes (by eridius@macports.org): * owner: macports-tickets@lists.macosforge.org => raimue@macports.org -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/14452#comment:2> MacPorts </projects/macports> Ports system for Mac OS
#14452: select.sh produce unneeded warnings when the only option is "-n" --------------------------------+------------------------------------------- Reporter: ebgssth@gmail.com | Owner: mww@macports.org Type: enhancement | Status: new Priority: Normal | Milestone: Port Enhancements Component: ports | Version: 1.6.0 Resolution: | Keywords: gcc_select python_select select.sh --------------------------------+------------------------------------------- Changes (by raimue@macports.org): * keywords: => gcc_select python_select select.sh * owner: raimue@macports.org => mww@macports.org * summary: python_select produce unneeded warnings when the only option is "-n" => select.sh produce unneeded warnings when the only option is "-n" Comment: This does not only affect python_select, but also gcc_select as both are using the general select.sh script. It was written by mww and resides in his user directory in svn, so I will reassign this issue to him. -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/14452#comment:3> MacPorts </projects/macports> Ports system for Mac OS
#14452: select.sh produce unneeded warnings when the only option is "-n" --------------------------------+------------------------------------------- Reporter: ebgssth@gmail.com | Owner: mww@macports.org Type: enhancement | Status: new Priority: Normal | Milestone: Port Enhancements Component: ports | Version: 1.6.0 Resolution: | Keywords: gcc_select python_select select.sh --------------------------------+------------------------------------------- Comment (by ebgssth@gmail.com): Any update? -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/14452#comment:4> MacPorts </projects/macports> Ports system for Mac OS
participants (1)
-
MacPorts