Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 253904 - avoid dependency choices that are not the highest visible within a slot
Summary: avoid dependency choices that are not the highest visible within a slot
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
: 259889 (view as bug list)
Depends on:
Blocks: 155723 210077 261959
  Show dependency tree
 
Reported: 2009-01-05 20:32 UTC by Caleb Cushing
Modified: 2009-03-20 17:22 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to ebuild (perl-MIME-Base64-3.07.ebuild.patch,559 bytes, text/plain)
2009-01-05 20:36 UTC, Caleb Cushing
Details
automatically mask lower versions that are likely to trigger slot conflicts (mask_lower_version.patch,1.31 KB, patch)
2009-02-24 00:14 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Caleb Cushing 2009-01-05 20:32:33 UTC
when using perl-5.10.0 

    ~dev-lang/perl-5.8.8 required by ('ebuild', '/', 'virtual/perl-MIME-Base64-3.07', 'merge') 

perl-MIME-Base64 seems to check for perl 5.8.8 and ignore the existence of MIME-Base64 even if it is installed. It does not attempt to install MIME-Base64 either. workaround seems to be masking perl-5.8

Reproducible: Always
Comment 1 Caleb Cushing 2009-01-05 20:36:41 UTC
Created attachment 177505 [details]
patch to ebuild

not sure if this actually works... seems to work for me using portage 2.2, but have one report of not working, so needs further testing.
Comment 2 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2009-01-05 21:09:44 UTC
There appears to be a dependency resolution issue here somewhere. I've been trying to find the cause, because its confusing, and occurs under both portage and paludis. 

Its been hard to categorise the problem, but I have a working example case: 

git clone http://git.fox.geek.nz/gentoo/testcase/test/.git  

or

wget -m -np http://git.fox.geek.nz/gentoo/testcase/test/

if you lack git. ( its a checked out copy ) 

 a-1 -> DEP < b-2
 a-3 -> DEP  ~b-3
 b-1 -> PDEP ~a-1
 b-3 -> PDEP ~a-3
 c-1 -> DEP  a 
 d-1 -> DEP ||( ~a-1  ~c-1 )

Installing c pulls a-3, b-3. 
Installing d ignores c is available, and downgrades a & b to v1. 
Comment 3 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2009-01-05 21:12:13 UTC
(In reply to comment #2)
> There appears to be a dependency resolution issue here somewhere. I've been
> trying to find the cause, because its confusing, and occurs under both portage
> and paludis. 
> 
> Its been hard to categorise the problem, but I have a working example case: 
> 
> git clone http://git.fox.geek.nz/gentoo/testcase/test/.git  
> 
> or
> 
> wget -m -np http://git.fox.geek.nz/gentoo/testcase/test/
> 
> if you lack git. ( its a checked out copy ) 
> 
>  a-1 -> DEP < b-2
>  a-3 -> DEP  ~b-3
>  b-1 -> PDEP ~a-1
>  b-3 -> PDEP ~a-3
>  c-1 -> DEP  a 
>  d-1 -> DEP ||( ~a-1  ~c-1 )
> 
> Installing c pulls a-3, b-3. 
> Installing d ignores c is available, and downgrades a & b to v1. 
> 

Whoops: 
 
 git clone http://git.fox.geek.nz/gentoo/testcase/.git  
 
 or
 
 wget -m -np http://git.fox.geek.nz/gentoo/testcase/

respectively. 

and the packages are all under a fake category I created called 'test' and install no files themselves. 
Comment 4 Zac Medico gentoo-dev 2009-01-06 11:38:27 UTC
(In reply to comment #1)
> Created an attachment (id=177505) [edit]

It's a variant of bug 1343. That patch seems like a reasonable solution, except maybe use >=dev-lang/perl-5.10 instead of ~dev-lang/perl-5.10.0 because the latter seems overly specific.
Comment 5 Caleb Cushing 2009-01-12 17:31:14 UTC
nvm.. my fix doesn't work... in fact no combo works from what I can tell... 
Comment 6 Zac Medico gentoo-dev 2009-01-12 17:41:53 UTC
Perhaps it should be like this:

  || ( >=dev-lang/perl-5.8.8  ~perl-core/MIME-Base64-${PV} )

That would sense if MIME-Base64 is included in versions of perl >=5.8.8.
Comment 7 Caleb Cushing 2009-01-15 16:45:21 UTC
ah.. my latest test was bugged... stale metadata... my patch works.
Comment 8 Henry Gebhardt 2009-02-15 11:43:08 UTC
(In reply to comment #6)
> Perhaps it should be like this:
> 
>   || ( >=dev-lang/perl-5.8.8  ~perl-core/MIME-Base64-${PV} )
> 
> That would sense if MIME-Base64 is included in versions of perl >=5.8.8.

Just installed perl-5.10.0 from the perl-experimental overlay yesterday, and indeed, MIME::Base64 is included.

I now have MIME-Base64 twice on my computer. I don't really care to have MIME::Base64 twice on my computer, but including Zac's suggestion would definitely ease upgrading to perl-5.10 A LOT, since the error messages were enlightening only in retrospect; this bug report helped.

Thanks,
Henry

PS: I am running ~x86.
Comment 9 Caleb Cushing 2009-02-15 14:59:03 UTC
been using zmedico's slightly modified version in funtoo/regen2 for ~ a month now no problems.
Comment 10 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2009-02-17 10:57:17 UTC
Zac: could the resolver be perhaps update to prefer installing the extra package instead of choosing and downgrading an existing one? While it's of course not the best solution to this bug, I imagine it might be useful somewhere else.
Comment 11 Zac Medico gentoo-dev 2009-02-17 17:52:01 UTC
(In reply to comment #10)
> Zac: could the resolver be perhaps update to prefer installing the extra
> package instead of choosing and downgrading an existing one? While it's of
> course not the best solution to this bug, I imagine it might be useful
> somewhere else.

For this particular case, I think a reasonable heuristic would be to avoid atoms which pull in a package which is not the highest visible within the slot. So, it would match ~dev-lang/perl-5.8.8 and notice that there's a higher visible version of dev-lang/perl:0 and then do the same for ~perl-core/MIME-Base64-3.07. If it happens that ~perl-core/MIME-Base64-3.07 matches the highest visible version within the perl-core/MIME-Base64:0 slot then it should choose that one instead.
Comment 12 Zac Medico gentoo-dev 2009-02-18 00:00:30 UTC
This is fixed in svn r12623.
Comment 13 Caleb Cushing 2009-02-18 00:03:06 UTC
zmedico does your fix affect my patch at all? will I need to change anything in my tree?
Comment 14 Zac Medico gentoo-dev 2009-02-18 00:09:56 UTC
You won't have to change anything, but your patch from comment #1 is no longer required to get appropriate behavior from portage.
Comment 15 Zac Medico gentoo-dev 2009-02-24 00:14:43 UTC
Created attachment 182975 [details, diff]
automatically mask lower versions that are likely to trigger slot conflicts

If this patch is saved as /tmp/mask_lower_version.patch, then it can be applied as follows:

  patch /usr/lib/portage/pym/_emerge/__init__.py /tmp/mask_lower_version.patch
Comment 16 Zac Medico gentoo-dev 2009-02-24 04:38:39 UTC
*** Bug 259889 has been marked as a duplicate of this bug. ***
Comment 17 Zac Medico gentoo-dev 2009-03-10 09:27:02 UTC
This is fixed in 2.2_rc24 which is in package.mask. I'll close this bug when it's also released in 2.1.6.8.
Comment 18 Zac Medico gentoo-dev 2009-03-13 20:40:19 UTC
This is released in 2.1.6.8.
Comment 19 Gian 2009-03-20 17:22:30 UTC
I think this bug should be reopened, since stable packages are affected (see bug #259889) but 2.1.6.8 is not in stable.