Add "divert" behaviour #15345

pwagland opened this Issue Oct 7, 2012 · 5 comments


None yet

4 participants

pwagland commented Oct 7, 2012

One of the really nice things about dpkg is dpkg-divert. This allows you to specify that a certain file should not be installed in its normal location, but rather should be diverted elsewhere. This can be incredibly handy when you want to override only part of a package, or if you want the original file, just in a different location.

In my case, I need svn to be "diverted" to svn.real, since svn is a script that knows about some local differences in my environment, however it still call svn.real to do the real work.

I am not sure how to mark this as a feature request, but that is what it is, it is not really an "issue" per se.


Can't you just put your svn before the Homebrew svn in the PATH?

pwagland commented Oct 7, 2012

Hmm. I was so fixated on the other solution… to answer your question, yes I could, given that I am hardcoding the name svn.real at the moment, I could just as easily hardcode in /usr/local/svn. It does mean that I need to add a new directory to my $PATH, but that is not a huge issue.

I still think that this could be useful functionality, but in my case I can easily work around it. I am happy to close the issue if you do not think that this would be more generally useful.

adamv commented Oct 7, 2012

Also: HOMEBREW_SVN (see man brew)


You can also brew unlink svn and then use $(brew --prefix svn) (or just hardcode /usr/local/opt/bin/svn).


Closing because there are already multiple ways to accomplish this.

@jacknagel jacknagel closed this Oct 9, 2012
@xu-cheng xu-cheng locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.