{"thread":{"id":"2411","subject":"Re: Expected Behavior?","startedAt":"2005-11-09T13:38:54Z","lastAt":"2005-11-09T20:38:29Z","messageCount":2,"participants":["Jon Loeliger","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"11391","messageId":"E1EZqAA-0002B0-Un@jdl.com","threadId":"2411","inReplyTo":null,"subject":"Re: Expected Behavior?","fromName":"Jon Loeliger","fromEmail":"jdl@freescale.com","sentAt":"2005-11-09T13:38:54Z","receivedAt":"2005-11-09T13:38:54Z","isPatch":false,"sender":{"key":"jdl@jdl.com","avatar":"https://gravatar.com/avatar/75ce9a10b151acd2c28ec4ab2136dba7b2ff1634530bd04b155981a749d08a64?d=mp&s=160"},"body":"> Could you check diff between /usr/bin/git-merge-recursive and\n> git-merge-recursive.py in your source tree and see if the\n> appending to sys.path points at the right place (i.e. where the\n> make installs gitMergeCommon.py)?\n\n    jdl.com 211 % diff /usr/src/git-core/git-merge-recursive /usr/bin/git-merge-recursive\n    jdl.com 212 %\n\n    jdl.com 213 % ll  /usr/src/git-core/git-merge-recursive /usr/bin/git-merge-recursive\n    32 -rwxr-xr-x  1 root root 29181 Nov  8 20:17 /usr/bin/git-merge-recursive\n    32 -rwxr-xr-x  1 jdl  src  29181 Nov  8 08:36 /usr/src/git-core/git-merge-recursive\n\nThis would be a problem, though:\n\n    jdl.com 216 % head -15 /usr/bin/git-merge-recursive\n    #!/usr/bin/python\n\n    import sys, math, random, os, re, signal, tempfile, stat, errno, traceback\n    from heapq import heappush, heappop\n    from sets import Set\n\n    sys.path.append('''/home/jdl/share/git-core/python''')\n    from gitMergeCommon import *\n\n    originalIndexFile = os.environ.get('GIT_INDEX_FILE',\n\t\t\t\t       os.environ.get('GIT_DIR', '.git') + '/index')temporaryIndexFile = os.environ.get('GIT_DIR', '.git') + \\\n\t\t\t '/merge-recursive-tmp-index'\n    def setupIndex(temporary):\n\ttry:\n\n\nLooks like /home/jdl/share got left instead of /usr/share.\n\nSo.  The root of the problem is that I followed the INSTALL\ninstructions:\n\n\t\t    Git installation\n\n    Normally you can just do \"make\" followed by \"make install\", and that\n    will install the git programs in your own ~/bin/ directory.  If you want\n    to do a global install, you can do\n\n\t    make prefix=/usr install\n\nI ran \"make\" as myself, and then later\nI ran \"make prefix=/usr install\" as root.\n\n\nHowever, the path substitution happened as part of the\n\"all\" target and not as part of the \"install\" target:\n\n    SCRIPT_PYTHON = \\\n\t    git-merge-recursive.py\n\n    SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \\\n\t      $(patsubst %.perl,%,$(SCRIPT_PERL)) \\\n\t      $(patsubst %.py,%,$(SCRIPT_PYTHON)) \\\n\t      gitk git-cherry-pick\n\n    all: $(PROGRAMS) $(SCRIPTS)\n\n    $(patsubst %.py,%,$(SCRIPT_PYTHON)) : % : %.py\n\t    rm -f $@\n\t    sed -e '1s|#!.*python|#!$(call shq,$(PYTHON_PATH))|' \\\n\t\t-e 's|@@GIT_PYTHON_PATH@@|$(call shq,$(GIT_PYTHON_DIR))|g' \\\n\t\t-e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \\\n\t\t$@.py >$@\n\t    chmod +x $@\n\n\nSo, It looks like either:\n\n    1) Change the INSTALL documentation and process\n       to require \"make prefix=/....\" also during the build,\nor\n    2) Change the Makefile to do install-related path\n       substitutions at \"make install\" time.\n\nMy preference would be the latter (ie, take $(SCRIPTS) off\nthe \"all: \" line), but you may have better notions here.\nLike, do people run stuff out of the build directory between\na \"make\" and a \"make install\"?  Dunno.\n\njdl\n"},{"id":"11402","messageId":"7v1x1peeuy.fsf@assigned-by-dhcp.cox.net","threadId":"2411","inReplyTo":"E1EZqAA-0002B0-Un@jdl.com","subject":"Re: Expected Behavior?","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-11-09T20:38:29Z","receivedAt":"2005-11-09T20:38:29Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jon Loeliger <jdl@freescale.com> writes:\n\n>     Normally you can just do \"make\" followed by \"make install\", and that\n>     will install the git programs in your own ~/bin/ directory.  If you want\n>     to do a global install, you can do\n>\n> \t    make prefix=/usr install\n>\n> I ran \"make\" as myself, and then later\n> I ran \"make prefix=/usr install\" as root.\n\nWould this be explicit enough?\n\n-- >8 -- cut here -- >8 --\n\ndiff --git a/INSTALL b/INSTALL\nindex bbb13f3..b2cdb31 100644\n--- a/INSTALL\n+++ b/INSTALL\n@@ -7,8 +7,10 @@ to do a global install, you can do\n \n \tmake prefix=/usr install\n \n-(or prefix=/usr/local, of course).  Some day somebody may send me a RPM\n-spec file or something, and you can do \"make rpm\" or whatever.\n+(or prefix=/usr/local, of course).  Just like any program suite\n+that uses $prefix, the built results have some paths encoded,\n+which are derived from $prefix, so \"make all; make prefix=/usr\n+install\" would not work.\n \n Issues of note:\n \n"}]}