Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 875860 - manifest.py calls non-existent updateFileHashes() (function was renamed)
Summary: manifest.py calls non-existent updateFileHashes() (function was renamed)
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on: 873757
Blocks:
  Show dependency tree
 
Reported: 2022-10-07 13:11 UTC by Petr Bahula
Modified: 2022-11-20 04:46 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
etilda.py = internal tool for handling ebuilds (etilda.py,6.71 KB, text/x-python)
2022-10-07 13:42 UTC, Petr Bahula
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Bahula 2022-10-07 13:11:16 UTC
Portage 3.0.38.1 (python 3.10.6-final-0, default/linux/amd64/17.1/no-multilib, gcc-11.3.0, glibc-2.35-r8, 5.15.41-gentoo x86_64)

    manifest.addFile( "EBUILD", os.path.basename( ebuild_name ) )
  File "/usr/lib/python3.10/site-packages/portage/manifest.py", line 480, in addFile
    self.updateFileHashes(
AttributeError: 'Manifest' object has no attribute 'updateFileHashes'. Did you mean: 'updateAllFileHashes'?

Original /usr/lib/python3.10/site-packages/portage/manifest.py :

    479         if self.required_hashes.difference(set(self.fhashdict[ftype][fname])):
    480             self.updateFileHashes(
    481                 ftype, fname, checkExisting=False, ignoreMissing=ignoreMissing
    482             )

Corrected:

    479         if self.required_hashes.difference(set(self.fhashdict[ftype][fname])):
    480             self.updateAllFileHashes(
    481                 ftype, [fname], checkExisting=False, ignoreMissing=ignoreMissing
    482             )
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-10-07 13:24:28 UTC
Can you give some context how you hit this? With a reproducer please, out of interest?
Comment 2 Petr Bahula 2022-10-07 13:41:26 UTC
(In reply to Sam James from comment #1)
> Can you give some context how you hit this? With a reproducer please, out of
> interest?

We have an internal tool etilda.py for handling ebuilds during development. Look in attachment.
Comment 3 Petr Bahula 2022-10-07 13:42:38 UTC
Created attachment 822742 [details]
etilda.py = internal tool for handling ebuilds
Comment 4 Larry the Git Cow gentoo-dev 2022-10-17 19:37:20 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=bd0b901ff3024fbb2289b370bde475b4b435294c

commit bd0b901ff3024fbb2289b370bde475b4b435294c
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-10-07 19:14:28 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-10-17 19:37:16 +0000

    portage: manifest: fix Manifest.addFile() call to renamed updateFileHashes
    
    Bug: https://bugs.gentoo.org/875860
    Fixes: 5ac2a8f08101501d0416ad9d79e277c363cea85e
    Fixes: 64d84ce2d9a333e83e2a5fba5e7ec95f936959e7
    Closes: https://github.com/gentoo/portage/pull/921
    Signed-off-by: Sam James <sam@gentoo.org>

 lib/portage/manifest.py                 | 16 ++++++++--------
 lib/portage/tests/util/test_manifest.py | 31 +++++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+), 8 deletions(-)
Comment 5 Larry the Git Cow gentoo-dev 2022-11-20 03:05:57 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=203e0d0083b5e7d8098785ec8862c02f6baf5534

commit 203e0d0083b5e7d8098785ec8862c02f6baf5534
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-11-20 03:04:40 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-11-20 03:05:40 +0000

    sys-apps/portage: add 3.0.39
    
    Closes: https://bugs.gentoo.org/365655
    Closes: https://bugs.gentoo.org/757525
    Closes: https://bugs.gentoo.org/871573
    Closes: https://bugs.gentoo.org/875812
    Closes: https://bugs.gentoo.org/875860
    Closes: https://bugs.gentoo.org/877215
    Closes: https://bugs.gentoo.org/877271
    Closes: https://bugs.gentoo.org/877357
    Closes: https://bugs.gentoo.org/877419
    Closes: https://bugs.gentoo.org/873757
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/portage/Manifest              |   1 +
 sys-apps/portage/portage-3.0.39.ebuild | 273 +++++++++++++++++++++++++++++++++
 2 files changed, 274 insertions(+)