Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
package.use new format
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Kurmis
n00b
n00b


Joined: 04 Jun 2010
Posts: 43
Location: LV

PostPosted: Sun Dec 15, 2024 10:37 am    Post subject: package.use new format Reply with quote

Good day, experts.

I am trying to install 32bit gentoo on P4.
According to
https://wiki.gentoo.org/wiki/Handbook:X86/Installation/Base
i must(can) specify CPU flags #echo "*/* $(cpuid2cpuflags)" > /etc/portage/package.use/00cpu-flags

Code:
# echo "*/* $(cpuid2cpuflags)" > /etc/portage/package.use/00cpu-flags


The same relates to file /etc/portage/package.use/00video_cards .
Previosly both entries was stored in make.conf
in format CPU_FLAGS_X86="aes avx avx2"

What if i wanna that /etc/portage/package.use is single file ?
Can somebody gimme piece-example of working package.use as single file,
where is new-format CPU_FLAGS_X86 and VIDEO_CARDS included ?

Tnx in advance @all.


Last edited by Kurmis on Sun Dec 15, 2024 11:28 am; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Dec 15, 2024 10:53 am    Post subject: Reply with quote

Kurmis,

Code:
# echo "*/* $(cpuid2cpuflags)" > /etc/portage/package.use/00cpu-flags

replaces a file if it exists.

Code:
# echo "*/* $(cpuid2cpuflags)" >> /etc/portage/package.use/00cpu-flags
appends to an existing file or creates it if its new.
One easy typo, and your existing file is gone.

/etc/portage/package.use/ can be a file or a directory. To convert from a directory to a file

Code:
cat /etc/portage/package.use/* /etc/portage/package.use_file

To preserve the existing directory content.
Code:
mv /etc/portage/package.use /etc/portage/package.use_dir

In case you make a mess of it.
Code:
mv /etc/portage/package.use_file /etc/portage/package.use

To put the preserved file in place.

Putting the entries in make.conf still works. Being an old, long time user, I still do that.
_________________
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
Kurmis
n00b
n00b


Joined: 04 Jun 2010
Posts: 43
Location: LV

PostPosted: Sun Dec 15, 2024 11:22 am    Post subject: Reply with quote

Thanks for reply.

I did it exactly this way previosly.
I just wanna see example of new-style-format of package.use as file

Is it like this ?
Code:
*/* CPU_FLAGS_X86: aes avx avx2 f16c
sci-libs/fftw mpi
media-libs/libmediainfo mms
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Dec 15, 2024 11:31 am    Post subject: Reply with quote

Kurmis,

It's not changed.

When package.use is a directory, portage concats the directory content in lexicographical order, then uses that as if it were the package.use file.
_________________
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
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5271
Location: Bavaria

PostPosted: Sun Dec 15, 2024 11:43 am    Post subject: Reply with quote

Kurmis wrote:
[...] Is it like this ?
Code:
*/* CPU_FLAGS_X86: aes avx avx2 f16c
sci-libs/fftw mpi
media-libs/libmediainfo mms

YES.

I use also /etc/portage/package.use as a file and not a directory because I also want to see all my settings at a glance. Another user - @logrusx - explained a simpler solution: Leave /etc/portage/package.use as directory and just create a file in there with all your settings, e.g. /etc/portage/package.use/00my ;-)
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
tckosvic
Apprentice
Apprentice


Joined: 18 Apr 2023
Posts: 152

PostPosted: Thu Dec 26, 2024 4:43 pm    Post subject: Reply with quote

I have package use flags in a file in package.use directory.

A snippet from that file is below:

Code:

>=sci-libs/cgnslib-4.3.0-r2 hdf5
>=dev-libs/boost-1.83.0-r2 python
>=x11-libs/wxGTK-3.2.2.1-r3 gstreamer
>=sys-apps/systemd-utils-254.7 kernel-install
>=media-video/ffmpeg-6.1-r2 chromium
>=dev-python/numpy-1.26.2 python_targets_python3_10
>=dev-python/pyside2-5.15.11-r1 python_targets_python3_10
>=dev-python/cython-3.0.7 python_targets_python3_10


I just copy the string that emerge lists and add it to the file with the use flag suggested by emerge as space delimited.

What does the ">=", greater than-equals symbol mean? Is it necessary?
I notice use entry strings displayed in this thread do not have that string in the beginning. That's why I wrote this.

thanks, tom kosvic
Back to top
View user's profile Send private message
eeckwrk99
Apprentice
Apprentice


Joined: 14 Mar 2021
Posts: 234
Location: Gentoo forums

PostPosted: Thu Dec 26, 2024 5:02 pm    Post subject: Reply with quote

tckosvic wrote:
What does the ">=", greater than-equals symbol mean? Is it necessary?


For instance:

Code:
>=x11-libs/wxGTK-3.2.2.1-r3 gstreamer

means that gstreamer USE flag will be used for x11-libs/wxGTK-3.2.2.1-r3 and newer versions, but not for 3.0.5.1-r1 (older version).

tckosvic wrote:
Is it necessary?


Only if you want to set the USE flag(s) for a specific version and newer ones. If you want to set the USE flag for any version of the package, you can remove ">=".
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10681
Location: Somewhere over Atlanta, Georgia

PostPosted: Thu Dec 26, 2024 6:03 pm    Post subject: Reply with quote

eeckwrk99 wrote:
Only if you want to set the USE flag(s) for a specific version and newer ones. If you want to set the USE flag for any version of the package, you can remove ">=".
Almost correct. If you remove the version operator from the front of the DEPEND atom, then you must also remove the version from the back. So
Code:
>=x11-libs/wxGTK-3.2.2.1-r3 gstreamer
becomes
Code:
x11-libs/wxGTK gstreamer
"man portage" has a full explanation.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.


Last edited by John R. Graham on Thu Dec 26, 2024 6:06 pm; edited 2 times in total
Back to top
View user's profile Send private message
eeckwrk99
Apprentice
Apprentice


Joined: 14 Mar 2021
Posts: 234
Location: Gentoo forums

PostPosted: Thu Dec 26, 2024 6:05 pm    Post subject: Reply with quote

John R. Graham wrote:
eeckwrk99 wrote:
Only if you want to set the USE flag(s) for a specific version and newer ones. If you want to set the USE flag for any version of the package, you can remove ">=".
Almost correct. If you remove the version operator from the front of the DEPEND atom, then you must also remove the version from the back. So
Code:
>=x11-libs/wxGTK-3.2.2.1-r3 gstreamer
becomes
Code:
x11-libs/wxGTK gstreamer
- John


Indeed, I should've mentioned that.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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