A workaround for multilib archs ? [Re: Re: state of apt-rpm development?]
Jaroslaw Polok <[email protected]> Wed, 27 Oct 2004 16:05:38 +0200
| Newsgroups | gmane.linux.conectiva.apt-rpm |
|---|---|
| Message-ID | <1098885938.11168.29.camel@lart> |
> > Is there support for multilib in svn? It's sad to see FC/RHEL x86_64
> > (and the miriads of clones) w/o apt ... :(
>
> Nope. And yes it's unfortunate...
>
Yes it is ...
And as it looks that this will not change soon, what about
at least making apt usable on multilib archs ? (for
native arch only ...).
with current apt version if you happen to have (x86_64)
system with installed (identically named)
x86_64.rpm and i686.rpm what happens is the later one
completely 'masks' the former:
as result apt depsolver believes that the system
is missing the x86_64.rpm provides... which is quite
disastrous if the package in question is glibc ...
I understand that making apt multiarch capable is an huge
task: but what about (for time being/via an option) make it
ignore compatible archs on x86_64/ia64 systems ?
What I use currently on x86_64/ia64 is a patched
apt-0.5.15cnc6 which ignores athlon/i?86 packages
completely.
The patch consist in making apt reject packages for
architectures with score > 2
(athlon/i?86 in case of x86_64/ia64)
in apt-pkg/rpm/rpmlistparser.cc, rpmListParser::Step()
-if (Handler->IsDatabase() == true ||
- RpmData->ArchScore(Architecture().c_str()) > 0)
- return true;
+// ONLY compatible AND native/noarch accepted
+if (RpmData->ArchScore(Architecture().c_str()) > 0
+ && RpmData->ArchScore(Architecture().c_str()) < 3)
+ return true;
As far as I can tell this works for me: I can now use apt
on 64bit archs to manage 64bit packages (and ONLY these)
, 32bit ones are completely ignored...
Of course this is a workaround (and ugly ..) with some
drawbacks ... but I believe that something is better than
nothing ....
Could such workaround (well ... improved, no hardcoding ...)
be considered for inclusion in apt for now ?
(with an option like APT::NativeArchOnly set to "false"
by default ... for std behaviour ..)
Jarek (maintaining one of 'miriads of clones' of RHEL ;-))
PS: For the people who would like to try above on their own:
one needs to rm -f /var/cache/apt/*bin before running
such patched version.
--
-------------------------------------------------------
_ Jaroslaw_Polok ___________________ CERN - IT/ADC/LE _
_ http://home.cern.ch/~jpolok ___ tel_+41_22_767_1834 _
_____________________________________ +41_78_792_0795 _