dskvr / opkg

Automatically exported from code.google.com/p/opkg
0 stars 0 forks source link

Replace providers of virtual packages that are conflict/provide/replace by another package #89

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create two packages that provide the same virtual package.  
 - Package A should provide X
 - Package B should provide X, replace X, conflict X
2. Install package A.  Then install package B.
3. Package B will be installed successfully, but package A will not have first 
been removed. If doing an "opkg list", both packages appear and package A files 
still exist in the file system. 

What is the expected output? What do you see instead?
 I expect package A to first be removed, and then for package B to be installed.  Instead, it remains and its files are overwritten by package B's.

What version of the product are you using? On what operating system?
1.8. Linux (amstrom distro).

Please provide any additional information below.
 I've attached a fix (opkg_install.new.c) that I am currently using and a diff with opkg_install.c rev 633.

Original issue reported on code.google.com by ccos...@gmail.com on 27 Jan 2012 at 9:22

Attachments:

GoogleCodeExporter commented 8 years ago
For reference regarding replacing virtual packages:
http://www.debian.org/doc/debian-policy/ch-relationships.html.

Original comment by ccos...@gmail.com on 27 Jan 2012 at 9:23

GoogleCodeExporter commented 8 years ago
I can confirm the bug in a similar situation. I created a package A, and 
package B. In newer versions of package B it integrates the function of A, so A 
is no longer needed and B now has the  'replace A' property.

Steps

1. Install A. Install B
2. Upgrade B to new version, which 'replaces: A'

Expected result:

A is removed during B upgrade

Actual Result:

Both A and new version of B are installed.

Original comment by rado...@gmail.com on 10 Oct 2012 at 5:32

GoogleCodeExporter commented 8 years ago
I've finally got round to looking at this and have confirmed both the original 
issue and the issue described in comment #2 are both still present.

Does anyone want to turn the attached diff into a git patch which I can apply 
to the current git master, give it a test and then send it to the mailing list?

Original comment by paul.betafive on 16 Feb 2014 at 10:59

GoogleCodeExporter commented 8 years ago
Attached

Original comment by ccos...@vt.edu on 18 Mar 2014 at 2:41

Attachments:

GoogleCodeExporter commented 8 years ago
Sorry, that doesn't seem to fix the problem, I'm still left with the replaced 
package and the replacement both installed during tests.

Your check of replacee->state_status seems incomplete, at the very least we 
also want to replace packages with a status of SS_UNPACKED (as they are during 
testing as I'm using an offline root) and probably some of the other statuses 
as well.

The patch is also missing a "Signed-off-by" line and could do with a short 
summary line "opkg_install: Replace virtual packages correctly" and a longer 
description of why this change is needed in the message body. That way we still 
have the information if this bug tracker ever disappears.

Patches are better sent to the mailing list but I'm happy to accept them on 
here if you can't send them to the mailing list for some reason.

Full guidelines for submitting patches is in the file CONTRIBUTING 
(http://git.yoctoproject.org/cgit/cgit.cgi/opkg/tree/CONTRIBUTING).

Thanks for the contribution though, it'll be good to tidy this up and get this 
bug fixed!

Original comment by paul.betafive on 18 Mar 2014 at 3:45

GoogleCodeExporter commented 8 years ago
This issue is now fixed in master. The issue described in comment #2 has been 
split out to become issue 136.

Many thanks to Carl Cospel for tidying up the patch for this.

Original comment by paul.betafive on 3 Jul 2014 at 3:02