Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Sirs, a conundrum. I have two packages that each create /usr/bin/ffprobe. One of them is ffmpeg from the Deb Multimedia repository, while the other is ffmbc 0.7-rc5 built from source. The hand-rolled one is business-critical, and we used to just install it from source wherever it was necessary. I can only assume it would clobber the ffmpeg file, and there were never any ill effects.

In theory, it should be acceptable for our ffmbc package to overwrite the file from the ffmpeg package. The drawback there is that an update to ffmpeg will overwrite the ffmbc binary. Is there any easy way to reconcile this?

share|improve this question
add comment

2 Answers

up vote 12 down vote accepted

On Debian based systems there is the DPKG (below apt) can have diversions setup using the command dpkg-divert

dpkg-divert is the utility used to set up and update the list of diversions.

File diversions are a way of forcing dpkg(1) not to install a file into its location, but to a diverted location. ... System administrators can also use it to override some package's configuration file, or whenever some files (which aren't marked as 'conffiles') need to be preserved by dpkg, when installing a newer version of a package which contains those files.

So for your case you might use a command like this to setup a diversions. (I haven't tested, check the man page and verify that this seems right.)

dpkg-divert --local --divert /usr/bin/ffprobe.ffmpeg --rename /usr/bin/ffprobe
share|improve this answer
add comment

Another solution I found was to change how I built the ffmbc package. Generally it's possible to pass an alternate prefix for the purpose of changing the final paths of the installed files:

./configure --prefix=/usr/local

For Debian packages, this goes in the ${package}/debian/rules file as follows:

override_dh_auto_configure:
    ./configure --enable-gpl --prefix=/usr/local

By putting the ffmbc files in /usr/local, I can keep the ffmpeg files in /usr and allow each package to update independently.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.