[123768] trunk/base/src/macports1.0/macports.tcl

Lawrence Velázquez larryv at macports.org
Thu Aug 14 00:58:56 PDT 2014


On Aug 14, 2014, at 2:40 AM, Joshua Root <jmr at macports.org> wrote:

> Do we really need to call 'sh -c' here?

I assumed that directory changes persist after the call to "system" — hence the pushd/popd in the previous version. We could probably get by with "cd $portdir && … && cd \$OLDPWD", though.

We could also pass options directly to Git to tell it where the repository and working directory are, but robustly determining the correct values might be more trouble than just cd(1)-ing into the working directory and letting Git figure it out.

> And is the '|| true' needed
> given that the 'system $git_commandline' is wrapped in a catch?

The previous command-line implicitly behaved this way; the Git command was followed by a semicolon, so the popd was executed regardless of whether the Git operation succeeded.

I thought that "port sync" failed immediately if any of the source syncs exited with a failure status, but I may have been misinterpreting the output I saw, since my git-svn repository is last in my sources list.

> And would it be better to replace the 'cd $portdir' with a -W arg to system, or do we want to see it in the ui_debug output?

I think it's useful to see the value of $portdir in the debug output, like we do for Subversion repositories.

vq
Sent from my iPhone


More information about the macports-dev mailing list