Skip to content

Commit 9ed3caa

Browse files
committed
GitPkgCommitsCheck: fix files check
When using _RemovalRepo for previous git state repo, it uses UnconfiguredTree::_pkg_filter as default pkg_filter. During the check for various bad file, it tries to parse the ebuild, which in turn tries to check the usage around inherited eclasses - which doesn't exist in this repo. In theory, the setting of masters repo as the original one should suffice, but it doesn't in practice. For now, let's copy the eclass content so at least this very important check is done! Fixes: #381 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
1 parent a411316 commit 9ed3caa

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/pkgcheck/checks/git.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import os
44
import re
5+
import shutil
56
import subprocess
67
import tarfile
78
from collections import defaultdict
@@ -187,6 +188,8 @@ def __init__(self, repo):
187188
os.makedirs(pjoin(repo_dir, 'profiles'))
188189
with open(pjoin(repo_dir, 'profiles', 'repo_name'), 'w') as f:
189190
f.write('old-repo\n')
191+
if os.path.exists(pjoin(repo_dir, 'eclass')):
192+
shutil.copytree(pjoin(repo.location, 'eclass'), pjoin(repo_dir, 'eclass'), dirs_exist_ok=True)
190193
super().__init__(repo_dir)
191194

192195
def __call__(self, pkgs):

0 commit comments

Comments
 (0)