Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
--usepkgonly per package (pre solved)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
hedmo
Veteran
Veteran


Joined: 29 Aug 2009
Posts: 1325
Location: sweden

PostPosted: Tue Mar 05, 2024 11:36 am    Post subject: --usepkgonly per package (pre solved) Reply with quote

hi

i have an old asus transformer t100ta with only 2GB of ram . it takes to long to compile now a days and i want to cut compile time on it .
ATM i am trying to use /etc/portage/env and /etc/portage/package.env with :
Code:

myt100 /etc/portage/env # cat /etc/portage/env/forcebin.conf
EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --getbinpkg --usepkgonly"
myt100 /etc/portage/env # cat /etc/portage/package.env/forcebin
kde-plasma/* forcebin.conf
kde-frameworks/* forcebin.conf
dev-qt/* forcebin.conf
sys-devel/gcc forcebin.conf
myt100 /etc/portage/env #


but it fails and only take what i have in /etc/portage/make.conf :
Code:

myt100 /etc/portage/env # cat /etc/portage/make.conf | grep EMERGE
EMERGE_DEFAULT_OPTS="--jobs 1 --quiet-build=y --load-average 8 --binpkg-respect-use=y --getbinpkg=y --usepkg=y"
myt100 /etc/portage/env #


i can confirm that gcc can be installed with :
Code:

myt100 /etc/portage/env # EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --getbinpkg --usepkgonly" emerge -av gcc

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 19.35 s (backtrack: 0/20).

Local copy of remote index is up-to-date and will be used.

[binary     U  ] sys-devel/gcc-13.2.1_p20240113-r1-2:13::gentoo [13.2.1_p20231014:13::gentoo] USE="(cxx) fortran nls openmp (pie) sanitize ssp -ada -cet (-custom-cflags) -d -debug -default-stack-clash-protection -default-znow -doc (-fixed-point) -go -graphite -hardened (-ieee-long-double) -jit (-libssp) -lto -modula2 (-multilib*) -objc -objc++ -objc-gc (-pch) -pgo -systemtap -test -valgrind -vanilla -vtv -zstd (-nptl%*)" 62210 KiB

Total: 1 package (1 upgrade, 1 binary), Size of downloads: 62210 KiB

Would you like to merge these packages? [Yes/No] n

Quitting.

myt100 /etc/portage/env #


how do i get as much bins as possible or per package to be installed ? .

regards hedmo


Last edited by hedmo on Sat Mar 09, 2024 9:53 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54529
Location: 56N 3W

PostPosted: Tue Mar 05, 2024 12:04 pm    Post subject: Reply with quote

hedmo,

There is no per package --getbinpkg --usepkgonly yet. There is an old open bug though.

To get as much bins as possible, your USE flags must match the binhost USE flags.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9591
Location: beyond the rim

PostPosted: Tue Mar 05, 2024 12:05 pm    Post subject: Reply with quote

You cannot redefine EMERGE_DEFAULT_OPTS per package, conceptually it doesn't make any sense.

This requirement really needs a dedicated solution, not a hack. Probably an extension to the repository specifier of the atom syntax.
Back to top
View user's profile Send private message
hedmo
Veteran
Veteran


Joined: 29 Aug 2009
Posts: 1325
Location: sweden

PostPosted: Tue Mar 05, 2024 12:11 pm    Post subject: Reply with quote

NeddySeagoon wrote:
hedmo,


To get as much bins as possible, your USE flags must match the binhost USE flags.


NeddySeagoon

Yes i know . At the moment i am trying to cut down on my useflags to but i dont have much in my make file :

Code:

  GNU nano 7.2                                       make.conf                                                 
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
COMMON_FLAGS="-march=silvermont -O2 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"

MAKEOPTS="-j1"
EMERGE_DEFAULT_OPTS="--jobs 1 --quiet-build=y --load-average 8 --binpkg-respect-use=y --getbinpkg=y --usepkg=y"

FEATURES="binpkg-request-signature"
#ACCEPT_KEYWORDS="~amd64"

USE=" elogind -consolekit -systemd wayland lm-sensors  /
dbus initramfs networkmanager pulseaudio gstreamer  /
opengl egl vulkan glamor vaapi gles gles2 v4l "

INPUT_DEVICES="libinput synaptics"
VIDEO_CARDS=" intel i965 "

# NOTE: This stage was built with the bindist Use flag enabled
PORTDIR="/var/db/repos/gentoo"
DISTDIR="/var/cache/distfiles"
PKGDIR="/var/cache/binpkgs"
PORTDIR_OVERLAY="/var/lib/local/hedmo/"
CCACHE_DIR="/var/cache/ccache"

ACCEPT_LICENSE="*"

# This sets the language of build output to English.
# Please keep this setting intact when reporting bugs.
LC_MESSAGES=C
GRUB_PLATFORMS="efi-32"


where can i find the useflags from the binhost?

regards
Back to top
View user's profile Send private message
hedmo
Veteran
Veteran


Joined: 29 Aug 2009
Posts: 1325
Location: sweden

PostPosted: Tue Mar 05, 2024 12:19 pm    Post subject: Reply with quote

Genone wrote:
You cannot redefine EMERGE_DEFAULT_OPTS per package, conceptually it doesn't make any sense.

This requirement really needs a dedicated solution, not a hack. Probably an extension to the repository specifier of the atom syntax.


Genone

you may be right but to ease the compile time i will be fine with the packages i have in my forcebin file :

Code:

kde-plasma/* forcebin.conf
kde-frameworks/* forcebin.conf
dev-qt/* forcebin.conf
sys-devel/gcc forcebin.conf


they alone can compile up to 3 days alone and under that time i cannot use my PC . if the updates could be over a night i would not ask about this .
now i have over 400 packages to update and it will take about a week or more to update it .

EDIT : i dont think this is a hack but a good solution for picking binaries if one like . for example gcc . in portage we have 13.2.1_p20240210 and in binhost we have gcc-13.2.1_p20240113-r1. if i do not want to update gcc to sources based version i can have the option to be at gcc-13.2.1_p20240113-r1 till the binhost updates .


regards


Last edited by hedmo on Tue Mar 05, 2024 12:37 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54529
Location: 56N 3W

PostPosted: Tue Mar 05, 2024 12:29 pm    Post subject: Reply with quote

hedmo,

USE flags came be set in several places.

If you choose one of the profiles provided by the binhost then set no USE flags of your own, it should just work.
The more your USE flags differ from the binhost, the more you must build for yourself.

Building on the target system is not required. You can make your own binhost on another system.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9591
Location: beyond the rim

PostPosted: Tue Mar 05, 2024 1:22 pm    Post subject: Reply with quote

hedmo wrote:
you may be right but to ease the compile time i will be fine with the packages i have in my forcebin file :


I understand that, but this just can't work at the moment due to how binpkg support is implemented.

You cannot redefine EMERGE_DEFAULT_OPTS by definition: There is only a single emerge process that handles the whole dependency tree, not separate emerge processes for every package. So EMERGE_DEFAULT_OPTS is only processed when that main process is launched, long before any per-package settings take effect. Even if it would re-evaluate the variable for every package, that would result in undefined behavior as the commandline options will impact dependency resolution. That is why there are dedicated solutions for things like per-package USE flags and per-package ACCEPT_KEYWORDS which have a similar impact.

You do need a more precise method for controlling wether a package will be installed from source or from binary packages. Including methods to control how strict things like USE flags must match the current system configuration.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22369

PostPosted: Tue Mar 05, 2024 3:48 pm    Post subject: Reply with quote

hedmo wrote:
Code:
EMERGE_DEFAULT_OPTS="--jobs 1 --quiet-build=y --load-average 8 --binpkg-respect-use=y --getbinpkg=y --usepkg=y"
where can i find the useflags from the binhost?
If you want to maximize use of the binhost, consider setting --binpkg-respect-use=n, so that USE flag mismatches are resolved in favor of using the binary with mismatched flags. Your current setting, according to man emerge, causes emerge to ignore any binary packages that have USE flags different from what you would use if you built locally.

This will also indirectly show you the flags of the binhost, since you will see packages installed (or, with --pretend, proposed) with the binhost's flags.
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2155

PostPosted: Tue Mar 05, 2024 6:44 pm    Post subject: Reply with quote

hedmo wrote:
.

EDIT : i dont think this is a hack but a good solution for picking binaries if one like . for example gcc . in portage we have 13.2.1_p20240210 and in binhost we have gcc-13.2.1_p20240113-r1. if i do not want to update gcc to sources based version i can have the option to be at gcc-13.2.1_p20240113-r1 till the binhost updates .

regards


You can --exclude "gcc ...<space separated list of packages you don't want to be evaluated in dependency resolution>".

Best Regards,
Georgi
Back to top
View user's profile Send private message
eschwartz
Developer
Developer


Joined: 29 Oct 2023
Posts: 131

PostPosted: Wed Mar 06, 2024 4:45 am    Post subject: Reply with quote

Hu wrote:
hedmo wrote:
Code:
EMERGE_DEFAULT_OPTS="--jobs 1 --quiet-build=y --load-average 8 --binpkg-respect-use=y --getbinpkg=y --usepkg=y"
where can i find the useflags from the binhost?
If you want to maximize use of the binhost, consider setting --binpkg-respect-use=n, so that USE flag mismatches are resolved in favor of using the binary with mismatched flags. Your current setting, according to man emerge, causes emerge to ignore any binary packages that have USE flags different from what you would use if you built locally.

This will also indirectly show you the flags of the binhost, since you will see packages installed (or, with --pretend, proposed) with the binhost's flags.


It turns out this is actually a terrible idea and is warned against here: https://wiki.gentoo.org/wiki/Gentoo_Binary_Host_Quickstart#--binpkg-respect-use.3Dy

tl;dr if you tell portage to ignore USE flags, sometimes it ignores USE flags your system depends on, such as USE=split-usr, which you ordinarily cannot mess with since it is forced by the profile.

If you remove --binpkg-respect-use=y then the default is auto, which is equivalent to "yes, but also warn you when it ignored binaries due to mismatched USE"
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2155

PostPosted: Wed Mar 06, 2024 6:06 am    Post subject: Reply with quote

eschwartz wrote:


tl;dr if you tell portage to ignore USE flags, sometimes it ignores USE flags your system depends on, such as USE=split-usr, which you ordinarily cannot mess with since it is forced by the profile.

If you remove --binpkg-respect-use=y then the default is auto, which is equivalent to "yes, but also warn you when it ignored binaries due to mismatched USE"


This is a concern only if you're using deprecated or custom profile. If thtat's the case, you already well aware of that type of issues and know how to handle them if you need to.

Best Regards,
Georgi
Back to top
View user's profile Send private message
hedmo
Veteran
Veteran


Joined: 29 Aug 2009
Posts: 1325
Location: sweden

PostPosted: Sat Mar 09, 2024 9:52 pm    Post subject: Reply with quote

conclusion at the moment !


    downgrade to amd64 stable and add my ~amd64 packages to /etc/portage/package.accept_keywords
    EMERGE_DEFAULT_OPTS=" --quiet-build=y --binpkg-respect-use=y --getbinpkg=y --usepkg=y --binpkg-changed-deps=n"
    clean out my USE=
    rebuild my world


this left me with about 150 package to compile and i am quite happy with that . the most important packages is @system and the EMERGE_DEFAULT_OPTS="--binpkg-changed-deps=n". if @system is from the binhost a lot of binary packages will be taken from the binhost to .

best regards hedmo
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 1843

PostPosted: Sun Mar 10, 2024 12:25 am    Post subject: Reply with quote

logrusx wrote:
eschwartz wrote:


tl;dr if you tell portage to ignore USE flags, sometimes it ignores USE flags your system depends on, such as USE=split-usr, which you ordinarily cannot mess with since it is forced by the profile.

If you remove --binpkg-respect-use=y then the default is auto, which is equivalent to "yes, but also warn you when it ignored binaries due to mismatched USE"


This is a concern only if you're using deprecated or custom profile. If thtat's the case, you already well aware of that type of issues and know how to handle them if you need to.

Best Regards,
Georgi


eschwartz was giving an example of a USE flag, not the only possible one. But also, non-merged-usr isn't deprecated, and split-usr as a USE flag is still used for that in a bunch of cases.
Back to top
View user's profile Send private message
hedmo
Veteran
Veteran


Joined: 29 Aug 2009
Posts: 1325
Location: sweden

PostPosted: Thu Jul 25, 2024 3:03 pm    Post subject: Reply with quote

is there a way to setup the binhost to : /etc/portage/repos,conf or rename it to gentoo-binhost? .

regards hedmo
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2155

PostPosted: Fri Jul 26, 2024 5:36 am    Post subject: Reply with quote

hedmo wrote:
is there a way to setup the binhost to : /etc/portage/repos,conf or rename it to gentoo-binhost? .

regards hedmo


I don't understand your question. Could you clarify? What is it that you're trying to achieve?

Best Regards,
Georgi
Back to top
View user's profile Send private message
hedmo
Veteran
Veteran


Joined: 29 Aug 2009
Posts: 1325
Location: sweden

PostPosted: Sat Jul 27, 2024 3:21 pm    Post subject: Reply with quote

logrusx wrote:


I don't understand your question. Could you clarify? What is it that you're trying to achieve?

Best Regards,
Georgi


for example if i want to use a local binhost and want to mask certain packages from gentoo binhost or mask packages from ::gentoo to force use binhost . i have a server that makes/maked binaries for my arm devices but atm i have not manage to mix them . or on my x86_amd64 devices that uses binhost . yesterday i was updating and llvm with friends came , i did check if i could use binaries and i could. when they were installed i could continue my updating and llvm with friends did not needed to be build from sources it would be grate to be able to mask ....::gentoo to get .....::gentoo-binhost installed . or on my arm devices mask ::gentoo-binhost to be able to use my ::binhost-local.

regards hedmo

ps: i know gentoo binhost is in early stage and understand if this is not possible . it is just stuff that comes in my mind and maybe some can be sorted .
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2155

PostPosted: Sat Jul 27, 2024 3:38 pm    Post subject: Reply with quote

hedmo wrote:
logrusx wrote:


I don't understand your question. Could you clarify? What is it that you're trying to achieve?

Best Regards,
Georgi


for example if i want to use a local binhost and want to mask certain packages from gentoo binhost or mask packages from ::gentoo to force use binhost . i have a server that makes/maked binaries for my arm devices but atm i have not manage to mix them . or on my x86_amd64 devices that uses binhost . yesterday i was updating and llvm with friends came , i did check if i could use binaries and i could. when they were installed i could continue my updating and llvm with friends did not needed to be build from sources it would be grate to be able to mask ....::gentoo to get .....::gentoo-binhost installed . or on my arm devices mask ::gentoo-binhost to be able to use my ::binhost-local.

regards hedmo

ps: i know gentoo binhost is in early stage and understand if this is not possible . it is just stuff that comes in my mind and maybe some can be sorted .


I don't think you can mask packages from a binhost (yet?) but you can have a local binhost with higher priority. You can then supply it with the desired packages so they are selected with higher priority over the ones from Gentoo binhost.

Code:
priority = 9999


is the highest.

Best Regards,
Georgi
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum