Le Mardi 22 Juillet 2003 02:41, Andi Payn a �crit :
> On Monday 21 July 2003 17:33, Olivier Thauvin wrote:

> > Are you sure:
> >
> > %define TDSVER 7.0
> > %define name freetds
> > %define release 1mdk
> > %define version 0.61
> >
> > Summary:    An OpenSource implementation of the tubular data stream
> > protocol. Name:       %name
> > [...]
> > %package devel # This mean the package will be name freetds-devel
> > [...]
> > Provides:   freetds-devel
> > Obsoletes:  freetds-devel
> >
> > No comment.
>
> The question is, why does freetds-devel provide freetds-devel in the first
> place? Unless there's some reason that I'm missing, this has to be a
> mistake. In which case this package should be flagged (even though it
> doesn't do any harm).
>
> Are there any examples where a package obsoletes %name but doesn't also
> provide %name like this?

Yes, I found lot.

You should know all rpm since version 4 provides %name = %version-%release 
without adding a specific provide in spec.
Then a package obsoleting his %name always obsoletes this provides.

[EMAIL PROTECTED] distriblint]$ rpm -qp --provides 
/home/root/mandrake/mdk/Mandrake-devel/contrib/i586/freetds-devel-0.61-1mdk.i586.rpm
freetds-devel <= The provides from spec
freetds-devel = 0.61-1mdk <= the automatic provides from rpm

>
> Meanwhile, I've been thinking about the general use of obsoletes to replace
> old packages. I need to do some more testing, but I'm not sure it's needed
> at all with rpm-4.2

Yes it is, else rpm does find 'mynew' as an update of 'myold', 'myold' will 
not be uninstalled.

>
> In other words, I think that if package foo provides bar, and you install
> foo, rpm-4.2 removes bar even if foo doesn't also obsolete bar.

No, this was a bug, fix since -7mdk (don't remember exactly, but by fpons), 
and fixed by RH after RH9.0 released:

foo provides bar; rpm -Uvh foo you have foo and bar
foo obsoletes bar; rpm -Uvh foo, you have only foo, bar was removed
foo provides and obsoletes bar; you have only foo, bar was removed, but you 
can keep packages requiring bar.

If bar provides foobar
foo obsoletes foobar
with rpm 4.2:
rpm -Uvh foo, bar is removed

wahou ! I hope you still follow me :) 
>
> If I'm right, we could get rid of all of these extra obsoletes, making it
> much easier (more packages to be changed, but a simpler test to lint for,
> and no judgement calls to be made). If I'm wrong... well, then never mind.

But it's  interesting to make a little test, I take basystem (easy to build), 
and make it wrong:

basesystem: conflict basesystem:

[EMAIL PROTECTED] SPECS]$ rpm -Uvh --test 
/home/users/olivier/RPM/RPMS/i586/basesystem-9.2-10mdk.i586.rpm
error: Failed dependencies:
        basesystem conflicts with basesystem-9.2-10mdk

Conflict apply to itself.

basesytem: obsolete basesytem:

[EMAIL PROTECTED] SPECS]$ rpm -Uvh --test 
/home/users/olivier/RPM/RPMS/i586/basesystem-9.2-10mdk.i586.rpm
Preparing...                ########################################### [100%]

Obsolete do not.


Next time, I explain with epoch tag... :)
Fran�ois, fix me if I said somethings wrong. 
-- 
Linux pour Mac !? Enfin le moyen de transformer
une pomme en v�ritable ordinateur. - JL.
Olivier Thauvin - http://nanardon.homelinux.org/


Reply via email to