Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 373655 - sys-apps/portage-2.2.0_alpha41: emerge --depclean (-c) complains about uninstalled alternatives (||)
Summary: sys-apps/portage-2.2.0_alpha41: emerge --depclean (-c) complains about uninst...
Status: RESOLVED WORKSFORME
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-30 21:23 UTC by Martin von Gagern
Modified: 2011-07-01 11:55 UTC (History)
0 users

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


Attachments
emerge -cvad (bug373655a.log.gz,536.67 KB, application/octet-stream)
2011-07-01 07:45 UTC, Martin von Gagern
Details
tar of pkg dir (bug373655b.tar,30.00 KB, application/x-tar)
2011-07-01 09:28 UTC, Martin von Gagern
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Gagern 2011-06-30 21:23:20 UTC
# emerge -cva
[...]
 * Dependencies could not be completely resolved due to
 * the following required packages not being installed:
 * 
 *   ~dev-lang/perl-5.14.0 pulled in by:
 *     virtual/perl-Locale-Maketext-Simple-0.210.0
[...]

# grep DEPEND /usr/portage/virtual/perl-Locale-Maketext-Simple/perl-Locale-Maketext-Simple-0.210.0-r1.ebuild 
RDEPEND="|| ( =dev-lang/perl-5.14* ~dev-lang/perl-5.12.4 ~dev-lang/perl-5.12.3 ~dev-lang/perl-5.12.2 ~perl-core/${PN#perl-}-${PV} )"

# emerge -pqv '~dev-lang/perl-5.12.4'
[ebuild   R   ] dev-lang/perl-5.12.4  USE="berkdb doc gdbm ithreads -build -debug"

# emerge -pqv '=dev-lang/perl-5.14*'
[ebuild     U ] dev-lang/perl-5.14.1 [5.12.4] USE="berkdb doc gdbm ithreads -build -debug"                                                                      

The following mask changes are necessary to proceed:
#required by =dev-lang/perl-5.14* (argument)
# /usr/portage/profiles/package.mask:
# Torsten Veller <tove@gentoo.org> (18 Jun 2011)
# Mask perl-5.14. See tracker bug #356171
>=dev-lang/perl-5.14.1

So it seems that my sys-apps/portage-2.2.0_alpha41 doesn't properly handle alternatives, but instead forces the first alternative it encounters into the dependency tree. This is bad enough, but not taking masks into account makes things worse.
Comment 1 Zac Medico gentoo-dev 2011-06-30 22:26:11 UTC
(In reply to comment #0)
> # emerge -cva
> [...]
>  * Dependencies could not be completely resolved due to
>  * the following required packages not being installed:
>  * 
>  *   ~dev-lang/perl-5.14.0 pulled in by:
>  *     virtual/perl-Locale-Maketext-Simple-0.210.0
> [...]
> 
> # grep DEPEND
> /usr/portage/virtual/perl-Locale-Maketext-Simple/perl-Locale-Maketext-Simple-0.210.0-r1.ebuild 
> RDEPEND="|| ( =dev-lang/perl-5.14* ~dev-lang/perl-5.12.4 ~dev-lang/perl-5.12.3
> ~dev-lang/perl-5.12.2 ~perl-core/${PN#perl-}-${PV} )"
> 
> # emerge -pqv '~dev-lang/perl-5.12.4'
> [ebuild   R   ] dev-lang/perl-5.12.4  USE="berkdb doc gdbm ithreads -build
> -debug"
> 
> # emerge -pqv '=dev-lang/perl-5.14*'
> [ebuild     U ] dev-lang/perl-5.14.1 [5.12.4] USE="berkdb doc gdbm ithreads
> -build -debug"

I suspect that something about the metadata in /var/db/pkg/dev-lang/perl-5.12.4/ is invalid or corrupt, which caused the dependency resolver to reject that choice. The EAPI, *DEPEND, USE, and IUSE are the most important files in there. You can check those for any obvious signs of invalidity or corruption.

Anyway, the problem will likely correct itself if you reinstall ~dev-lang/perl-5.12.4.

> The following mask changes are necessary to proceed:
> #required by =dev-lang/perl-5.14* (argument)
> # /usr/portage/profiles/package.mask:
> # Torsten Veller <tove@gentoo.org> (18 Jun 2011)
> # Mask perl-5.14. See tracker bug #356171
> >=dev-lang/perl-5.14.1
> 
> So it seems that my sys-apps/portage-2.2.0_alpha41 doesn't properly handle
> alternatives, but instead forces the first alternative it encounters into the
> dependency tree. This is bad enough, but not taking masks into account makes
> things worse.

As said, it's likely just invalid or corrupt metadata that's triggering this strange behavior.
Comment 2 Martin von Gagern 2011-07-01 06:53:40 UTC
(In reply to comment #1)
> I suspect that something about the metadata in
> /var/db/pkg/dev-lang/perl-5.12.4/ is invalid or corrupt, which caused the
> dependency resolver to reject that choice. The EAPI, *DEPEND, USE, and IUSE
> are the most important files in there. You can check those for any obvious
> signs of invalidity or corruption.
> 
> Anyway, the problem will likely correct itself if you reinstall
> ~dev-lang/perl-5.12.4.

Negative, that didn't solve things. Metadata changes in BUILD_TIME, COUNTER and CONTENTS, surprisingly many of the latter, but the error message persists.
Comment 3 Martin von Gagern 2011-07-01 07:45:30 UTC
Created attachment 278761 [details]
emerge -cvad

Attached is a run of emerge -cvad, i.e. with debugging enabled. Had to compress it to make bugzilla accept it. Notable parts appear to be these:

Parent:    (virtual/perl-Locale-Maketext-Simple-0.210.0::gentoo, installed)
Depstring: || ( ~dev-lang/perl-5.14.0 ~dev-lang/perl-5.12.3 ~dev-lang/perl-5.12.2 ~perl-core/Locale-Maketext-Simple-0.210.0 )
Priority:  hard

Parent:    (virtual/perl-Locale-Maketext-Simple-0.210.0::gentoo, installed)
Depstring: || ( ~dev-lang/perl-5.14.0 ~dev-lang/perl-5.12.3 ~dev-lang/perl-5.12.2 ~perl-core/Locale-Maketext-Simple-0.210.0 )
Priority:  hard
Candidates: ['~dev-lang/perl-5.14.0']
Exiting... (virtual/perl-Locale-Maketext-Simple-0.210.0::gentoo, installed)

[...]
(virtual/perl-Locale-Maketext-Simple-0.210.0::gentoo, installed) (no children)

The single-element list of candidates looks particularly strange to me; it's not what I would have expected. Is that part of this bug, or did I misinterpret the meaning of candidates? Isn't a candidate any package that could satisfy the dependency? So there should be more than one in this case?
Comment 4 Zac Medico gentoo-dev 2011-07-01 08:02:34 UTC
(In reply to comment #3)
> Parent:    (virtual/perl-Locale-Maketext-Simple-0.210.0::gentoo, installed)
> Depstring: || ( ~dev-lang/perl-5.14.0 ~dev-lang/perl-5.12.3
> ~dev-lang/perl-5.12.2 ~perl-core/Locale-Maketext-Simple-0.210.0 )

Since it says ~dev-lang/perl-5.12.3 instead of ~dev-lang/perl-5.12.4, it looks similar to bug 368725. What version of portage do you have?

> Priority:  hard
> Candidates: ['~dev-lang/perl-5.14.0']
> Exiting... (virtual/perl-Locale-Maketext-Simple-0.210.0::gentoo, installed)
> 
> [...]
> (virtual/perl-Locale-Maketext-Simple-0.210.0::gentoo, installed) (no children)
> 
> The single-element list of candidates looks particularly strange to me; it's
> not what I would have expected. Is that part of this bug, or did I misinterpret
> the meaning of candidates? Isn't a candidate any package that could satisfy the
> dependency? So there should be more than one in this case?

That's normal. The "Candidates" in this context are only supposed to include 1 atom from each || choice. Anyway, it looks like bug 368725, so you'd better check your portage version.
Comment 5 Martin von Gagern 2011-07-01 08:52:39 UTC
(In reply to comment #4)
> Since it says ~dev-lang/perl-5.12.3 instead of ~dev-lang/perl-5.12.4, it looks
> similar to bug 368725.

Indeed. The RDEPEND does agree with the one from
/var/db/pkg/virtual/perl-Locale-Maketext-Simple-0.210.0/RDEPEND

> What version of portage do you have?

2.2.0_alpha41, as the summary of this bug and comment #0 states.

I tried with commit d810f9a0 from bug #368725 comment #6 as well, same problem. In fact I couldn't find a version which did NOT exhibit this behaviour, so it probably isn't an alpha36 regression. I've tried v2.2.0_alpha35, 88ab3aed^ and current master a30cc13e, and all of them do exhibit this problem.
Comment 6 Martin von Gagern 2011-07-01 08:54:26 UTC
I guess a simple "emerge virtual/perl-Locale-Maketext-Simple" would fix the issue for me, but I'll keep my broken system around for a bit, in case you want me to try out some portage fix.
Comment 7 Zac Medico gentoo-dev 2011-07-01 09:05:10 UTC
(In reply to comment #6)
> I guess a simple "emerge virtual/perl-Locale-Maketext-Simple" would fix the
> issue for me, but I'll keep my broken system around for a bit, in case you want
> me to try out some portage fix.

You can make a backup copy of /var/db/pkg/virtual/perl-Locale-Maketext-Simple-0.210.0 and that's enough for analysis. My first guess is that the "repository" file doesn't contain "gentoo". That would prevent it from using the new metadata from the "gentoo" repo.
Comment 8 Martin von Gagern 2011-07-01 09:28:49 UTC
Created attachment 278771 [details]
tar of pkg dir

This is a tar-ed version of
/var/db/pkg/virtual/perl-Locale-Maketext-Simple-0.210.0
in case it helps you reproduce the issue.

(In reply to comment #7)
> My first guess is that the "repository" file doesn't contain "gentoo".#

You guessed wrong.
Comment 9 Zac Medico gentoo-dev 2011-07-01 09:57:34 UTC
Oh, you need virtual/perl-Locale-Maketext-Simple-0.210.0-r1 but you have the previous revision installed.
Comment 10 Martin von Gagern 2011-07-01 11:34:49 UTC
(In reply to comment #9)
> Oh, you need virtual/perl-Locale-Maketext-Simple-0.210.0-r1 but you have the
> previous revision installed.

PEBKAC: didn't catch the "--with-bdeps=y" in the "emerge --update" which the depclean error message suggested. Or rather didn't comprehend that this would make a difference here. Sorry. Feel free to choose an appropriate resolution state, as an update with bdeps will in fact update that package as well.
Comment 11 Zac Medico gentoo-dev 2011-07-01 11:55:01 UTC
Alright, I guess there's not much that we can do on the portage side.

Dependencies like || ( =dev-lang/perl-5.14* ~dev-lang/perl-5.12.3 ) are just really error prone. It seems like >=dev-lang/perl-5.12.3 would work just fine as a substitute, but for some reason inane || deps like these seem to be a recurring theme.