2

On dpkg-/apt-based systems, it is possible to encounter a message such as the following:

The following package disappeared from your system as
all files have been overwritten by other packages:
  qfdevelopment_metapkg
Note: This is done automatically and on purpose by dpkg.

What does this even mean? How should we deal with it?

In this case, qfdevelopment_metapkg is an apt package that contains only dependencies in order to install the necessary packages prior to performing development for the qf project. I had installed the package (originally) using:

sudo dpkg -i qfdevelopment_metapkg-0.3.8-Linux.deb
sudo apt install -f

I am eager to know how others deal with this, since I don't understand the workaround that I fumbled through (which I'll list if it does not come up in answers).

2

Why we should care: this issue manifests when a sudo apt-get upgrade helpfully offers that autoremove will remove all of the just added packages - because the package that depends on them was removed.

Workaround

It seems that this results from the package not installing anything. I solved the problem by adding a trivial script that I install into the bin directory:

INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/list_qf_dev_info DESTINATION bin)

The contents of this list_qf_dev_info script are just:

#! /bin/sh

apt-cache show qfdevelopment_metapkg

Now, after installing, the presence of this script causes the apt/deb system to keep the package instead of automatically causing it to disappear.

Alternate workaround - without editing deb

A different workaround - that does not require modifying the deb - is to just install again at the end to get things squared away:

sudo dpkg -i qfdevelopment_metapkg-0.3.8-Linux.deb
sudo apt install -f
sudo dpkg -i qfdevelopment_metapkg-0.3.8-Linux.deb

PS

I had forgotten about this issue as I had worked unrelated items. Today I was running into the issue again and was briefly excited to see somebody had asked before realizing it's my question and that there were no answers, so I had to fumble through it myself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.