Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Portage deficiency.
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
pygoscelis
Guru
Guru


Joined: 07 Jun 2003
Posts: 402

PostPosted: Mon Jun 16, 2003 8:49 am    Post subject: Portage deficiency. Reply with quote

I'm not sure if this is the right forum. Anyway, here goes.

Here is a comment on Kuro5hin.

I think the complaint is fair. The problem is, USE flags are global. This could be changed for good. The packages should be divided by categories with different USE flags for each category, overriding global flags. If the user says "emerge links" and there's no X installed on his system, chances are he doesn't want a graphical browser. Sane defaults for different packages are different, and portage should account for this fact.

Another welcome addition would be an interactive (console or graphical) front end to emerge that allows the user to select optional dependencies of the package. It would help if at least these user-selected (as opposed to default) settings were made persistent across builds, too.

What do you people think?
Back to top
View user's profile Send private message
deepthought
Guru
Guru


Joined: 04 Apr 2003
Posts: 321
Location: icbm://5131''N:0710''E

PostPosted: Mon Jun 16, 2003 1:09 pm    Post subject: Reply with quote

The portage developers already noticed this and are working on a "per-package use flags" update to portage/emerge.

If you are interested in the development progress, see bug 13616.

Regards,
Alexander
_________________
Out of loyalty to its disregarded comrades, this message feels free to ignore the reader.
Registered Linux User #317705
Back to top
View user's profile Send private message
bsolar
Bodhisattva
Bodhisattva


Joined: 12 Jan 2003
Posts: 2764

PostPosted: Mon Jun 16, 2003 1:24 pm    Post subject: Reply with quote

I think he is complaining more about the default USE, something that can be easily solved with USE="-* ..." :roll:

BTW I readed the other comments... 8O :lol:
_________________
I may not agree with what you say, but I'll defend to the death your right to say it.
Back to top
View user's profile Send private message
pygoscelis
Guru
Guru


Joined: 07 Jun 2003
Posts: 402

PostPosted: Mon Jun 16, 2003 2:53 pm    Post subject: Reply with quote

bsolar wrote:
I think he is complaining more about the default USE, something that can be easily solved with USE="-* ..." :roll:

BTW I readed the other comments... 8O :lol:


Yes, I'm complaining about the defaults. They should be sensible. If you need to fix the defaults at each invocation of emerge with USE="-* ...", they are not sensible.

"emerge links" shouldn't by default bring you X and OpenGL, unless you have X and OpenGL already installed (and even then it's debatable). There should be a way for the ebuild provider to specify what defaults are sensible for his package, and for the user to quickly and painlessly override his choice, both globally and per package.
Back to top
View user's profile Send private message
deepthought
Guru
Guru


Joined: 04 Apr 2003
Posts: 321
Location: icbm://5131''N:0710''E

PostPosted: Wed Jun 18, 2003 12:57 pm    Post subject: Reply with quote

I'm quite sure that it is impossible to find "sensible defaults" so that everyone is satisfied. Just think of "desktop" vs. "server" users...

Regards,
Alexander
_________________
Out of loyalty to its disregarded comrades, this message feels free to ignore the reader.
Registered Linux User #317705
Back to top
View user's profile Send private message
bsolar
Bodhisattva
Bodhisattva


Joined: 12 Jan 2003
Posts: 2764

PostPosted: Wed Jun 18, 2003 1:49 pm    Post subject: Reply with quote

pygoscelis wrote:
Yes, I'm complaining about the defaults. They should be sensible. If you need to fix the defaults at each invocation of emerge with USE="-* ...", they are not sensible.

You don't "need to fix the defaults at each invocation of emerge" you just need to edit the setting in the make.conf. If you think they are not sensible, get rid of them.

pygoscelis wrote:
"emerge links" shouldn't by default bring you X and OpenGL, unless you have X and OpenGL already installed (and even then it's debatable). There should be a way for the ebuild provider to specify what defaults are sensible for his package, and for the user to quickly and painlessly override his choice, both globally and per package.

The fact that you have or not have X and/or OpenGL doesn't matter. They get installed because the USE enables the optional support links has and they become dependencies. This can be easily avoided as I explained above.
_________________
I may not agree with what you say, but I'll defend to the death your right to say it.
Back to top
View user's profile Send private message
pygoscelis
Guru
Guru


Joined: 07 Jun 2003
Posts: 402

PostPosted: Wed Jun 18, 2003 4:26 pm    Post subject: Reply with quote

bsolar wrote:
You don't "need to fix the defaults at each invocation of emerge" you just need to edit the setting in the make.conf. If you think they are not sensible, get rid of them.

If I think it's sensible to have X support in emacs but not in vim, how do I do that? I can only turn optional support on and off globally. This is the thing I'm complaining about.

bsolar wrote:
The fact that you have or not have X and/or OpenGL doesn't matter. They get installed because the USE enables the optional support links has and they become dependencies. This can be easily avoided as I explained above.

I think default settings (like everything else in software) should follow the principle of least surprise. If the user says "emerge links" and portage starts pulling X in, this is a bit surprising. A light package shouldn't depend on a heavy package if it's avoidable. OTOH if the user has X already installed and portage does not enable X support in links, this is somewhat surprising too. I mean, the heavy package is already here, using it is cheap, why not use it?
Back to top
View user's profile Send private message
pygoscelis
Guru
Guru


Joined: 07 Jun 2003
Posts: 402

PostPosted: Wed Jun 18, 2003 4:43 pm    Post subject: Reply with quote

deepthought wrote:
I'm quite sure that it is impossible to find "sensible defaults" so that everyone is satisfied. Just think of "desktop" vs. "server" users...

Gentoo could ship with a set of different profiles and ask the user to choose the default at install time. It will not satisfy everyone, just the majority :)
Back to top
View user's profile Send private message
zhenlin
Veteran
Veteran


Joined: 09 Nov 2002
Posts: 1361

PostPosted: Thu Jun 19, 2003 8:11 am    Post subject: Reply with quote

Gentoo already ships with many profiles.

Just look at /usr/portage/profiles

But seriously, this kind of what default flags to use and what things to install by default will require a slightly different kind of 'profile', one that can inherit the current architecture profile.

Perhaps profiles should become more object-oriented with inheritance and virtual base classes and the like, then this becomes more feasible.

But per-package USE flags are a long way off. Firstly, how do we solve the problem, where do we put them? In /var/db/pkg? That's for installed packages. What happens when they are uninstalled? /var/edb/cache/use? Maybe.
Back to top
View user's profile Send private message
pygoscelis
Guru
Guru


Joined: 07 Jun 2003
Posts: 402

PostPosted: Thu Jun 19, 2003 9:53 am    Post subject: Reply with quote

zhenlin wrote:
But per-package USE flags are a long way off. Firstly, how do we solve the problem, where do we put them? In /var/db/pkg? That's for installed packages. What happens when they are uninstalled? /var/edb/cache/use? Maybe.

I dunno, if there's no good place to put them in, why not just create such a place? I was thinking more in terms of /etc, but I'm not very experienced *nix administrator.

Per-package USE flags that come with the package itself may or may not be a good idea. But I like my other idea, that of interactive emerge that allows the user to select USE flags (and perhaps other variables) interactively. I always use emerge -pv before installing anything these days. Building an interactive tool on top of it is a piece of cake. I'll give it a shot after I learn some python :)
Back to top
View user's profile Send private message
bsolar
Bodhisattva
Bodhisattva


Joined: 12 Jan 2003
Posts: 2764

PostPosted: Thu Jun 19, 2003 10:08 am    Post subject: Reply with quote

pygoscelis wrote:
A light package shouldn't depend on a heavy package if it's avoidable. OTOH if the user has X already installed and portage does not enable X support in links, this is somewhat surprising too. I mean, the heavy package is already here, using it is cheap, why not use it?

IMHO whatever package should depend on whatever other packages if it needes it to work correctly. If you have X in you use, you active the optional support that i.e. links has for it. This means that it then needs xfree to work correctly (the way YOU wanted it to work, i.e. with xfree support enabled, since you left the X flag active).

I use VIM without X support giving 'USE="-X" emerge vim', but I agree that some way to store my setting for VIM (or other packages when needed) might be interesting, so that I can update it with the rest of world. BTW I can live without it.
_________________
I may not agree with what you say, but I'll defend to the death your right to say it.
Back to top
View user's profile Send private message
pygoscelis
Guru
Guru


Joined: 07 Jun 2003
Posts: 402

PostPosted: Thu Jun 19, 2003 10:48 am    Post subject: Reply with quote

bsolar wrote:
MHO whatever package should depend on whatever other packages if it needes it to work correctly. If you have X in you use, you active the optional support that i.e. links has for it. This means that it then needs xfree to work correctly (the way YOU wanted it to work, i.e. with xfree support enabled, since you left the X flag active).

I installed links a few times on other computers with different OSes, and the default never was to compile X support in. The user might not even know links has optional X support! I don't think it's correct to say that's what the user wanted. "Didn't know better" is more like it.

Of course it's very easy to check with "emerge -pv" (I always do that) but again, new users don't because they don't know they should. If the default behaviour of emerge were to display verbose info about dependencies a la -pv and then ask for confirmation, the problem would mostly go away. Better yet, display the info and then let the user edit per-package USE flags (note how subtly I'm pushing my favourite solution :)

OK, I feel this should be moved to the chat forum.
Back to top
View user's profile Send private message
bsolar
Bodhisattva
Bodhisattva


Joined: 12 Jan 2003
Posts: 2764

PostPosted: Thu Jun 19, 2003 11:05 am    Post subject: Reply with quote

pygoscelis wrote:
OK, I feel this should be moved to the chat forum.

I agree, moved from Portage & Programming.

pygoscelis wrote:
I installed links a few times on other computers with different OSes, and the default never was to compile X support in. The user might not even know links has optional X support! I don't think it's correct to say that's what the user wanted. "Didn't know better" is more like it.

I personally don't how what other OSes manage the issue, in Gentoo you are able to switch the optional supporto on/off via USE flags, if you don't know it's not Gentoo's fault, there's plenty of documentation and in the make.conf there's the USE HOWTO for reference, where it's clearly explained how to find the defaults. IMHO the average user wants X, that's why it is in the default flags and as I said it's very easy to tweak this.

pygoscelis wrote:
Of course it's very easy to check with "emerge -pv" (I always do that) but again, new users don't because they don't know they should. If the default behaviour of emerge were to display verbose info about dependencies a la -pv and then ask for confirmation, the problem would mostly go away. Better yet, display the info and then let the user edit per-package USE flags (note how subtly I'm pushing my favourite solution :)

IMHO the user should be responsible of his make.conf settings and his emerges. If he doesn't do a pretend (or a verbose) it's his fault, not a problem in Portage. If he doesn't know, it's because he failed to read the various documentation there's around like e.g. the docs referenced in the make.conf notes or the Portage User Guide.
_________________
I may not agree with what you say, but I'll defend to the death your right to say it.
Back to top
View user's profile Send private message
pygoscelis
Guru
Guru


Joined: 07 Jun 2003
Posts: 402

PostPosted: Thu Jun 19, 2003 12:37 pm    Post subject: Reply with quote

bsolar wrote:
IMHO the user should be responsible of his make.conf settings and his emerges. If he doesn't do a pretend (or a verbose) it's his fault, not a problem in Portage. If he doesn't know, it's because he failed to read the various documentation there's around like e.g. the docs referenced in the make.conf notes or the Portage User Guide.

Well, technically you're right. HOWEVER. New users don't start with the Portage User Guide, they start with the Installation Guide and the Installation Guide barely says anything about it. And whatever is said is easy to miss on the first reading (I did). I say, make Portage newbie-friendly by default but with a way to revert to the current behaviour, it'll be a win-win.

You don't have to teach me to read the docs, but what about users coming from Windows or some Mandrake-style Linux distro? Command-line install procedure can be very intimidating for them, you don't want to make their lives even harder.
Back to top
View user's profile Send private message
RedBeard0531
Guru
Guru


Joined: 21 Sep 2002
Posts: 415
Location: maryland

PostPosted: Thu Jun 19, 2003 12:52 pm    Post subject: Reply with quote

Almost everything you are looking for already exists. emerge ufed for an interactive use flag editor. Type emerge -pv links instead of emerge -p links to see all the available and selected use flags. If you see one you dont like type the following on one line:

USE="-X -java" emrge -pv links

Then you can narrow it down some more. By the way, there are local use flages. Take a look at ufed, it pionts them out. mozzila, and gentoo-sources use them hevlily.
_________________
OH MY GOD! Kenny just killed Kenny!
That Basterd!
Back to top
View user's profile Send private message
bsolar
Bodhisattva
Bodhisattva


Joined: 12 Jan 2003
Posts: 2764

PostPosted: Thu Jun 19, 2003 1:20 pm    Post subject: Reply with quote

pygoscelis wrote:
And whatever is said is easy to miss on the first reading (I did).

The informations are not hidden or difficult to notice so, IMHO, if you miss them it's your fault.
pygoscelis wrote:
You don't have to teach me to read the docs

Nor I want.
pygoscelis wrote:
but what about users coming from Windows or some Mandrake-style Linux distro? Command-line install procedure can be very intimidating for them, you don't want to make their lives even harder.

That's exaclty why the default USE include some amenities like X.

BTW you might want to propose your ideas in Bugzilla as enhancements or discuss the issue in the gentoo-dev@gentoo.org list.
_________________
I may not agree with what you say, but I'll defend to the death your right to say it.
Back to top
View user's profile Send private message
pygoscelis
Guru
Guru


Joined: 07 Jun 2003
Posts: 402

PostPosted: Thu Jun 19, 2003 1:32 pm    Post subject: Reply with quote

RedBeard0531 wrote:
Almost everything you are looking for already exists.

I know! The thing is, once I got Gentoo up and running, I don't need these things that much. I needed them most when I was in process of installation and learning. I argue that newbie-friendliness should be the default, not something you strap on later when you're not a newbie anymore.

Simply making emerge display the "-pv" output and then ask for confirmation by default will go a long way. Ideally, ufed or something like it should be integrated with portage and explained in the documentation from the very beginning.
Back to top
View user's profile Send private message
Mystilleef
Guru
Guru


Joined: 27 Apr 2003
Posts: 561
Location: Earth

PostPosted: Thu Jun 19, 2003 1:38 pm    Post subject: Reply with quote

Dude, you just need a little tutorial on the USE flags and portage. All you're asking for is already available in portage. And if new users don't learn how to read the manual, you can't blame Gentoo for there misdeeds. Every tool has a manual, at least in *nix, you'd be a more effective user if you read/studied the manual, preferably thoroughly, before using the tool. Unfortunately, this is hardly ever the case. :(

Regards,

Mystilleef
_________________
simple, sleek and sexy text editor for gnome

"My logic is undeniable."
Back to top
View user's profile Send private message
pygoscelis
Guru
Guru


Joined: 07 Jun 2003
Posts: 402

PostPosted: Thu Jun 19, 2003 3:17 pm    Post subject: Reply with quote

Mystilleef wrote:
Dude, you just need a little tutorial on the USE flags and portage. All you're asking for is already available in portage. And if new users don't learn how to read the manual, you can't blame Gentoo for there misdeeds. Every tool has a manual, at least in *nix, you'd be a more effective user if you read/studied the manual, preferably thoroughly, before using the tool. Unfortunately, this is hardly ever the case. :(

Regards,

Mystilleef

Suppose I'm a new user installing Gentoo on my only computer. I've built the stage 3 and now want to read the Portage manual. I know it's on gentoo.org somewhere. How do I get there?

I say "emerge links"... and it starts bringing in X. Why? Did I do something wrong? What else it will do? Is it safe to interrupt the build? Need to RTFM ASAP... wait, that's what I tried to do in the first place. How do I build a text-mode browser on the damn box?

Simple things can and should be simple, even in *nix. I use it for more than a decade now, prefer it to anything else, and can find my way around most problems. But its unfriendliness still sometimes amazes me.
Back to top
View user's profile Send private message
bsolar
Bodhisattva
Bodhisattva


Joined: 12 Jan 2003
Posts: 2764

PostPosted: Thu Jun 19, 2003 3:22 pm    Post subject: Reply with quote

pygoscelis wrote:
Suppose I'm a new user installing Gentoo on my only computer. I've built the stage 3 and now want to read the Portage manual. I know it's on gentoo.org somewhere. How do I get there?

lynx is provided with the LiveCD, you just need to open a new console and you can easily browse while i.e. you are bootstrapping in another console.

Note that lynx is mentioned multiple times in the Installation Guide and eventually the user has to use it to locate the desired tarball, so:

pygoscelis wrote:
You don't have to teach me to read the docs

Are you sure? :roll: (of course I'm joking :P )
_________________
I may not agree with what you say, but I'll defend to the death your right to say it.
Back to top
View user's profile Send private message
pygoscelis
Guru
Guru


Joined: 07 Jun 2003
Posts: 402

PostPosted: Thu Jun 19, 2003 3:36 pm    Post subject: Reply with quote

bsolar wrote:
lynx is provided with the LiveCD, you just need to open a new console and you can easily browse while i.e. you are bootstrapping in another console.

Um, sorry, I forgot about it. It was not my experience anyway, I'm just relating somebody else's story. Well I'll stick to hard facts next time instead of filling in the details :oops:

Anyway, I think I'll try to add the newbie mode to some portage tools and see how things pan out. I do think new users will benefit from it, somehow.
Back to top
View user's profile Send private message
dmitchell
Veteran
Veteran


Joined: 17 May 2003
Posts: 1159
Location: Austin, Texas

PostPosted: Thu Jun 19, 2003 9:09 pm    Post subject: Reply with quote

This guy is a real tool. If he'd taken some time to RTFM, he would have known about $emerge -pv <package> and $USE="-* stuff_you_want" emerge <package>.

Portage is fine the way it is.
_________________
Your argument is invalid.
Back to top
View user's profile Send private message
Steffen
Apprentice
Apprentice


Joined: 14 Jul 2002
Posts: 159

PostPosted: Thu Jun 19, 2003 9:25 pm    Post subject: Reply with quote

I'd be glad to see per-package use-flags, too. Sorry, if this has already been suggested, I haven't read through all relevant threads and bug comments.

When a package gets installed ("emerge package") portage should look whether this package has already been emerged before (maybe an older version already exists). If that's not the case it should be installed using default options, for example the current default global USE flags. Alternantively the user could specify the -i option ("emerge -i package") and in this case portage would interactively ask the user which use flags should be enabled during compilation of this package.
Code:
emerge -i mod_php
Enable libgd? (Default: Yes) Y
Enable xml? (Default: No) N

These settings would be saved as defaults for future installations of this package and be used as default if the user does not specify the -i option. If the user does specify the -i option these saved settings should be "preselected", i.e. be the default.
Back to top
View user's profile Send private message
Spire
n00b
n00b


Joined: 01 Dec 2002
Posts: 22
Location: Ontario, Canada

PostPosted: Fri Jun 20, 2003 12:57 am    Post subject: Reply with quote

A way of accomplishing the desired "more intelligent" defaults may be to add another level to what you can customize with the USE var. Where there are now '-X', and just plain 'X', a '+X' could be added. I'm thinking that '+X' would compile in X support for absolutely everything that has it available, while 'X' would include it if it was set as a default on a per package basis. '-X' would obvious leave X support out of everything that didn't depend on it. With this system, a package like Lynx could be set to have no X support unless the user really wants it, but something like Xchat (which has a console version) would still work fine.

I agree with the need for per-package USE vars. However, I think that this sort of thing should definitely be kept out of make.conf, as should the mozilla stuff that's in there now (moznocompose, moznoirc). I see the global USE var as something system wide, applicable only for choices that the user would otherwise have to make for a large number of applications.

Finally, is there a way of accomplishing the opposite of USE="-*", and including everything to see what options you have with a particular package?

EDIT: Steffen, I would like that sort of thing as well, but that becomes a pain if you are installing a long line of dependencies. You would have to keep checking whether or not there were any choices to be made before emerge could continue to compile the package. The only way I can see decisions like this being convenient is if the USE var information for each package is included when you sync (is it?), or if all of the package files were downloaded beforehand with all the questions asked and answered before any compiling was done. Both of these let you answer all of the questions before any actual compiling (or even downloading?) is done.

Actually, I see that you've already made an allowance for this. It is a little flawed though, as you are forced to decide between relying on the defaults, or dealing with the problem I mentioned above.
Back to top
View user's profile Send private message
zhenlin
Veteran
Veteran


Joined: 09 Nov 2002
Posts: 1361

PostPosted: Fri Jun 20, 2003 7:06 am    Post subject: Reply with quote

I agree, somewhat. In order to maintain compatibility, I suggest instead a ?USE flag that will enable only if the associated package is installed.

For example:

X? (virtual/xfree) will depend on virtual/xfree only if installed. And if the ebuild asks "use X", it will return no if virtual/xfree is not installed. If the use flag doesn't introduce any additional dependencies, then it will act as if it is on.

This will not require linking a specific package to a use flag, only adding a few lines to dependency computation.

Another example:

Code:

# USE="java" emerge -pv php
[ebuild  N   ] dev-java/java-config-0.2.8
[ebuild  N   ] dev-java/sun-jdk-1.4.1.03  -doc
[ebuild  N   ] dev-php/php-4.3.2  ... +java ...
# USE="?java" emerge -pv php
[ebuild  N   ] dev-php/php-4.3.2  ... -java ...
# USE="-java" emerge -pv php
[ebuild  N   ] dev-php/php-4.3.2  ... -java ...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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