All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] image_types: Ensure /init exists for cpio rootfs archives
Date: Fri, 06 Jan 2012 10:57:13 +0000	[thread overview]
Message-ID: <1325847433.20759.80.camel@ted> (raw)
In-Reply-To: <CAAQYJAtV9moez4thDcRtbm_0w=b+F_q2ag344PiUytRe_g-ysg@mail.gmail.com>

On Fri, 2012-01-06 at 02:00 +0100, Andrea Adami wrote:
> On Fri, Jan 6, 2012 at 12:36 AM, Darren Hart <dvhart@linux.intel.com> wrote:
> >
> >
> > On 01/05/2012 04:30 AM, Richard Purdie wrote:
> >> On Thu, 2012-01-05 at 01:05 +0100, Andrea Adami wrote:
> >>> I'd say we have to test for the in-existence of the file instead of
> >>> blindly touching it.
> >>> Smthg like
> >>>
> >>> if [! -e ${IMAGE_ROOTFS}/init]; then
> >>> touch ${IMAGE_ROOTFS}/init
> >>> fi
> >
> > Why? Touch creates it if it doesn't exist and updates the modtime if it
> > does. It doesn't modify the content of the file if it exists. What is
> > the motivation for testing for it's existence?
> >
> touch fails with Permission denied because one package in my rootfs
> already created the symlink
> 
> >>>
> >>>
> >>> Now, repeating that block for all 4 cpio images is a bit ugly... better ideas?
> >>
> >> Make it a shell function we call? I'd also check for
> >> ${base_sbindir}/init first too?
> >
> > Why check for that? So we can link to it instead of creating an empty file?
> 
> Nonsense, kernel looks for /init
> ( http://www.kernel.org/doc/Documentation/filesystems/ramfs-rootfs-initramfs.txt
> )

Yes, please ignore my comment about /sbin/init, I'm misremembering
something. We should deal with the symlink case though.

Cheers,

Richard




  parent reply	other threads:[~2012-01-06 11:04 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-28 23:45 [PATCH V3 0/3] New distribution definition for poky-tiny Darren Hart
2011-12-28 23:45 ` [PATCH 1/3] distro: Add POKY_DEFAULT_EXTRA_R* variables Darren Hart
2011-12-28 23:45 ` [PATCH 2/3] distro: Add poky-tiny distro definition Darren Hart
2012-01-04  0:19   ` Khem Raj
2012-01-04 16:16     ` Darren Hart
2012-01-04 16:31       ` Chris Larson
2012-01-04 13:56   ` Leon Woestenberg
2012-01-04 14:12     ` Richard Purdie
2011-12-28 23:45 ` [PATCH 3/3] image_types: Ensure /init exists for cpio rootfs archives Darren Hart
2011-12-28 23:52   ` Darren Hart
2011-12-28 23:54   ` [PATCH] " Darren Hart
2011-12-29 17:39     ` Chris Larson
2011-12-30  8:25     ` Andrea Adami
2011-12-30 23:18       ` Darren Hart
2012-01-03 14:57         ` Andrea Adami
2012-01-04  0:07     ` Saul Wold
2012-01-04 23:49       ` Andrea Adami
2012-01-05  0:05         ` Andrea Adami
2012-01-05 12:30           ` Richard Purdie
2012-01-05 23:36             ` Darren Hart
2012-01-06  1:00               ` Andrea Adami
2012-01-06  1:10                 ` Andrea Adami
2012-01-06 10:57                 ` Richard Purdie [this message]
2012-01-06 22:58                   ` Andrea Adami
2012-01-10 23:07                     ` Andrea Adami
2012-01-10 23:28                       ` Andrea Adami
2011-12-29  0:16 ` [PATCH V3 0/3] New distribution definition for poky-tiny Chris Larson
2011-12-29  1:07 ` Leon Woestenberg
2011-12-29  1:51   ` Chris Larson
2011-12-29  2:12     ` Leon Woestenberg
2012-01-06 11:52       ` Richard Purdie
2011-12-29  5:55   ` Darren Hart

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=1325847433.20759.80.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@lists.openembedded.org \
    /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.