summaryrefslogtreecommitdiffstats
path: root/external/poky/scripts/lib/wic/plugins/source/rawcopy.py
diff options
context:
space:
mode:
Diffstat (limited to 'external/poky/scripts/lib/wic/plugins/source/rawcopy.py')
-rw-r--r--external/poky/scripts/lib/wic/plugins/source/rawcopy.py20
1 files changed, 5 insertions, 15 deletions
diff --git a/external/poky/scripts/lib/wic/plugins/source/rawcopy.py b/external/poky/scripts/lib/wic/plugins/source/rawcopy.py
index e86398ac..3c4997d8 100644
--- a/external/poky/scripts/lib/wic/plugins/source/rawcopy.py
+++ b/external/poky/scripts/lib/wic/plugins/source/rawcopy.py
@@ -1,18 +1,5 @@
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# SPDX-License-Identifier: GPL-2.0-only
#
import logging
@@ -70,7 +57,10 @@ class RawCopyPlugin(SourcePlugin):
raise WicError("No file specified")
src = os.path.join(kernel_dir, source_params['file'])
- dst = os.path.join(cr_workdir, "%s.%s" % (source_params['file'], part.lineno))
+ dst = os.path.join(cr_workdir, "%s.%s" % (os.path.basename(source_params['file']), part.lineno))
+
+ if not os.path.exists(os.path.dirname(dst)):
+ os.makedirs(os.path.dirname(dst))
if 'skip' in source_params:
sparse_copy(src, dst, skip=int(source_params['skip']))