apt-rpm handles obsoletes differently?

Vincent Danen vdanen at annvix.org
Fri May 5 11:42:01 PDT 2006


Got a quick question here.  I've built apt and have setup a repository
for Annvix.  So far so good.  Got my sources setup and everything.  With
everything up to date, when I run "apt-get dist-upgrade" I'm seeing
this:

[root at build apt]# apt-get dist-upgrade
Reading Package Lists... 33%
Reading Package Lists... Done
Building Dependency Tree... Done
Calculating Upgrade... Done
The following packages will be REPLACED:
  exim (by postfix)
The following NEW packages will be installed:
  postfix
  0 upgraded, 1 newly installed, 1 replaced, 0 removed and 0 not upgraded.

Which is odd because it shouldn't (ie. urpmi --auto-select does not try
to do this).  So, postfix is now installed instead of exim and then I
get:

[root at build apt]# apt-get dist-upgrade
Reading Package Lists... Done
Building Dependency Tree... Done
Calculating Upgrade... Done
The following packages will be REPLACED:
  postfix (by exim)
The following NEW packages will be installed:
  exim
  0 upgraded, 1 newly installed, 1 replaced, 0 removed and 0 not upgraded.


And this will keep happening.  Now, I suspect this is due to how
obsoletes is being handled, and maybe this isn't the best behaviour for
how to handle obsoletes, but exim obsoletes postfix and postfix
obsoletes exim.  The rationale behind this is so that if someone does a
"urpmi exim" then postfix will be uninstalled, and the opposite if they
"urpmi postfix" and exim is installed (it will get removed).

Now, maybe urpmi handles this differently than apt-rpm does (well, it
obviously does).  I suppose this could be solved by using conflicts
instead of using obsoletes.

Is that the problem?  With the obsoletes tag?  I see that Mandriva has
included a certain patch that "enhances the sorting by taking Obsoletes
into account".  While I used Mandriva's spec as a starter, I dropped all
of their patches (I prefer not to patch the crap out of stuff that I
maintain).  The patch is small:

[vdanen at build p]$ cat
apt-0.3.19cnc53-stelian-apt-pkg-algorithms-scores.patch 
--- apt-0.5.4cnc9/apt-pkg/algorithms.cc.orig    Wed Nov 21 17:45:34 2001
+++ apt-0.5.4cnc9/apt-pkg/algorithms.cc Wed Nov 21 17:46:12 2001
@@ -566,6 +566,8 @@
       {
         if (D->Type == pkgCache::Dep::Depends || D->Type == pkgCache::Dep::PreDepends)
	     Scores[D.TargetPkg()->ID]++;
+	 if (D->Type == pkgCache::Dep::Obsoletes)
+           Scores[I->ID]++;
       }
    }   

I'm not sure if I should stick this patch in and if it would solve the
problem or not (because I'm not sure how urpmi will handle changing the
obsoletes to conflicts... I suspect it should be ok, but....)

Any insight would be appreciated.

-- 
Annvix - Secure Linux Server: http://annvix.org/
"lynx -source http://linsec.ca/vdanen.asc | gpg --import"
{FEE30AD4 : 7F6C A60C 06C2 4811 FA1C  A2BC 2EBC 5E32 FEE3 0AD4}
Wasting time like it was free...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
URL: <http://lists.laiskiainen.org/pipermail/apt-rpm-laiskiainen.org/attachments/20060505/60d94abe/attachment-0002.pgp>


More information about the Apt-Rpm mailing list