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

Re: xapt created inconsistencies



On Mon, 2 Jul 2012 15:27:44 -0400
Andrew Bradford <andrew@bradfordembedded.com> wrote:

> I'd like to understand if my xapt experience should be considered
> expected or not. I'm running xapt version 2.2.18~bpo60+1 on Squeeze
> amd64.

Probably. xapt tries very hard not to do anything remotely clever. It
makes huge and often unjustifiable assumptions and is explicitly
designed to leave you to your own mess. Whatever xapt breaks, you're
expected to know how to fix (usually with another xapt command after
using apt to fix whatever xapt broke). Trying to be clever just doesn't
work - we tried that with apt-cross.

That's just how it is. The dpkg-cross design is broken - we know this.
xapt has to make do in a world which is becoming ever less tolerant of
the side-effects of using dpkg-cross, we know this too.

xapt is particularly likely to break stuff when used repeatedly unless
all of the -cross packages are removed before hand - we know this.

In general, for a less stressful life with xapt, use a pbuilder chroot
where the cross dependencies are thrown away. This is recommended in
the xapt man page. There's a big section called Limitations in the xapt
manpage which explicitly covers this.

If you try to use xapt to upgrade -cross dependencies in place then you
*will* get all the hassle you have thereby requested. 

You save nothing by trying to upgrade because xapt just downloads and
processes everything again anyway.

> Is my experience with xapt considered expected in that xapt'ing one dev
> package may pull in newer others and thus break version dependencies?

xapt will generally break anything where you are expecting it to
upgrade existing -cross dependencies unless you are v.v.v.v.careful.
i.e. I routinely get away with it because I wrote the xapt code but most
people won't because that would require xapt to be clever.

Hint: never upgrade -cross dependencies. Yes, I did say never.
Hint2: if you ignore that warning (and know the xapt source code
intimately), only ever upgrade the dependencies for a single top level
package which you have explicitly created to build-depend on everything
you will ever need as a -cross package and then 10% more random ones
just to be safe and then meticulously push the versions of the
build-depends in all your other packages to be in line with every
package which has been changed on the entire system. If you do all of
that, every time, upgrading using xapt will work about 80% of the time.
If you miss a single package, it will fail 100% of the time. Failure in
this mode means leaving the system unable to install ordinary packages,
removing your cross toolchain, removing unrelated packages or any
combination of those. That's why the manpage advises using a disposable
chroot.

> Even though I assume they're not really broken (ie: everything is still
> compatible), just that dpkg thinks they are. 

Sorry, -cross packages are inherently broken, by definition. We've got
away with using them for a decade now, but they never have been properly
supported. The breakage caused by xapt can be very real too. If you've
not seen it get that bad yet then you've been lucky, that's all. Give
it time, or just use a disposable chroot.

> It's not a huge deal if it
> is, I just want to understand so I can document it for the future.  I
> couldn't easily find existing documentation on this condition.

man xapt ?

Limitations
... warnings about breaking stuff if you try to upgrade ...
"       The best option is to use "xapt" inside a disposable chroot."

It's too late to fix anything in xapt. embuilddeps will probably
survive Multiarch but xapt will go the same way as dpkg-cross and at the
same time. It's not gone yet, true, but *design* limitations like this
are not going to be changed.

The solution is Multiarch and just look how difficult that is proving
to be - there is no way xapt can be that clever and if the tool cannot
cope with being clever, it has to be reliably dumb. That's xapt.

Don't expect it to do clever stuff and you won't be disappointed.

(If anyone thinks upgrading cross dependencies is easy, talk to some of
the people working on MultiArch cross-build toolchains and cross-arch
dependencies.)

-- 


Neil Williams
=============
http://www.linux.codehelp.co.uk/

Attachment: pgplBN8cUJgOi.pgp
Description: PGP signature


Reply to: