[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Tips for debugging/testing debian/control Depends/Breaks etc changes?



On Wed, Mar 24, 2021 at 12:37:46PM -0400, Otto Kekäläinen wrote:
> As an example of 1, sometimes I see this:
> 
> apt install mariadb-client
>  The following packages have unmet dependencies:
>  mariadb-client : Depends: mariadb-client-10.5 (>= 1:10.5.10) but it
> is not going to be installed
> 
> apt install mariadb-client-10.5
>  Installing.. Done!
> 
> When this happens I have no idea why apt did not resolve the
> dependency by itself automatically, as there was no real conflict in
> installing it.

Nitpicking, but that are quite different requests. The message shown to
users can also be very unhelpful as decisions are reverted in many cases
to allow alternatives to be tried, even if those alternatives do not
really exist higher up the tree… so you end up with a failure on the
first level than the problem is in reality twenty level down… its a long
standing wishlist item to improve it – but as you might guess its not as
simple as it sounds and the team is tiny, so the improvements are
usually small steps and not giant landslides.


Anyway, you can tell apt to give you more details on different aspects.
The README.md has some info on a few aspects, but usually you can get
out the big guns for simplicity:

-o Debug::pkgDepCache::Marker=1 -o Debug::pkgDepCache::AutoInstall=1
 -o Debug::pkgProblemResolver=1


The first two are for the first step of the default resolver – which
basically tries to follow dependencies – while the later shows the
second step dealing with, as the name implies, problems arising from
packages who can not coexist [both oversimplified].

It can be quiet a bit of output, it changes slightly between versions
and might be a bit overwhelming at first, but you get used to it with
some experience – and if you have questions feel free drop by in
#debian-apt or deity@l.d.o.


> For the problem 2, I hate to rebuild all of the packages (and
> binaries) just because there was a change in debian/control and go
> through the hassle of updating a test repo etc.

You might know that "apt install ./file.deb" works. What most people
don't know is that "apt install ./file.changes" works, too. And
basically nobody realizes that this is a short-hand for "apt install
--with-source ./file.deb pkgname". --with-source also accepts beside
deb and changes (and dsc, '.' and debian/control for source packages)
a file with the syntax of a Packages (or Sources) file. So if you are
able of writing the later by hand you don't have to build packages
(I would advice running apt in simulation mode, though, as you will
 make it very sad otherwise. And of course, not as root).

So, e.g.:
| apt-ftparchive packages . > ./Packages
| apt full-upgrade --with-source ./Packages -s
| # edit Packages file and repeat last call until satisfied

The command line option is backed by a config option, and that one will
work for basically every libapt-based client, so if you feel like
fiddling with aptitude instead… less handy but possible (the resolvers
are entirely different though, so knowledge doesn't transfer well).


It is "only" available starting with Debian stretch (current oldstable)
and I might have blogged about it three years ago – in other words: We
are well on track as it usually takes a decade before people start using
things. It usually takes another decade before people stop complaining
that an implemented feature is not implemented (case in point:
manual vs. automatic installed packages which some users still believe
only exists in aptitude – more than 16y later…).

So don't worry that you haven't heard about it yet: You are not the last
one to know, you are in fact well ahead of the curve. 😉


As said, if you have questions (or ideas), feel free to praise the cow
^Ŵ^W^W join #debian-apt on IRC, mail us at deity@d.l.o or even report
a bug against apt.


Best regards

David Kalnischkies

P.S.: Disclaimer: If that wasn't clear already: This mail is shameless
advertisement for apt by an APT developer; aka: I "might" be biased.

Attachment: signature.asc
Description: PGP signature


Reply to: