Forums

Skip to content

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

are per-application use-flags centrally stored?

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
7 posts • Page 1 of 1
Author
Message
Tschew
n00b
n00b
Posts: 9
Joined: Fri Apr 30, 2004 10:44 am

are per-application use-flags centrally stored?

  • Quote

Post by Tschew » Wed Apr 05, 2006 10:56 am

As a summer project I wanted to build a simple editor for /etc/portage/package.use but I'm not sure whether it's worth the effort.

Are per-application use-flags stored in any other place than the individual ebuilds? (it would take ages to read all ebuilds and assemble a database, and it would have to be kept up to date, although that would be easy given the first step, with timestamps)

What I was thinking of was just a list ordered by the typical portage categories and then per-application (maybe even per-version if that is supported in package.use, haven't checked yet) The individual packages would have check marks to enable and disable the different use flags

This would write a package.use with entries for ALL applications (although this has to be thought over as I'm not sure what the performance impact would be, and whether it would be desirable, if it is too slow, only packages diverging from the default useflags would be written to file)

So.. does portage store per-application useflags somewhere central or is everything on an ebuild basis? (of course, not being centralised would not prevent my writing the app, just significantly complicate it!)

PS: I know about /usr/portage/use.local.desc, but it obviously lists only a fraction of useflags and it does (obviously) not list global flags that apply to certain packages.
Top
bemis
Tux's lil' helper
Tux's lil' helper
Posts: 136
Joined: Tue Mar 30, 2004 5:27 pm
Location: USA
Contact:
Contact bemis
Website

  • Quote

Post by bemis » Wed Apr 05, 2006 10:59 am

you mention that you know about $PORTDIR/profiles/use.local.desc -- that coupled with $PORTDIR/profiles/use.desc should cover all of the available use flags for any given application -- a simple script using euse would probably be a step in the direction you were looking for?

you could also "cheat" and look at the existing code for apps like ufed to see if you can work from their existing codebase?
Y'know, somewhere along the line, my brain got wired directly to my fingers .. I'm not even consulted anymore in the decision making processes.
-bemis
Top
Tschew
n00b
n00b
Posts: 9
Joined: Fri Apr 30, 2004 10:44 am

  • Quote

Post by Tschew » Wed Apr 05, 2006 11:23 am

you mention that you know about $PORTDIR/profiles/use.local.desc -- that coupled with $PORTDIR/profiles/use.desc should cover all of the available use flags for any given application -- a simple script using euse would probably be a step in the direction you were looking for?
not really, use.desc only lists descriptions, not which package uses which useflag, use.local.desc is of course very valuable

you could also "cheat" and look at the existing code for apps like ufed to see if you can work from their existing codebase?
yes, that was the plan of attack, but I first wanted to see whether anyone else is working on something better than ufed

yep, as the extent of its editing capabilities suggested, and the source confirmed, ufed just reads use.desc/local.use.desc.. so I will definately have to read the ebuilds one-by-one... I'll have to write a test for that and see how long it will take to produce the list from that

Also, I specifically do not want to touch /etc/make.conf as people are usually quite creative and produce very good, nicely commented USE="$USE blah blah" ... etc stuff and I don't even want to think about trying to write something like that from a C++ app... (although reading it is straightforward) I'm only concerned about package.use
Top
ticho
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 138
Joined: Thu Oct 23, 2003 7:12 am
Location: yes

  • Quote

Post by ticho » Wed Apr 05, 2006 2:54 pm

My opinion is that USEflags are so numerous and different (and often a single USEflag has a different meaning for different packages), that any attempt at an user-friendly flag editor like ufed is predestined to be unusable.

It is easy enough to edit a single line in a text file already, why cover system configuration under additional layer of user interfaces?

This said, I wish you all the best in the development of such tool, if you consider it needed. Scratch your itch. :)
The more you depend on forces outside yourself, the more you are dominated by them.
Top
Genone
Retired Dev
Retired Dev
User avatar
Posts: 9656
Joined: Fri Mar 14, 2003 6:02 pm
Location: beyond the rim

  • Quote

Post by Genone » Wed Apr 05, 2006 6:10 pm

You probably want to have a look at this thread, you really don't want to parse ebuilds yourself.
Top
Tschew
n00b
n00b
Posts: 9
Joined: Fri Apr 30, 2004 10:44 am

Per-application

  • Quote

Post by Tschew » Thu Apr 06, 2006 4:20 pm

My opinion is that USEflags are so numerous and different (and often a single USEflag has a different meaning for different packages
That's why I want to build a per-package useflag editor.
that any attempt at an user-friendly flag editor like ufed is predestined to be unusable
Yep, I totally agree, but a ufed clone is not what I want to do. It only reads use.local.desc and sets whatever flags you select in make.conf, which completely defeats the purpose of local useflags doesn't it? All I want to write is a tool to add lines to /etc/portage/package.use on a per-package basis because it is just so damn useful to keep tools like revdep-rebuild etc.. from breaking your precious configuration. And since there are so many packages (and their useflags differ in effect from package to package) I think that a category/list based editor would be easier to use than having to add applications + useflags by hand by looking them up with emerge -pv package and then adding the ones you want to the package.use ... also, what about all those packages you emerged by just specifying 'USE="..." emerge package' because you were lazy?

I think it should be worth my while.
You probably want to have a look at this thread, you really don't want to parse ebuilds yourself.
Well.. kuroo seems to be able to extract the useflags just fine. I'll have to check its initialisation code. Also, portage itself extracts useflags just fine...

Thanks for your help guys.
Top
Genone
Retired Dev
Retired Dev
User avatar
Posts: 9656
Joined: Fri Mar 14, 2003 6:02 pm
Location: beyond the rim

Re: Per-application

  • Quote

Post by Genone » Thu Apr 06, 2006 11:12 pm

Tschew wrote:
You probably want to have a look at this thread, you really don't want to parse ebuilds yourself.
Well.. kuroo seems to be able to extract the useflags just fine. I'll have to check its initialisation code. Also, portage itself extracts useflags just fine...
That's why I suggested you look at the referenced thread, it contains the relevant code/tools to lookup ebuild use flags ;)
(don't use the current kuroo code, AFAIK it's using a broken concept, I'm working with the author to fix that)
Top
Post Reply

7 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