How do I override a file installed by a package, so that a different version can be used instead?
Suppose a sysadmin or local user wishes to use a program “login-local” rather than the program “login” provided by the Debian login package. Do not: • Overwrite /bin/login with login-local. The package management system will not know about this change, and will simply overwrite your custom /bin/login whenever login (or any package that provides /bin/login) is installed or updated. Rather, do • Execute: dpkg-divert –divert /bin/login.debian /bin/login in order to cause all future installations of the Debian login package to write the file /bin/login to /bin/login.debian instead. • Then execute: cp login-local /bin/login to move your own locally-built program into place. Run dpkg-divert –list to see which diversions are currently active on your system. Details are given in the manual page dpkg-divert(8).
Related Questions
- I installed a previous version of Free Solitaire that used the Conducent ad system. How do I remove the Conducent files from my computer?
- I have previously used a World file to georeference my ERDAS version 7.5 LAN and GIS rasters, but in ArcMap they don seem to work. Why?
- How do I override a file installed by a package, so that a different version can be used instead?