Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[gentoo-user] ALSA and my own kernel

82 views
Skip to first unread message

Justin Patrin

unread,
Dec 20, 2004, 2:20:10 PM12/20/04
to
I'm using my own kernel, compiled form source, which has ALSA compiled
into it already. Portage wants to recompile the ALSA driver. How can I
make portage assume the newest version is already installed?

--
Justin Patrin

--
gento...@gentoo.org mailing list

darren kirby

unread,
Dec 20, 2004, 3:00:16 PM12/20/04
to
quoth the Justin Patrin:

> I'm using my own kernel, compiled form source, which has ALSA compiled
> into it already. Portage wants to recompile the ALSA driver. How can I
> make portage assume the newest version is already installed?

# emerge --inject alsa-driver

will fool portage into thinking it is installed.

-d
--
darren kirby :: Part of the problem since 1976 :: http://badcomputer.org
"...the number of UNIX installations has grown to 10, with more expected..."
- Dennis Ritchie and Ken Thompson, June 1972

Tero Grundström

unread,
Dec 20, 2004, 4:40:11 PM12/20/04
to
On Mon, 20 Dec 2004, darren kirby wrote:

> quoth the Justin Patrin:
> > I'm using my own kernel, compiled form source, which has ALSA compiled
> > into it already. Portage wants to recompile the ALSA driver. How can I
> > make portage assume the newest version is already installed?

Note that the kernel version is not the newest version unless you've
patched your kernel. It is at version 1.0.6. The alsa-driver in portage is
at 1.0.7.

> # emerge --inject alsa-driver
>
> will fool portage into thinking it is installed.

If you do it this way portage will try to "upgrade" the alsa-driver again
when there is a new version available. So a better way is to put these
lines to /etc/portage/profile/package.provided:

media-sound/alsa-headers-999
media-sound/alsa-driver-999

--
T.G.

--
gento...@gentoo.org mailing list

Benoit Boissinot

unread,
Dec 20, 2004, 4:50:08 PM12/20/04
to

i think it is more correct to put development-sources in
package.provided (correct me if
i am wrong but it should provide virtual/alsa-drivers)

Benoit

--
gento...@gentoo.org mailing list

Tero Grundström

unread,
Dec 20, 2004, 5:10:10 PM12/20/04
to
On Mon, 20 Dec 2004, Benoit Boissinot wrote:

> i think it is more correct to put development-sources in
> package.provided (correct me if
> i am wrong but it should provide virtual/alsa-drivers)

I have to disagree:

If we have information about option A (1) and it works, how would it be
more correct to use option X (2)?

(1) the alsa-driver in question

(2) development-sources that have nothing to do with this issue

Justin Patrin

unread,
Dec 20, 2004, 5:40:07 PM12/20/04
to
On Mon, 20 Dec 2004 23:36:00 +0200 (EET), Tero Grundström
<te...@vuosaari.hai.fi> wrote:

Thanks, this seems to have worked.

Georgi Georgiev

unread,
Dec 21, 2004, 6:30:12 PM12/21/04
to
On Tue, 21 Dec 2004 00:06:27 +0200, Tero Grundström wrote:

> On Mon, 20 Dec 2004, Benoit Boissinot wrote:
>
>> i think it is more correct to put development-sources in
>> package.provided (correct me if
>> i am wrong but it should provide virtual/alsa-drivers)
>
> I have to disagree:
>
> If we have information about option A (1) and it works, how would it be
> more correct to use option X (2)?

Because option 1 was not actually correct. Instead of fooling portage
into thinking that the latest version of alsa-driver is installed, it is
more correct to tell portage that alsa-driver is provided by the kernel
sources:

echo "virtual/alsa sys-kernel/development-sources" >>/etc/portage/virtuals
(*Note: replace with your favorite sources)

And, if portage is not managing the installation of the kernel sources
(if you do them by hand), it may need to be told that they are indeed
installed and managed by the user.

echo "sys-kernel/development-sources-2.6.10" >>/etc/portage/package.provided

> (1) the alsa-driver in question
>
> (2) development-sources that have nothing to do with this issue

I hope this answered your question.

--
\/ Georgi Georgiev \/ There's always free cheese in a mousetrap. \/
/\ ch...@gg3.net /\ /\
\/ +81(90)6266-1163 \/ \/

--
gento...@gentoo.org mailing list

Georgi Georgiev

unread,
Dec 21, 2004, 6:40:08 PM12/21/04
to
On Wed, 22 Dec 2004 08:23:44 +0900, Georgi Georgiev wrote:
> echo "virtual/alsa sys-kernel/development-sources" >>/etc/portage/virtuals
> (*Note: replace with your favorite sources)
>
> And, if portage is not managing the installation of the kernel sources (if
> you do them by hand), it may need to be told that they are indeed
> installed and managed by the user.
>
> echo "sys-kernel/development-sources-2.6.10"
>>>/etc/portage/package.provided

Those were supposed to be

/etc/portage/profile/virtuals
/etc/portage/profile/package.provided

--
/ Georgi Georgiev / Sweet April showers do spring May flowers. /
\ ch...@gg3.net \ -- Thomas Tusser \

Justin Patrin

unread,
Dec 21, 2004, 8:10:13 PM12/21/04
to
On Wed, 22 Dec 2004 08:32:20 +0900, Georgi Georgiev <ch...@gg3.net> wrote:
> On Wed, 22 Dec 2004 08:23:44 +0900, Georgi Georgiev wrote:
> > echo "virtual/alsa sys-kernel/development-sources" >>/etc/portage/virtuals
> > (*Note: replace with your favorite sources)
> >
> > And, if portage is not managing the installation of the kernel sources (if
> > you do them by hand), it may need to be told that they are indeed
> > installed and managed by the user.
> >
> > echo "sys-kernel/development-sources-2.6.10"
> >>>/etc/portage/package.provided
>
> Those were supposed to be
>
> /etc/portage/profile/virtuals
> /etc/portage/profile/package.provided
>

Thanks much, this seems like the "right" way to do things.

Tero Grundström

unread,
Dec 21, 2004, 8:20:08 PM12/21/04
to
On Wed, 22 Dec 2004, Georgi Georgiev wrote:

> On Tue, 21 Dec 2004 00:06:27 +0200, Tero Grundström wrote:
>
> > On Mon, 20 Dec 2004, Benoit Boissinot wrote:
> >
> >> i think it is more correct to put development-sources in
> >> package.provided (correct me if
> >> i am wrong but it should provide virtual/alsa-drivers)
> >
> > I have to disagree:
> >
> > If we have information about option A (1) and it works, how would it be
> > more correct to use option X (2)?
>
> Because option 1 was not actually correct. Instead of fooling portage
> into thinking that the latest version of alsa-driver is installed, it is
> more correct to tell portage that alsa-driver is provided by the kernel
> sources:

Why? Could you please tell me *why* this would be more correct?

> And, if portage is not managing the installation of the kernel sources
> (if you do them by hand), it may need to be told that they are indeed
> installed and managed by the user.

Yes, of course. This obvious.

Billy

unread,
Dec 21, 2004, 9:30:13 PM12/21/04
to
Tero Grundström wrote:

> Why? Could you please tell me *why* this would be more correct?

well.. for one, if you inject alsa, then if a new alsa version comes
out, the next time you try to update world alsa will attempt to be
reinstalled.

for second, if you inject alsa, when you do an emerge world --emptytree,
your system will break again as it tries to emerge alsa - since you
fooled portage into thinking it was installed, it will attempt to emerge it.

--
gento...@gentoo.org mailing list

Tero Grundström

unread,
Dec 22, 2004, 5:00:26 AM12/22/04
to
On Tue, 21 Dec 2004, Billy wrote:

> Tero Grundström wrote:
>
> > Why? Could you please tell me *why* this would be more correct?
>
> well.. for one, if you inject alsa, then if a new alsa version comes
> out, the next time you try to update world alsa will attempt to be
> reinstalled.

No, I didn't ask this. And if you had read the thread you'd know that I
know this..

The question is why it would be better to provide development-sources
instead of alsa-driver, in order to tell portage that we already have
alsa-driver.

Jim Hatfield

unread,
Dec 22, 2004, 6:10:15 AM12/22/04
to
On Tue, 21 Dec 2004 23:32:20 -0000, in local.gentoo.users you wrote:

>On Wed, 22 Dec 2004 08:23:44 +0900, Georgi Georgiev wrote:
>> echo "virtual/alsa sys-kernel/development-sources"
>>>/etc/portage/virtuals
>> (*Note: replace with your favorite sources)
>>

>> And, if portage is not managing the installation of the kernel sources
>(if
>> you do them by hand), it may need to be told that they are indeed
>> installed and managed by the user.
>>

>> echo "sys-kernel/development-sources-2.6.10"
>>>>/etc/portage/package.provided
>
>Those were supposed to be
>
>/etc/portage/profile/virtuals
>/etc/portage/profile/package.provided

I tried this one too, but it still wants to install alsa-driver:

>term2 root # cat /etc/portage/profile/virtuals
>virtual/alsa sys-kernel/gentoo-dev-sources
>term2 root # cat /etc/portage/profile/package.provided
>sys-kernel/gentoo-dev-sources-2.6.9
>term2 root # emerge --update --pretend world
>
>These are the packages that I would merge, in order:
>
>Calculating world dependencies ...done!
>[ebuild U ] media-libs/alsa-lib-1.0.7 [1.0.6]
>[ebuild U ] media-libs/alsa-oss-1.0.7 [1.0.6]
>[ebuild U ] dev-libs/glib-2.4.8 [2.4.7]
>[ebuild U ] x11-libs/gtk+-2.4.13-r1 [2.4.9-r1]
>[ebuild U ] mail-client/mozilla-thunderbird-1.0 [0.8]
>[ebuild U ] media-video/mplayer-1.0_pre5-r5 [1.0_pre4-r7]
>[ebuild NS ] media-sound/alsa-driver-1.0.7-r4

jim

--
gento...@gentoo.org mailing list

Jim Hatfield

unread,
Dec 22, 2004, 6:10:06 AM12/22/04
to
On Mon, 20 Dec 2004 21:36:00 -0000, in local.gentoo.users you wrote:

>when there is a new version available. So a better way is to put these
>lines to /etc/portage/profile/package.provided:
>
>media-sound/alsa-headers-999
>media-sound/alsa-driver-999

I did this but it doesn't alter what happens:

>term2 root # cat /etc/portage/profile/package.provided

>media-sound/alsa-headers-999
>media-sound/alsa-drivers-999


>term2 root # emerge --update --pretend world
>
>These are the packages that I would merge, in order:
>
>Calculating world dependencies ...done!

>[ebuild NS ] media-sound/alsa-driver-1.0.7-r4


>[ebuild U ] media-libs/alsa-lib-1.0.7 [1.0.6]
>[ebuild U ] media-libs/alsa-oss-1.0.7 [1.0.6]

jim

--
gento...@gentoo.org mailing list

Tero Grundström

unread,
Dec 22, 2004, 6:30:16 AM12/22/04
to
On Wed, 22 Dec 2004, Jim Hatfield wrote:

> On Mon, 20 Dec 2004 21:36:00 -0000, in local.gentoo.users you wrote:
>
> >when there is a new version available. So a better way is to put these
> >lines to /etc/portage/profile/package.provided:
> >
> >media-sound/alsa-headers-999
> >media-sound/alsa-driver-999
>
> I did this but it doesn't alter what happens:

[snip]

Hmm.. Hard to say what's wrong. It should work... What is your portage
version? Mine is 2.0.51-r8.

Billy

unread,
Dec 22, 2004, 10:50:12 AM12/22/04
to
Tero Grundström wrote:
>>well.. for one, if you inject alsa, then if a new alsa version comes
>>out, the next time you try to update world alsa will attempt to be
>>reinstalled.
> No, I didn't ask this. And if you had read the thread you'd know that I
> know this..

I did read the thread, actually, however I didn't pay attention to the
details it seems. Benoit threw me off by saying something about "fooling
portage", which is also the same wording used by Darren when he
suggested using emerge --inject. Therefore when you responded to Benoit,
I thought you were referring to the idea of using --inject.

> The question is why it would be better to provide development-sources
> instead of alsa-driver, in order to tell portage that we already have
> alsa-driver.

It's a POV issue, which in the computer world can mean a lot. Example:

To techs, the world wide web is a service used on the internet, which is
itself a large network made by interconnecting ISP's to one another in a
homogeneous way.

To consumers, the word wide web IS the internet, which to them is the
ether that surrounds the entire world of computers.

While both POV's allow the www to operate and provide STUFF to people.
It is the tech's POV that really makes all that STUFF exist.

Back to Gentoo.

Both POV's allow stuff to work. However, one more accurately describes
the system. You don't really have the most up to date version of Alsa
installed if you are using the one in kernel version 2.6.#. If you tell
portage you do, however, then portage will think you do.

On the otherhand, if you tell portage that kernel version 2.6.# provides
alsa, that more accurately describes the system. There may not be a way
for portage to use that distinction, but that doesn't mean there won't
be a way in the future.

If the Gentoo devs figure out a way to apply alsa versions to kernel
sources, then all of a sudden - Portage will know exactly what version
of alsa you have in your system if you told it that the kernel provides
alsa. A package could then accurately depend upon a specific version of
alsa, and portage could use it's knowledge of the version of alsa in a
kernel package to ensure you get the right kernel emerged.


--
gento...@gentoo.org mailing list

Brett I. Holcomb

unread,
Dec 22, 2004, 12:40:05 PM12/22/04
to
On Wed, 22 Dec 2004, [iso-8859-1] Tero Grundström wrote:

> On Wed, 22 Dec 2004, Jim Hatfield wrote:
>
>> On Mon, 20 Dec 2004 21:36:00 -0000, in local.gentoo.users you wrote:
>>
>>> when there is a new version available. So a better way is to put these
>>> lines to /etc/portage/profile/package.provided:
>>

>> I did this but it doesn't alter what happens:
> [snip]
>
> Hmm.. Hard to say what's wrong. It should work... What is your portage
> version? Mine is 2.0.51-r8.
>

Mine is 2.0.51-r3 and with

virtual/alsa sys-kernel/gentoo-dev-source

in /etc/portage/profiles/virtuals

it still wants to merge the alsa 1.0.7 driver.


Tero Grundström

unread,
Dec 22, 2004, 12:50:13 PM12/22/04
to
On Wed, 22 Dec 2004, Billy wrote:

> Tero Grundström wrote:
> > The question is why it would be better to provide development-sources
> > instead of alsa-driver, in order to tell portage that we already have
> > alsa-driver.
>

[snip]


> Both POV's allow stuff to work. However, one more accurately describes
> the system. You don't really have the most up to date version of Alsa
> installed if you are using the one in kernel version 2.6.#. If you tell
> portage you do, however, then portage will think you do.

Actually I do have the latest in-kernel alsa, as I just patched it into my
2.6.10-rc3-ck1 kernel.

> On the otherhand, if you tell portage that kernel version 2.6.# provides
> alsa, that more accurately describes the system. There may not be a way
> for portage to use that distinction, but that doesn't mean there won't
> be a way in the future.

That would be difficult. Just think how rapidly in-kernel alsa versions
evolve, and a system may have multible kernels. Furthermore you could also
have a patched kernel with updated alsa.

And if we want other alsa stuff in sync with all of those kernels,
alsa-lib and others should be slotted.

All of this may very well be the main reason why emerging the
alsa-driver is still the preferred method for Gentoo even with a 2.6.x
kernel. Rest of us may then do it what ever other way we see fit...

(Btw, with alsa v1.0.7 it became more difficult to determine the alsa
version from the kernel-sources, as there is no longer
linux/include/sound/version.h)

> If the Gentoo devs figure out a way to apply alsa versions to kernel
> sources, then all of a sudden - Portage will know exactly what version
> of alsa you have in your system if you told it that the kernel provides
> alsa. A package could then accurately depend upon a specific version of
> alsa, and portage could use it's knowledge of the version of alsa in a
> kernel package to ensure you get the right kernel emerged.

I suppose your right. Overall this was a very good answer to my question
:)

Tero Grundström

unread,
Dec 22, 2004, 1:00:14 PM12/22/04
to
On Wed, 22 Dec 2004, Brett I. Holcomb wrote:

> On Wed, 22 Dec 2004, [iso-8859-1] Tero Grundström wrote:
>
> > Hmm.. Hard to say what's wrong. It should work... What is your portage
> > version? Mine is 2.0.51-r8.
>
> Mine is 2.0.51-r3 and with
>
> virtual/alsa sys-kernel/gentoo-dev-source
>
> in /etc/portage/profiles/virtuals
>
> it still wants to merge the alsa 1.0.7 driver.

Maybe something wrong with your portage version? I'm not able to come up
with any other explanation for this. Sorry.

I don't remember which version of portage I had, when I started to use
this feature, but it has always worked fine here.

Justin Patrin

unread,
Dec 22, 2004, 1:30:19 PM12/22/04
to

Thanks to all for the discussion here. It seems the best solution is
to take ALSA out of my manually built kernel and allow portage to
install the driver as it will get the newest version. From the
discussion I assume this will work with kernel 2.6. Is there anything
special I have to do to tell portage I'm using a 2.6 kernel or will it
auto-configure this based on the headers that are set up (via
/usr/src/linux symlink I believe).

>
>
> --
> gento...@gentoo.org mailing list

Tero Grundström

unread,
Dec 22, 2004, 2:20:08 PM12/22/04
to
On Wed, 22 Dec 2004, Justin Patrin wrote:

> Thanks to all for the discussion here. It seems the best solution is
> to take ALSA out of my manually built kernel and allow portage to
> install the driver as it will get the newest version.

Well it depends... This discussion would not exist if all of us would
think that it is the best solution. Doing all the kernel stuff myself
has become my preference for various reasons:

- emerging a kernel is different from other emerges anyway, as you'll
still need to compile it separately
- it takes forever to unmerge a kernel. rm -rf is a lot faster :)
- new ck-sources don't get added to portage quickly enough
- I don't want to re-emerge alsa-driver everytime I rebuild my kernel

> From the
> discussion I assume this will work with kernel 2.6. Is there anything
> special I have to do to tell portage I'm using a 2.6 kernel or will it
> auto-configure this based on the headers that are set up (via
> /usr/src/linux symlink I believe).

AFAIK it checks the kernel version via the /usr/src/linux and installs the
alsa modules to the correct directory in /lib/modules/

Just follow the Gentoo Alsa Guide, and you'll be all set.

Boyd Stephen Smith Jr.

unread,
Dec 22, 2004, 5:50:15 PM12/22/04
to
On Wednesday 22 December 2004 05:01 am, Jim Hatfield
<subsc...@insignia.com> wrote:
> On Mon, 20 Dec 2004 21:36:00 -0000, in local.gentoo.users you wrote:
> I did this but it doesn't alter what happens:
> >term2 root # cat /etc/portage/profile/package.provided
> >media-sound/alsa-headers-999
> >media-sound/alsa-drivers-999
> >term2 root # emerge --update --pretend world
> >
> >These are the packages that I would merge, in order:
> >[ebuild U ] media-libs/alsa-lib-1.0.7 [1.0.6]
> >[ebuild U ] media-libs/alsa-oss-1.0.7 [1.0.6]

Um, look at the categories?

Evidently, portage has alsa in media-libs, so you telling it that
media-sound/alsa is provided doesn't really matter.

Try changing those lines in package.provided to the correct category like:
media-libs/alsa-headers-999

--
Boyd Stephen Smith Jr.
bs...@volumehost.com
ICQ: 514984 YM/AIM: DaTwinkDaddy

--
gento...@gentoo.org mailing list

Nick Rout

unread,
Dec 22, 2004, 6:10:06 PM12/22/04
to

On Wed, 22 Dec 2004 16:37:05 -0600
"Boyd Stephen Smith Jr." <bs...@volumehost.com> wrote:

> On Wednesday 22 December 2004 05:01 am, Jim Hatfield
> <subsc...@insignia.com> wrote:
> > On Mon, 20 Dec 2004 21:36:00 -0000, in local.gentoo.users you wrote:
> > I did this but it doesn't alter what happens:
> > >term2 root # cat /etc/portage/profile/package.provided
> > >media-sound/alsa-headers-999
> > >media-sound/alsa-drivers-999
> > >term2 root # emerge --update --pretend world
> > >
> > >These are the packages that I would merge, in order:
> > >[ebuild U ] media-libs/alsa-lib-1.0.7 [1.0.6]
> > >[ebuild U ] media-libs/alsa-oss-1.0.7 [1.0.6]
>
> Um, look at the categories?
>
> Evidently, portage has alsa in media-libs, so you telling it that
> media-sound/alsa is provided doesn't really matter.
>
> Try changing those lines in package.provided to the correct category like:
> media-libs/alsa-headers-999

sorry look again: alsa-lib and alsa-oss are in media-libs, alsa-drivers
and alsa-headers are in media-sound.

>
> --
> Boyd Stephen Smith Jr.
> bs...@volumehost.com
> ICQ: 514984 YM/AIM: DaTwinkDaddy
>
> --
> gento...@gentoo.org mailing list

--
Nick Rout <ni...@rout.co.nz>


--
gento...@gentoo.org mailing list

Maarten

unread,
Dec 30, 2004, 1:20:08 PM12/30/04
to
On Monday 20 December 2004 22:36, Tero Grundström wrote:
> On Mon, 20 Dec 2004, darren kirby wrote:
> > quoth the Justin Patrin:
> > > I'm using my own kernel, compiled form source, which has ALSA compiled
> > > into it already. Portage wants to recompile the ALSA driver. How can I
> > > make portage assume the newest version is already installed?

I have the same problem.

[...]

> If you do it this way portage will try to "upgrade" the alsa-driver again
> when there is a new version available. So a better way is to put these
> lines to /etc/portage/profile/package.provided:

Sorry if I missed something, but that path /etc/portage/profile doesn't even
exist on my system. Is it okay to create it or is something amiss here ?

> media-sound/alsa-headers-999
> media-sound/alsa-driver-999

Thanks,
Maarten

--
bash-2.05b$ emerge ncy


--
gento...@gentoo.org mailing list

Justin Patrin

unread,
Dec 30, 2004, 1:20:11 PM12/30/04
to
On Thu, 30 Dec 2004 19:15:49 +0100, Maarten <gen...@ultratux.org> wrote:
> On Monday 20 December 2004 22:36, Tero Grundström wrote:
> > On Mon, 20 Dec 2004, darren kirby wrote:
> > > quoth the Justin Patrin:
> > > > I'm using my own kernel, compiled form source, which has ALSA compiled
> > > > into it already. Portage wants to recompile the ALSA driver. How can I
> > > > make portage assume the newest version is already installed?
>
> I have the same problem.
>
> [...]
>
> > If you do it this way portage will try to "upgrade" the alsa-driver again
> > when there is a new version available. So a better way is to put these
> > lines to /etc/portage/profile/package.provided:
>
> Sorry if I missed something, but that path /etc/portage/profile doesn't even
> exist on my system. Is it okay to create it or is something amiss here ?
>

Yes, create it.

> > media-sound/alsa-headers-999
> > media-sound/alsa-driver-999

Maarten

unread,
Dec 30, 2004, 1:40:18 PM12/30/04
to
On Thursday 30 December 2004 19:17, Justin Patrin wrote:
> On Thu, 30 Dec 2004 19:15:49 +0100, Maarten <gen...@ultratux.org> wrote:
> > On Monday 20 December 2004 22:36, Tero Grundström wrote:
> > > On Mon, 20 Dec 2004, darren kirby wrote:
> > > > quoth the Justin Patrin:

> > > If you do it this way portage will try to "upgrade" the alsa-driver


> > > again when there is a new version available. So a better way is to put
> > > these lines to /etc/portage/profile/package.provided:
> >
> > Sorry if I missed something, but that path /etc/portage/profile doesn't
> > even exist on my system. Is it okay to create it or is something amiss
> > here ?
>
> Yes, create it.

Thanks! I did, and it helped. emerge -u world is running again...!

0 new messages