#586424 dmsetup has circular Depends on libdevmapper1.02.1

Package:
src:lvm2
Source:
lvm2
Submitter:
Bill Allombert
Date:
2021-04-10 08:45:06 UTC
Severity:
normal
Tags:
#586424#5
Date:
2010-06-19 12:49:20 UTC
From:
To:
Package: dmsetup
Version: 2:1.02.48-2
Severity: important

Hello Debian LVM Team,

There is a circular dependency between dmsetup and libdevmapper1.02.1:

dmsetup 	:Depends: libdevmapper1.02.1 (>= 2:1.02.47)
libdevmapper1.02.1 	:Depends: dmsetup (>= 2:1.02.48-2)

Circular dependencies involving shared libraries are known to cause problems
during upgrade between stable releases, so we should try to get rid of them.

Cheers,

#586424#10
Date:
2010-06-19 13:08:53 UTC
From:
To:
severity 586424 normal
thanks

Known and documented.

You are free to send a patch to acomplish this.

Bastian

#586424#17
Date:
2010-06-19 13:30:00 UTC
From:
To:
Well, move the udev rules to devmapper-udev-rules and set up the dependencies
as follow:

dmsetup -> libdevmapper1.02.1 -> devmapper-udev-rules

Cheers,

#586424#22
Date:
2010-06-19 13:35:57 UTC
From:
To:
Please try again. The library needs the rules to work properly and the
udev rules calls dmsetup.

Bastian

#586424#29
Date:
2015-12-16 13:58:48 UTC
From:
To:
Hello,

Bastian Blank [2010-06-19 15:35 +0200]:

I don't understand this. Merely having a libary installed should not
imply any userspace actions. If some packages need device mapper
functionality, they need to depend on dmsetup, not just libdevmapper.

We've seen quite a lot of upgrade failures due to this circular
dependency, so it's clearly a problem:

| Unpacking dmsetup (2:1.02.90-2ubuntu1) over (2:1.02.77-6ubuntu2) ...
| Preparing to unpack .../libdevmapper1.02.1_2%3a1.02.90-2ubuntu1_amd64.deb ...
| Unpacking libdevmapper1.02.1:amd64 (2:1.02.90-2ubuntu1) over (2:1.02.77-6ubuntu2) ...
| Preparing to unpack .../libudev1_219-7ubuntu6_amd64.deb ...
| Unpacking libudev1:amd64 (219-7ubuntu6) over (204-5ubuntu20.15) ...
| Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
| Setting up libudev1:amd64 (219-7ubuntu6) ...
| dpkg: dependency problems prevent configuration of libdevmapper1.02.1:amd64:
|  libdevmapper1.02.1:amd64 depends on dmsetup (>= 2:1.02.90-2ubuntu1); however:
|   Package dmsetup is not configured yet.
|
| dpkg: error processing package libdevmapper1.02.1:amd64 (--configure):
|  dependency problems - leaving unconfigured

This then causes a trail of followup errors, like failing to configure
libcryptsetup4, systemd-sysv, and init.

IMHO the cleanest solution is to drop libdevmapper1.02.1's dependency
to dmsetup entirely. For fixing the upgrade bug it should be
sufficient to downgrade it to Recommends, though, to hint apt into
ordering it correctly.

Thanks,

Martin

#586424#34
Date:
2015-12-16 14:04:21 UTC
From:
To:
Yes, it does.  The sole purpose of libdevmapper is to configure the
device mapper part of the kernel.  To do this it needs a working udev.

Please report failures with Ubuntu to the Ubuntu bug tracker, not the
Debian one.

Regards,
Bastian

#586424#39
Date:
2015-12-16 14:54:10 UTC
From:
To:
Hello Bastian,

Bastian Blank [2015-12-16 14:04 +0000]:

It is (https://launchpad.net/bugs/1032823), but the circular dep is
exactly the same way in Debian, thus why would Debian upgrades not be
be affected? We just don't automatically report them in Debian.

dmsetup is already required, so lowering libdevmapper's depends:
dmsetup to recommends should not have any practical consequences other
than fixing this circular dependency and upgrade bug.

Anyway, if you are not interested in this I'll shut up.

Thanks,

Martin

#586424#44
Date:
2015-12-16 15:29:00 UTC
From:
To:
Hi Martin

It is your task to show that Debian is affected.  I have never seen
this problem at all and I would assume a lot more bug reports if this
would be show up more often.

No, dmsetup is _not_ required, it never was:

| Package: dmsetup
| Source: lvm2 (2.02.111-2.2)
| Section: admin
| Priority: optional

You mean dmsetup is required in Ubuntu?  Then you may have found your
problem.  apt have some special handling of required and/or essential
packages.

Regards,
Bastian

#586424#57
Date:
2017-02-04 13:53:49 UTC
From:
To:
I run LVM on a non-dynamic system without udev installed. The udev rules
are a no-op on my system. libdevmapper still does its job just fine. So
it seems that no, it doesn't "need" a working udev.

If it "needed" a working udev to apply the dmsetup udev rules, then it
should have a dependency not just on the udev rules, but on udev itself.
But we've gone over that issue already before:

So, from this point of view, it doesn't make sense to say that
libdevmapper needs a hard dependency relationship with something that
may or may not be a no-op, depending on the status of other packages
that have however no dependency with it.

Beyond the circular dependency, there is the problem of respecting the
policy and avoiding package and daemon bloat through unwarranted hard
dependencies. All I want and need on my system is the LVM init service,
the LVM utilities, and the device mapper dynamic libraries they use;
which is main and significant functionality in itself. However with the
current lvm2 package I have no choice but getting way more than that.

Do you think it could be beneficial to create a meta-package, under
whose umbrella the dependencies on anything needed for a "fully working
LVM experience" could be simply moved? Between plugins and udev, there
seem to be different degrees of what a dependency is, so that could be a
nice approach to it.

Best regards,