* [gentoo-user] flags: v4l and v4l2
@ 2010-11-04 17:34 James
2010-11-04 19:11 ` Alan McKinnon
2010-11-04 19:13 ` Paul Hartman
0 siblings, 2 replies; 8+ messages in thread
From: James @ 2010-11-04 17:34 UTC (permalink / raw
To: gentoo-user
Hello,
My google is not sufficient to flesh out the difference
(other than the obvious) of these 2 flags.
Where would I read about the deep, detailed difference
in flags that appear similar in purpose?
How would/should I know when flags are deprecated, or
on the fast track to becoming deprecated?
It there systematic (methologies/syntax) to
discover such nuggets of knowledge?
James
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] flags: v4l and v4l2
2010-11-04 17:34 [gentoo-user] flags: v4l and v4l2 James
@ 2010-11-04 19:11 ` Alan McKinnon
2010-11-04 19:13 ` Paul Hartman
1 sibling, 0 replies; 8+ messages in thread
From: Alan McKinnon @ 2010-11-04 19:11 UTC (permalink / raw
To: gentoo-user
Apparently, though unproven, at 19:34 on Thursday 04 November 2010, James did
opine thusly:
> Hello,
>
>
> My google is not sufficient to flesh out the difference
> (other than the obvious) of these 2 flags.
>
> Where would I read about the deep, detailed difference
> in flags that appear similar in purpose?
$ grep v4l /var/portage/profiles/use.*
/var/portage/profiles/use.desc:v4l - Enables video4linux support
/var/portage/profiles/use.desc:v4l2 - Enable video4linux2 support
To grok that, you need to know a little about the video4linux project. It's
safe to assume as step 1 that v4l builds support for video4linux (which is
deprecated, moribund, obsolete or discarded depending on your point of view);
and v4l2 is support for the currently supported video4linux2 project.
Considering your line of work, you likely work with this and already know it.
I suppose there are tools that display info about flags (euse is good for the
quick one-line description), but if I want to know what is actually being
*done* with a USE flag, I look in the ebuild. Nothing quite like reading the
code, eh?
"equery depends" shows info but it really just greps the portage tree or
/var/lib/something with default settings (search installed packages only).
Reading the ebuild shows you the context too which often contains very
valuable info. "equery hasuse" quickly shows installed packages that use a
specified flag.
The ffmpeg ebuild shows that ffmpeg supports both projects, you just say which
you want. The ebuild for sane-backends reveals:
RDEPEND="v4l? ( media-libs/libv4l )"
which I'm certain is a current project using v4l2. Oops, initial assumption
about flags above is probably wrong. Oh well, it's code, this happens. A lot.
> How would/should I know when flags are deprecated, or
> on the fast track to becoming deprecated?
$PORTDIR/package.mask has info about why things are masked
$PORTDIR/use*desc contains the one-line description of flags
$PORTDIR/profiles/ChangeLog has useful info about all sorts of stuff.
Anything in $PORTDIR with "use" in it's name is worth a look
> It there systematic (methologies/syntax) to
> discover such nuggets of knowledge?
Not that I ever found. It's more a case of familiarity with where things are
found and a deep knowledge of grep :-)
And ChangeLogs are always the best source of info. That's true for almost all
projects out there.
--
alan dot mckinnon at gmail dot com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] flags: v4l and v4l2
2010-11-04 17:34 [gentoo-user] flags: v4l and v4l2 James
2010-11-04 19:11 ` Alan McKinnon
@ 2010-11-04 19:13 ` Paul Hartman
2010-11-05 1:02 ` [gentoo-user] " James
1 sibling, 1 reply; 8+ messages in thread
From: Paul Hartman @ 2010-11-04 19:13 UTC (permalink / raw
To: gentoo-user
On Thu, Nov 4, 2010 at 12:34 PM, James <wireless@tampabay.rr.com> wrote:
> Hello,
>
>
> My google is not sufficient to flesh out the difference
> (other than the obvious) of these 2 flags.
>
> Where would I read about the deep, detailed difference
> in flags that appear similar in purpose?
>
> How would/should I know when flags are deprecated, or
> on the fast track to becoming deprecated?
>
> It there systematic (methologies/syntax) to
> discover such nuggets of knowledge?
I don't know what you considered obvious, so excuse me if I'm
repeating what you already knew. :)
Start with the Gentoo USE flag list:
http://www.gentoo.org/dyn/use-index.xml
Though that doesn't tell you anything technical, it tells you that v4l
stands for video4linux. Google for video4linux and first result is
this page:
http://linux.bytesex.org/v4l2/
Which says:
[snip]
About v4l + v4l2
v4l
is the original video capture/overlay API of the linux kernel. It
appeared late the 2.1.x development cycle in the linux kernel.
v4l2
is the second generation of the video4linux API which fixes a
number of design bugs of the first version. It was integrated into the
standard kernel in 2.5.x.
Althrough v4l2 is integrated into the standard kernel a number of
drivers don't support the new v4l2 API yet, so we'll likely see v4l
and v4l2 coexist for some time.
[/snip]
The last line being key. There are 2 versions of the V4L API and not
everything uses the new one. So that's most likely why we have USE
flags for both versions in Gentoo, too.
The third result on Google is a gentoo-dev thread from 2006 about
those USE flags themselves:
http://www.mail-archive.com/gentoo-dev@lists.gentoo.org/msg11831.html
My suggestion with these v4l v4l2 USE flags in particular:
Use V4L2 in your kernel, enable the V4L1 compatibility mode and
hopefully every package should work regardless of which version of V4L
it actually needs. Hopefully. :)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [gentoo-user] Re: flags: v4l and v4l2
2010-11-04 19:13 ` Paul Hartman
@ 2010-11-05 1:02 ` James
2010-11-05 2:52 ` Brennan Shacklett
2010-11-05 7:39 ` Alan McKinnon
0 siblings, 2 replies; 8+ messages in thread
From: James @ 2010-11-05 1:02 UTC (permalink / raw
To: gentoo-user
Paul Hartman <paul.hartman+gentoo <at> gmail.com> writes:
> I don't know what you considered obvious, so excuse me if I'm
> repeating what you already knew. :)
OK (Alan) and Paul. I should have explained that v4l and
v4l2 were just examples. Sure, I know about them. Why
is v4l still around? Some package somewhere with some old
kernel probably still needs it...... one man's deprecated cruft
is another man's gotta_have_crutch......
Lots of good information specific to those flags (Alan), but,
as I suspected, no general quick reference on a given flag,
with any sort of detail. Look here what I use from my .bashrc:
# USE flag settings hack by Ciaran McCreesh:
explainuseflag(){ sed -ne "s,^\([^ ]*:\)\?$1 - ,,p"
$(portageq portdir)/profiles/use.{,local.}desc; }
alias ef="explainuseflag"
ONE _OFF hunting around with some of the tools/methods
Alan mentioned or googling or hacks from wherever. WE
can do better.
Exactly what I expected and hoped I was wrong. As the DOC
team discusses opening up things a bit (Git vs wiki)
I thought I'd do a little test. Wouldn't it be nice
if (gentoo) documentation was expanded as surely USE flags
have some generic meaning and a (package) specific meaning
(sometimes) found deeper in the ebuild or code elsewhere.
Something maybe a little more systematic would be keen, methinks.
After all that work alan did, will it be assimilated
into the (gentoo/borg) collective?
Maybe I'm rambling, maybe I expect too much, maybe I dream
of a documentation system, that is open to many folks easily
injecting knowledge therein.
Maybe, I dream about gentoo too much.......
Oh well, thanks for participating in my little experiment.
(apologies in advance).
James
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] Re: flags: v4l and v4l2
2010-11-05 1:02 ` [gentoo-user] " James
@ 2010-11-05 2:52 ` Brennan Shacklett
2010-11-05 12:59 ` James
2010-11-05 7:39 ` Alan McKinnon
1 sibling, 1 reply; 8+ messages in thread
From: Brennan Shacklett @ 2010-11-05 2:52 UTC (permalink / raw
To: gentoo-user
On 11/4/10, James <wireless@tampabay.rr.com> wrote:
> Paul Hartman <paul.hartman+gentoo <at> gmail.com> writes:
>
>> I don't know what you considered obvious, so excuse me if I'm
>> repeating what you already knew. :)
>
>
> OK (Alan) and Paul. I should have explained that v4l and
> v4l2 were just examples. Sure, I know about them. Why
> is v4l still around? Some package somewhere with some old
> kernel probably still needs it...... one man's deprecated cruft
> is another man's gotta_have_crutch......
>
> Lots of good information specific to those flags (Alan), but,
> as I suspected, no general quick reference on a given flag,
> with any sort of detail. Look here what I use from my .bashrc:
>
> # USE flag settings hack by Ciaran McCreesh:
> explainuseflag(){ sed -ne "s,^\([^ ]*:\)\?$1 - ,,p"
> $(portageq portdir)/profiles/use.{,local.}desc; }
> alias ef="explainuseflag"
>
>
> ONE _OFF hunting around with some of the tools/methods
> Alan mentioned or googling or hacks from wherever. WE
> can do better.
>
> Exactly what I expected and hoped I was wrong. As the DOC
> team discusses opening up things a bit (Git vs wiki)
> I thought I'd do a little test. Wouldn't it be nice
> if (gentoo) documentation was expanded as surely USE flags
> have some generic meaning and a (package) specific meaning
> (sometimes) found deeper in the ebuild or code elsewhere.
> Something maybe a little more systematic would be keen, methinks.
> After all that work alan did, will it be assimilated
> into the (gentoo/borg) collective?
>
> Maybe I'm rambling, maybe I expect too much, maybe I dream
> of a documentation system, that is open to many folks easily
> injecting knowledge therein.
>
> Maybe, I dream about gentoo too much.......
>
> Oh well, thanks for participating in my little experiment.
>
> (apologies in advance).
>
> James
>
The quse command in app-portage/gentoolkit is useful for finding a
quick definition of a use flag. You go "quse -D <name of flag>" and it
will give you the global definition (if it exists), as well as local
definitions for packages in which the use flag does something
different.
For instance this is the output from "quse -D udev":
global:udev: Enable sys-fs/udev integration (device discovery, power
and storage device support, etc)
local:udev:gnome-base/gvfs: Enable udev base replacement code for cdda feature
local:udev:sys-fs/ntfs3g: Install udev rule to make udisks use
ntfs-3g instead of the kernel NTFS driver.
Hopefully this helps, I am not sure if this is what you meant.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] Re: flags: v4l and v4l2
2010-11-05 1:02 ` [gentoo-user] " James
2010-11-05 2:52 ` Brennan Shacklett
@ 2010-11-05 7:39 ` Alan McKinnon
2010-11-05 13:10 ` James
1 sibling, 1 reply; 8+ messages in thread
From: Alan McKinnon @ 2010-11-05 7:39 UTC (permalink / raw
To: gentoo-user
Apparently, though unproven, at 03:02 on Friday 05 November 2010, James did
opine thusly:
> Lots of good information specific to those flags (Alan), but,
> as I suspected, no general quick reference on a given flag,
> with any sort of detail. Look here what I use from my .bashrc:
>
> # USE flag settings hack by Ciaran McCreesh:
> explainuseflag(){ sed -ne "s,^\([^ ]*:\)\?$1 - ,,p"
> $(portageq portdir)/profiles/use.{,local.}desc; }
> alias ef="explainuseflag"
>
>
> ONE _OFF hunting around with some of the tools/methods
> Alan mentioned or googling or hacks from wherever. WE
> can do better.
You are probably correct, the tools could indeed stand some improvement.
Sounds like an good candidate for a Google Summer of Code project actually.
Meanwhile, I'm not aware of any method more reliable than good old grep -r
--
alan dot mckinnon at gmail dot com
^ permalink raw reply [flat|nested] 8+ messages in thread
* [gentoo-user] Re: flags: v4l and v4l2
2010-11-05 2:52 ` Brennan Shacklett
@ 2010-11-05 12:59 ` James
0 siblings, 0 replies; 8+ messages in thread
From: James @ 2010-11-05 12:59 UTC (permalink / raw
To: gentoo-user
Brennan Shacklett <bp.shacklett <at> gmail.com> writes:
> The quse command in app-portage/gentoolkit is useful for finding a
> quick definition of a use flag. You go "quse -D <name of flag>" and it
> will give you the global definition (if it exists), as well as local
> definitions for packages in which the use flag does something
> different.
OK, let's take a look:
# quse -D v4l
global:v4l: Enables video4linux support
video_cards.desc:v4l: VIDEO_CARDS setting to build driver for v4l video cards
# quse -D v4l2
global:v4l2: Enable video4linux2 support
Hmmmm, not terribly inspiring methinks. You have the right idea,
but to quote and old TV commercial; "where's the Beef?"
Wholely inadequate and no discussion on deprecation of vl4
as Alan so illustriously pointed out.
> Hopefully this helps, I am not sure if this is what you meant.
Exactly what I was looking for, just wholly inadequate,
if not a plain embarrassment. Sure Hard core *nix hack
can flesh these things out, but since emerge(portage) and
flag settings are at the HEART of Gentoo, shouldn't we do
better? This stuff get's documented all the time, by folks
like Alan and Paul, but it never becomes assimilated into
the collective! Like it or not, what makes a distro POWERFUL
is this collective. If we assimilated just 1% of the good
information that graces this group, our docs would be the envy
of the operating systems world! Devs are too busy and
many are angry and frustrated. Brilliant devs never
like to document code, so somehow our "collective"
need to understand things, from a consumer's point of
view, and build docs!
Without Docks, boats have no where to go, particularly the large
one's that most benefit the average citizens.
The gentoo Doc team, is actually receptive to new ideas!
(hurry, it won't last!) As the #1 grouch even solicited
ideas and involvement, since the old (absentee) grouch
has been officially mortified. (not a stab, just a statement
of fact from ANYONE that has tried to deal with the
Gentoo Doc team). That's why I tricked, motivated and posted
here. Seek HIM out and voice your concern GIT vs wiki
for the docs, or whatever you idea is.
PEACE,
James
^ permalink raw reply [flat|nested] 8+ messages in thread
* [gentoo-user] Re: flags: v4l and v4l2
2010-11-05 7:39 ` Alan McKinnon
@ 2010-11-05 13:10 ` James
0 siblings, 0 replies; 8+ messages in thread
From: James @ 2010-11-05 13:10 UTC (permalink / raw
To: gentoo-user
Alan McKinnon <alan.mckinnon <at> gmail.com> writes:
> Sounds like an good candidate for a Google Summer of Code project actually.
You scare the hell out of me. WE think so much alike.
You STOLE my punchline here........
> Meanwhile, I'm not aware of any method more reliable than good old grep -r
Now I know you're just another crusty old hack,
probably with a similar (deeper?) bag of tricks.......
PS, I go both_ways
(software and hardware)
;-)
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-11-05 13:12 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-04 17:34 [gentoo-user] flags: v4l and v4l2 James
2010-11-04 19:11 ` Alan McKinnon
2010-11-04 19:13 ` Paul Hartman
2010-11-05 1:02 ` [gentoo-user] " James
2010-11-05 2:52 ` Brennan Shacklett
2010-11-05 12:59 ` James
2010-11-05 7:39 ` Alan McKinnon
2010-11-05 13:10 ` James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox