Reputation: 3914
I've custom compiled my own version of ffmpeg and made a .deb file from this package. The package is described as follows
control.txt
Package: ffmpeg
Version: 4.3-ubuntu1804+hwaccel.cuda+20200806
Architecture: amd64
Depends: ${insert dependencies here}
Replaces: ffmpeg, libavutil-dev, libavformat-dev, libavcodec-dev, libswresample-dev, libavdevice-dev, libavfilter-dev, libavresample-dev, libpostproc-dev, libswscale-dev, libmp3lame0
Maintainer: [email protected]
Description: some ffmpeg package I built with CUDA hwaccel for Ubuntu 1804 targets
I then take my system, an Ubuntu 18.04 server device, that already has ffmpeg
installed from the system repositories and run the following
sudo apt-get install -y ./ffmpeg_4.3-ubuntu1804+hwaccel.cuda+20200806_amd64.deb
and it installs ffmpeg into my system and replaces the one that was already installed. I let this run for a while and when I come back I notice that the ffmpeg
installed on my system is the one from the Ubuntu repositories. Namely, version 7:3.4.8-0ubuntu0.2
.
I go to check the /var/log/apt/history.log
file and see this
Upgrade: ffmpeg:amd64 (4.3-ubuntu1804+hwaccel.cuda+20200919, 7:3.4.8-0ubuntu0.2)
End-Date: 2020-09-20 06:04:48
It looks like it noticed my custom compiled version of ffmpeg on the system and did some sort of version comparison to the one in the repositories and noticed that it was behind that one and did an automatic upgrade. The issue is, mine is not behind the one in the repositories (4.3 vs 3.4.8) and also that, I installed this custom-compiled version myself, why does unattended-upgrades go ahead and undo my work by installing the default one from the repositories?
My question is - how do I tell unattended-upgrades
to not, under any circumstance, touch this package, and better yet, how to tell it to not touch any packages that I install from custom compiled .deb files?
Upvotes: 2
Views: 1621
Reputation: 3914
Just FYI in case anyone comes across this answer in the future, there are three things you can do.
unattended-upgrades
/etc/apt/apt.conf.d/20auto-upgrades
to have the line APT::Periodic::Unattended-Upgrade "0";
instead of 1
sudo apt-mark hold ffmpeg
. This tells apt-get and other programs to not upgrade this package.Upvotes: 3