{"thread":{"id":"43227","subject":"Re: [GIT PATCH] Makefile missing git-runstatus in PROGRAMS list","startedAt":"2006-11-15T18:42:27Z","lastAt":"2006-11-15T19:04:39Z","messageCount":2,"participants":["Junio C Hamano","Bhavesh Davda"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"295921","messageId":"FE74AC4E0A23124DA52B99F17F44159701A11D6D@PA-EXCH03.vmware.com","threadId":"43227","inReplyTo":null,"subject":"RE: [GIT PATCH] Makefile missing git-runstatus in PROGRAMS list","fromName":"Bhavesh Davda","fromEmail":"bhavesh@vmware.com","sentAt":"2006-11-15T18:42:27Z","receivedAt":"2006-11-15T18:42:27Z","isPatch":true,"sender":{"key":"bhavesh@vmware.com","avatar":null},"body":"> \n> > Attached is my attempt at the same command \"make \n> prefix=/var/tmp/ggg clean\n> > all install\"\n> >\n> > make install failes for the templates directory, leading to \n> the entire make\n> > install failing:\n> >\n> > make -C templates DESTDIR='' install\n> > make[1]: Entering directory `/VMware/kernel/git/git/templates'\n> > : no custom templates yet\n> > install -d -m755 '/var/tmp/ggg/share/git-core/templates/'\n> > (cd blt && tar cf - .) | \\\n> > (cd '/var/tmp/ggg/share/git-core/templates/' && tar xf -)\n> > tar: This does not look like a tar archive\n> > tar: Skipping to next header\n> > tar: Archive contains obsolescent base-64 headers\n> > tar: Error exit delayed from previous errors\n> \n> I have a feeling that you have CDPATH exported to the\n> environment, which is a braindamage.  It is a fine usability\n> helper for interactive shells so I do not have problem with\n> people setting that in shell as shell variables, though.\n> \n> In other words, never do \"export CDPATH=...\" nor \"export CDPATH\".\n> \n> \n\nIndeed! I had \"export CDPATH=.:$HOME\" in my $HOME/.bash_profile.\n\n\"export -n CDPATH\", and now \"make install\" works, setting up those hard links\ntoo.\n\nIf this is a common gotcha in building and installing git, maybe you should\nadd it near the top of the INSTALL instructions.\n\nI haven't run into this issue with other projects. Is there something that\ncan be changed in git's Makefile so it works even if CDPATH is set and\nexported in people's environments? What about simply not naming the subdir\nblt for both source and install directories under templates?\n\nThanks!\n\n"},{"id":"294078","messageId":"7vodr8mszc.fsf@assigned-by-dhcp.cox.net","threadId":"43227","inReplyTo":"FE74AC4E0A23124DA52B99F17F44159701A11D6D@PA-EXCH03.vmware.com","subject":"Re: [GIT PATCH] Makefile missing git-runstatus in PROGRAMS list","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-11-15T19:04:39Z","receivedAt":"2006-11-15T19:04:39Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Bhavesh Davda\" <bhavesh@vmware.com> writes:\n\n> Indeed! I had \"export CDPATH=.:$HOME\" in my $HOME/.bash_profile.\n>\n> \"export -n CDPATH\", and now \"make install\" works, setting up those hard links\n> too.\n>\n> If this is a common gotcha in building and installing git, maybe you should\n> add it near the top of the INSTALL instructions.\n>\n> I haven't run into this issue with other projects. Is there something that\n> can be changed in git's Makefile so it works even if CDPATH is set and\n> exported in people's environments?\n\nI think we already had this discussed twice on this list.\n\nThe problem is not just Makefile, but any command implemented as\nshell scripts, if it needs to \"cd\" inside, is bitten by exported\nCDPATH not just because it gives unwanted output to stdout\n(which is already stupid -- CDPATH is purely convenience for\ninteractive session) but also because it would take the process\nto unexpected places.\n\nYou can solve it by three ways.  (1) unset CDPATH at the\nbeginning of every shell script; (2) write all internal \"cd\" in\nsuch a way that CDPATH would not try to interfere with it; (3)\nteach users to fix their broken environment.\n\nWe do (1) for our shell scripts with git-sh-setup which almost\nall other script sources, along with a comment for (3) at that\nplace.  As you say we should probably add the same to INSTALL\ninstructions.\n"}]}