makefiledebianconfigurecheckinstall

trying to overwrite `/var/backups/infodir.bak', which is also in package x


when compiling software I do always . ./configure && make && checkinstall -D make install to build the software.

Now i run into the issue when using checkinstall that I get the error

"trying to overwrite `/var/backups/infodir.bak', which is also in package libtasn1-3.2".

I also created libtasn1-3.2 with ./configure && make && checkinstall -D make install.

I tried to remove the file /var/backups/infodir.bak, but I still get the error. Does anyone know how I can solve this issue?

Building Debian package...OK 
Installing Debian package... FAILED! 
Failed to install the package

Do you want to see the log file?  [y]: y (Reading database ... dpkg:
serious warning: files list file for package `squeezecenter-readynas'
missing, assuming package has no files currently installed. 30739
files and directories currently installed.) Unpacking libgcrypt-1.5.1
(from .../libgcrypt-1.5.1_1.5.1-1_sparc.deb) ... dpkg: error
processing
/c/backup/zarafa/libgcrypt-1.5.1/libgcrypt-1.5.1_1.5.1-1_sparc.deb
(--install):  trying to overwrite `/var/backups/infodir.bak', which is
also in package libtasn1-3.2 dpkg-deb: subprocess paste killed by
signal (Broken pipe) Errors were encountered while processing: 
/c/backup/zarafa/libgcrypt-1.5.1/libgcrypt-1.5.1_1.5.1-1_sparc.deb

Solution

  • in debian it is forbidden for two packages to install the same file.

    thus, whenever you try to install a package that contains file "/path/to/foo" and another package is already installed that contains file "/path/to/foo", you get a conflict and thus an error.

    part of the maintainer's work is to make sure that such things do not happen,

    maintaining debian packages is generally a lot of work.

    now the tool checkinstall is a "poor man's" package maintainance tool, as it makes it super easy to create packages from "make install". since it is an automation tool, it simply cannot replace the work and sophistication of a maintainer. (else we wouldn't need any debian maintainers any more; just upload the source-packages to some build-server and run "checkinstall" on them)

    so the reason why you get problems, is because you are installing badly maintained (or rather: automatically created and thus not-at-all maintained) packages. the reason why deleting the offending file doesn't work is because the package management is more than just downloading archives and extracting them. among other things it maintains a list of installed files in a database, and this list indicates that you alredy have /var/backups/infodir.bak installed (regardless whether the file is actually on the harddisk or not)... resulting in the conflict you see.

    so the solution to your problem is, to invest more time in maintenance.

    in any case, you should investigate why the two "packages" both require /var/backups/infodir.bak (and whether they require it at all).

    you can omit certain files from checkinstall via

     checkinstall --exclude /var/backups/infodir.bak -D make install
    

    whether this will break any of your packages, i cannot say.