1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-03 13:49:49 +00:00

lib/oe/buildcfg.py: Remove unused parameter

Several functions included the 'd' parameter but never used it,
additionally the value passed is always None.

(From OE-Core rev: ea871e7920726c7b2e57161092e21c62e6a5d91e)

Signed-off-by: Jermain Horsman <jermain.horsman@nedap.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
(cherry picked from commit 9e03ce0426576ebef3739dc1dfec4f7cd73ae094)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
This commit is contained in:
Jermain Horsman
2023-11-02 13:11:32 +01:00
committed by Steve Sakoman
parent 38e5d2ac60
commit b680a95e6b
+5 -5
View File
@@ -5,23 +5,23 @@ import bb.process
def detect_revision(d):
path = get_scmbasepath(d)
return get_metadata_git_revision(path, d)
return get_metadata_git_revision(path)
def detect_branch(d):
path = get_scmbasepath(d)
return get_metadata_git_branch(path, d)
return get_metadata_git_branch(path)
def get_scmbasepath(d):
return os.path.join(d.getVar('COREBASE'), 'meta')
def get_metadata_git_branch(path, d):
def get_metadata_git_branch(path):
try:
rev, _ = bb.process.run('git rev-parse --abbrev-ref HEAD', cwd=path)
except bb.process.ExecutionError:
rev = '<unknown>'
return rev.strip()
def get_metadata_git_revision(path, d):
def get_metadata_git_revision(path):
try:
rev, _ = bb.process.run('git rev-parse HEAD', cwd=path)
except bb.process.ExecutionError:
@@ -46,5 +46,5 @@ def get_layer_revisions(d):
layers = (d.getVar("BBLAYERS") or "").split()
revisions = []
for i in layers:
revisions.append((i, os.path.basename(i), get_metadata_git_branch(i, None).strip(), get_metadata_git_revision(i, None), is_layer_modified(i)))
revisions.append((i, os.path.basename(i), get_metadata_git_branch(i).strip(), get_metadata_git_revision(i), is_layer_modified(i)))
return revisions