{"thread":{"id":"26809","subject":"[PATCH] Work around broken ln on solaris as used in t8006","startedAt":"2011-03-20T23:59:46Z","lastAt":"2011-03-21T05:00:11Z","messageCount":6,"participants":["Ben Walton","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"163853","messageId":"1300665586-24512-1-git-send-email-bwalton@artsci.utoronto.ca","threadId":"26809","inReplyTo":null,"subject":"[PATCH] Work around broken ln on solaris as used in t8006","fromName":"Ben Walton","fromEmail":"bwalton@artsci.utoronto.ca","sentAt":"2011-03-20T23:59:46Z","receivedAt":"2011-03-20T23:59:46Z","isPatch":true,"sender":{"key":"bdwalton@gmail.com","avatar":"https://avatars.githubusercontent.com/u/396061?v=4"},"body":"The test setup in t8006-blame-textconv.sh used ln -sf to overwrite an\nexisting symlink.  Unfortunately, both /usr/bin/ln and\n/usr/xpg4/bin/ln on solaris 9 don't properly handle -f when -s is\nused.  This caused the test setup to fail which caused subsequent\nchecks to also fail.\n\nThis patch uses changes the first check in the test to rm the symlink\nand then create the new symlink using only -s.\n\nThe upstream Solaris bug (fixed in 10, but not 9) is documented here:\nhttp://bugs.opensolaris.org/view_bug.do?bug_id=4372462\n\nSigned-off-by: Ben Walton <bwalton@artsci.utoronto.ca>\n---\n t/t8006-blame-textconv.sh |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/t/t8006-blame-textconv.sh b/t/t8006-blame-textconv.sh\nindex ea64cd8..c5362d9 100755\n--- a/t/t8006-blame-textconv.sh\n+++ b/t/t8006-blame-textconv.sh\n@@ -24,8 +24,9 @@ test_expect_success 'setup ' '\n \tGIT_AUTHOR_NAME=Number1 git commit -a -m First --date=\"2010-01-01 18:00:00\" &&\n \techo \"bin: test 1 version 2\" >one.bin &&\n \techo \"bin: test number 2 version 2\" >>two.bin &&\n+\trm symlink.bin &&\n \tif test_have_prereq SYMLINKS; then\n-\t\tln -sf two.bin symlink.bin\n+\t\tln -s two.bin symlink.bin\n \tfi &&\n \tGIT_AUTHOR_NAME=Number2 git commit -a -m Second --date=\"2010-01-01 20:00:00\"\n '\n-- \n1.7.1\n"},{"id":"163855","messageId":"1300668306-25662-1-git-send-email-bwalton@artsci.utoronto.ca","threadId":"26809","inReplyTo":"1300665586-24512-1-git-send-email-bwalton@artsci.utoronto.ca","subject":"[PATCH] Work around broken ln on solaris as used in t8006","fromName":"Ben Walton","fromEmail":"bwalton@artsci.utoronto.ca","sentAt":"2011-03-21T00:45:06Z","receivedAt":"2011-03-21T00:45:06Z","isPatch":true,"sender":{"key":"bdwalton@gmail.com","avatar":"https://avatars.githubusercontent.com/u/396061?v=4"},"body":"The test setup in t8006-blame-textconv.sh used ln -sf to overwrite an\nexisting symlink.  Unfortunately, both /usr/bin/ln and\n/usr/xpg4/bin/ln on solaris 9 don't properly handle -f when -s is\nused.  This caused the test setup to fail which caused subsequent\nchecks to also fail.\n\nThis patch changes the first check in the test to rm the symlink\nand then create the new symlink using only -s.\n\nThe upstream Solaris bug (fixed in 10, but not 9) is documented here:\nhttp://bugs.opensolaris.org/view_bug.do?bug_id=4372462\n\nSigned-off-by: Ben Walton <bwalton@artsci.utoronto.ca>\n---\n\nFixed typo in the original submission...\n\n t/t8006-blame-textconv.sh |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/t/t8006-blame-textconv.sh b/t/t8006-blame-textconv.sh\nindex ea64cd8..c5362d9 100755\n--- a/t/t8006-blame-textconv.sh\n+++ b/t/t8006-blame-textconv.sh\n@@ -24,8 +24,9 @@ test_expect_success 'setup ' '\n \tGIT_AUTHOR_NAME=Number1 git commit -a -m First --date=\"2010-01-01 18:00:00\" &&\n \techo \"bin: test 1 version 2\" >one.bin &&\n \techo \"bin: test number 2 version 2\" >>two.bin &&\n+\trm symlink.bin &&\n \tif test_have_prereq SYMLINKS; then\n-\t\tln -sf two.bin symlink.bin\n+\t\tln -s two.bin symlink.bin\n \tfi &&\n \tGIT_AUTHOR_NAME=Number2 git commit -a -m Second --date=\"2010-01-01 20:00:00\"\n '\n-- \n1.7.1\n"},{"id":"163856","messageId":"7vd3lluvze.fsf@alter.siamese.dyndns.org","threadId":"26809","inReplyTo":"1300665586-24512-1-git-send-email-bwalton@artsci.utoronto.ca","subject":"Re: [PATCH] Work around broken ln on solaris as used in t8006","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-03-21T01:02:13Z","receivedAt":"2011-03-21T01:02:13Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ben Walton <bwalton@artsci.utoronto.ca> writes:\n\n> The test setup in t8006-blame-textconv.sh used ln -sf to overwrite an\n> existing symlink.  Unfortunately, both /usr/bin/ln and\n> /usr/xpg4/bin/ln on solaris 9 don't properly handle -f when -s is\n> used.\n\nThanks for reporting.  I recall \"ln -s -f\" traditionally has been a pain\npoint not just on Solaris.\n\n> This caused the test setup to fail which caused subsequent\n> checks to also fail.\n>\n> This patch uses changes the first check in the test to rm the symlink\n> and then create the new symlink using only -s.\n\ns/uses //; I think.\n\nIt is curious why \"rm symlink.bin\" is not inside the test-have-prereq\npart, iow, immediately before the problematic \"ln -s\", where it logically\nbelongs to, though.  What does the updated code do on systems without\nsymbolic link support?\n\n> The upstream Solaris bug (fixed in 10, but not 9) is documented here:\n> http://bugs.opensolaris.org/view_bug.do?bug_id=4372462\n>\n> Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>\n> ---\n>  t/t8006-blame-textconv.sh |    3 ++-\n>  1 files changed, 2 insertions(+), 1 deletions(-)\n>\n> diff --git a/t/t8006-blame-textconv.sh b/t/t8006-blame-textconv.sh\n> index ea64cd8..c5362d9 100755\n> --- a/t/t8006-blame-textconv.sh\n> +++ b/t/t8006-blame-textconv.sh\n> @@ -24,8 +24,9 @@ test_expect_success 'setup ' '\n>  \tGIT_AUTHOR_NAME=Number1 git commit -a -m First --date=\"2010-01-01 18:00:00\" &&\n>  \techo \"bin: test 1 version 2\" >one.bin &&\n>  \techo \"bin: test number 2 version 2\" >>two.bin &&\n> +\trm symlink.bin &&\n>  \tif test_have_prereq SYMLINKS; then\n> -\t\tln -sf two.bin symlink.bin\n> +\t\tln -s two.bin symlink.bin\n>  \tfi &&\n>  \tGIT_AUTHOR_NAME=Number2 git commit -a -m Second --date=\"2010-01-01 20:00:00\"\n>  '\n"},{"id":"163857","messageId":"1300669724-sup-450@pinkfloyd.chass.utoronto.ca","threadId":"26809","inReplyTo":"7vd3lluvze.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] Work around broken ln on solaris as used in t8006","fromName":"Ben Walton","fromEmail":"bwalton@artsci.utoronto.ca","sentAt":"2011-03-21T01:10:24Z","receivedAt":"2011-03-21T01:10:24Z","isPatch":true,"sender":{"key":"bdwalton@gmail.com","avatar":"https://avatars.githubusercontent.com/u/396061?v=4"},"body":"Excerpts from Junio C Hamano's message of Sun Mar 20 21:02:13 -0400 2011:\n\nHi Junio,\n\n> > This patch uses changes the first check in the test to rm the symlink\n> > and then create the new symlink using only -s.\n> \n> s/uses //; I think.\n\nYes, I caught that right after send.  A follow up corrected it, but\nI'll resubmit taking your feedback below into account.\n\n> It is curious why \"rm symlink.bin\" is not inside the\n> test-have-prereq part, iow, immediately before the problematic \"ln\n> -s\", where it logically belongs to, though.  What does the updated\n> code do on systems without symbolic link support?\n\nI think you're right about this.  They should be logically grouped.\nI'll send an update shortly.\n\nThanks\n-Ben\n--\nBen Walton\nSystems Programmer - CHASS\nUniversity of Toronto\nC:416.407.5610 | W:416.978.4302\n"},{"id":"163858","messageId":"1300669946-26326-1-git-send-email-bwalton@artsci.utoronto.ca","threadId":"26809","inReplyTo":"1300669724-sup-450@pinkfloyd.chass.utoronto.ca","subject":"[PATCH] Work around broken ln on solaris as used in t8006","fromName":"Ben Walton","fromEmail":"bwalton@artsci.utoronto.ca","sentAt":"2011-03-21T01:12:26Z","receivedAt":"2011-03-21T01:12:26Z","isPatch":true,"sender":{"key":"bdwalton@gmail.com","avatar":"https://avatars.githubusercontent.com/u/396061?v=4"},"body":"The test setup in t8006-blame-textconv.sh used ln -sf to overwrite an\nexisting symlink.  Unfortunately, both /usr/bin/ln and\n/usr/xpg4/bin/ln on solaris 9 don't properly handle -f when -s is\nused.  This caused the test setup to fail which caused subsequent\nchecks to also fail.\n\nThis patch changes the setup to rm the symlink and then create the new\none using only -s.\n\nThe upstream Solaris bug (fixed in 10, but not 9) is documented here:\nhttp://bugs.opensolaris.org/view_bug.do?bug_id=4372462\n\nSigned-off-by: Ben Walton <bwalton@artsci.utoronto.ca>\n---\n t/t8006-blame-textconv.sh |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/t/t8006-blame-textconv.sh b/t/t8006-blame-textconv.sh\nindex ea64cd8..32ec82a 100755\n--- a/t/t8006-blame-textconv.sh\n+++ b/t/t8006-blame-textconv.sh\n@@ -25,7 +25,8 @@ test_expect_success 'setup ' '\n \techo \"bin: test 1 version 2\" >one.bin &&\n \techo \"bin: test number 2 version 2\" >>two.bin &&\n \tif test_have_prereq SYMLINKS; then\n-\t\tln -sf two.bin symlink.bin\n+\t\trm symlink.bin &&\n+\t\tln -s two.bin symlink.bin\n \tfi &&\n \tGIT_AUTHOR_NAME=Number2 git commit -a -m Second --date=\"2010-01-01 20:00:00\"\n '\n-- \n1.7.1\n"},{"id":"163867","messageId":"7v4o6xukys.fsf@alter.siamese.dyndns.org","threadId":"26809","inReplyTo":"1300669946-26326-1-git-send-email-bwalton@artsci.utoronto.ca","subject":"Re: [PATCH] Work around broken ln on solaris as used in t8006","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-03-21T05:00:11Z","receivedAt":"2011-03-21T05:00:11Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ben Walton <bwalton@artsci.utoronto.ca> writes:\n\n> The upstream Solaris bug (fixed in 10, but not 9) is documented here:\n> http://bugs.opensolaris.org/view_bug.do?bug_id=4372462\n>\n> Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>\n\nThanks; will queue.\n"}]}