Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Dan Nicholson <nicholson@endlessm.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH] alsactl: Try to create state file directory
Date: Mon, 08 Jun 2015 15:22:41 +0200	[thread overview]
Message-ID: <s5h8ubuibby.wl-tiwai@suse.de> (raw)
In-Reply-To: <s5hd216ic86.wl-tiwai@suse.de>

At Mon, 08 Jun 2015 15:03:21 +0200,
Takashi Iwai wrote:
> 
> At Mon, 8 Jun 2015 05:52:18 -0700,
> Dan Nicholson wrote:
> > 
> > On Jun 8, 2015 4:38 AM, "Takashi Iwai" <tiwai@suse.de> wrote:
> > >
> > > At Fri,  5 Jun 2015 15:00:47 -0700,
> > > Dan Nicholson wrote:
> > > >
> > > > Try to create the directory for the state file when saving so we don't
> > > > depend on it being created ahead of time. This only checks for failures
> > > > on existing directories and doesn't try to create the leading
> > > > directories or workaround any other errors. This should catch the common
> > > > case where /var/lib exists, but /var/lib/alsa doesn't.
> > >
> > > I don't think it's the role of alsactl.  It saves a file on the
> > > certain directory.  If it doesn't exist, it's a failure of the
> > > installed package.
> > 
> > Sure, that's understandable, but there's a couple reasons I think this is
> > helpful addition.
> > 
> > First, if no path is supplied, store will save to /var/lib/alsa. So, it's
> > not as of the user has supplied a path it didn't setup correctly. It would
> > be nice if alsactl worked out of the box without additional integration by
> > packagers.
> 
> For that, a safer way would be to create /var/lib/alsa in the
> installation.
> 
> > Second, my real motivation for fixing this is to support stateless type of
> > systems that come with a clean /var. At Endless we're using ostree. The OS
> > is composed by Debian packages, and indeed alsa-utils is setup to create
> > /var/lib/alsa on install. However, to use the same OS snapshot for all
> > users, the contents of /var are stripped since they represent local system
> > state. We can certainly add a method for creating the directory at runtime,
> > but we believe it's more robust to have the program manage its own state as
> > much as possible.
> 
> Why not specifying the proper directory via alsactl -f option for
> user?

Also, your patch seems to care only the top directory.  For example,
if alsactl is configured to use /var/lib/alsa/more/deep/dir, it won't
work.


thanks,

Takashi

  reply	other threads:[~2015-06-08 13:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-05 22:00 [PATCH] alsactl: Try to create state file directory Dan Nicholson
2015-06-05 22:13 ` Dan Nicholson
2015-06-08 11:38 ` Takashi Iwai
2015-06-08 12:52   ` Dan Nicholson
2015-06-08 13:03     ` Takashi Iwai
2015-06-08 13:22       ` Takashi Iwai [this message]
2015-06-08 16:17         ` Dan Nicholson
2015-06-08 18:46           ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5h8ubuibby.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=nicholson@endlessm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox