14.04 - Custom .deb does not install all files - Ask Ubuntu


i'm developing proprietary cross-platform file manager called fman. want distribute ubuntu users .deb file, can downloaded web site. use fpm create file, works without problems.

when user installs fman, want add file /etc/apt/sources.list.d/ points update server. allow user automatically update fman via ubuntu's package manager (or via apt-get).

i did obvious: placed file inside .deb archive under etc/apt/sources.list.d/fman.list. problem is: file not created under /etc/apt/... when user installs fman .deb file.

when dpkg -x fman.deb some_dir/, file fman.list correctly created @ some_dir/etc/apt/sources.list.d/fman.list. likewise, when dpkg-query -l fman after installation, output

/. /etc /etc/apt /etc/apt/sources.list.d /etc/apt/sources.list.d/fman.list ...

i don't errors or warnings when install .deb file command line via sudo dpkg -i fman.deb. tried increasing log level via sudo dpkg -d 100 -i fman.deb. 2 lines of output pertaining fman.list are:

d000100: setupvnamevbs main='/etc/apt/sources.list.d/fman.list' tmp='/etc/apt/sources.list.d/fman.list.dpkg-tmp' new='/etc/apt/sources.list.d/fman.list.dpkg-new' d000100: setupvnamevbs main='/etc/apt/sources.list.d/fman.list' tmp='/etc/apt/sources.list.d/fman.list.dpkg-tmp' new='/etc/apt/sources.list.d/fman.list.dpkg-new'

at previous point, found file /etc/apt/sources.list.d/fman.list.dpkg-dist. file removed when uninstalled fman. subsequent installations of fman did not produce file again.

does know why /etc/apt/sources.list.d/fman.list not created when install fman .deb file?

i figured out problem was.

i tested .deb file via cycles of following 2 commands:

  • sudo dpkg -i fman.deb
  • sudo dpkg -r fman (equivalently, sudo apt-get remove fman)

i found out ... -r excludes config files. delete config files, 1 must use sudo dpkg -p fman.

during testing, must have manually deleted /etc/apt/sources.list.d/fman.list @ point. dpkg (/apt) still remembered had installed file, didn't re-install next time did dpkg -i (equivalently, apt-get install).

the solution therefore call sudo dpkg -p fman. next time did dpkg -i fman.deb fman.list file created expected.


Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User