pkgcore / pkgcheck

pkgcore-based QA utility for ebuild repos
https://pkgcore.github.io/pkgcheck
BSD 3-Clause "New" or "Revised" License
35 stars 29 forks source link

'No such file or directory' with `pkgcheck scan --commits` when revbumping with `git mv` #511

Closed thesamesam closed 1 year ago

thesamesam commented 1 year ago
  1. Checkout 67efd39ceb3e1d62410f46fa6c84008e248aa977
  2. Apply the following with git am:
    
    From 78d6f0ffcb82a7a70074d9df4d6122e08916ad6e Mon Sep 17 00:00:00 2001
    From: David Seifert <soap@gentoo.org>
    Date: Wed, 4 Jan 2023 10:33:07 +0100
    Subject: [PATCH 1/2] x11-libs/librfm: update EAPI 6 -> 8

Signed-off-by: David Seifert soap@gentoo.org

....16.3-r1.ebuild => librfm-5.3.16.3-r2.ebuild} | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) rename x11-libs/librfm/{librfm-5.3.16.3-r1.ebuild => librfm-5.3.16.3-r2.ebuild} (80%)

diff --git a/x11-libs/librfm/librfm-5.3.16.3-r1.ebuild b/x11-libs/librfm/librfm-5.3.16.3-r2.ebuild similarity index 80% rename from x11-libs/librfm/librfm-5.3.16.3-r1.ebuild rename to x11-libs/librfm/librfm-5.3.16.3-r2.ebuild index cdb51d8462313..ee43305cac246 100644 --- a/x11-libs/librfm/librfm-5.3.16.3-r1.ebuild +++ b/x11-libs/librfm/librfm-5.3.16.3-r2.ebuild @@ -1,7 +1,8 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors

Distributed under the terms of the GNU General Public License v2

-EAPI=6 +EAPI=8 + inherit autotools

MY_P="${PN}5-${PV}" @@ -9,11 +10,11 @@ MY_P="${PN}5-${PV}" DESCRIPTION="The basic library used by some rfm applications, such as Rodent filemanager" HOMEPAGE="http://xffm.org/libxffm.html" SRC_URI="mirror://sourceforge/xffm/${PN}/${MY_P}.tar.bz2" +S="${WORKDIR}/${MY_P}"

LICENSE="GPL-3" SLOT="0" KEYWORDS="amd64 x86" -IUSE=""

RDEPEND="

=dev-libs/glib-2.22.5:2 @@ -25,17 +26,14 @@ RDEPEND=" =x11-libs/cairo-1.12.6[X] =x11-libs/gtk+-3.12:3[X] =x11-libs/pango-1.28.0[X]

  • !<x11-misc/rodent-5 -" -DEPEND="${RDEPEND}
  • virtual/pkgconfig " +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig"

-S="${WORKDIR}/${MY_P}" +PATCHES=( "${FILESDIR}"/${P}-autotools.patch )

src_prepare() { default

-- 2.39.0

From 755ac0976aa0ddceca51e8f541a9c4b66acd196e Mon Sep 17 00:00:00 2001 From: David Seifert soap@gentoo.org Date: Wed, 4 Jan 2023 10:36:37 +0100 Subject: [PATCH 2/2] x11-libs/dnd: update EAPI 6 -> 8

Signed-off-by: David Seifert soap@gentoo.org

.../dnd/{dnd-1.1-r3.ebuild => dnd-1.1-r4.ebuild} | 14 +++++--------- x11-libs/dnd/files/Makefile-fix.patch | 9 +++++---- 2 files changed, 10 insertions(+), 13 deletions(-) rename x11-libs/dnd/{dnd-1.1-r3.ebuild => dnd-1.1-r4.ebuild} (83%)

diff --git a/x11-libs/dnd/dnd-1.1-r3.ebuild b/x11-libs/dnd/dnd-1.1-r4.ebuild similarity index 83% rename from x11-libs/dnd/dnd-1.1-r3.ebuild rename to x11-libs/dnd/dnd-1.1-r4.ebuild index 09bc04cde8f63..f62563274f358 100644 --- a/x11-libs/dnd/dnd-1.1-r3.ebuild +++ b/x11-libs/dnd/dnd-1.1-r4.ebuild @@ -1,19 +1,21 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors

Distributed under the terms of the GNU General Public License v2

-EAPI=6 +EAPI=8

inherit toolchain-funcs

DESCRIPTION="OffiX' Drag'n'drop library" HOMEPAGE="http://leb.net/offix" SRC_URI="http://leb.net/offix/${PN}.${PV}.tgz" +S="${WORKDIR}/DND/DNDlib"

LICENSE="GPL-2 LGPL-2" SLOT="0" KEYWORDS="~alpha amd64 arm64 ~hppa ~ia64 ppc ppc64 ~riscv sparc x86"

-RDEPEND="x11-libs/libICE +RDEPEND="

-S="${WORKDIR}/DND/DNDlib"

src_configure() { tc-export CC CXX RANLIB AR econf --with-x }

-src_install() {

3. `pkgcheck scan --commits`
4. Get traceback:

$ pkgcheck scan --commits pkgcheck scan: error: Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/pkgcheck/pipeline.py", line 237, in _run if results := tuple(runner.run(restriction)): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/pkgcheck/runners.py", line 71, in run yield from check.feed(item) File "/usr/lib/python3.11/site-packages/pkgcheck/checks/git.py", line 371, in feed yield from self.removal_checks(list(pkg_map["D"])) File "/usr/lib/python3.11/site-packages/pkgcheck/checks/git.py", line 280, in removal_checks old_keywords = set().union(*(p.keywords for p in removal_repo.match(pkg.unversioned_atom))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/pkgcore/repository/prototype.py", line 227, in match return list(self.itermatch(atom, kwds)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/pkgcore/repository/prototype.py", line 317, in _internal_match for pkg in self._internal_gen_candidates(candidates, kwargs): File "/usr/lib/python3.11/site-packages/pkgcore/repository/prototype.py", line 312, in _internal_gen_candidates yield from sorter(pkg_filter(pkgs)) File "/usr/lib/python3.11/site-packages/pkgcore/ebuild/repository.py", line 574, in _pkg_filter if not pkg.is_supported: ^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/snakeoil/klass.py", line 389, in call return self.getter(obj) ^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/pkgcore/package/base.py", line 97, in dynamic_getattr_dict val = functor(self) ^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/pkgcore/ebuild/ebuild_src.py", line 289, in eapi i = fileutils.readlines_utf8(ebuild.path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/snakeoil/_fileutils.py", line 85, in native_readlines handle = open(mypath, mode, encoding=encoding) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmp-pkgcheck-12rzhs7i.repo/x11-libs/librfm/librfm-5.3.16.3.ebuild'

arthurzam commented 1 year ago

Notes for me, reproduced!

  1. git checkout 67efd39ceb3e1d62410f46fa6c84008e248aa977
  2. wl-paste | git am
  3. pkgcheck scan --commits HEAD~2..HEAD
juippis commented 3 months ago

Just had this happen with https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e34060946f75e8837542658393aa520772747a91

pkgcheck scan: error: Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/pkgcheck/pipeline.py", line 237, in _run
    if results := tuple(runner.run(restriction)):
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pkgcheck/runners.py", line 71, in run
    yield from check.feed(item)
  File "/usr/lib/python3.11/site-packages/pkgcheck/checks/git.py", line 572, in feed
    yield from self.removal_checks(list(pkg_map["D"]))
  File "/usr/lib/python3.11/site-packages/pkgcheck/checks/git.py", line 400, in removal_checks
    old_keywords = set().union(*(p.keywords for p in removal_repo.match(pkg.unversioned_atom)))
                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pkgcore/repository/prototype.py", line 212, in match
    return list(self.itermatch(atom, **kwds))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pkgcore/repository/prototype.py", line 302, in _internal_match
    for pkg in self._internal_gen_candidates(candidates, **kwargs):
  File "/usr/lib/python3.11/site-packages/pkgcore/repository/prototype.py", line 297, in _internal_gen_candidates
    yield from sorter(pkg_filter(pkgs))
  File "/usr/lib/python3.11/site-packages/pkgcore/ebuild/repository.py", line 586, in _pkg_filter
    if not pkg.is_supported:
           ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/snakeoil/klass.py", line 391, in __call__
    return self.getter(obj)
           ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pkgcore/package/base.py", line 95, in dynamic_getattr_dict
    val = functor(self)
          ^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pkgcore/ebuild/ebuild_src.py", line 289, in eapi
    i = fileutils.readlines_utf8(ebuild.path)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/snakeoil/_fileutils.py", line 85, in native_readlines
    handle = open(mypath, mode, encoding=encoding)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmp-pkgcheck-s7x4p57m.repo/app-containers/lxd/lxd-5.21.1.ebuild'