Ticket #1267 (new defect)

Opened 5 years ago

Last modified 3 years ago

cave suggests "--permit-old-version" on keyword masked versions, that are newer than the latest unmasked version

Reported by: christian. Owned by:
Priority: Sometime Milestone:
Component: clients/cave Version: 0.82.0
Keywords: Cc:
Blocked By: Blocking:
Distribution: N/A

Description

When I tried to upgrade net-libs/nodejs, cave suggested that I have to unmask a certain version of dev-lang/v8 and use the "--permit-old-version" option.

# cave resolve net-libs/nodejs --explain dev-lang/v8

These are the actions I will take, in order:

-u  dev-lang/v8:0::gentoo (not the best version) 3.15.11.15 to ::installed replacing 3.14.5.3
    build_options: symbols=split -optional_tests -trace work=tidyup
    Reasons: net-libs/nodejs-0.9.9:0::gentoo
    Masked by keyword
        Keywords ~amd64 ~arm ~x64-macos ~x86 ~x86-fbsd ~x86-macos
    9.91 MBytes to download
u   net-libs/nodejs:0::gentoo 0.9.9 to ::installed replacing 0.9.3-r1
    build_options: symbols=split (-optional_tests) -trace work=tidyup
    Reasons: target
    12.05 MBytes to download

Total: 1 upgrades, 21.96 MBytes to download

I cannot proceed without being permitted to do the following:

-u  dev-lang/v8:0::gentoo (not the best version) 3.15.11.15 to ::installed replacing 3.14.5.3
    build_options: symbols=split -optional_tests -trace work=tidyup
    Reasons: net-libs/nodejs-0.9.9:0::gentoo
    Masked by keyword
        Keywords ~amd64 ~arm ~x64-macos ~x86 ~x86-fbsd ~x86-macos
    Cannot proceed without: --permit-old-version, being unmasked

Explaining requested decisions:

For dev-lang/v8:0::(install_to_slash):
    The following constraints were in action:
      * =dev-lang/v8-3.15*:=, use existing if possible, installing to /
        Because of =dev-lang/v8-3.15*:= from net-libs/nodejs-0.9.9:0::gentoo, key 'Build dependencies', labelled 'DEPEND'
        Because of =dev-lang/v8-3.15*:= from net-libs/nodejs-0.9.9:0::gentoo, key 'Run dependencies', labelled 'RDEPEND'
    The decision made was:
        Use origin ID dev-lang/v8-3.15.11.15:0::gentoo
        Install to repository installed
            Replacing dev-lang/v8-3.14.5.3:0::installed

Executing pretend actions: 2 of 2

This was kinda weird, because the new -- but keyword masked -- version (3.15.11.15) to be installed, was newer than the only version marked stable (3.14.5.3):

# cave show -c dev-lang/v8
* dev-lang/v8
    ::gentoo                  3.14.5.3* {:0/3.14.5} (3.15.11.13)K (3.15.11.15)K {:0/3.15.11} (3.16.4.1)KR {:0/3.16.4} (3.16.11.1)KR {:0/3.16.11} (9999)KR {:0}
    ::installed               3.14.5.3 {:0/3.14.5}
    ::layman                  (3.7.12.20 (in ::sabayon))X (3.8.7.1 (in ::sabayon))X {:0}
    dev-lang/v8-3.14.5.3:0::installed (world)
    Description               Google's open source JavaScript engine
    Homepage                  http://code.google.com/p/v8
    From repositories         gentoo
    Installed time            Mon Jan 14 23:17:37 CET 2013
    Installed using           paludis-0.82.0
    License                   BSD
    Use flags
        Build Options
            -trace            Trace actions executed by the package (very noisy, for debugging broken builds only)
    Build dependencies
                              || (
                                  dev-lang/python:2.7
                                  dev-lang/python:2.6
                              )
    Source URI
                              http://commondatastorage.googleapis.com/chromium-browser-official/v8-3.14.5.3.tar.bz2
    dev-lang/v8-3.14.5.3:0::gentoo (world)
    Description               Google's open source JavaScript engine
    Homepage                  http://code.google.com/p/v8
    Herds                     chromium
    Use flags
        Build Options
            symbols=split     How to handle debug symbols in installed files
                              Permitted values:
                                  compress:  Split and compress debug symbols
                                  preserve:  Preserve debug symbols
                                  split:     Split debug symbols
                                  strip:     Strip debug symbols
            -optional_tests   Run tests considered by the package to be optional
            -trace            Trace actions executed by the package (very noisy, for debugging broken builds only)
            work=tidyup       Whether to preserve or remove working directories
                              Permitted values:
                                  leave:     Do not remove, but allow destructive merges
                                  preserve:  Perserve the working directory
                                  remove:    Always remove the working directory
                                  tidyup:    Tidy up work directory after a successful build
    Build dependencies
                              || (
                                  dev-lang/python:2.7
                                  dev-lang/python:2.6
                              )
    Source URI
                              http://commondatastorage.googleapis.com/chromium-browser-official/v8-3.14.5.3.tar.bz2

As soon as I unmasked the requested version, I did not need the "--permit-old-version" option.

I assume the resolver realizes it cannot satisfy the requested version with the available versions and pretends to unmask all keyword masked versions. In that case the new version becomes indeed an older one. But usually, I only unmask the version requested to minimize the need for unmasking other packages on which a total new version might depend.

It seems to me that this is more of an edge case, which might be complicated to handle, and if not handled, it does not hurt anyone: An additional, but in the end unnecessary "--permit-old-version" probably does not pose a problem.

BTW: I missed version "1.0.0" in the "Version" option field of the bug report form. :)

Change History

comment:1 Changed 5 years ago by ciaranm

Hrm. Whether or not something is an "old" version is decided at the slot level, not at the package level.

comment:2 Changed 3 years ago by christian.

TL;DR: While revisiting this ticket, I just realized, that this report is invalid because it's based on a wrong assumption of mine. Sorry, for wasting your time.


I was just checking if this report is still valid with 2.0.0: It is. Since I could not replicate the issue with the actual packages, I made a minimal test case:

  • 2 packages: some-cat/target-1 and some-cat/dependency-{1,2}, all in slot "0", no sub-slots
  • some-cat/target has exact dependency =some-cat/dependency-1
  • it's actually much simpler than the original issue

This is the resulting output:

# cave resolve some-cat/target --explain some-cat/dependency
Done: 13 steps              

These are the actions I will take, in order:

-n  some-cat/dependency:0::sandbox (not the best version) 1 to ::installed
    "dependency"
    build_options: symbols=split -dwarf_compress -optional_tests -trace work=tidyup
    Reasons: some-cat/target-1:0::sandbox
    Masked by keyword
        Keywords ~amd64 ~x86

n   some-cat/target:0::sandbox 1 to ::installed
    "target"
    build_options: symbols=split -dwarf_compress -optional_tests -trace work=tidyup
    Reasons: target

Total: 1 new installs

Build Options:
    dwarf_compress:                Compress DWARF2+ debug information
    optional_tests:                Run tests considered by the package to be optional
    symbols:                       How to handle debug symbols in installed files
    trace:                         Trace actions executed by the package (very noisy, for debugging broken builds only)
    work:                          Whether to preserve or remove working directories

I cannot proceed without being permitted to do the following:

-n  some-cat/dependency:0::sandbox (not the best version) 1 to ::installed
    "dependency"
    build_options: symbols=split -dwarf_compress -optional_tests -trace work=tidyup
    Reasons: some-cat/target-1:0::sandbox
    Masked by keyword
        Keywords ~amd64 ~x86
    Cannot proceed without: --permit-old-version, being unmasked

Explaining requested decisions:

For some-cat/dependency:0::(install_to_slash):
    The following constraints were in action:
      * =some-cat/dependency-1, use existing if possible, installing to /
        Because of =some-cat/dependency-1 from some-cat/target-1:0::sandbox, key 'Build dependencies', labelled 'DEPEND'
    The decision made was:
        Use origin ID some-cat/dependency-1:0::sandbox
        Install to repository installed
Executing pretend actions: 2 of 2

 * No unread news items found

and here it is with

=some-cat/dependency-1 ~amd64

in keywords.conf, whereas no "--permit-old-version" is needed

 # cave resolve some-cat/target --explain some-cat/dependency
Done: 13 steps              

These are the actions I will take, in order:

n   some-cat/dependency:0::sandbox 1 to ::installed
    "dependency"
    build_options: symbols=split -dwarf_compress -optional_tests -trace work=tidyup
    Reasons: some-cat/target-1:0::sandbox

n   some-cat/target:0::sandbox 1 to ::installed
    "target"
    build_options: symbols=split -dwarf_compress -optional_tests -trace work=tidyup
    Reasons: target

Total: 2 new installs

Build Options:
    dwarf_compress:                Compress DWARF2+ debug information
    optional_tests:                Run tests considered by the package to be optional
    symbols:                       How to handle debug symbols in installed files
    trace:                         Trace actions executed by the package (very noisy, for debugging broken builds only)
    work:                          Whether to preserve or remove working directories

Explaining requested decisions:

For some-cat/dependency:0::(install_to_slash):
    The following constraints were in action:
      * =some-cat/dependency-1, use existing if possible, installing to /
        Because of =some-cat/dependency-1 from some-cat/target-1:0::sandbox, key 'Build dependencies', labelled 'DEPEND'
    The decision made was:
        Use origin ID some-cat/dependency-1:0::sandbox
        Install to repository installed
Executing pretend actions: 2 of 2

 * No unread news items found

I realize now, that the description is misleading and symptomatic for my misconception; should be more like: 'cave suggests "--permit-old-version" on keyword masked version, even if a newer (also masked) version would not satisfy constraints' and thus the report is basically invalid:

If you put

some-cat/dependency ~amd64

into keywords.conf --permit-old-version is obviously required. I realize most people would not be that specific like me when unmasking a package. So I come to the conclusion that cave actually just covers all the bases (unmasking specific version or all versions) and there is really nothing to fix or improve here. Even if one might infer from the message Cannot proceed without: --permit-old-version, being unmasked, that the specific version must be unmasked, the other option (unmasking all versions) is possible and cave does not specify how the user should proceed. I would close this ticket as "invalid" if I could.

Note: See TracTickets for help on using tickets.