Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 508008 - sys-devel/crossdev: overlay search does not consider requested versions
Summary: sys-devel/crossdev: overlay search does not consider requested versions
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal enhancement
Assignee: Gentoo Crossdev team
URL:
Whiteboard:
Keywords:
: 565054 (view as bug list)
Depends on:
Blocks: crossdev-bugs
  Show dependency tree
 
Reported: 2014-04-18 13:34 UTC by Andrew Aladjev
Modified: 2023-11-19 12:00 UTC (History)
2 users (show)

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


Attachments
crossdev patch (crossdev.patch,844 bytes, patch)
2014-04-18 13:34 UTC, Andrew Aladjev
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Aladjev 2014-04-18 13:34:24 UTC
Hello. I want to create aarch64 crossdev environment today. I need gcc-4.9 from toolchain overlay and binutils-9999 from core gentoo overlay.

1. if I will add toolchain overlay to PORTDIR_OVERLAY:

 * getting sys-devel/binutils from /var/lib/layman/toolchain
 * getting sys-devel/gcc from /var/lib/layman/toolchain
 * getting sys-libs/glibc from /var/lib/layman/toolchain
 * getting sys-devel/gdb from /var/lib/layman/toolchain

but there are no binutils-9999 in toolchain overlay.

2. if I will not add toolchain overlay to PORTDIR_OVERLAY - there are no gcc-4.9 in core gentoo overlay

The problem is the part of "set_links" function:

for s in ${ovl} ${SEARCH_OVERLAYS} ; do
  if [[ -d ${s}/${cat}/${pkg} ]] ; then
    srcdir=${s}
    einfo "getting ${cat}/${pkg} from ${srcdir}"
    break
  fi
done

This code do not care about package's version. Please consider attached patch.

Reproducible: Always
Comment 1 Andrew Aladjev 2014-04-18 13:34:53 UTC
Created attachment 375200 [details, diff]
crossdev patch
Comment 2 dwfreed 2014-04-19 03:53:59 UTC
Crossdev is not part of portage, but is its own package.  Re-assigning to the maintainer.
Comment 3 SpanKY gentoo-dev 2014-04-20 03:07:50 UTC
Comment on attachment 375200 [details, diff]
crossdev patch

this doesn't work with version strings like ~4.8.1 or =4.9*
Comment 4 SpanKY gentoo-dev 2015-11-22 23:31:05 UTC
*** Bug 565054 has been marked as a duplicate of this bug. ***
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-11-19 12:00:34 UTC
This got a bit better with the following (although I don't think it's perfect):

commit 65364fa2fa675ed05152f8fe5e4665cf262ed4b7
Author: Sam James <sam@gentoo.org>
Date:   Mon Jan 31 02:02:36 2022 +0000

    crossdev: don't pick ebuild version from overlay if unmatching KEYWORDS

    We don't want to e.g. pick a GCC from an overlay if it doesn't
    have KEYWORDS for our target, which then leads to an early
    crossdev failure as it obviously can't then emerge GCC.

    Signed-off-by: Sam James <sam@gentoo.org>

commit b15c1d5f590a309d6015ae6f225fc1b4611ff427
Author: Mikk Margus Möll <mikk.margus.moll@eesti.ee>
Date:   Tue Apr 19 21:01:54 2022 +0300

    crossdev: add quotes to set_keywords variable

    Signed-off-by: Mikk Margus Möll <mikk.margus.moll@eesti.ee>
    Closes: https://github.com/gentoo/crossdev/pull/1
    Signed-off-by: Sam James <sam@gentoo.org>

commit 951e3f54dae6c815fbd89c16004c99b5c4c391ae
Author: Krzesimir Nowak <knowak@microsoft.com>
Date:   Thu Jul 7 14:58:55 2022 +0200

    crossdev: Take gdb variables into account

    When restoring user settings and when figuring out the list of repos.

    Signed-off-by: Krzesimir Nowak <knowak@microsoft.com>
    Signed-off-by: Sam James <sam@gentoo.org>

commit e4acb756ed5c898e4b244807fa5d3d14464765ea
Author: Krzesimir Nowak <knowak@microsoft.com>
Date:   Thu Jul 7 14:56:57 2022 +0200

    crossdev: Fall back to default version for gdb too

    Passing `--stable` didn't affect the version of built GDB, thus we
    needed to pass `--gdb '[stable]'` on our own.

    Signed-off-by: Krzesimir Nowak <knowak@microsoft.com>
    Signed-off-by: Sam James <sam@gentoo.org>

commit 718184e68a99cad05475854c136ab4664da12dee (tag: 20220709)
Author: Krzesimir Nowak <knowak@microsoft.com>
Date:   Wed Jul 6 21:44:21 2022 +0200

    crossdev: Fix matching of stable keywords

    Not sure how this worked before - in our case emerge couldn't find a
    matching ebuild any more when requesting stable versions.

    Signed-off-by: Krzesimir Nowak <knowak@microsoft.com>
    Closes: https://github.com/gentoo/crossdev/pull/3
    Signed-off-by: Sam James <sam@gentoo.org>

commit dd89e2ff97e249a0800660cd6d135ff161e30ed0
Author: Sam James <sam@gentoo.org>
Date:   Sat Jan 14 17:58:08 2023 +0000

    crossdev: add TODO re picking versions from overlays & best version

    Signed-off-by: Sam James <sam@gentoo.org>