diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-05-13 16:02:41 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-05-22 22:26:30 +0100 |
commit | 569f8e09f0b077045d112dd569cbc4d47fdae08e (patch) | |
tree | 543339fe570d6ad4de7f22248aaeda99b274ad92 /scripts/lib/scriptutils.py | |
parent | d24a7d0fb16457e10e7a216d4c9ae3fb265113d1 (diff) | |
download | poky-569f8e09f0b077045d112dd569cbc4d47fdae08e.tar.gz |
recipetool/devtool: Update to work correctly with UNPACKDIR
Tweak recipetool and devtool to correctly use UNPACKDIR. This allows some
simplification of the code. This patch makes things basically work but there
are likely deeper improvements that can be made now that WORKDIR != UNPACKDIR.
(From OE-Core rev: d2eeaa88b27a2875c419591d1d91bcc85d7b129c)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/scriptutils.py')
-rw-r--r-- | scripts/lib/scriptutils.py | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/scripts/lib/scriptutils.py b/scripts/lib/scriptutils.py index f23e53cba9..81f0b01fa5 100644 --- a/scripts/lib/scriptutils.py +++ b/scripts/lib/scriptutils.py | |||
@@ -179,6 +179,8 @@ def fetch_url(tinfoil, srcuri, srcrev, destdir, logger, preserve_tmp=False, mirr | |||
179 | f.write('SRCREV = "%s"\n' % srcrev) | 179 | f.write('SRCREV = "%s"\n' % srcrev) |
180 | f.write('PV = "0.0+"\n') | 180 | f.write('PV = "0.0+"\n') |
181 | f.write('WORKDIR = "%s"\n' % tmpworkdir) | 181 | f.write('WORKDIR = "%s"\n' % tmpworkdir) |
182 | f.write('UNPACKDIR = "%s"\n' % destdir) | ||
183 | |||
182 | # Set S out of the way so it doesn't get created under the workdir | 184 | # Set S out of the way so it doesn't get created under the workdir |
183 | f.write('S = "%s"\n' % os.path.join(tmpdir, 'emptysrc')) | 185 | f.write('S = "%s"\n' % os.path.join(tmpdir, 'emptysrc')) |
184 | if not mirrors: | 186 | if not mirrors: |
@@ -232,10 +234,6 @@ def fetch_url(tinfoil, srcuri, srcrev, destdir, logger, preserve_tmp=False, mirr | |||
232 | if e.errno != errno.ENOTEMPTY: | 234 | if e.errno != errno.ENOTEMPTY: |
233 | raise | 235 | raise |
234 | 236 | ||
235 | bb.utils.mkdirhier(destdir) | ||
236 | for fn in os.listdir(tmpworkdir): | ||
237 | shutil.move(os.path.join(tmpworkdir, fn), destdir) | ||
238 | |||
239 | finally: | 237 | finally: |
240 | if not preserve_tmp: | 238 | if not preserve_tmp: |
241 | shutil.rmtree(tmpdir) | 239 | shutil.rmtree(tmpdir) |
@@ -271,12 +269,3 @@ def is_src_url(param): | |||
271 | return True | 269 | return True |
272 | return False | 270 | return False |
273 | 271 | ||
274 | def filter_src_subdirs(pth): | ||
275 | """ | ||
276 | Filter out subdirectories of initial unpacked source trees that we do not care about. | ||
277 | Used by devtool and recipetool. | ||
278 | """ | ||
279 | dirlist = os.listdir(pth) | ||
280 | filterout = ['git.indirectionsymlink', 'source-date-epoch', 'sstate-install-recipe_qa'] | ||
281 | dirlist = [x for x in dirlist if x not in filterout] | ||
282 | return dirlist | ||