FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 11-04-2010, 04:34 PM
James
 
Default flags: v4l and v4l2

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
 
Old 11-04-2010, 06:11 PM
Alan McKinnon
 
Default flags: v4l and v4l2

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
 
Old 11-04-2010, 06:13 PM
Paul Hartman
 
Default flags: v4l and v4l2

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.
 
Old 11-05-2010, 12:02 AM
James
 
Default flags: v4l and v4l2

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
 
Old 11-05-2010, 01:52 AM
Brennan Shacklett
 
Default flags: v4l and v4l2

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.
 
Old 11-05-2010, 06:39 AM
Alan McKinnon
 
Default flags: v4l and v4l2

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
 
Old 11-05-2010, 11:59 AM
James
 
Default flags: v4l and v4l2

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
 
Old 11-05-2010, 12:10 PM
James
 
Default flags: v4l and v4l2

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)
;-)
 

Thread Tools




All times are GMT. The time now is 03:48 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org