Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 104680 - Improved k3b ebuild, to get rid of `fmt -w`
Summary: Improved k3b ebuild, to get rid of `fmt -w`
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 108247
  Show dependency tree
 
Reported: 2005-09-03 00:30 UTC by Christian Heim (RETIRED)
Modified: 2005-09-19 15:50 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
k3b-0.12.3.ebuild (k3b-0.12.3.ebuild,3.44 KB, text/plain)
2005-09-03 00:32 UTC, Christian Heim (RETIRED)
Details
k3b-0.12.3.ebuild.diff (k3b-0.12.3.ebuild.diff,3.72 KB, text/plain)
2005-09-03 03:00 UTC, Christian Heim (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Heim (RETIRED) gentoo-dev 2005-09-03 00:30:53 UTC
k3b uses fmt -w (from coreutils) in global scope, which is really bad.  
In the latest coreutils (~x86 that is here) `fmt` doesn't even accept the '-w  
10000' used in the ebuild. The ebuild tries to avoid this, by using LINGUAS 
and USE="nls" (which might be a bad idea). 

Reproducible: Always
Steps to Reproduce:
# emerge >sys-apps/portage-2.1.0_alpha20050718 
# emerge --regen 
 
Actual Results:  
$ emerge -pv k3b 
 
These are the packages that I would merge, in order: 
 
Calculating dependencies  fmt: invalid width: `10000' 
uniq: write error: Broken pipe 
fmt: invalid width: `10000' 
uniq: write error: Broken pipe 
fmt: invalid width: `10000' 
uniq: write error: Broken pipe 
fmt: invalid width: `10000' 
fmt: invalid width: `10000' 
fmt: invalid width: `10000' 
uniq: write error: Broken pipe  
...done! 
[ebuild  N   ] app-cdr/k3b-0.12.3 

Expected Results:  
[ebuild  N   ] app-cdr/k3b-0.12.3
Comment 1 Christian Heim (RETIRED) gentoo-dev 2005-09-03 00:32:43 UTC
Created attachment 67539 [details]
k3b-0.12.3.ebuild

An improved ebuild, which uses USE=nls, strip-linguas and LINGUAS to determine
which languages to install.
Comment 2 Christian Heim (RETIRED) gentoo-dev 2005-09-03 03:00:48 UTC
Created attachment 67543 [details]
k3b-0.12.3.ebuild.diff

Diff between k3b from cvs and the improved one ...
Comment 3 Carsten Lohrke (RETIRED) gentoo-dev 2005-09-03 07:04:52 UTC
> k3b uses fmt -w (from coreutils) in global scope, which is really bad.

No alternative at the moment, as it is the case with a lot of other things.

> In the latest coreutils (~x86 that is here) `fmt` doesn't even accept the '-w  
10000' used in the ebuild.

And what (value) does work?

> The ebuild tries to avoid this, by using LINGUAS and USE="nls" (which might be
a bad idea). 

Right. It's not acceptable to mix use flags this way. That said: I'd favor it,
if we'd fix and unify our localization approaches (nls, LINGUAS, userlocales)
some day...
Comment 4 Christian Heim (RETIRED) gentoo-dev 2005-09-03 07:59:45 UTC
(In reply to comment #3) 
> And what (value) does work? 
Maximum thats working here is -w 2500. 
 
> Right. It's not acceptable to mix use flags this way. That said: I'd favor 
it, 
> if we'd fix and unify our localization approaches (nls, LINGUAS, userlocales) 
> some day... 
Why not fix it now, to give others a starting point ?! :) 
 
Comment 5 Brian Harring (RETIRED) gentoo-dev 2005-09-14 05:50:36 UTC
Err... that LINGUAS portion of MAKE_LANG isn't valid, you can't do that _period_ :)

The metadata changes depending on the users environment, that's a major no no.
Comment 6 Brian Harring (RETIRED) gentoo-dev 2005-09-14 05:52:24 UTC
Bleh, ignore me regarding metadata; curious, what's the reasoning for why it
cannot be done within pkg_setup?
Comment 7 SpanKY gentoo-dev 2005-09-14 05:59:17 UTC
dont use 'useq' ... just utilize 'use' ... otherwise, proposed patch looks good
in theory
Comment 8 Carsten Lohrke (RETIRED) gentoo-dev 2005-09-14 07:00:35 UTC
(In reply to comment #6)
> Bleh, ignore me regarding metadata; curious, what's the reasoning for why it
> cannot be done within pkg_setup?

Pure historical...

btw.: Would it be possible to have a flag "linguas", which is set when any
"linguas_foo" is set? I'd also appreciate if you could have a look at Bug 98425.
I'd like to know, if we can exect some "second level slot dependency" support
from portage. I'm not sure, if you're already aware of the problem or if a new
bug for it makes sense. 


(In reply to comment #7)
> otherwise, proposed patch looks good in theory

Mixing two use flags this way is really bad.

Comment 9 SpanKY gentoo-dev 2005-09-14 10:30:22 UTC
maybe, but that isnt going to happen anytime soon, and the current ebuild is a
lot more broken than what is proposed here
Comment 10 SpanKY gentoo-dev 2005-09-14 10:31:02 UTC
and generally it doesnt make any sense to have LINGUA set to something
non-english and have USE=-nls
Comment 11 Carsten Lohrke (RETIRED) gentoo-dev 2005-09-19 15:50:42 UTC
(In reply to comment #10)
> and generally it doesnt make any sense to have LINGUA set to something
> non-english and have USE=-nls

It doesn't make sense to have two configuration options for one purpose and no
user will expect this usage, because it never was (correctly) never handled this
way and is nowhere documented.

(In reply to comment #9)
> maybe, but that isnt going to happen anytime soon, and the current ebuild is a
> lot more broken than what is proposed here

What's really broken is fmt as it seems, when you look at comments to the code.