Skip to content

Commit

Permalink
csmock: make sure that tar is installed in chroot
Browse files Browse the repository at this point in the history
... because it is used by `csmock` itself while copying files into
chroot.  This commit fixes the following failure with `--no-scan`:
```
$ csmock -r rhel-8.9.0.z-x86_64 --use-host-cppcheck -o output.tar.xz
[...]
>>> 2023-12-11 10:12:01	"tar -cP '/usr/share/csmock/scripts' '/usr/bin/cswrap' '/usr/lib64/cswrap' '/usr/bin/csclng' '/usr/lib64/csclng' '/usr/bin/csclng++' '/usr/bin/cscppc' '/usr/lib64/cscppc' '/usr/share/cscppc' '/usr/bin/cppcheck' '/usr/share/Cppcheck' '/usr/bin/csgcca' '/usr/lib64/csgcca' '/tmp/csmockvujta3wk/gitleaks' | '/usr/bin/mock' '-r' 'rhel-8.9.0.z-x86_64' '--plugin-option=tmpfs:keep_mounted=True' '--config-opts=print_main_output=True' '--quiet' '--shell' 'tar -xC/'"
/bin/sh: tar: command not found

scan.ini: analyzer-version-clang = 16.0.6
!!! 2023-12-11 10:12:05	error: failed to query cppcheck version
```
Closes: #144
  • Loading branch information
kdudka committed Dec 11, 2023
1 parent 869b800 commit f04a792
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion py/csmock
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ class ScanProps:
def __init__(self):
self.plugins = None
self.spec_in = None
self.install_pkgs = []
self.install_pkgs = ["tar"] # needed for self.copy_in_files to work
self.install_pkgs_blacklist = []
self.install_opt_pkgs = []
self.add_repos = []
Expand Down

0 comments on commit f04a792

Please sign in to comment.