From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44234) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xqaav-0007Rn-92 for qemu-devel@nongnu.org; Mon, 17 Nov 2014 23:40:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xqaaq-0004Cb-A2 for qemu-devel@nongnu.org; Mon, 17 Nov 2014 23:40:49 -0500 Message-ID: <546ACDBD.9010403@redhat.com> Date: Mon, 17 Nov 2014 21:40:29 -0700 From: Eric Blake MIME-Version: 1.0 References: <1416278986-17320-1-git-send-email-famz@redhat.com> In-Reply-To: <1416278986-17320-1-git-send-email-famz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="EBqDc6db0f1G1VceLhp9nxpVoaQd3TRRj" Subject: Re: [Qemu-devel] [PATCH] qemu-iotests: Fix error message if which(1) not installed List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng , qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, kwolf@redhat.com, mjt@tls.msk.ru, stefanha@redhat.com, mreitz@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --EBqDc6db0f1G1VceLhp9nxpVoaQd3TRRj Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/17/2014 07:49 PM, Fam Zheng wrote: > When which(1) is not installed, we complain "perl not found" because > it's the first set_prog_path check. The error message is misleading. >=20 > Fix it by adding a check for which(1) in the beginning. Why not instead change set_prog_path to use 'command -v' instead of 'which'? As this is a bash script, we shouldn't need to shell out to an optional package for something we can do natively. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --EBqDc6db0f1G1VceLhp9nxpVoaQd3TRRj Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg iQEcBAEBCAAGBQJUas29AAoJEKeha0olJ0NqKrgH/iFPTJyjOd5tZ2HLSvV4SzMK W/bR56j+gYnl/TgtREYw4NGYYFz0kfbrw/aTjqGR7elslZalWqtXDy4iOAfxQkNf 2gmYPnemTawxc3SheLU2JwqAUb3m1FAFowSZYuuUYefymCdqAbWEj86wS7KdZTga +rV/DFSjmJrGNpT0OdeohmSjCeuDPHNRyuzYC2PV+eePHj74DsIEpOtVBDmg0csa 4wcxBKr+SQok1iO9sZ71xv3lr5uQZufsiva8jAysL+GpQ2AM7fvRlNivsxceRqJq mKklSbJtuF+aL3+f1EdHvOTalVYs1V3KCXsW5jBzbA9JRF9DRcE/QobVROtLkeU= =lsPh -----END PGP SIGNATURE----- --EBqDc6db0f1G1VceLhp9nxpVoaQd3TRRj--