Skip to contentSkip to conversation

wic: rawcopy: make source filenames unique

PATCH In review Ed Bartosh 5 participants 6 messages Jul 1, 2016 – Jul 7, 2016

lore
Share & tools
lore

Ed Bartosh

author
#0 lore raw

PATCH 1/1 wic: rawcopy: make source filenames unique

Rawcopy plugin copies source files to build folder before using them to assemble result image. After assembling the image wic renames source files to <image>.p<partition number>. If the same source file is used in multiple partitions wic breaks trying to rename file that doesn't exist.

Added <line number> suffix to the files when copying them to the build dir. This should make filename unique even if the same source file is used for multiple partitions.

[YOCTO #9826]

---
 scripts/lib/wic/plugins/source/rawcopy.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/lib/wic/plugins/source/rawcopy.py +1 -1
index 0472f53..7ce0cc4 100644
@@ -67,7 +67,7 @@ class RawCopyPlugin(SourcePlugin):
             return
 
         src = os.path.join(bootimg_dir, source_params['file'])
-        dst = os.path.join(cr_workdir, source_params['file'])
+        dst = os.path.join(cr_workdir, "%s.%s" % (source_params['file'], part.lineno))
 
         if 'skip' in source_params:
             dd_cmd = "dd if=%s of=%s ibs=%s skip=1 conv=notrunc" % \
Signature · 1 line
2.1.4
#1 lore raw

Hi Ed,

This patch was already tested, can be applied to krogoth?

Regards,

Fabio

Quoted 41 lines · Ed Bartosh

Rawcopy plugin copies source files to build folder before using them to assemble result image. After assembling the image wic renames source files to <image>.p<partition number>. If the same source file is used in multiple partitions wic breaks trying to rename file that doesn't exist.

Added <line number> suffix to the files when copying them to the build dir. This should make filename unique even if the same source file is used for multiple partitions.

[YOCTO #9826]

---
 scripts/lib/wic/plugins/source/rawcopy.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/lib/wic/plugins/source/rawcopy.py +1 -1
index 0472f53..7ce0cc4 100644
@@ -67,7 +67,7 @@ class RawCopyPlugin(SourcePlugin):
             return
 
         src = os.path.join(bootimg_dir, source_params['file'])
-        dst = os.path.join(cr_workdir, source_params['file'])
+        dst = os.path.join(cr_workdir, "%s.%s" % (source_params['file'],
 part.lineno))
 
         if 'skip' in source_params:
             dd_cmd = "dd if=%s of=%s ibs=%s skip=1 conv=notrunc" % \

--
2.1.4

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#2 lore raw

[OE-core] problem with blacklisted packages

In reply to Ed Bartosh

Hi,
I'm having problem with some of the recipes which are blacklisted due to problems with compilation using GCC-6.

I wonder if there is a way to "whitelist" those packages without changing content of original recipe?

For now I have:

GCCVERSION = "5.%"

in my distro.conf so if a recipe is not building due to problems with gcc6 I simply edit the recipe and remove the line with PNBLACKLIST.

Is there a better way to deal with those problems? Can this blacklisting depend on "GCCVERSION" ?

Example of problematic recipe : crda (from crda_3.18.bb)

Thanks,
Piotr Lewicki

#3 lore raw

Re: [OE-core] problem with blacklisted packages

Quoted 9 lines · piotr.lewicki

Hi,
I'm having problem with some of the recipes which are blacklisted due to problems with compilation using GCC-6.

I wonder if there is a way to "whitelist" those packages without changing content of original recipe?

For now I have:

GCCVERSION = "5.%"

Quoted 8 lines

in my distro.conf so if a recipe is not building due to problems with gcc6 I simply edit the recipe and remove the line with PNBLACKLIST.

Is there a better way to deal with those problems? Can this blacklisting depend on "GCCVERSION" ?

Example of problematic recipe : crda (from crda_3.18.bb)

I asked this same question last week :-) I agree that not everyone is using the leading edge compilers and making those of us have to take such pains is a bit unfair.

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#4 lore raw

Re: [OE-core] problem with blacklisted packages

In reply to piotr.lewicki

You can override the blacklist to off. That is what I have been doing. Put the following in your local.conf or distro conf file. PNBLACKLIST[crda] = ""

Quoted 24 lines · piotr. lewicki

Hi,
I'm having problem with some of the recipes which are blacklisted due to problems with compilation using GCC-6.

I wonder if there is a way to "whitelist" those packages without changing content of original recipe?

For now I have:

GCCVERSION = "5.%"

in my distro.conf so if a recipe is not building due to problems with gcc6 I simply edit the recipe and remove the line with PNBLACKLIST.

Is there a better way to deal with those problems? Can this blacklisting depend on "GCCVERSION" ?

Example of problematic recipe : crda (from crda_3.18.bb)

Thanks,
Piotr Lewicki

#5 lore raw

Re: [OE-core] problem with blacklisted packages

Awesome.
Then maybe some comment should be added to meta/classes/blacklist.bbclass for clarity. Like this:

# * Package can be unblacklisted by setting:
# PNBLACKLIST[pn] = ""
#

Thanks,
Piotr Lewicki

Quoted 28 lines · Michael

You can override the blacklist to off. That is what I have been doing. Put the following in your local.conf or distro conf file. PNBLACKLIST[crda] = ""

Quoted 23 lines · piotr. lewicki

Hi,
I'm having problem with some of the recipes which are blacklisted due to problems with compilation using GCC-6.

I wonder if there is a way to "whitelist" those packages without changing content of original recipe?

For now I have:

GCCVERSION = "5.%"

in my distro.conf so if a recipe is not building due to problems with gcc6 I simply edit the recipe and remove the line with PNBLACKLIST.

Is there a better way to deal with those problems? Can this blacklisting depend on "GCCVERSION" ?

Example of problematic recipe : crda (from crda_3.18.bb)

Thanks,
Piotr Lewicki