Ticket #560 (closed defect: fixed)

Opened 8 months ago

Last modified 8 months ago

USE dependency upon non-existant flag shouldn't cause paludis to keep reinstalling

Reported by: ingmar Owned by: ciaranm
Priority: Sometime Milestone:
Component: clients/paludis Version: 0.26.0_pre1
Keywords: Cc: gentoo@…
Blocked By: Blocking: #445
Distribution:

Description

media-sound/amarok has DEPEND="kde-base/libplasma[opengl?]" (EAPI=kdebuild-1), though libplasma didn't actually have an "opengl" USE flag.

This causes paludis to reinstall kde-base/libplasma, every time media-sound/amarok is installed with USE=opengl enabled.

http://genkdesvn.mailstation.de/gitweb.html @ 72d47427, in case you need a testcase.

Change History

Changed 8 months ago by ciaranm

  • blocking set to 445

Changed 8 months ago by ciaranm

More details. What's installed? What's the target?

Changed 8 months ago by ciaranm

Looking at this more... This doesn't make sense. Paludis doesn't reinstall for use deps.

Changed 8 months ago by Berniyh

  • cc gentoo@… added

Ok, this is the change I made to kde-base/libplasma (see the kdebuild in the overlay linked above): -OPENGL_REQUIRED="optional" +#OPENGL_REQUIRED="optional"

This results in the opengl flag being missing. Reinstalled libplasma and then did:
paludis -i amarok
Result:
* kde-base/libplasma::kde4-experimental :kde-svn [R scm]

Reasons: *media-sound/amarok-scm:kde-svn::kde4-experimental debug -test xinerama

* media-sound/amarok::kde4-experimental :kde-svn [R scm] <target>

-daap -debug -ifp -ipod kde -mp4 -mtp -mysql -njb opengl -postgres (-real) -visualization xine

I let it do that and just run it again:
Result:
* kde-base/libplasma::kde4-experimental :kde-svn [R scm]

Reasons: *media-sound/amarok-scm:kde-svn::kde4-experimental debug -test xinerama

* media-sound/amarok::kde4-experimental :kde-svn [R scm] <target>

-daap -debug -ifp -ipod kde -mp4 -mtp -mysql -njb opengl -postgres (-real) -visualization xine

Changed 8 months ago by ciaranm

There's something you're not telling us. -i shouldn't reinstall non-targets. What are your PALUDIS_OPTIONS? What about if you do --log-level debug (which will be noisy, but should tell us why it's taking the reinstall)?

Changed 8 months ago by Berniyh

PALUDIS_OPTIONS=--log-level warning --show-reasons summary --dl-new-slots as-needed --resume-command-template /root/.paludis-resume-XXXXXX

Will attach the debug run in a second.

Changed 8 months ago by Berniyh

Was too big to attach. Uploaded it here:
http://www.berniyh.net/debug.log

I guess the important part is:

... When performing install action from command line: ... When executing install task: ... When building dependency list: ... When adding PackageDepSpec? 'media-sound/amarok': ... When adding package 'media-sound/amarok-scm:kde-svn::kde4-experimental': ... When adding build dependencies as pre dependencies: ... When adding PackageDepSpec? 'kde-base/libplasma:kde-svn[opengl?]': ... No installed packages in SLOT 'kde-svn', taking uninstalled package 'kde-base/libplasma-scm:kde-svn::kde4-experimental'

Changed 8 months ago by Berniyh

A bit more information, the output of
paludis -q libplasma
http://zlin.dk/p/?NjM1NzE2
paludis -qD amarok
http://zlin.dk/p/?M2M3Y2Qx

Changed 8 months ago by ciaranm

Oooooooooooooh. I think I know what this is. I think it's using the entire spec rather than just the QPN to determine whether there're any installed packages. Which means it's a use dep problem in general. Do you get the same thing if it's an unmet use requirement, rather than an effectively invalid use requirement?

Changed 8 months ago by Berniyh

You mean, if libplasma has the opengl use flag and has been installed with -opengl (disabled opengl use)? No, in that case it works fine.

DepList additional requirements not met error:
  * In program paludis (--log-level warning --show-reasons summary --dl-new-slots as-needed --resume-command-template /root/.paludis-resume-XXXXXX) -pi1 amarok:
  * When performing install action from command line:
  * When executing install task:
  * When building dependency list:
  * When adding PackageDepSpec 'media-sound/amarok':
  * When adding package 'media-sound/amarok-scm:kde-svn::kde4-experimental':
  * When adding build dependencies as pre dependencies:
  * When adding PackageDepSpec 'kde-base/libplasma:kde-svn[opengl?]':
  * Error searching for 'kde-base/libplasma:kde-svn[opengl?]': additional requirements are not met

Additional requirements are as follows:
    * Flag 'opengl' enabled if it is enabled for 'media-sound/amarok-scm:kde-svn::kde4-experimental'

Changed 8 months ago by ciaranm

Blerg. This bug is subtler than I thought... Looks like the case I described works, but by fluke. Next attempt at proving that the bug has nothing to do with non-existant flags:

Try installing libplasma with opengl turned off, then in use.conf enable opengl for libplasma, and then try to install amarok. I think it'll suggest to reinstall libplasma, rather than giving the 'additional requirements not met' message like it should.

Otherwise I'm going to cry.

Changed 8 months ago by Berniyh

Here you go:

These packages will be installed:

* kde-base/libplasma::kde4-experimental :kde-svn [R scm]
    Reasons: *media-sound/amarok-scm:kde-svn::kde4-experimental
    debug opengl* -test xinerama
* media-sound/amarok::kde4-experimental :kde-svn [R scm] <target>
    -daap -debug -ifp -ipod kde -mp4 -mtp -mysql -njb opengl -postgres (-real) -visualization xine

Total: 2 packages (2 rebuilds)

Changed 8 months ago by ciaranm

W00t. Ok, I think the bug starts off with this:

If a package is installed but doesn't meet the use requirements, and a reinstall would make it meet the use requirements, Paludis suggests a reinstall rather than indicating unmet use requirements.

There might well be something else broken after that too...

Changed 8 months ago by ciaranm

And I think the other thing might be what env->query_use ends up returning for flags not listed in IUSE for VDB vs E...

Changed 8 months ago by ciaranm

And I think suggesting a reinstall on a non-target to change USE flags to what you'd get when you'd reinstall manually isn't a bad idea anyway, even if it only happens because the code's subtly wrong.

But there's definitely a query_use issue:

irb(main):019:0> env.query_use("usb", env.package_database.query(Paludis::Query::Matches.new(Paludis::parse_user_package_dep_spec("app-editors/vim", [])), Paludis::QueryOrder::OrderByVersion)[0])
=> true
irb(main):020:0> env.query_use("usb", env.package_database.query(Paludis::Query::Matches.new(Paludis::parse_user_package_dep_spec("app-editors/vim::installed", [])), Paludis::QueryOrder::OrderByVersion)[0])

Blech.

Changed 8 months ago by ciaranm

  • status changed from new to closed
  • resolution set to fixed

r4590 makes env->query_use QA and return false for things not in IUSE etc. I think this is enough to give sane behaviour. Please reopen if it still does silly things.

Note: See TracTickets for help on using tickets.