Thank you Teemu, this is very close to what I wanted. And if I'm not mistaken, the dpkg log will inform me about packages installing diversions, so I will notice when some new package wants to install a new version and compare them. However, I will have to remember that the diversion was made by me.
Yet I'm still curious if there is some more convenient machinery for maintaining custom packages with modifications. Kind regards, Ondřej Grover On Sun, Oct 25, 2015 at 9:26 AM, Teemu Likonen <tliko...@iki.fi> wrote: > Ondřej Grover [2015-10-25 08:47:23+01] wrote: > > > I often come across a situation where I need to apply a few simple > > patches to a script in /usr/bin or so. Simply changing the script > > works, but it will be overridden on any new upgrade. > > > I look forward to your recommendations on how to manage local > > modifications. > > Sounds exactly what dpkg-divert(8) is for. > > > DESCRIPTION > 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. Diversions > can be used through the Debian package scripts to move a file > away when it causes a conflict. 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. >