Skip to content

Commit

Permalink
csmock: install dynamic build dependencies, too
Browse files Browse the repository at this point in the history
Use the `--calculate-build-dependencies` option of `mock` instead of the
`--installdeps` option, which installs static build dependencies only.

Fixes: csutils#188
Closes: csutils#189
  • Loading branch information
kdudka committed Nov 5, 2024
1 parent 27e6af1 commit 2887fdc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion make-srpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Summary: Core of csmock (a mock wrapper for Static Analysis tools)
Requires: csdiff > 3.1.0
Requires: csgcca
Requires: cswrap
Requires: mock
Requires: mock >= 5.7
Requires: tar
Requires: xz
%if 0%{?rhel} != 7
Expand Down
5 changes: 3 additions & 2 deletions py/csmock
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,8 @@ echo \"$self_pid\" > \"$lock_file\"'" \
cmd = ["--install", "module-build-macros"] + cmd_add
self.exec_mock_cmd(cmd, quiet=quiet)

cmd = ["--installdeps", srpm] + cmd_add
# install both static and dynamic build dependencies (replacement for --installdeps)
cmd = ["--calculate-build-dependencies", srpm] + cmd_add
return (self.exec_mock_cmd(cmd, quiet=quiet) == 0)

def emergency_install_pkgs(self, pkgs):
Expand Down Expand Up @@ -385,7 +386,7 @@ echo \"$self_pid\" > \"$lock_file\"'" \
continue
self.init_done = True

# run `mock --installdeps`
# run `mock --calculate-build-dependencies`
srpm_deps_ok = srpm is None or self.install_deps(srpm)
if not srpm_deps_ok and not try_only:
srpm_base = os.path.basename(srpm)
Expand Down

0 comments on commit 2887fdc

Please sign in to comment.