Subject: Using the result of equivs (dummy package for dependencies)

From: Mark Fletcher <[email-masked]>
Date: Mon, 12 Sep 2016 00:13:33 +0900

Hello the list!

I am trying to install an open-source submarine simulation game called
Danger From The Deep onto Jessie. The game is not packaged for Debian,
although an old version is packaged for Ubuntu, I've just noticed. The
game has recently seen a lot of developer activity after a long pause,
and I want to try out the latest bells and whistles.

So I've cloned the git repository of the source code and am all set to
build the game from source. Some years ago I did this and got the game
to work, but made a bit of a mess of my installed packages in the
process. Specifically, the game needs a bunch of OpenGL, SDL etc
libraries and their -dev equivalents. Many of the libraries themselves
were already installed but the -dev equivalents weren't. Last time, I
installed them using aptitude install, which was fine until it came time
to upgrade, either from wheezy to jessie or from squeeze to wheezy, I
forget which... Anyway, that upgrade replaced many of the libraries not
with newer versions, but with new library packages altogether which
conflicted with the old ones. Because the dev libraries were explicitly
installed, and not automatically installed, aptitude couldn't see that
it could actually remove them, and so it was desperately trying to come
up with a solution and ended up wanting to completely remove Gnome (not
a terrible idea, some might argue :) ). I got out of the mess by using
aptitude markauto on the -dev packages and then aptitude was able to
figure out that it could remove them, and hence what to do to resolve
the dependencies.

So, this time, I want to avoid that, and I had the idea to create a
dummy package that has all the dependencies that Danger From The Deep
needs. Then, I can install that package and have aptitude install the
missing dependencies and mark them as auto-installed. Then, if I get
into a future similar upgrade situation, aptitude will be able to see it
can resolve the dependencies by removing the Danger From The Deep
package, not ripping out half my system. Also if I go off Danger From
the Deep I can remove the package and have aptitude remove all the
dependencies that were only there for it -- keep things tidy.

So I've used the equivs-control and equivs-build commands from the
equivs package to create a dummy package which has all the needed
dependencies. My problem is I can't do anything with the created package
-- I obviously can't dpkg -i it because dpkg just complains about the
missing dependencies -- which was the point of creating the dummy
package in the first place!

Is there a way I can get aptitude to add this package to its knowledge
base, and then let me install it as if it came from a debian repository?
(Its sole purpose is to reflect the dependency on the required libraries
so they are installed and marked as auto-installed, and not immediately
removed as long as the dummy package is in place) Do I have to set up a
local repository? If so, any pointers to references on doing that? But,
better, can that be avoided? Is there a simpler way?

A lot of the info on the web says create your package with equivs-build
then install it with dpkg -i -- which I can't do as described above.

(I'm an aptitude man but apt-get based solutions also entirely
acceptable!)

Thanks in advance!

Mark

---

From: The Wanderer <[email-masked]>
Date: Sun, 11 Sep 2016 11:24:58 -0400

On 2016-09-11 at 11:13, Mark Fletcher wrote:

> dependencies. My problem is I can't do anything with the created
> package -- I obviously can't dpkg -i it because dpkg just complains
> about the missing dependencies -- which was the point of creating the
> dummy package in the first place!
> 
> Is there a way I can get aptitude to add this package to its
> knowledge base, and then let me install it as if it came from a
> debian repository?

You almost certainly want one or more of dpkg's '--force' options.

As a first attempt, try 'dpkg -i pkgname.deb --force-depends', or
similar. If that doesn't work, look through that section of the man page
and see what else you may find.

After it's installed, 'apt-get -f install' (or a comparable aptitude
command) should get you the missing dependencies, as intended.

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man.         -- George Bernard Shaw

---

From: Mark Fletcher <[email-masked]>
Date: Mon, 12 Sep 2016 14:20:05 +0000

On Mon, 12 Sep 2016 at 00:25, The Wanderer <[email-masked]> wrote:

> This worked, thanks!

dpkg --force-depends -i dangerdeep.deb

Followed by aptitude install dangerdeep

Then I was able to build Danger From The Deep, and in sharp contrast to
last time it worked first time!

And all the dependent libraries know they are only there because of that
dangerdeep package, as I wanted.

Mark