[3/6] binutils: Ensure old -symlinks packages get removed

Submitted by Mark Hatle on Nov. 13, 2013, 1:23 a.m.

Details

Message ID 20f7dafc5f5948e7954203a0d57c25b68a419568.1384305535.git.mark.hatle@windriver.com
State New
Headers show

Commit Message

Mark Hatle Nov. 13, 2013, 1:23 a.m.
When the -symlinks package was removed and an RPROVIDES was added, nothing
was put in to cause the removal of the older package in an upgrade.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 meta/recipes-devtools/binutils/binutils.inc | 1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc
index 17c66bc..ea2383e 100644
--- a/meta/recipes-devtools/binutils/binutils.inc
+++ b/meta/recipes-devtools/binutils/binutils.inc
@@ -21,6 +21,7 @@  FILES_${PN} = " \
 	${prefix}/${TARGET_SYS}/bin/*"
 
 RPROVIDES_${PN} += "${PN}-symlinks"
+RREPLACES_${PN} += "${PN}-symlinks"
 
 FILES_${PN}-dev = " \
 	${includedir} \

Comments

Martin Jansa Nov. 13, 2013, 8:12 a.m.
On Tue, Nov 12, 2013 at 07:23:22PM -0600, Mark Hatle wrote:
> When the -symlinks package was removed and an RPROVIDES was added, nothing
> was put in to cause the removal of the older package in an upgrade.
> 
> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
> ---
>  meta/recipes-devtools/binutils/binutils.inc | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc
> index 17c66bc..ea2383e 100644
> --- a/meta/recipes-devtools/binutils/binutils.inc
> +++ b/meta/recipes-devtools/binutils/binutils.inc
> @@ -21,6 +21,7 @@ FILES_${PN} = " \
>  	${prefix}/${TARGET_SYS}/bin/*"
>  
>  RPROVIDES_${PN} += "${PN}-symlinks"
> +RREPLACES_${PN} += "${PN}-symlinks"

IIRC for opkg backend you need also RCONFLICTS for opkg to really remove
old ${PN}-symlinks.
>  
>  FILES_${PN}-dev = " \
>  	${includedir} \
> -- 
> 1.8.1.2.545.g2f19ada
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
Phil Blundell Nov. 13, 2013, 11:14 a.m.
On Wed, 2013-11-13 at 09:12 +0100, Martin Jansa wrote:
> On Tue, Nov 12, 2013 at 07:23:22PM -0600, Mark Hatle wrote:
> > When the -symlinks package was removed and an RPROVIDES was added, nothing
> > was put in to cause the removal of the older package in an upgrade.
> > 
> > Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
> > ---
> >  meta/recipes-devtools/binutils/binutils.inc | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc
> > index 17c66bc..ea2383e 100644
> > --- a/meta/recipes-devtools/binutils/binutils.inc
> > +++ b/meta/recipes-devtools/binutils/binutils.inc
> > @@ -21,6 +21,7 @@ FILES_${PN} = " \
> >  	${prefix}/${TARGET_SYS}/bin/*"
> >  
> >  RPROVIDES_${PN} += "${PN}-symlinks"
> > +RREPLACES_${PN} += "${PN}-symlinks"
> 
> IIRC for opkg backend you need also RCONFLICTS for opkg to really remove
> old ${PN}-symlinks.

Also for dpkg.  If you have Replaces: without Conflicts: then this just
means that the replacing package is allowed to overwrite files in the
replaced one, not that the replaced one will actually be uninstalled.

p.
Mark Hatle Nov. 13, 2013, 1:39 p.m.
On 11/13/13, 5:14 AM, Phil Blundell wrote:
> On Wed, 2013-11-13 at 09:12 +0100, Martin Jansa wrote:
>> On Tue, Nov 12, 2013 at 07:23:22PM -0600, Mark Hatle wrote:
>>> When the -symlinks package was removed and an RPROVIDES was added, nothing
>>> was put in to cause the removal of the older package in an upgrade.
>>>
>>> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
>>> ---
>>>   meta/recipes-devtools/binutils/binutils.inc | 1 +
>>>   1 file changed, 1 insertion(+)
>>>
>>> diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc
>>> index 17c66bc..ea2383e 100644
>>> --- a/meta/recipes-devtools/binutils/binutils.inc
>>> +++ b/meta/recipes-devtools/binutils/binutils.inc
>>> @@ -21,6 +21,7 @@ FILES_${PN} = " \
>>>   	${prefix}/${TARGET_SYS}/bin/*"
>>>
>>>   RPROVIDES_${PN} += "${PN}-symlinks"
>>> +RREPLACES_${PN} += "${PN}-symlinks"
>>
>> IIRC for opkg backend you need also RCONFLICTS for opkg to really remove
>> old ${PN}-symlinks.
>
> Also for dpkg.  If you have Replaces: without Conflicts: then this just
> means that the replacing package is allowed to overwrite files in the
> replaced one, not that the replaced one will actually be uninstalled.

This seems incredibly strange to me.  But I can adjust the 2/6 and 3/6 patches 
by adding the appropriate RCONFLICTS.

--Mark

> p.
>
>
Phil Blundell Nov. 13, 2013, 1:44 p.m.
On Wed, 2013-11-13 at 07:39 -0600, Mark Hatle wrote:
> On 11/13/13, 5:14 AM, Phil Blundell wrote:
> > On Wed, 2013-11-13 at 09:12 +0100, Martin Jansa wrote:
> >> On Tue, Nov 12, 2013 at 07:23:22PM -0600, Mark Hatle wrote:
> >>> When the -symlinks package was removed and an RPROVIDES was added, nothing
> >>> was put in to cause the removal of the older package in an upgrade.
> >>>
> >>> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
> >>> ---
> >>>   meta/recipes-devtools/binutils/binutils.inc | 1 +
> >>>   1 file changed, 1 insertion(+)
> >>>
> >>> diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc
> >>> index 17c66bc..ea2383e 100644
> >>> --- a/meta/recipes-devtools/binutils/binutils.inc
> >>> +++ b/meta/recipes-devtools/binutils/binutils.inc
> >>> @@ -21,6 +21,7 @@ FILES_${PN} = " \
> >>>   	${prefix}/${TARGET_SYS}/bin/*"
> >>>
> >>>   RPROVIDES_${PN} += "${PN}-symlinks"
> >>> +RREPLACES_${PN} += "${PN}-symlinks"
> >>
> >> IIRC for opkg backend you need also RCONFLICTS for opkg to really remove
> >> old ${PN}-symlinks.
> >
> > Also for dpkg.  If you have Replaces: without Conflicts: then this just
> > means that the replacing package is allowed to overwrite files in the
> > replaced one, not that the replaced one will actually be uninstalled.
> 
> This seems incredibly strange to me.

Well, perhaps, but it's always been that way.  See the documentation for
Replaces:

http://www.debian.org/doc/debian-policy/ch-relationships.html#s-replaces

p.