[OE-core] [PATCH] package_rpm.bbclass : escape "%" in files and directories name

Sebastien MENNETRIER s.mennetrier at innotis.org
Tue Oct 29 16:37:43 UTC 2013


I'm not a specialist with rpm but I saw this documentation and I tried with
"%%" and with "\%" and it did not work.

I don't know if it's the best way but it work for me ;)

Regards,
Seb



2013/10/29 Paul Eggleton <paul.eggleton at linux.intel.com>

> Hi Sébastien,
>
> On Tuesday 29 October 2013 17:09:09 Sébastien Mennetrier wrote:
> > Fixes [YOCTO #5397]
> >
> > The rpm process replace all the "%name" in the spec file by the name of
> > the package. So, if the package is composed of some files or directories
> > named "%name...", the rpm package process failed.
> >
> > Replace all "%" present in files or directories names by "[%]"
> >
> > Signed-off-by: Sébastien Mennetrier <s.mennetrier at innotis.org>
> > ---
> >  meta/classes/package_rpm.bbclass | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/meta/classes/package_rpm.bbclass
> > b/meta/classes/package_rpm.bbclass index 36bad09..6c73e37 100644
> > --- a/meta/classes/package_rpm.bbclass
> > +++ b/meta/classes/package_rpm.bbclass
> > @@ -662,10 +662,13 @@ python write_specfile () {
> >      def walk_files(walkpath, target, conffiles):
> >          for rootpath, dirs, files in os.walk(walkpath):
> >              path = rootpath.replace(walkpath, "")
> > +            path = path.replace("%", "[%]")
> >              for dir in dirs:
> > +                dir = dir.replace("%", "[%]")
> >                  # All packages own the directories their files are in...
> >                  target.append('%dir "' + path + '/' + dir + '"')
> >              for file in files:
> > +                file = file.replace("%", "[%]")
> >                  if conffiles.count(path + '/' + file):
> >                      target.append('%config "' + path + '/' + file + '"')
> >                  else:
>
> Are you sure this is correct? The documentation I have been able to dig up
> via
> google seems to suggest that %% is the correct way to escape a % sign in a
> spec file.
>
> Cheers,
> Paul
>
> --
>
> Paul Eggleton
> Intel Open Source Technology Centre
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20131029/eb23db83/attachment-0002.html>


More information about the Openembedded-core mailing list