From c4eb4d6365635a6eb2533f34a336425554e8a5ce Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sun, 27 Oct 2024 21:20:30 +0100 Subject: [PATCH] bitbake: fetch2/git: Use quote from shlex, not pipes The pipes module is removed in python 3.13. It was already using the quote function from shlex so use that directly instead. The module already imports shlex too so it is an easy substitution. (Bitbake rev: 53264dc14554890b3a2afc83cb1749cf10d86854) Signed-off-by: Richard Purdie Signed-off-by: Steve Sakoman --- bitbake/lib/bb/fetch2/git.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index 9ecc855af8..dc86aabfe2 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py @@ -861,9 +861,8 @@ class Git(FetchMethod): commits = None else: if not os.path.exists(rev_file) or not os.path.getsize(rev_file): - from pipes import quote commits = bb.fetch2.runfetchcmd( - "git rev-list %s -- | wc -l" % quote(rev), + "git rev-list %s -- | wc -l" % shlex.quote(rev), d, quiet=True).strip().lstrip('0') if commits: open(rev_file, "w").write("%d\n" % int(commits))