diff mbox series

[v2,2/4] package_pkgdata: fix typo to stop calling undefined function

Message ID 20260402-dead_code_and_unification-v2-2-259169372299@gmail.com
State Changes Requested
Headers show
Series Slight code cleanup - remove dead code, fix typos, unify patterns | expand

Commit Message

Adam Blank April 2, 2026, 3:39 p.m. UTC
The function is named 'package_populate_pkgdata_dir' but the
call was to 'staging_package_populate_pkgdata_dir'.

Signed-off-by: Adam Blank <adam.blank.g@gmail.com>
---
 meta/classes-global/package_pkgdata.bbclass | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Mathieu Dubois-Briand April 3, 2026, 8 a.m. UTC | #1
On Thu Apr 2, 2026 at 5:39 PM CEST, Adam Blank via lists.openembedded.org wrote:
> The function is named 'package_populate_pkgdata_dir' but the
> call was to 'staging_package_populate_pkgdata_dir'.
>
> Signed-off-by: Adam Blank <adam.blank.g@gmail.com>
> ---

Hi Adam,

Thanks for your patch.

I can't say if this is another issue or something wrong with the tests,
but two of these are failing because of this patch:

2026-04-02 19:56:53,924 - oe-selftest - INFO - sstatetests.SStateHashSameSigs2.test_sstate_allarch_samesigs (subunit.RemotedTestCase)
2026-04-02 19:56:53,926 - oe-selftest - INFO -  ... FAIL
...
2026-04-02 19:56:53,926 - oe-selftest - INFO - 13: 17/52 271/679 (95.16s) (0 failed) (sstatetests.SStateHashSameSigs2.test_sstate_allarch_samesigs)
2026-04-02 19:56:53,926 - oe-selftest - INFO - testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/openembedded-core/meta/lib/oeqa/selftest/cases/sstatetests.py", line 469, in test_sstate_allarch_samesigs
    self.sstate_common_samesigs(configA, configB, allarch=True)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/openembedded-core/meta/lib/oeqa/selftest/cases/sstatetests.py", line 206, in sstate_common_samesigs
    self.assertEqual(files1, files2)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/unittest/case.py", line 907, in assertEqual
    assertion_func(first, second, msg=msg)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/unittest/case.py", line 1206, in assertDictEqual
    self.fail(self._formatMessage(msg, standardMsg))
    ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/unittest/case.py", line 732, in fail
    raise self.failureException(msg)
AssertionError: {'nat[31 chars]ckage_qa': '1cf298a771718a59519250687e84c92de5[302150 chars]adb'} != {'nat[31 chars]ckagedata': 'e9b33afd6d363736c82af96ef0a991046[302150 chars]bb4'}
  {'adwaita-icon-theme/do_compile': '18aab6f6fe8018875194a0636a0f373a55f73fb4b8129d77a2e1d086d2ec578e',
   'adwaita-icon-theme/do_configure': '7380b23df0d0ef5ef3abc408bf06c4b25284a707bbb39391092412c9e5fdd0f0',
-  'adwaita-icon-theme/do_create_package_spdx': '71291be90a9aae925880a5fb43a06ac5e77b516d30297dc2a512939386160379',
+  'adwaita-icon-theme/do_create_package_spdx': 'e79bbe627c2567a418bd672bef357e0e2561f24100be568749bd5e0618503328',
   'adwaita-icon-theme/do_create_recipe_spdx': '4a4714266c3fb489eb4e563917ccccb38cc0b9f66594a6107f3a502036a3c5b3',
-  'adwaita-icon-theme/do_create_spdx': 'd4a4708d298a5dd62e647fe7e886d5c673e9c3aac4365c743360dbcafb18be38',
+  'adwaita-icon-theme/do_create_spdx': '98cd801f20f0ffb0e9bdffd12ee44f748e4d292e828f1cd37b7fdb1d24f195d6',
   'adwaita-icon-theme/do_deploy_source_date_epoch': '9f88202fbc0193ad762daea7e7b614cbed0c61ff6a60a2dfba4bbd770e21f91f',
   'adwaita-icon-theme/do_fetch': '2ddf4b31dca442e88c40cbadb087f7f14aa5e7903ddf25a9eaa010a784df31e0',
   'adwaita-icon-theme/do_install': '997dd989d8d5379abaeaea11cb76db90603e4fd8e5b15eaa7d3bed5efc6c2f28',
-  'adwaita-icon-theme/do_package': 'ae407bcb5d420c505b3de2dd5d67eb6c9d81b31da8008393c72bda7d1f7d4e3e',
-  'adwaita-icon-theme/do_package_qa': '0f93d17760ba7d350147722bf7a49a88580f3d2d511acace784be8737ab28624',
-  'adwaita-icon-theme/do_package_write_rpm': 'd672adc3f3a53d3392340974f4a7edc92bd455a6b5782a527a0f22f76ffc18d3',
-  'adwaita-icon-theme/do_packagedata': '252ddb5c78401938a7e0cc11803932ec5d5c55083a7bdcdee4e23c1f992c0f2f',
+  'adwaita-icon-theme/do_package': 'fcae5f450961cf5319679099fa4948312f289150a73b75f4e6271aa41eaf35f4',
+  'adwaita-icon-theme/do_package_qa': '4d363ce538fd446486e157c8c4e7c304e8bb39fcddc70effc8779dee824984e8',
+  'adwaita-icon-theme/do_package_write_rpm': 'b9b134d7912f00b50297f2d18d64ff3589054c48574655b5f6749d9517451651',
+  'adwaita-icon-theme/do_packagedata': '25015261e21fd33d2c29b66af7158a8818612793eb676574355245c359bfbb99',
   'adwaita-icon-theme/do_patch': 'fbb075a802b4418e22df82386efbb58dd9bcb6902a5a2599d7b57921ba142e29',
...
2026-04-02 19:59:11,956 - oe-selftest - INFO - sstatetests.SStateHashSameSigs2.test_sstate_nativesdk_samesigs_multilib (subunit.RemotedTestCase)
2026-04-02 19:59:11,957 - oe-selftest - INFO -  ... FAIL
...

https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/3580
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3678
https://autobuilder.yoctoproject.org/valkyrie/#/builders/48/builds/3468

Can you have a look at the issue?

Thanks,
Mathieu
Adam Blank April 3, 2026, 10:32 a.m. UTC | #2
Hmmm, can't see any connection between those tests and this particular
patch...
The thing is, that since the patch fixes a call to an undefined function,
there could not have been a test covering this case in the first place ;-)
In addition, the function call takes place only in the 'bitbake -b' case...

Where can it be found, which other changes took place in those builds?

On Fri, 3 Apr 2026 at 10:00, Mathieu Dubois-Briand <
mathieu.dubois-briand@bootlin.com> wrote:

> On Thu Apr 2, 2026 at 5:39 PM CEST, Adam Blank via lists.openembedded.org
> wrote:
> > The function is named 'package_populate_pkgdata_dir' but the
> > call was to 'staging_package_populate_pkgdata_dir'.
> >
> > Signed-off-by: Adam Blank <adam.blank.g@gmail.com>
> > ---
>
> Hi Adam,
>
> Thanks for your patch.
>
> I can't say if this is another issue or something wrong with the tests,
> but two of these are failing because of this patch:
>
> 2026-04-02 19:56:53,924 - oe-selftest - INFO -
> sstatetests.SStateHashSameSigs2.test_sstate_allarch_samesigs
> (subunit.RemotedTestCase)
> 2026-04-02 19:56:53,926 - oe-selftest - INFO -  ... FAIL
> ...
> 2026-04-02 19:56:53,926 - oe-selftest - INFO - 13: 17/52 271/679 (95.16s)
> (0 failed) (sstatetests.SStateHashSameSigs2.test_sstate_allarch_samesigs)
> 2026-04-02 19:56:53,926 - oe-selftest - INFO -
> testtools.testresult.real._StringException: Traceback (most recent call
> last):
>   File
> "/srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/openembedded-core/meta/lib/oeqa/selftest/cases/sstatetests.py",
> line 469, in test_sstate_allarch_samesigs
>     self.sstate_common_samesigs(configA, configB, allarch=True)
>     ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File
> "/srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/openembedded-core/meta/lib/oeqa/selftest/cases/sstatetests.py",
> line 206, in sstate_common_samesigs
>     self.assertEqual(files1, files2)
>     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
>   File "/usr/lib/python3.13/unittest/case.py", line 907, in assertEqual
>     assertion_func(first, second, msg=msg)
>     ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/usr/lib/python3.13/unittest/case.py", line 1206, in
> assertDictEqual
>     self.fail(self._formatMessage(msg, standardMsg))
>     ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/usr/lib/python3.13/unittest/case.py", line 732, in fail
>     raise self.failureException(msg)
> AssertionError: {'nat[31 chars]ckage_qa':
> '1cf298a771718a59519250687e84c92de5[302150 chars]adb'} != {'nat[31
> chars]ckagedata': 'e9b33afd6d363736c82af96ef0a991046[302150 chars]bb4'}
>   {'adwaita-icon-theme/do_compile':
> '18aab6f6fe8018875194a0636a0f373a55f73fb4b8129d77a2e1d086d2ec578e',
>    'adwaita-icon-theme/do_configure':
> '7380b23df0d0ef5ef3abc408bf06c4b25284a707bbb39391092412c9e5fdd0f0',
> -  'adwaita-icon-theme/do_create_package_spdx':
> '71291be90a9aae925880a5fb43a06ac5e77b516d30297dc2a512939386160379',
> +  'adwaita-icon-theme/do_create_package_spdx':
> 'e79bbe627c2567a418bd672bef357e0e2561f24100be568749bd5e0618503328',
>    'adwaita-icon-theme/do_create_recipe_spdx':
> '4a4714266c3fb489eb4e563917ccccb38cc0b9f66594a6107f3a502036a3c5b3',
> -  'adwaita-icon-theme/do_create_spdx':
> 'd4a4708d298a5dd62e647fe7e886d5c673e9c3aac4365c743360dbcafb18be38',
> +  'adwaita-icon-theme/do_create_spdx':
> '98cd801f20f0ffb0e9bdffd12ee44f748e4d292e828f1cd37b7fdb1d24f195d6',
>    'adwaita-icon-theme/do_deploy_source_date_epoch':
> '9f88202fbc0193ad762daea7e7b614cbed0c61ff6a60a2dfba4bbd770e21f91f',
>    'adwaita-icon-theme/do_fetch':
> '2ddf4b31dca442e88c40cbadb087f7f14aa5e7903ddf25a9eaa010a784df31e0',
>    'adwaita-icon-theme/do_install':
> '997dd989d8d5379abaeaea11cb76db90603e4fd8e5b15eaa7d3bed5efc6c2f28',
> -  'adwaita-icon-theme/do_package':
> 'ae407bcb5d420c505b3de2dd5d67eb6c9d81b31da8008393c72bda7d1f7d4e3e',
> -  'adwaita-icon-theme/do_package_qa':
> '0f93d17760ba7d350147722bf7a49a88580f3d2d511acace784be8737ab28624',
> -  'adwaita-icon-theme/do_package_write_rpm':
> 'd672adc3f3a53d3392340974f4a7edc92bd455a6b5782a527a0f22f76ffc18d3',
> -  'adwaita-icon-theme/do_packagedata':
> '252ddb5c78401938a7e0cc11803932ec5d5c55083a7bdcdee4e23c1f992c0f2f',
> +  'adwaita-icon-theme/do_package':
> 'fcae5f450961cf5319679099fa4948312f289150a73b75f4e6271aa41eaf35f4',
> +  'adwaita-icon-theme/do_package_qa':
> '4d363ce538fd446486e157c8c4e7c304e8bb39fcddc70effc8779dee824984e8',
> +  'adwaita-icon-theme/do_package_write_rpm':
> 'b9b134d7912f00b50297f2d18d64ff3589054c48574655b5f6749d9517451651',
> +  'adwaita-icon-theme/do_packagedata':
> '25015261e21fd33d2c29b66af7158a8818612793eb676574355245c359bfbb99',
>    'adwaita-icon-theme/do_patch':
> 'fbb075a802b4418e22df82386efbb58dd9bcb6902a5a2599d7b57921ba142e29',
> ...
> 2026-04-02 19:59:11,956 - oe-selftest - INFO -
> sstatetests.SStateHashSameSigs2.test_sstate_nativesdk_samesigs_multilib
> (subunit.RemotedTestCase)
> 2026-04-02 19:59:11,957 - oe-selftest - INFO -  ... FAIL
> ...
>
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/3580
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3678
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/48/builds/3468
>
> Can you have a look at the issue?
>
> Thanks,
> Mathieu
>
> --
> Mathieu Dubois-Briand, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
>
>
Mathieu Dubois-Briand April 3, 2026, 11:31 a.m. UTC | #3
On Fri Apr 3, 2026 at 12:32 PM CEST, Adam Blank wrote:
> Hmmm, can't see any connection between those tests and this particular
> patch...
> The thing is, that since the patch fixes a call to an undefined function,
> there could not have been a test covering this case in the first place ;-)
> In addition, the function call takes place only in the 'bitbake -b' case...
>
> Where can it be found, which other changes took place in those builds?
>
> On Fri, 3 Apr 2026 at 10:00, Mathieu Dubois-Briand <
> mathieu.dubois-briand@bootlin.com> wrote:
>

The tested branch can be found here:
https://git.yoctoproject.org/poky-ci-archive/log/?h=oecore/autobuilder.yoctoproject.org/valkyrie/a-full-3579

But I confirm git bisect points to this commit, and the error is gone
after a revert. You can easily reproduce the issue on your side:
oe-selftest -r sstatetests.SStateHashSameSigs2.test_sstate_allarch_samesigs

Thanks,
Mathieu
diff mbox series

Patch

diff --git a/meta/classes-global/package_pkgdata.bbclass b/meta/classes-global/package_pkgdata.bbclass
index f653bd9240..5312ca873c 100644
--- a/meta/classes-global/package_pkgdata.bbclass
+++ b/meta/classes-global/package_pkgdata.bbclass
@@ -47,7 +47,7 @@  python package_prepare_pkgdata() {
     # Detect bitbake -b usage
     nodeps = d.getVar("BB_LIMITEDDEPS") or False
     if nodeps:
-        staging_package_populate_pkgdata_dir(pkgdatadir, d)
+        package_populate_pkgdata_dir(pkgdatadir, d)
         return
 
     start = None
@@ -169,5 +169,3 @@  python package_prepare_pkgdata() {
 }
 package_prepare_pkgdata[cleandirs] = "${WORKDIR_PKGDATA}"
 package_prepare_pkgdata[vardepsexclude] += "MACHINE_ARCH PACKAGE_EXTRA_ARCHS SDK_ARCH BUILD_ARCH SDK_OS BB_TASKDEPDATA SSTATETASKS"
-
-