Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

Enabling all USE flags for a package?

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
10 posts • Page 1 of 1
Author
Message
Etal
Veteran
Veteran
User avatar
Posts: 1932
Joined: Fri Jul 15, 2005 3:01 pm

Enabling all USE flags for a package?

  • Quote

Post by Etal » Sat Dec 16, 2017 1:46 am

Someone out there decided that Qt has too much documentation, and so made a bunch of USE flags with some modules disabled.

Code: Select all

[ebuild     U  ] dev-qt/qt-docs-5.9.3_p201711211135:5::gentoo [5.9.2_p201710050733:5::gentoo] USE="webengine%* -charts% -datavis% -networkauth% -script% -speech% -virtualkeyboard%" 210,634 KiB
Well, if I'm installing the ~500 MB docs package for offline use, I might as well sacrifice another 45 MB to install all of them. :roll:

The question is, how can I set all the flags to enabled without adding them one by one? If a new flag gets added, I don't want to have to update my package.use.

The opposite is easy - to disable all flags, set them to -*. But setting the flags to * doesn't do anything.
Top
LIsLinuxIsSogood
Veteran
Veteran
Posts: 1186
Joined: Sat Feb 13, 2016 11:41 pm

  • Quote

Post by LIsLinuxIsSogood » Sun Dec 17, 2017 5:26 am

If a new flag gets added, I don't want to have to update my package.use.
Seems like you are asking for something that is impossible to know, which is like auto accepting the changes from an upstream or package maintainer. Have you thought of taking it in steps and first scripting something that would allow you to check to see if any changes to the flags have been made? Then if so at that point you might find it easier to just add them at a later time. Personally, on both my laptop and desktops I am sure that I could take a close look as I have to from time to time and see how I screwed up so many of the USE flag settings but when it comes time to do any heavy projects with a piece of software that is when I will go and check if it was installed with the ones needed.

What do these qt5 doc flags look like, I haven't caught even a glimpse of it yet since I run on gnome.
Top
Mr. T.
Guru
Guru
Posts: 477
Joined: Mon Dec 26, 2016 4:19 pm

  • Quote

Post by Mr. T. » Sun Dec 17, 2017 10:58 am

The original documentation consists of various documents (look at the ebuild) and the package brings them together.

Personally, I've tried app-portage/flaggie. Note, it is necessary to take into account the syntax specified in the file package.use.

Code: Select all

flaggie dev-qt/qt-docs +
flaggie '=dev-qt/qt-docs-5.9.3_p201711211135' +
flaggie '>=dev-qt/qt-docs-5.9.3_p201711211135' +
The previous three commands don't produce the same result!

helecho.
Top
bunder
Bodhisattva
Bodhisattva
Posts: 5956
Joined: Sat Apr 10, 2004 5:13 am

  • Quote

Post by bunder » Sun Dec 17, 2017 11:03 am

I know that "flag" and "+flag" are supposed to be synonymous, but did you happen to try "+*"?
Top
krinn
Watchman
Watchman
User avatar
Posts: 7476
Joined: Fri May 02, 2003 6:14 am

  • Quote

Post by krinn » Sun Dec 17, 2017 12:37 pm

bunder wrote:I know that "flag" and "+flag" are supposed to be synonymous, but did you happen to try "+*"?
I did, i like this kind of weird test :)

Code: Select all

USE="+*" emerge -pv vlc --nodeps
USE flags should not start with a '+': +*

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

USE flags should not start with a '+': +*
USE flags should not start with a '+': +*
USE flags should not start with a '+': +*
USE flags should not start with a '+': +*
[ebuild     U  ] media-video/vlc-2.2.6-r2:0/5-8::gentoo [2.2.6-r1:0/5-8::gentoo] USE="X a52 aalib alsa avcodec avformat cdda dbus dvbpsi dvd encode fdk ffmpeg flac gcrypt gnutls gstreamer jpeg libcaca libnotify libsamplerate live matroska modplug mp3 mpeg musepack ncurses ogg opengl png qt4 qt5 sdl sdl-image skins svg swscale theora truetype udev v4l vdpau vlm vorbis x264 xcb xml xv (-altivec) -atmo (-audioqueue) -bidi -bluray -cddb -chromaprint -dc1394 -debug -directfb (-directx) -dts -dvb (-dxva2) -faad -fluidsynth -fontconfig -gme -gnome -growl -httpd -ieee1394 -jack -kate -libass -libav -libtar -libtiger -linsys -lirc -lua (-macosx-dialog-provider) (-macosx-eyetv) (-macosx-qtkit) (-macosx-quartztext) -mtp (-neon) -omxil -opencv -optimisememory -opus -postproc -projectm -pulseaudio -rdp -rtsp -run-as-root -samba -schroedinger -sftp -shout -sid -speex -taglib {-test} -tremor -twolame -upnp -vaapi -vcdx -vnc -vpx -wma-fixed -x265 -zeroconf -zvbi (-kde%)" CPU_FLAGS_X86="mmx sse" 0 KiB
Top
bunder
Bodhisattva
Bodhisattva
Posts: 5956
Joined: Sat Apr 10, 2004 5:13 am

  • Quote

Post by bunder » Sun Dec 17, 2017 12:44 pm

Eww. So much for that idea. :oops:

(OT: did that change recently, or am I just dreaming?)
Top
krinn
Watchman
Watchman
User avatar
Posts: 7476
Joined: Fri May 02, 2003 6:14 am

  • Quote

Post by krinn » Sun Dec 17, 2017 12:57 pm

bunder wrote:Eww. So much for that idea. :oops:

(OT: did that change recently, or am I just dreaming?)
Should mistake with some tools output, that specify + for clarity, like equery do

Code: Select all

 + - avcodec           : Enables libavcodec support for video/audio
Top
Mr. T.
Guru
Guru
Posts: 477
Joined: Mon Dec 26, 2016 4:19 pm

  • Quote

Post by Mr. T. » Sun Dec 17, 2017 1:43 pm

The application is broken by design when package.use ([bug=451396]package.*[/bug]) is a directory! Proceed with caution.

The + "action symbol" enables one USE flag but without argument specified, flaggie evaluates the "action specification" as +?*.
/usr/share/doc/flaggie<..>/README.bz2 wrote:An action specification consists of an action symbol and an optional or
obligatory argument (flag). The action symbols are:

- `+` to enable a flag,
- `-` to disable a flag,
- `%` to reset the flag(s) to the default state (remove them completely
from the files),
- `?` to print the effective flag declaration from the files.

Each of the actions should be followed by an argument. It could be
a flag name, a keyword or a license string. Arguments can be shell
patterns (same as in filename matching). If no argument is passed,
flaggie assumes `?*`.

With `+` and `-` actions, pattern matching is performed against package
`IUSE`, `KEYWORDS` or `LICENSE` variable. With `%` and `?`, it is done
against values specified in `package.*` files.
helecho.
Top
Ant P.
Watchman
Watchman
Posts: 6920
Joined: Sat Apr 18, 2009 7:18 pm
Contact:
Contact Ant P.
Website

Re: Enabling all USE flags for a package?

  • Quote

Post by Ant P. » Sun Dec 17, 2017 8:55 pm

Etal wrote:The question is, how can I set all the flags to enabled without adding them one by one? If a new flag gets added, I don't want to have to update my package.use.
If you're feeling lucky, put this in a /etc/portage/repo.postsync.d/ script.

Code: Select all

#!/bin/sh
grep IUSE $(equery w dev-qt/qt-docs) \
    | sed 's@^IUSE="\(.*\)"$@dev-qt/qtdocs \1@' \
    >> /etc/portage/package.use/qtdocs.conf
Top
Hu
Administrator
Administrator
Posts: 24389
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Mon Dec 18, 2017 12:23 am

Wouldn't that accumulate new entries with each sync, since you're using append rather than overwrite?

You could eliminate the use of grep by relying on sed to delete lines that are not interesting. sed -e '/^IUSE=/!d' -e 's@^IUSE="\(.*\)"$@dev-qt/qtdocs \1@' (underlined portion copied unchanged from Ant P.'s example, so that readers can copy the full command in one step).
Top
Post Reply

10 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic