[bitbake-devel] [PATCH 2/4] bitbake-layers: remove-layer: accept just layer directory
Paul Eggleton
paul.eggleton at linux.intel.com
Thu Aug 20 07:36:13 UTC 2015
On Wednesday 19 August 2015 10:51:35 Christopher Larson wrote:
> On Wed, Aug 19, 2015 at 6:20 AM, Paul Eggleton <
> paul.eggleton at linux.intel.com> wrote:
> > If the specified layer isn't a path, then just match on the directory.
> >
> > Fixes [YOCTO #7839].
> >
> > Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
> > ---
> >
> > bin/bitbake-layers | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/bin/bitbake-layers b/bin/bitbake-layers
> > index a0227d4..1b4694b 100755
> > --- a/bin/bitbake-layers
> > +++ b/bin/bitbake-layers
> > @@ -120,6 +120,8 @@ Removes the specified layer from bblayers.conf
> >
> > if args.layerdir.startswith('*'):
> > layerdir = args.layerdir
> >
> > + elif not '/' in args.layerdir:
> > + layerdir = '*/%s' % args.layerdir
> >
> > else:
> > layerdir = os.path.abspath(args.layerdir)
> >
> > (_, notremoved) = bb.utils.edit_bblayers_conf(bblayers_conf,
> >
> > None, layerdir)
>
> Shouldn't this check to see if args.layerdir is an existing path, instead?
IIRC I think I didn't do this on the offchance that the user happened to have a
directory named the same as one of the layers in their configuration in the
current directory. A corner case to be sure but one that does happen on my
machine (due to my less than stellar organisation skills).
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
More information about the bitbake-devel
mailing list