Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 381893 - alsasound init script should change opts variable to use either extra_commands or extra_started_commands
Summary: alsasound init script should change opts variable to use either extra_command...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo ALSA team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: init.d-depr-opts
  Show dependency tree
 
Reported: 2011-09-05 08:50 UTC by Robert Cabrera
Modified: 2011-10-23 15:59 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Cabrera 2011-09-05 08:50:03 UTC
I spent the last week installing a fresh Gentoo ~amd64 on my new laptop. Today I did my first sync which included an update to openrc-0.9.2. Now I get several startup error messages about "Use of the opts variable is deprecated and will be removed in the future. Please use extra_commands or extra_started_commands."

Checked in /var/messages log and find several errors including one for alsasound, wicd and samba.

Here's a pertinent snippet of the log:
Sep  5 02:08:06 odysseus acpid: waiting for events: event logging is off
Sep  5 02:08:06 odysseus /etc/init.d/alsasound[1532]: Use of the opts variable is deprecated and will be
Sep  5 02:08:06 odysseus /etc/init.d/alsasound[1533]: removed in the future.
Sep  5 02:08:06 odysseus /etc/init.d/alsasound[1534]: Please use extra_commands or extra_started_commands.
Sep  5 02:08:06 odysseus start-stop-daemon: pam_unix(start-stop-daemon:session): session opened for user nobody by (uid=0)
Sep  5 02:08:06 odysseus cron[1631]: (CRON) STARTUP (V5.0)
Sep  5 02:08:06 odysseus /etc/init.d/wicd[1643]: Use of the opts variable is deprecated and will be
Sep  5 02:08:06 odysseus /etc/init.d/wicd[1644]: removed in the future.
Sep  5 02:08:06 odysseus /etc/init.d/wicd[1645]: Please use extra_commands or extra_started_commands.
Sep  5 02:08:08 odysseus acpid: client connected from 1461[0:0]

I hope this helps.


Reproducible: Always

Steps to Reproduce:
1.Reboot system after openrc-0.9.2 update
2.
3.
Actual Results:  
Above mentioned error messages at startup.

Expected Results:  
No error messages.

The warnings are annoying, but scripts appear to be starting as they should.
Comment 1 Andreas Proteus 2011-09-08 10:43:54 UTC
Easily fixed with:

cd /etc/init.d

find -type f -name '*' -print | xargs  \
    perl -pi -e's/(\W|^)opts/$1extra_commands/g'
Comment 2 Lars Wendler (Polynomial-C) gentoo-dev 2011-10-23 15:51:32 UTC
(In reply to comment #1)
> Easily fixed with:
> 
> cd /etc/init.d
> 
> find -type f -name '*' -print | xargs  \
>     perl -pi -e's/(\W|^)opts/$1extra_commands/g'

This is a really bad fix as opts= can become either extra_commands= _or_ extra_started_commands= depending on whether the extra option can only be run when the script was started before.
Comment 3 Lars Wendler (Polynomial-C) gentoo-dev 2011-10-23 15:59:21 UTC
+  23 Oct 2011; Lars Wendler <polynomial-c@gentoo.org> files/alsasound.initd-r4:
+  non-maintainer commit: Replaced deprecated opts variable in init script (bug
+  #381893).
+