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

git: FileNotFoundError for removed ebuild (?) #194

Closed mgorny closed 4 years ago

mgorny commented 4 years ago
$ pkgcheck scan --commits 
dev-python/pypy-bin
  MissingPythonEclass: version 7.3.0: missing python-r1 or python-single-r1 eclass usage for RDEPEND="~dev-python/pypy-7.3.0[gdbm?,libressl?,sqlite?,tk?]"
  UnstableOnly: for arches: [ amd64, x86 ], all versions are unstable: [ 7.3.0 ]

dev-python/pypy
  UnstableOnly: for arches: [ amd64, x86 ], all versions are unstable: [ 7.3.0 ]
Process ForkPoolWorker-1:3:
Traceback (most recent call last):
  File "/usr/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
    self.run()
  File "/usr/lib/python3.7/multiprocessing/process.py", line 99, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3.7/multiprocessing/pool.py", line 105, in worker
    initializer(*initargs)
  File "/usr/lib/python3.7/site-packages/pkgcheck/pipeline.py", line 72, in _run_checks
    results.extend(pipe.run(restrict))
  File "/usr/lib/python3.7/site-packages/pkgcheck/pipeline.py", line 182, in run
    yield from reports
  File "/usr/lib/python3.7/site-packages/pkgcheck/checks/git.py", line 267, in feed
    yield from self.removal_checks(removed)
  File "/usr/lib/python3.7/site-packages/pkgcheck/checks/git.py", line 245, in removal_checks
    pkg.keywords for pkg in removal_repo.match(pkg.unversioned_atom)))
  File "/usr/lib/python3.7/site-packages/pkgcore/repository/prototype.py", line 229, in match
    return list(self.itermatch(atom, **kwds))
  File "/usr/lib/python3.7/site-packages/pkgcore/repository/prototype.py", line 297, in _internal_match
    for pkg in self._internal_gen_candidates(candidates, **kwargs):
  File "/usr/lib/python3.7/site-packages/pkgcore/repository/prototype.py", line 294, in _internal_gen_candidates
    yield from sorter(pkg_filter(pkgs))
  File "/usr/lib/python3.7/site-packages/pkgcore/ebuild/repository.py", line 545, in _pkg_filter
    if not pkg.is_supported:
  File "/usr/lib/python3.7/site-packages/snakeoil/klass.py", line 373, in __call__
    return self.getter(obj)
  File "/usr/lib/python3.7/site-packages/pkgcore/package/base.py", line 84, in dynamic_getattr_dict
    val = functor(self)
  File "/usr/lib/python3.7/site-packages/pkgcore/ebuild/ebuild_src.py", line 176, in get_parsed_eapi
    i = fileutils.readlines_utf8(ebuild.path)
  File "/usr/lib/python3.7/site-packages/snakeoil/_fileutils.py", line 78, in native_readlines
    handle = open(mypath, mode, encoding=encoding)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmp5ej8fdys/dev-python/pypy3/pypy3-9999.ebuild'

dev-python/pypy3-bin
  MissingPythonEclass: version 7.3.0: missing python-r1 or python-single-r1 eclass usage for RDEPEND="~dev-python/pypy3-7.3.0[gdbm?,libressl?,sqlite?,tk?]"
  UnstableOnly: for arches: [ amd64, x86 ], all versions are unstable: [ 7.3.0 ]

virtual/pypy
  UnstableOnly: for arches: [ amd64, x86 ], all versions are unstable: [ 7.3.0 ]

virtual/pypy3
  UnstableOnly: for arches: [ amd64, x86 ], all versions are unstable: [ 7.3.0 ]

The relevant commits are:

commit 8b3aaf4307e7b79ae8a153cb1ae33c2c4016b1e3
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2019-12-30 12:07:40 +0100
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2019-12-30 12:08:08 +0100

    dev-python/pypy3: Remove unused USE=sandbox

    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 dev-python/pypy3/metadata.xml       | 3 ---
 dev-python/pypy3/pypy3-7.3.0.ebuild | 2 +-
 2 files changed, 1 insertion(+), 4 deletions(-)

commit 1c8f9cf3a0ee959f927bf14c9bbc764bc48ae483
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2019-12-30 12:07:18 +0100
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2019-12-30 12:08:06 +0100

    dev-python/pypy: Remove unused USE=sandbox

    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 dev-python/pypy/metadata.xml      | 3 ---
 dev-python/pypy/pypy-7.3.0.ebuild | 2 +-
 2 files changed, 1 insertion(+), 4 deletions(-)

commit d2f3bd34f0afaa8e5ee3edb728c5eb760c1d0978
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2019-12-30 12:05:01 +0100
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2019-12-30 12:08:04 +0100

    dev-python/pypy3-bin: Remove old

    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 dev-python/pypy3-bin/Manifest                      |   5 -
 ....UnixCCompiler.runtime_library_dir_option.patch |  11 -
 dev-python/pypy3-bin/files/7.0.0-gentoo-path.patch |  52 ----
 .../pypy3-bin/files/7.2.0-distutils-cxx.patch      | 306 ---------------------
 .../files/python-3.5-distutils-OO-build.patch      |  80 ------
 dev-python/pypy3-bin/pypy3-bin-7.2.0-r1.ebuild     | 184 -------------
 6 files changed, 638 deletions(-)

commit 597d65a2838bf693b5612f80187f29ab37eef7fd
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2019-12-30 12:04:45 +0100
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2019-12-30 12:08:01 +0100

    dev-python/pypy3: Remove old

    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 dev-python/pypy3/Manifest                     |   2 -
 dev-python/pypy3/files/5.9.0-shared-lib.patch |  12 --
 dev-python/pypy3/metadata.xml                 |   3 -
 dev-python/pypy3/pypy3-7.2.0-r1.ebuild        | 268 --------------------------
 dev-python/pypy3/pypy3-7.3.0_rc1.ebuild       | 268 --------------------------
 5 files changed, 553 deletions(-)

commit c12e84cb63434486c0618d317cdb2b9ccd33c22a
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2019-12-30 12:04:14 +0100
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2019-12-30 12:07:57 +0100

    dev-python/pypy3: Remove the live ebuild

    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 dev-python/pypy3/pypy3-9999.ebuild | 276 -------------------------------------
 1 file changed, 276 deletions(-)

commit 1cf0043bb9098d72be4b5e31b25f1e9ae08fc2d4
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2019-12-30 12:03:58 +0100
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2019-12-30 12:07:55 +0100

    dev-python/pypy-bin: Remove old

    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 dev-python/pypy-bin/Manifest                       |   6 -
 ....UnixCCompiler.runtime_library_dir_option.patch |  11 -
 .../pypy-bin/files/5.8.0_all_distutils_cxx.patch   | 388 ---------------------
 dev-python/pypy-bin/files/7.0.0-gentoo-path.patch  |  52 ---
 dev-python/pypy-bin/pypy-bin-7.2.0.ebuild          | 188 ----------
 5 files changed, 645 deletions(-)

commit 4f3d09cafe5561b6921d37cd755b575175b2dae0
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2019-12-30 12:03:23 +0100
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2019-12-30 12:07:52 +0100

    dev-python/pypy: Remove old

    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 dev-python/pypy/Manifest                     |   3 -
 dev-python/pypy/files/5.9.0-shared-lib.patch |  12 --
 dev-python/pypy/metadata.xml                 |   3 -
 dev-python/pypy/pypy-7.2.0.ebuild            | 287 ---------------------------
 dev-python/pypy/pypy-7.3.0_rc1.ebuild        | 286 --------------------------
 5 files changed, 591 deletions(-)

commit da1f78427f72d09f67e13c44cbb1711c8685ecdb
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2019-12-30 12:03:00 +0100
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2019-12-30 12:03:00 +0100

    dev-python/pypy: Remove the live ebuild

    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 dev-python/pypy/pypy-9999.ebuild | 293 ---------------------------------------
 1 file changed, 293 deletions(-)

commit 917c0e9fac44c96d4186b2f022128d3b16182c4a
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2019-12-30 12:02:13 +0100
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2019-12-30 12:02:13 +0100

    virtual/pypy3: Remove old

    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 virtual/pypy3/pypy3-7.2.0.ebuild     | 16 ----------------
 virtual/pypy3/pypy3-7.3.0_rc1.ebuild | 16 ----------------
 2 files changed, 32 deletions(-)

commit 70ff9eedf7bfc1d1b64145f429f0163887331e75
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2019-12-30 12:01:58 +0100
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2019-12-30 12:01:58 +0100

    virtual/pypy: Remove old

    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 virtual/pypy/pypy-7.2.0.ebuild     | 17 -----------------
 virtual/pypy/pypy-7.3.0_rc1.ebuild | 16 ----------------
 2 files changed, 33 deletions(-)

I've pushed the relevant commits to 'pkgcheck-bug' branch of https://github.com/mgorny/gentoo

radhermit commented 4 years ago

I'm not able to reproduce this, but it did make me realize that it might be useful for the --commits option to take an optional ref to diff against instead of assuming that origin should always be used so I don't have to hack things up locally in the future to debug things like this.

radhermit commented 4 years ago

Now pkgcheck git supports an optional ref argument to the --commits option. So if you can reproduce this between two branches on your repo using that functionality, just point me at them and I'll try again.

radhermit commented 4 years ago

Closing as I can't reproduce this, feel free to reopen with the requested info as a new release is now available that includes the optional ref argument support for --commits.