Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 756190 - dev-java/openjdk-11.0.9_p11:11/11 : Error: circular dependencies
Summary: dev-java/openjdk-11.0.9_p11:11/11 : Error: circular dependencies
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Georgy Yakovlev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-23 09:55 UTC by Manfred Knick
Modified: 2021-04-14 09:51 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Manfred Knick 2020-11-23 09:55:49 UTC
<summary>

Reproducible: Always

Steps to Reproduce:
emerge  =dev-java/openjdk-11.0.9_p11:11/11::gentoo
Actual Results:  
 * Error: circular dependencies:

(dev-java/openjdk-11.0.9_p11:11/11::gentoo, ebuild scheduled for merge) 

depends on

(dev-java/openjdk-11.0.9_p11:11/11::gentoo, ebuild scheduled for merge) (buildtime)

Expected Results:  
Build.

 # equery list -p dev-java/openjdk

[-P-] [  ] dev-java/openjdk-8.272_p10:8
[-P-] [  ] dev-java/openjdk-11.0.9_p11:11


OBSERVATION:  openjdk-11.0.9_p11.ebuild , line 65-68 :

DEPEND="
...
    || (
        dev-java/openjdk-bin:${SLOT}
        dev-java/openjdk:${SLOT}
    )
...

# emerge -p -v  =dev-java/openjdk-11.0.9_p11:11/11::gentoo

[ebuild  N    ~] dev-java/openjdk-11.0.9_p11:11::gentoo  USE="alsa cups jbootstrap pch -debug -doc -examples (-gentoo-vm) -headless-awt -javafx (-selinux) -source -systemtap"
Comment 1 Manfred Knick 2020-11-23 10:22:45 UTC
BACKGROUND:

I discovered this bug because it blocks upgrade of app-office/libreoffice.

WORKAROUND:

Unmask (~) for
#
  app-office/libreoffice:0
  app-office/libreoffice-l10n:0
  dev-java/openjdk:11
  dev-java/openjdk-bin:11          <--- +
  dev-java/openjdk-jre-bin:11
#

? check dependency in   pkg_setup() ?
? add ewarn        into pkg_setup() ?

Thanks.
Comment 2 Manfred Knick 2020-11-23 13:54:17 UTC
STRANGE:

After emerge -auDN
and   emerge -a --depclean

portage wants to re-emerge dev-java/openjdk-8.272_p10 again:

# equery list -p dev-java/openjdk

[-P-] [  ] dev-java/openjdk-8.272_p10:8
[IP-] [  ] dev-java/openjdk-11.0.9_p11:11


#  emerge -auDN --keep-going  system world

[ebuild  NS    ] dev-java/openjdk-8.272_p10 [11.0.9_p11]


After that,

# emerge -a --depclean

 dev-java/icedtea-bin
    selected: 3.16.0

 virtual/jpeg-compat
    selected: 62

and

# emerge -puDN   system world

is satisfied without further whishes;

#  equery list  dev-java/openjdk*

[IP-] [  ] dev-java/openjdk-8.272_p10:8
[IP-] [  ] dev-java/openjdk-11.0.9_p11:11


# equery depends =dev-java/openjdk-8.272_p10:8

dev-java/openjdk-8.272_p10 (dev-java/openjdk:8)
virtual/jdk-1.8.0-r5 (dev-java/openjdk:8)
Comment 3 Georgy Yakovlev archtester gentoo-dev 2020-11-24 07:46:10 UTC
openjdk needs openjdk-bin to compile for the first time.

but since it's unstable, and you only accepted keywords on one package, portage can't solve circular dep.

to break the cycle you need to accept keywords on both openjdk:11 and openjdk-bin:11

that way portage will pull openjdk-bin:11, use it to build openjdk:11.
after that openjdk-bin:11 can be removed, as at next upgrade it will use already installed openjdk:11

that works as intended, nothing we can do here unfortunately.

the only solution that may work is listing -bin as first acceptable candidate in libreoffice ebuild.



also different versions use different virtuals, it's unclear what you are asking in #2.
Comment 4 Manfred Knick 2020-11-25 08:16:36 UTC
(In reply to Georgy Yakovlev from comment #3)
> openjdk needs openjdk-bin to compile for the first time.
> ...

  Isn't that exactly what I already pinned in #1 ?

> nothing we can do here unfortunately.

  As already stated above:

(Manfred Knick from comment #1)

>> ? check dependency in   pkg_setup() ?
>> ? add ewarn        into pkg_setup() ?


> it's unclear what you are
> asking in #2.

  I could not grasp why 
  - after a successful emerge of dev-java/openjdk-11.0.9_p11:11 -

(Manfred Knick from comment #2)

>> portage wants to *re-emerge* dev-java/openjdk-8.272_p10 *again*     <---
Comment 5 Andrea Bartoli 2020-11-25 10:58:18 UTC
(In reply to Georgy Yakovlev from comment #3)
> openjdk needs openjdk-bin to compile for the first time.
> 
> but since it's unstable, and you only accepted keywords on one package,
> portage can't solve circular dep.
> 
> to break the cycle you need to accept keywords on both openjdk:11 and
> openjdk-bin:11
> 
> that way portage will pull openjdk-bin:11, use it to build openjdk:11.
> after that openjdk-bin:11 can be removed, as at next upgrade it will use
> already installed openjdk:11
> 
> that works as intended, nothing we can do here unfortunately.
> 
> the only solution that may work is listing -bin as first acceptable
> candidate in libreoffice ebuild.
> 
> 
> 
> also different versions use different virtuals, it's unclear what you are
> asking in #2.

Thanks, this solve dependencies