Mailinglist Archive: zypp-devel (230 mails)
| < Previous | Next > |
Re: [zypp-devel] zypper dup
- From: Michael Matz <matz@xxxxxxx>
- Date: Mon, 11 Feb 2008 13:57:32 +0100 (CET)
- Message-id: <Pine.LNX.4.64.0802111353310.20583@xxxxxxxxxxxxx>
Hi,
On Mon, 11 Feb 2008, Stefan Schubert wrote:
libzypp. Arch::compare, Arch::CompatEntry::compare. The users are in
solver/detail/Helper.cc:LookForUpdate::operator() and
solver/detail/ResolverUpgrade.cc:Resolver::doUpgrade().
I've asked coolo to try the attached patch^Whack (it still wouldn't be
completely correct, but at least it won't try to install incompatible
candidates over already installed packages).
Distupgrade algorithm with i586+x86_64 in a repository? With the sat
branch code (AFAIK the old parser threw out incompatible architectures
already when reading in)?
Ciao,
Michael.
--
To unsubscribe, e-mail: zypp-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-devel+help@xxxxxxxxxxxx
On Mon, 11 Feb 2008, Stefan Schubert wrote:
I think I know. The code in question looks like so:Hm, I cannot find this code. Is it in zypper ?
if (uninstalled->arch().compare( provider->arch() ) < 0)
// provider has "better" arch, take it
The data in question is, that uninstalled has arch i586, provider has
x86_64. So, i586->compare(x86_64), which is (Arch::compare just calls
the below):
int compare( const CompatEntry & rhs ) const
{
if ( _compatScore != rhs._compatScore )
return( _compatScore < rhs._compatScore ? -1 : 1 );
return _archStr.compare( rhs._archStr );
}
The _compatScore is the number of archs compatible with it. Hence
i586->compatScore is three, and x86_64->compatScore is six. Hence -1 is
returned.
This is sort of true in the sense that more archs are compatible with
"x86_64" than there are with "i585" (six vs. three). But of course it's
the completely wrong mean to determine if x86_64 can and should replace a
i586 package. It simply makes no sense to use Arch::compare() as a
"better" predicate on archs.
Ciao,
Michael.
libzypp. Arch::compare, Arch::CompatEntry::compare. The users are in
solver/detail/Helper.cc:LookForUpdate::operator() and
solver/detail/ResolverUpgrade.cc:Resolver::doUpgrade().
I've asked coolo to try the attached patch^Whack (it still wouldn't be
completely correct, but at least it won't try to install incompatible
candidates over already installed packages).
Some days ago I have run some testcases and no archtecture change has
been done. So I am little bit confused.
Distupgrade algorithm with i586+x86_64 in a repository? With the sat
branch code (AFAIK the old parser threw out incompatible architectures
already when reading in)?
Ciao,
Michael.
--
To unsubscribe, e-mail: zypp-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-devel+help@xxxxxxxxxxxx
| < Previous | Next > |