Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: "Sébastien Mennetrier" <s.mennetrier@innotis.org>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] package_rpm.bbclass : escape "%" in files and directories name
Date: Tue, 29 Oct 2013 16:16:33 +0000	[thread overview]
Message-ID: <1416831.14LsivE7s1@helios> (raw)
In-Reply-To: <1383062949-12318-1-git-send-email-s.mennetrier@innotis.org>

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@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


  reply	other threads:[~2013-10-29 16:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-29 16:09 [PATCH] package_rpm.bbclass : escape "%" in files and directories name Sébastien Mennetrier
2013-10-29 16:16 ` Paul Eggleton [this message]
2013-10-29 16:37   ` Sebastien MENNETRIER
  -- strict thread matches above, loose matches on Subject: below --
2015-05-20 14:48 Michaël Burtin

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=1416831.14LsivE7s1@helios \
    --to=paul.eggleton@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=s.mennetrier@innotis.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox