{"thread":{"id":"8067","subject":"[PATCH] t5000: skip ZIP tets when unzip is absent","startedAt":"2007-05-10T10:47:06Z","lastAt":"2007-05-12T15:39:10Z","messageCount":3,"participants":["Johannes Schindelin","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"41729","messageId":"Pine.LNX.4.64.0705101246430.4167@racer.site","threadId":"8067","inReplyTo":null,"subject":"[PATCH] t5000: skip ZIP tets when unzip is absent","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-05-10T10:47:06Z","receivedAt":"2007-05-10T10:47:06Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nSigned-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n\n---\n\n t/t5000-tar-tree.sh |    7 +++++++\n 1 files changed, 7 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh\nindex e223c07..1580592 100755\n--- a/t/t5000-tar-tree.sh\n+++ b/t/t5000-tar-tree.sh\n@@ -108,6 +108,13 @@ test_expect_success \\\n     'git-archive --format=zip' \\\n     'git-archive --format=zip HEAD >d.zip'\n \n+unzip -v 2>/dev/null\n+if [ $? -ne 10 ]; then\n+\techo \"Skipping ZIP tests, because unzip was not found\"\n+\ttest_done\n+\texit\n+fi\n+\n test_expect_success \\\n     'extract ZIP archive' \\\n     '(mkdir d && cd d && $UNZIP ../d.zip)'\n"},{"id":"41774","messageId":"7vps58ieuw.fsf@assigned-by-dhcp.cox.net","threadId":"8067","inReplyTo":"Pine.LNX.4.64.0705101246430.4167@racer.site","subject":"Re: [PATCH] t5000: skip ZIP tets when unzip is absent","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-05-10T20:49:11Z","receivedAt":"2007-05-10T20:49:11Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n>\n> ---\n>\n>  t/t5000-tar-tree.sh |    7 +++++++\n>  1 files changed, 7 insertions(+), 0 deletions(-)\n>\n> diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh\n> index e223c07..1580592 100755\n> --- a/t/t5000-tar-tree.sh\n> +++ b/t/t5000-tar-tree.sh\n> @@ -108,6 +108,13 @@ test_expect_success \\\n>      'git-archive --format=zip' \\\n>      'git-archive --format=zip HEAD >d.zip'\n>  \n> +unzip -v 2>/dev/null\n> +if [ $? -ne 10 ]; then\n> +\techo \"Skipping ZIP tests, because unzip was not found\"\n> +\ttest_done\n> +\texit\n> +fi\n> +\n\nAre you sure about this?\n\n        $ unzip -v 2>/dev/null; echo \"**$?**\"\n        UnZip 5.52 of 28 February 2005, by Debian. Original by Info-ZIP.\n\n        Latest sources and executables are at\n        ftp://ftp.info-zip.org/pub/infozip/ ;\n        see ftp://ftp.info-zip.org/pub/infozip/UnZip.html for other\n        sites.\n\n        Compiled with gcc 4.1.2 20060814 (prerelease) (Debian 4.1.1-11)\n        for Unix (Linux ELF) on Aug 30 2006.\n\n        UnZip special compilation options:\n                ACORN_FTYPE_NFS\n                COPYRIGHT_CLEAN (PKZIP 0.9x unreducing method not\n                supported)\n                SET_DIR_ATTRIB\n                TIMESTAMP\n                USE_EF_UT_TIME\n                USE_UNSHRINK (PKZIP/Zip 1.x unshrinking method\n                supported)\n                USE_DEFLATE64 (PKZIP 4.x Deflate64(tm) supported)\n                VMS_TEXT_CONV\n                WILD_STOP_AT_DIR\n                [decryption, version 2.9 of 05 May 2000]\n\n        UnZip and ZipInfo environment options:\n                   UNZIP:  [none]\n                UNZIPOPT:  [none]\n                 ZIPINFO:  [none]\n              ZIPINFOOPT:  [none]\n        **0**\n\t$ unzil -v 2>/dev/null; echo \"**$?**\"\n\t**127**\n\nSo two points are...\n\n * 2>/dev/null alone would give unsightly output to stdout which\n   does not need to be in the test when unzip is available;\n\n * at least one version of unzip does not exit with status 10\n   upon successful -v invocation, so the test is wrong; \"unzip\n   is unavaiable\" is typically signalled with exit 127 (POSIX\n   tells shell to use this for \"command not found\"; if found but\n   not executable is 126).\n"},{"id":"41929","messageId":"Pine.LNX.4.64.0705121735580.4167@racer.site","threadId":"8067","inReplyTo":"7vps58ieuw.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] t5000: skip ZIP tets when unzip is absent","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-05-12T15:39:10Z","receivedAt":"2007-05-12T15:39:10Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 10 May 2007, Junio C Hamano wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> \n> > Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n> >\n> > ---\n> >\n> >  t/t5000-tar-tree.sh |    7 +++++++\n> >  1 files changed, 7 insertions(+), 0 deletions(-)\n> >\n> > diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh\n> > index e223c07..1580592 100755\n> > --- a/t/t5000-tar-tree.sh\n> > +++ b/t/t5000-tar-tree.sh\n> > @@ -108,6 +108,13 @@ test_expect_success \\\n> >      'git-archive --format=zip' \\\n> >      'git-archive --format=zip HEAD >d.zip'\n> >  \n> > +unzip -v 2>/dev/null\n> > +if [ $? -ne 10 ]; then\n> > +\techo \"Skipping ZIP tests, because unzip was not found\"\n> > +\ttest_done\n> > +\texit\n> > +fi\n> > +\n> \n> Are you sure about this?\n\nNo longer.\n\nAt least one unzip version I tested returned exit code 10 when correctly \nshowing the usage (IIRC). However, another one has exit code 0!\n\nAlso, it should not hardcode \"unzip\", but instead use \"$UNZIP\".\n\nSo, please ignore this patch. I try to do it properly.\n\nCiao,\nDscho\n"}]}