{"thread":{"id":"2767","subject":"Failure in t6021 on Red Hat Enterprise Linux 4","startedAt":"2005-12-07T16:49:09Z","lastAt":"2005-12-08T17:04:45Z","messageCount":6,"participants":["Mark Allen","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"13320","messageId":"20051207164909.24221.qmail@web34304.mail.mud.yahoo.com","threadId":"2767","inReplyTo":null,"subject":"Failure in t6021 on Red Hat Enterprise Linux 4","fromName":"Mark Allen","fromEmail":"mrallen1@yahoo.com","sentAt":"2005-12-07T16:49:09Z","receivedAt":"2005-12-07T16:49:09Z","isPatch":false,"sender":{"key":"mrallen1@yahoo.com","avatar":null},"body":"Running t/t6021-crisscross-merge.sh -v -i on Red Hat Enterprise Linux 4 Workstation with\npython 2.3.4 installed, I found a fatal error in the test.\n\nApparently, this release of python doesn't have the subprocess module installed. In what\npackage is that located? How can I fix this error?\n\nThanks!\n\n--Mark\n\n-- BEGIN --\n\n[mallen@mrhat t]$ rpm -q python\npython-2.3.4-14.1\n\n...SNIP...\n\ngit commit -m D8 file\nCommitting initial tree ec103796f9a6ca8367bd90cd88edf39c5dd2ae26\nTrying really trivial in-index merge...\nfatal: Merge requires file-level merging\nNope.\nTraceback (most recent call last):\n  File \"/home/mallen/git/git.git/t/../git-merge-recursive\", line 13, in ?\n    from gitMergeCommon import *\n  File \"/home/mallen/git/git.git/gitMergeCommon.py\", line 18, in ?\n    import subprocess\nImportError: No module named subprocess\nAutomatic merge failed/prevented; fix up by hand\n\n...SNIP...\n\n--- END ---\n"},{"id":"13321","messageId":"7vfyp4u7rl.fsf@assigned-by-dhcp.cox.net","threadId":"2767","inReplyTo":"20051207164909.24221.qmail@web34304.mail.mud.yahoo.com","subject":"Re: Failure in t6021 on Red Hat Enterprise Linux 4","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-12-07T17:38:54Z","receivedAt":"2005-12-07T17:38:54Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Mark Allen <mrallen1@yahoo.com> writes:\n\n> Running t/t6021-crisscross-merge.sh -v -i on Red Hat Enterprise Linux 4 Workstation with\n> python 2.3.4 installed, I found a fatal error in the test.\n\nAre you using git RPM, or building by hand?\n\nIf the latter, \"grep -A2 python INSTALL\" may be helpful.\n"},{"id":"13324","messageId":"20051207181225.67737.qmail@web34304.mail.mud.yahoo.com","threadId":"2767","inReplyTo":"7vfyp4u7rl.fsf@assigned-by-dhcp.cox.net","subject":"Re: Failure in t6021 on Red Hat Enterprise Linux 4","fromName":"Mark Allen","fromEmail":"mrallen1@yahoo.com","sentAt":"2005-12-07T18:12:24Z","receivedAt":"2005-12-07T18:12:24Z","isPatch":false,"sender":{"key":"mrallen1@yahoo.com","avatar":null},"body":"--- Junio C Hamano <junkio@cox.net> wrote:\n> Are you using git RPM, or building by hand?\n> If the latter, \"grep -A2 python INSTALL\" may be helpful.\n\nDefinitely. Thanks for the pointer -- I rebuilt my git installation with the correct\nflag, but there's a bootstrapping problem with the test -- and I'm not a good enough\npython programmer to fix it very well.\n\nSo, basically the problem is that the subprocess.py module is in the compat directory,\nand by default (I think) the git-merge-recursive being tested is only looking in\n$HOME/git/git.git where it finds and loads gitMergeCommon.py, but gitMergeCommon.py is\nnot looking in $HOME/git/git.git/compat which is where subprocess.py lives.\n\nSo I hacked in to git-merge-recursive this line at the top of the file\n\nsys.path.append('''/home/mallen/git/git.git/compat''')\n\nat the very top and now the test passes.  \n\nSo maybe this points out a problem in the Makefile or in the substitution the Makefile is\nusing to put in @@GIT_PYTHON_PATH@@\n\nI'm not sure I've clearly explained the issue, and like I said, I'm kind of a Python\nbaby, so I'm not sure what the best way to fix this problem might be.\n\nThanks,\n\n--Mark\n"},{"id":"13326","messageId":"7vslt4rb4v.fsf@assigned-by-dhcp.cox.net","threadId":"2767","inReplyTo":"20051207181225.67737.qmail@web34304.mail.mud.yahoo.com","subject":"Re: Failure in t6021 on Red Hat Enterprise Linux 4","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-12-07T18:54:24Z","receivedAt":"2005-12-07T18:54:24Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\nMark Allen <mrallen1@yahoo.com> writes:\n\n> So, basically the problem is that the subprocess.py module is\n> in the compat directory, and by default (I think)..\n\nAh, you are right.\n\nJust like we fix PATH and GIT_EXEC_PATH during the test\nexecution, we need to do something with PYTHONPATH environment\nvariable (this one is _without_ underscore), I think.\n"},{"id":"13348","messageId":"7vr78oktp0.fsf_-_@assigned-by-dhcp.cox.net","threadId":"2767","inReplyTo":"7vslt4rb4v.fsf@assigned-by-dhcp.cox.net","subject":"[PATCH] Make sure we use compat/subprocess.py with Python 2.3 while running tests.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-12-08T06:07:39Z","receivedAt":"2005-12-08T06:07:39Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Otherwise the test will not succeed without installing.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n\n---\n\n  Junio C Hamano <junkio@cox.net> writes:\n\n  > Mark Allen <mrallen1@yahoo.com> writes:\n  >\n  >> So, basically the problem is that the subprocess.py module is\n  >> in the compat directory, and by default (I think)..\n  >\n  > Ah, you are right.\n  >\n  > Just like we fix PATH and GIT_EXEC_PATH during the test\n  > execution, we need to do something with PYTHONPATH environment\n  > variable (this one is _without_ underscore), I think.\n\n  This seems to fix it for me.\n\n t/test-lib.sh |   13 ++++++++++++-\n 1 files changed, 12 insertions(+), 1 deletions(-)\n\n49ccb0877f64308662669a09db7b221419c13d0a\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex f2eccd7..0539dac 100755\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -172,7 +172,18 @@ test_done () {\n # t/ subdirectory and are run in trash subdirectory.\n PATH=$(pwd)/..:$PATH\n GIT_EXEC_PATH=$(pwd)/..\n-export GIT_EXEC_PATH\n+export PATH GIT_EXEC_PATH\n+\n+# Similarly use ../compat/subprocess.py if our python does not\n+# have subprocess.py on its own.\n+PYTHON=`sed -e '1{\n+\ts/^#!//\n+\tq\n+}' ../git-merge-recursive` &&\n+\"$PYTHON\" -c 'import subprocess' 2>/dev/null || {\n+\tPYTHONPATH=$(pwd)/../compat\n+\texport PYTHONPATH\n+}\n \n # Test repository\n test=trash\n-- \n0.99.9.GIT\n"},{"id":"13355","messageId":"20051208170445.38067.qmail@web34302.mail.mud.yahoo.com","threadId":"2767","inReplyTo":"7vr78oktp0.fsf_-_@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Make sure we use compat/subprocess.py with Python 2.3 while running tests.","fromName":"Mark Allen","fromEmail":"mrallen1@yahoo.com","sentAt":"2005-12-08T17:04:45Z","receivedAt":"2005-12-08T17:04:45Z","isPatch":true,"sender":{"key":"mrallen1@yahoo.com","avatar":null},"body":"--- Junio C Hamano <junkio@cox.net> wrote:\n>   This seems to fix it for me.\n\nWorks on my build here. Thanks!\n\n--Mark\n"}]}