Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkgdev commit throws pkgcore.ebuild.processor.UnhandledCommand: es succeeded #173

Open
arkamar opened this issue Jan 31, 2024 · 4 comments

Comments

@arkamar
Copy link

arkamar commented Jan 31, 2024

I am in commit a66f97b855cc - net-misc/ofono: drop 1.33 in ::gentoo tree and this is my staged change:

diff --git a/dev-db/mariadb/mariadb-10.11.6.ebuild b/dev-db/mariadb/mariadb-10.11.6.ebuild
index 9b2a4c5785b0..053886557e4b 100644
--- a/dev-db/mariadb/mariadb-10.11.6.ebuild
+++ b/dev-db/mariadb/mariadb-10.11.6.ebuild
@@ -26,7 +26,8 @@ RESTRICT="!bindist? ( bindist ) !test? ( test )"
 
 REQUIRED_USE="jdbc? ( extraengine server !static )
 	?? ( tcmalloc jemalloc )
-	static? ( yassl !pam )"
+	static? ( yassl !pam )
+	test? ( extraengine )"
 
 KEYWORDS="~amd64 ~x86"

I run pkgdev commit and it throws following:

Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.11/pkgdev", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3.11/site-packages/pkgdev/scripts/__init__.py", line 48, in main
    run(os.path.basename(sys.argv[0]))
  File "/usr/lib/python3.11/site-packages/pkgdev/scripts/__init__.py", line 40, in run
    sys.exit(tool())
             ^^^^^^
  File "/usr/lib/python3.11/site-packages/snakeoil/cli/tool.py", line 81, in __call__
    ret = self.main()
          ^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pkgdev/cli.py", line 23, in main
    return super().main()
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/snakeoil/cli/tool.py", line 191, in main
    self.handle_exec_exception(e)
  File "/usr/lib/python3.11/site-packages/snakeoil/cli/tool.py", line 176, in main
    exitstatus = func(self.options, self.out, self.err)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pkgdev/scripts/pkgdev_commit.py", line 933, in _commit
    args = determine_msg_args(options, changes)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pkgdev/scripts/pkgdev_commit.py", line 797, in determine_msg_args
    message.append(changes.prefix + changes.summary)
                                    ^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/snakeoil/klass.py", line 205, in __get__
    obj = self.function(instance)
          ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pkgdev/scripts/pkgdev_commit.py", line 700, in summary
    return str(PkgSummary(self._options, self.ebuild_changes))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pkgdev/scripts/pkgdev_commit.py", line 324, in __str__
    if s := self.status_funcs[statuses](self):
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pkgdev/scripts/pkgdev_commit.py", line 509, in modify
    old_env = old_pkg.environment.data.splitlines()
              ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pkgcore/ebuild/ebuild_src.py", line 454, in environment
    data = self._get_ebuild_environment()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pkgcore/ebuild/ebuild_src.py", line 459, in _get_ebuild_environment
    return ebp.get_ebuild_environment(self, self.repo.eclass_cache)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pkgcore/ebuild/processor.py", line 869, in get_ebuild_environment
    self._run_depend_like_phase(
  File "/usr/lib/python3.11/site-packages/pkgcore/ebuild/processor.py", line 838, in _run_depend_like_phase
    self.generic_handler(additional_commands=commands)
  File "/usr/lib/python3.11/site-packages/pkgcore/ebuild/processor.py", line 976, in generic_handler
    raise UnhandledCommand(line)
pkgcore.ebuild.processor.UnhandledCommand: es succeeded

I guess that es succeeded should have been phases succeeded, which I see in strace.
pkgdev commit seems to work in other scenarios, like version bumps.
Following versions are installed in my system:

dev-python/snakeoil-0.10.7
dev-util/pkgdev-0.2.8-r1
sys-apps/pkgcore-0.12.24

I don't use any special configuration. It should be basically default installation.

@thesamesam
Copy link
Member

cc @eli-schwartz @ulm who have both hit this too

@prometheanfire
Copy link

Happened in the app-crypt/certbot-9999 when updating it to support python3.12.

my traceback is https://gist.github.com/prometheanfire/69fc7035457beee7799e6acc6e7b248b

@alarig
Copy link

alarig commented May 28, 2024

I’ve also hit it. I came here from https://bugs.gentoo.org/930852

alarig@msi ~/Documents/git/gentoo/repo/proj/guru/net-misc/openbgpd (dev +) $ git status
On branch dev
Your branch is up to date with 'origin/dev'.

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
	modified:   openbgpd-8.0.ebuild

alarig@msi ~/Documents/git/gentoo/repo/proj/guru/net-misc/openbgpd (dev +) $ git diff HEAD | cat
diff --git a/net-misc/openbgpd/openbgpd-8.0.ebuild b/net-misc/openbgpd/openbgpd-8.0.ebuild
index 480afe2ae..cf55b894a 100644
--- a/net-misc/openbgpd/openbgpd-8.0.ebuild
+++ b/net-misc/openbgpd/openbgpd-8.0.ebuild
@@ -23,6 +23,8 @@ RDEPEND="
 	!!net-misc/frr
 	acct-group/_bgpd
 	acct-user/_bgpd
+	dev-libs/libevent
+	net-libs/libmnl
 "
 BDEPEND="
 	dev-build/libtool
alarig@msi ~/Documents/git/gentoo/repo/proj/guru/net-misc/openbgpd (dev +) $ pkgdev commit --signoff --closes https://bugs.gentoo.org/933083
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.11/pkgdev", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3.11/site-packages/pkgdev/scripts/__init__.py", line 48, in main
    run(os.path.basename(sys.argv[0]))
  File "/usr/lib/python3.11/site-packages/pkgdev/scripts/__init__.py", line 40, in run
    sys.exit(tool())
             ^^^^^^
  File "/usr/lib/python3.11/site-packages/snakeoil/cli/tool.py", line 81, in __call__
    ret = self.main()
          ^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pkgdev/cli.py", line 23, in main
    return super().main()
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/snakeoil/cli/tool.py", line 191, in main
    self.handle_exec_exception(e)
  File "/usr/lib/python3.11/site-packages/snakeoil/cli/tool.py", line 176, in main
    exitstatus = func(self.options, self.out, self.err)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pkgdev/scripts/pkgdev_commit.py", line 933, in _commit
    args = determine_msg_args(options, changes)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pkgdev/scripts/pkgdev_commit.py", line 797, in determine_msg_args
    message.append(changes.prefix + changes.summary)
                                    ^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/snakeoil/klass.py", line 205, in __get__
    obj = self.function(instance)
          ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pkgdev/scripts/pkgdev_commit.py", line 700, in summary
    return str(PkgSummary(self._options, self.ebuild_changes))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pkgdev/scripts/pkgdev_commit.py", line 324, in __str__
    if s := self.status_funcs[statuses](self):
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pkgdev/scripts/pkgdev_commit.py", line 509, in modify
    old_env = old_pkg.environment.data.splitlines()
              ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pkgcore/ebuild/ebuild_src.py", line 454, in environment
    data = self._get_ebuild_environment()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pkgcore/ebuild/ebuild_src.py", line 459, in _get_ebuild_environment
    return ebp.get_ebuild_environment(self, self.repo.eclass_cache)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pkgcore/ebuild/processor.py", line 869, in get_ebuild_environment
    self._run_depend_like_phase(
  File "/usr/lib/python3.11/site-packages/pkgcore/ebuild/processor.py", line 838, in _run_depend_like_phase
    self.generic_handler(additional_commands=commands)
  File "/usr/lib/python3.11/site-packages/pkgcore/ebuild/processor.py", line 976, in generic_handler
    raise UnhandledCommand(line)
pkgcore.ebuild.processor.UnhandledCommand: es succeeded
alarig@msi ~/Documents/git/gentoo/repo/proj/guru/net-misc/openbgpd (dev +) $

@antecrescent
Copy link
Contributor

antecrescent commented Jun 16, 2024

These ebuilds have in common, that they contain certain non-ASCII code points.
You can verify that with

grep -n -P "[^\x00-\x7F]" ${ebuild}

From my limited testing it seems that problems occur when the commit modifies
(not adds) one or more ebuilds with offending code points such as emoji, or
within a single package. This list is probably not exhaustive but other
characters such as ä, ß, don't seem to cause problems.

Interestingly, I cannot reproduce this issue in a minimal containerized
environment I use to build packages in.

antecrescent referenced this issue in gentoo/guru Aug 25, 2024
Signed-off-by: Alarig Le Lay <alarig@swordarmor.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants