All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Shelton <ben.shelton@ni.com>
To: Otavio Salvador <otavio@ossystems.com.br>
Cc: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 10/20] udev-cache: parametrize sysconf file paths
Date: Mon, 4 Aug 2014 16:48:01 -0500	[thread overview]
Message-ID: <20140804214801.GC10174@bshelton-desktop> (raw)
In-Reply-To: <CAP9ODKqykzm_0qQ2YY3pTs=Bofuwq5PQC7_4xb_C+S6ak43cEA@mail.gmail.com>

On 08/04, Otavio Salvador wrote:
> On Mon, Aug 4, 2014 at 6:38 PM, Ben Shelton <ben.shelton@ni.com> wrote:
> > On 08/04, Otavio Salvador wrote:
> >> On Mon, Aug 4, 2014 at 3:41 PM, Ben Shelton <ben.shelton@ni.com> wrote:
> >> > From: Richard Tollerton <rich.tollerton@ni.com>
> >> >
> >> > The udev-cache facility uses files that represent system states, to
> >> > ensure that the cache tarball is valid to apply. These paths were
> >> > hardcoded in several places; collect them into DEVCACHE_SYSCONF and
> >> > DEVCACHE_CURRENT_SYSCONF in the defaults file.
> >> >
> >> > Natinst-Rally-ID: TA44427
> >> > Acked-by: Gratian Crisan <gratian.crisan@ni.com>
> >> > Natinst-ReviewBoard-ID: 58620
> >> > Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
> >> > ---
> >> ...
> >> > --- a/meta/recipes-core/udev/udev/udev-cache
> >> > +++ b/meta/recipes-core/udev/udev/udev-cache
> >> > @@ -23,12 +23,12 @@ if [ "$ROOTFS_READ_ONLY" = "yes" ]; then
> >> >      exit 0
> >> >  fi
> >> >
> >> > -if [ "$DEVCACHE" != "" -a -e /dev/shm/udev.cache ]; then
> >> > +if [ "$DEVCACHE" != "" -a -e "$DEVCACHE_CURRENT_SYSCONF" ]; then
> >> >         [ "${VERBOSE}" != "no" ] && echo "Populating dev cache"
> >> >         (
> >> >                 tar czf "${DEVCACHE}.tmp" dev -C / --exclude=log
> >> >                 mv -f "${DEVCACHE}.tmp" "$DEVCACHE"
> >> > -               mv /dev/shm/udev.cache /etc/udev/cache.data
> >> > +               mv "$DEVCACHE_CURRENT_SYSCONF" "$DEVCACHE_SYSCONF"
> >> >         ) &
> >> >  fi
> >> >
> >> > diff --git a/meta/recipes-core/udev/udev/udev-cache.default b/meta/recipes-core/udev/udev/udev-cache.default
> >> > index 656c2a4..7f39a68 100644
> >> > --- a/meta/recipes-core/udev/udev/udev-cache.default
> >> > +++ b/meta/recipes-core/udev/udev/udev-cache.default
> >> > @@ -2,4 +2,8 @@
> >> >
> >> >  # Comment this out to disable device cache
> >> >  DEVCACHE="/etc/udev-cache.tar.gz"
> >> > +
> >> > +DEVCACHE_SYSCONF="/etc/udev/cache.data"
> >> > +DEVCACHE_CURRENT_SYSCONF="/dev/shm/udev.cache"
> >> > +
> >> >  PROBE_PLATFORM_BUS="yes"
> >> > --
> >>
> >> Most users won't need to change this so I think this should have a
> >> default value in the script and don't be added in the default.
> >>
> >
> > My concern is that the uses of both DEVCACHE_SYSCONF and
> > DEVCACHE_CURRENT_SYSCONF are split across two script files: udev/init
> > and udev/udev-cache.  I don't like replicating the same default setting
> > in both, but if that's preferable to adding it in the default, that's
> > OK.
> 
> I think this also provides a backward compatibility for users
> providing their own default file. Otherwise you'll break those.

Fair point.  I'll make the change.

Thanks,
Ben

> 
> -- 
> Otavio Salvador                             O.S. Systems
> http://www.ossystems.com.br        http://code.ossystems.com.br
> Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


  reply	other threads:[~2014-08-04 21:48 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-04 18:40 [PATCH 00/20] udev-cache related changes Ben Shelton
2014-08-04 18:40 ` [PATCH 01/20] udev-cache: Compress the cache Ben Shelton
2014-08-04 19:29   ` Otavio Salvador
2014-08-04 22:44   ` Khem Raj
2014-08-04 23:45     ` Ben Shelton
2014-08-05  0:06       ` Khem Raj
2014-08-05 19:00   ` Randy MacLeod
2014-08-05 20:09     ` Otavio Salvador
2014-08-05 20:35       ` Randy MacLeod
2014-08-06  2:08         ` Ben Shelton
2014-08-22 15:24         ` Patch message guidelines and internal/corporate fields Richard Tollerton
2014-08-23  8:40           ` Richard Purdie
2014-08-24 15:33             ` Paul Eggleton
2014-08-25  1:19               ` Khem Raj
2014-08-04 18:40 ` [PATCH 02/20] udev-cache: choose a more descriptive cache filename Ben Shelton
2014-08-04 19:30   ` Otavio Salvador
2014-08-04 18:40 ` [PATCH 03/20] udev-cache: Honor VERBOSE for bootup message Ben Shelton
2014-08-04 19:30   ` Otavio Salvador
2014-08-04 18:40 ` [PATCH 04/20] udev-cache: Don't ignore errors from cache extract Ben Shelton
2014-08-04 19:32   ` Otavio Salvador
2014-08-04 18:40 ` [PATCH 05/20] busybox: tar: enable CONFIG_FEATURE_TAR_LONG_OPTIONS Ben Shelton
2014-08-04 19:33   ` Otavio Salvador
2014-08-04 18:40 ` [PATCH 06/20] udev-cache: Remove superfluous subshell on extract Ben Shelton
2014-08-04 19:33   ` Otavio Salvador
2014-08-04 18:40 ` [PATCH 07/20] udev-cache: Update cache tarball atomically Ben Shelton
2014-08-04 19:35   ` Otavio Salvador
2014-08-04 18:41 ` [PATCH 08/20] udev-cache: Create cache asynchronously Ben Shelton
2014-08-04 19:41   ` Otavio Salvador
2014-08-04 21:18     ` Richard Tollerton
2014-08-04 21:22       ` Otavio Salvador
2014-08-04 21:37         ` Richard Tollerton
2014-08-04 21:41           ` Otavio Salvador
2014-08-04 22:07             ` Richard Tollerton
2014-08-04 18:41 ` [PATCH 09/20] udev-cache.default: documentation update Ben Shelton
2014-08-04 19:42   ` Otavio Salvador
2014-08-04 18:41 ` [PATCH 10/20] udev-cache: parametrize sysconf file paths Ben Shelton
2014-08-04 19:44   ` Otavio Salvador
2014-08-04 21:38     ` Ben Shelton
2014-08-04 21:42       ` Otavio Salvador
2014-08-04 21:48         ` Ben Shelton [this message]
2014-08-04 18:41 ` [PATCH 11/20] udev-cache: parametrize tar options Ben Shelton
2014-08-04 19:44   ` Otavio Salvador
2014-08-04 21:40     ` Ben Shelton
2014-08-04 18:41 ` [PATCH 12/20] udev-cache: fix timestamp errors on systems lacking an RTC Ben Shelton
2014-08-04 18:41 ` [PATCH 13/20] udev-cache: Avoid caching udev.cache or non-devfs filesystems Ben Shelton
2014-08-04 18:41 ` [PATCH 14/20] udev-cache: refactor; improve verbosity and error handling Ben Shelton
2014-08-04 18:41 ` [PATCH 15/20] udev-cache: don't attempt to extract cache if it doesn't exist Ben Shelton
2014-08-04 18:41 ` [PATCH 16/20] udev-cache: invalidate on rules.d changes Ben Shelton
2014-08-04 18:41 ` [PATCH 17/20] udev-cache: fix udev-cache changes to work with busybox tar Ben Shelton
2014-08-04 18:41 ` [PATCH 18/20] udev: Make build MACHINE-specific Ben Shelton
2014-08-04 19:43   ` Martin Jansa
2014-08-04 18:41 ` [PATCH 19/20] udev: Disable keymap support on machines lacking keyboard support Ben Shelton
2014-08-04 19:41   ` Martin Jansa
2014-08-04 18:41 ` [PATCH 20/20] udev: don't halt if devtmpfs can't be mounted Ben Shelton
2014-08-04 19:40   ` Martin Jansa

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=20140804214801.GC10174@bshelton-desktop \
    --to=ben.shelton@ni.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=otavio@ossystems.com.br \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.