diff options
author | Niko Mauno <niko.mauno@vaisala.com> | 2023-10-21 15:51:11 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-10-26 15:29:35 +0100 |
commit | 91352a99f716d48e3d51af3d80eb1111b34384d1 (patch) | |
tree | d44e4dc9ab99ba5f12739d31b04c9701da749bdc | |
parent | 4962d27e5dec7422702c52a9bab7a5ba283a8f27 (diff) | |
download | poky-91352a99f716d48e3d51af3d80eb1111b34384d1.tar.gz |
package_rpm: Fix some pycodestyle issues
Fix following subset of observations reported by version 2.10.0 of
pycodestyle utility:
meta/classes-global/package_rpm.bbclass:65:46: E231 missing whitespace after ','
meta/classes-global/package_rpm.bbclass:66:46: E231 missing whitespace after ','
meta/classes-global/package_rpm.bbclass:107:19: E231 missing whitespace after ','
meta/classes-global/package_rpm.bbclass:109:69: E202 whitespace before ')'
meta/classes-global/package_rpm.bbclass:122:103: W291 trailing whitespace
meta/classes-global/package_rpm.bbclass:194:74: W291 trailing whitespace
meta/classes-global/package_rpm.bbclass:448:16: E713 test for membership should be 'not in'
meta/classes-global/package_rpm.bbclass:450:16: E713 test for membership should be 'not in'
meta/classes-global/package_rpm.bbclass:520:1: W293 blank line contains whitespace
meta/classes-global/package_rpm.bbclass:521:15: E231 missing whitespace after ','
meta/classes-global/package_rpm.bbclass:542:12: E713 test for membership should be 'not in'
meta/classes-global/package_rpm.bbclass:544:12: E713 test for membership should be 'not in'
meta/classes-global/package_rpm.bbclass:647:67: W291 trailing whitespace
(From OE-Core rev: 7920599c05c066767025063b277df73c6560753d)
Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes-global/package_rpm.bbclass | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/meta/classes-global/package_rpm.bbclass b/meta/classes-global/package_rpm.bbclass index 85d0bd7fce..992446a033 100644 --- a/meta/classes-global/package_rpm.bbclass +++ b/meta/classes-global/package_rpm.bbclass | |||
@@ -62,8 +62,8 @@ def write_rpm_perfiledata(srcname, d): | |||
62 | for dep in depends_dict: | 62 | for dep in depends_dict: |
63 | ver = depends_dict[dep] | 63 | ver = depends_dict[dep] |
64 | if dep and ver: | 64 | if dep and ver: |
65 | ver = ver.replace("(","") | 65 | ver = ver.replace("(", "") |
66 | ver = ver.replace(")","") | 66 | ver = ver.replace(")", "") |
67 | outfile.write(dep + " " + ver + " ") | 67 | outfile.write(dep + " " + ver + " ") |
68 | else: | 68 | else: |
69 | outfile.write(dep + " ") | 69 | outfile.write(dep + " ") |
@@ -104,9 +104,9 @@ python write_specfile () { | |||
104 | import oe.packagedata | 104 | import oe.packagedata |
105 | 105 | ||
106 | # append information for logs and patches to %prep | 106 | # append information for logs and patches to %prep |
107 | def add_prep(d,spec_files_bottom): | 107 | def add_prep(d, spec_files_bottom): |
108 | if d.getVarFlag('ARCHIVER_MODE', 'srpm') == '1' and bb.data.inherits_class('archiver', d): | 108 | if d.getVarFlag('ARCHIVER_MODE', 'srpm') == '1' and bb.data.inherits_class('archiver', d): |
109 | spec_files_bottom.append('%%prep -n %s' % d.getVar('PN') ) | 109 | spec_files_bottom.append('%%prep -n %s' % d.getVar('PN')) |
110 | spec_files_bottom.append('%s' % "echo \"include logs and patches, Please check them in SOURCES\"") | 110 | spec_files_bottom.append('%s' % "echo \"include logs and patches, Please check them in SOURCES\"") |
111 | spec_files_bottom.append('') | 111 | spec_files_bottom.append('') |
112 | 112 | ||
@@ -119,7 +119,7 @@ python write_specfile () { | |||
119 | source_list = os.listdir(ar_outdir) | 119 | source_list = os.listdir(ar_outdir) |
120 | source_number = 0 | 120 | source_number = 0 |
121 | for source in source_list: | 121 | for source in source_list: |
122 | # do_deploy_archives may have already run (from sstate) meaning a .src.rpm may already | 122 | # do_deploy_archives may have already run (from sstate) meaning a .src.rpm may already |
123 | # exist in ARCHIVER_OUTDIR so skip if present. | 123 | # exist in ARCHIVER_OUTDIR so skip if present. |
124 | if source.endswith(".src.rpm"): | 124 | if source.endswith(".src.rpm"): |
125 | continue | 125 | continue |
@@ -191,7 +191,7 @@ python write_specfile () { | |||
191 | 191 | ||
192 | def walk_files(walkpath, target, conffiles, dirfiles): | 192 | def walk_files(walkpath, target, conffiles, dirfiles): |
193 | # We can race against the ipk/deb backends which create CONTROL or DEBIAN directories | 193 | # We can race against the ipk/deb backends which create CONTROL or DEBIAN directories |
194 | # when packaging. We just ignore these files which are created in | 194 | # when packaging. We just ignore these files which are created in |
195 | # packages-split/ and not package/ | 195 | # packages-split/ and not package/ |
196 | # We have the odd situation where the CONTROL/DEBIAN directory can be removed in the middle of | 196 | # We have the odd situation where the CONTROL/DEBIAN directory can be removed in the middle of |
197 | # of the walk, the isdir() test would then fail and the walk code would assume its a file | 197 | # of the walk, the isdir() test would then fail and the walk code would assume its a file |
@@ -445,9 +445,9 @@ python write_specfile () { | |||
445 | rprovides = bb.utils.explode_dep_versions2(splitrprovides) | 445 | rprovides = bb.utils.explode_dep_versions2(splitrprovides) |
446 | rreplaces = bb.utils.explode_dep_versions2(splitrreplaces) | 446 | rreplaces = bb.utils.explode_dep_versions2(splitrreplaces) |
447 | for dep in rreplaces: | 447 | for dep in rreplaces: |
448 | if not dep in robsoletes: | 448 | if dep not in robsoletes: |
449 | robsoletes[dep] = rreplaces[dep] | 449 | robsoletes[dep] = rreplaces[dep] |
450 | if not dep in rprovides: | 450 | if dep not in rprovides: |
451 | rprovides[dep] = rreplaces[dep] | 451 | rprovides[dep] = rreplaces[dep] |
452 | splitrobsoletes = bb.utils.join_deps(robsoletes, commasep=False) | 452 | splitrobsoletes = bb.utils.join_deps(robsoletes, commasep=False) |
453 | splitrprovides = bb.utils.join_deps(rprovides, commasep=False) | 453 | splitrprovides = bb.utils.join_deps(rprovides, commasep=False) |
@@ -517,8 +517,8 @@ python write_specfile () { | |||
517 | spec_files_bottom.append('') | 517 | spec_files_bottom.append('') |
518 | 518 | ||
519 | del localdata | 519 | del localdata |
520 | 520 | ||
521 | add_prep(d,spec_files_bottom) | 521 | add_prep(d, spec_files_bottom) |
522 | spec_preamble_top.append('Summary: %s' % srcsummary) | 522 | spec_preamble_top.append('Summary: %s' % srcsummary) |
523 | spec_preamble_top.append('Name: %s' % srcname) | 523 | spec_preamble_top.append('Name: %s' % srcname) |
524 | spec_preamble_top.append('Version: %s' % srcversion) | 524 | spec_preamble_top.append('Version: %s' % srcversion) |
@@ -539,9 +539,9 @@ python write_specfile () { | |||
539 | rprovides = bb.utils.explode_dep_versions2(srcrprovides) | 539 | rprovides = bb.utils.explode_dep_versions2(srcrprovides) |
540 | rreplaces = bb.utils.explode_dep_versions2(srcrreplaces) | 540 | rreplaces = bb.utils.explode_dep_versions2(srcrreplaces) |
541 | for dep in rreplaces: | 541 | for dep in rreplaces: |
542 | if not dep in robsoletes: | 542 | if dep not in robsoletes: |
543 | robsoletes[dep] = rreplaces[dep] | 543 | robsoletes[dep] = rreplaces[dep] |
544 | if not dep in rprovides: | 544 | if dep not in rprovides: |
545 | rprovides[dep] = rreplaces[dep] | 545 | rprovides[dep] = rreplaces[dep] |
546 | srcrobsoletes = bb.utils.join_deps(robsoletes, commasep=False) | 546 | srcrobsoletes = bb.utils.join_deps(robsoletes, commasep=False) |
547 | srcrprovides = bb.utils.join_deps(rprovides, commasep=False) | 547 | srcrprovides = bb.utils.join_deps(rprovides, commasep=False) |
@@ -644,7 +644,7 @@ python do_package_rpm () { | |||
644 | return | 644 | return |
645 | 645 | ||
646 | # Construct the spec file... | 646 | # Construct the spec file... |
647 | # If the spec file already exist, and has not been stored into | 647 | # If the spec file already exist, and has not been stored into |
648 | # pseudo's files.db, it maybe cause rpmbuild src.rpm fail, | 648 | # pseudo's files.db, it maybe cause rpmbuild src.rpm fail, |
649 | # so remove it before doing rpmbuild src.rpm. | 649 | # so remove it before doing rpmbuild src.rpm. |
650 | srcname = d.getVar('PN') | 650 | srcname = d.getVar('PN') |