Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 916149 - app-portage/unsymlink-lib broken from unicode changes (probably?)
Summary: app-portage/unsymlink-lib broken from unicode changes (probably?)
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - External Interaction (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on: 916031
Blocks:
  Show dependency tree
 
Reported: 2023-10-23 07:44 UTC by Mart Raudsepp
Modified: 2023-10-25 05:49 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mart Raudsepp gentoo-dev 2023-10-23 07:44:15 UTC
# unsymlink-lib --analyze 
Analyzing files installed into lib & lib64...
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.11/unsymlink-lib", line 838, in <module>
    main()
  File "/usr/lib/python-exec/python3.11/unsymlink-lib", line 728, in main
    m.analyze(usr_merge, prefixes)
  File "/usr/lib/python-exec/python3.11/unsymlink-lib", line 187, in analyze
    trees = create_trees(config_root=self.eroot)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/portage/__init__.py", line 631, in create_trees
    settings = config(
               ^^^^^^^
  File "/usr/lib/python3.11/site-packages/portage/proxy/objectproxy.py", line 31, in __call__
    return result(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/portage/package/ebuild/config.py", line 413, in __init__
    locations_manager = LocationsManager(
                        ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/portage/package/ebuild/_config/LocationsManager.py", line 79, in __init__
    normalize_path(os.path.abspath(self.config_root or os.sep)).rstrip(os.sep)
TypeError: a bytes-like object is required, not 'str'
Comment 1 Mart Raudsepp gentoo-dev 2023-10-23 08:22:40 UTC
It works with portage-3.0.49-r2, didn't try anything inbetween
Comment 2 Zac Medico gentoo-dev 2023-10-23 14:40:39 UTC
unsymlink-lib encodes self.eroot as bytes here:

top_dir = argv_to_bytes(args.root)

https://github.com/projg2/unsymlink-lib/blob/v20/unsymlink-lib#L696

Portage could convert it back to unicode in the create_trees function.
Comment 3 Larry the Git Cow gentoo-dev 2023-10-24 01:48:24 UTC
The bug has been referenced in the following commit(s):

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

commit d7ff40702646bbbe9ae9e2c691f3290f2cc565ba
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2023-10-23 14:51:44 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2023-10-23 14:52:05 +0000

    create_trees: Handle bytes arguments for utf8_mode
    
    Bug: https://bugs.gentoo.org/916149
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 lib/portage/__init__.py | 10 ++++++++++
 1 file changed, 10 insertions(+)
Comment 4 Larry the Git Cow gentoo-dev 2023-10-25 05:49:05 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b9128b401def05cac46f9e6d66048e5a0d888b8

commit 2b9128b401def05cac46f9e6d66048e5a0d888b8
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-10-25 05:48:31 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-10-25 05:48:40 +0000

    sys-apps/portage: add 3.0.54
    
    Closes: https://bugs.gentoo.org/905869
    Closes: https://bugs.gentoo.org/915551
    Closes: https://bugs.gentoo.org/915896
    Closes: https://bugs.gentoo.org/916106
    Closes: https://bugs.gentoo.org/916108
    Closes: https://bugs.gentoo.org/916112
    Closes: https://bugs.gentoo.org/916116
    Closes: https://bugs.gentoo.org/916139
    Closes: https://bugs.gentoo.org/916141
    Closes: https://bugs.gentoo.org/916142
    Closes: https://bugs.gentoo.org/916149
    Closes: https://bugs.gentoo.org/916182
    Closes: https://bugs.gentoo.org/916231
    Closes: https://bugs.gentoo.org/916235
    Closes: https://bugs.gentoo.org/916240
    Closes: https://bugs.gentoo.org/916242
    Closes: https://bugs.gentoo.org/916245
    Closes: https://bugs.gentoo.org/916248
    Closes: https://bugs.gentoo.org/899898
    Closes: https://bugs.gentoo.org/906129
    Closes: https://bugs.gentoo.org/906156
    Closes: https://bugs.gentoo.org/916031
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/portage/Manifest              |   1 +
 sys-apps/portage/portage-3.0.54.ebuild | 238 +++++++++++++++++++++++++++++++++
 2 files changed, 239 insertions(+)