Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 689236 - default/linux/riscv/17.0/rv64gc/lp64d: @system has bogus dependency on app-emulation/qemu-riscv64-bin
Summary: default/linux/riscv/17.0/rv64gc/lp64d: @system has bogus dependency on app-em...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Profiles (show other bugs)
Hardware: riscv Linux
: Normal normal (vote)
Assignee: RISCV project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-04 09:07 UTC by Marcus Comstedt
Modified: 2020-07-19 17:12 UTC (History)
0 users

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 Marcus Comstedt 2019-07-04 09:07:23 UTC
Upon switching to the official riscv profile (default/linux/riscv/17.0/rv64gc/lp64d) after running on a custom profile since June 2018, app-emulation/qemu-riscv64-bin was installed and can not be removed:

vanille /home/marcus # uname -a
Linux vanille 4.19.44+ #23 SMP Sun May 19 10:04:40 CEST 2019 riscv64 GNU/Linux
vanille /home/marcus # eselect profile show
Current /etc/portage/make.profile symlink:
  default/linux/riscv/17.0/rv64gc/lp64d
vanille /home/marcus # emerge -cv app-emulation/qemu-riscv64-bin

Calculating dependencies... done!
  app-emulation/qemu-riscv64-bin-3.1.0-r4 pulled in by:
    @system requires app-emulation/qemu-riscv64-bin

>>> No packages selected for removal by depclean
Packages installed:   282
Packages in world:    40
Packages in system:   45
Required packages:    282
Number removed:       0
vanille /home/marcus # 

This is bogus.  app-emulation/qemu-riscv64-bin installs an x86-64 binary which can not be run on the RV64 system (or indeed on any of my systems) without further use of qemu.

I build everything natively on the riscv system, but if I were to cross-build (as I did when bootstrapping in 2018) I would use a ppc64 system, so the x86-64 binary would be useless anyway.  Don't try to second-guess what the user is trying to do but instead let them install qemu manually if they need it.  _No_ other arch installs qemu as @system.

Thanks.
Comment 1 Andreas K. Hüttel archtester gentoo-dev 2019-07-05 22:46:49 UTC
>  _No_ other arch installs qemu as @system.
> 

No other arch installs gdb in the stages or build stages with debug info either.
Sorry for the 3MByte, but you'll have to deal with it for a while.
Comment 2 Marcus Comstedt 2019-07-06 09:20:25 UTC
What's in the stage is of less importance since it is only used for bootstrapping.  When doing the usual "emerge -e" after installation, you are in control of whether or not debug info is added (and whether or not to use splitdebug).

If something is in @system, I can unmerge it with emerge -C, but emerge @world keeps wanting to re-emerge it, even if I put it into package.mask.  :-(  This would not happen if people who need the package simply put it in their world list instead.
Comment 3 Matthias Maier gentoo-dev 2019-07-28 17:51:51 UTC
Most of the riscv stages at the moment are used in an emulated environment (with qemu). Adding the qemu-riscv64-bin package to the @system set eases bootstrapping and generating the stages.

If you do not need the emulator, you can simply locally override the @system set:

mkdir -p /etc/portage/profile
echo '-*app-emulation/qemu-riscv64-bin' > /etc/portage/profiles/packages

After that an # emerge --depclean will remove the package.
Comment 4 Marcus Comstedt 2019-07-28 20:45:33 UTC
@Matthias:  Thanks for the tip.  It should be "profile" (without the "s") also in the second line, but it does work.

That being the case, can't you just do the opposite when generating the stages?  I.e. in the portage_confdir that you point out in your catalyst spec, you put a profile/packages file that _selects_ app-emulation/qemu-riscv64-bin?  Optionally, it could even be put under a prefix so that it is removed by emerge -c unless you manually add it to @world during installation...
Comment 5 Larry the Git Cow gentoo-dev 2020-07-19 15:08:13 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be516c14ebf884ec769cb2b3bb4952ffef067199

commit be516c14ebf884ec769cb2b3bb4952ffef067199
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: 2020-07-19 15:05:50 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: 2020-07-19 15:07:59 +0000

    profiles: drop qemu binary from riscv @system
    
    Closes: https://bugs.gentoo.org/689236
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>

 profiles/arch/riscv/packages | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
Comment 6 Larry the Git Cow gentoo-dev 2020-07-19 17:12:46 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c85c7013642bd98ab23c07790b9f18b9d3dc9e70

commit c85c7013642bd98ab23c07790b9f18b9d3dc9e70
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: 2020-07-19 17:11:10 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: 2020-07-19 17:12:29 +0000

    profiles: drop qemu binary from riscv @system, this time for real
    
    Bug: https://bugs.gentoo.org/689236
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>

 profiles/arch/riscv/package.accept_keywords | 3 ---
 profiles/arch/riscv/packages                | 7 -------
 profiles/arch/riscv/packages.build          | 4 ----
 3 files changed, 14 deletions(-)