]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#2539] hammer.py: reinstall pkg to update repositories
authorAndrei Pavel <andrei@isc.org>
Mon, 5 Sep 2022 19:32:58 +0000 (22:32 +0300)
committerAndrei Pavel <andrei@isc.org>
Fri, 7 Oct 2022 12:06:27 +0000 (15:06 +0300)
This way, a pkg-search command will find package versions that can be
installed rather than outdated versions. Solves errors like the following.

pkg: No packages available to install matching 'py38-sphinx' have
been found in the repositories

hammer.py

index 06e72a2fe1fd66bad6886517e0ebd11a5a69f25c..b66ff0f94621f06ef4557f6ab67a85d220ef8f80 100755 (executable)
--- a/hammer.py
+++ b/hammer.py
@@ -1799,6 +1799,13 @@ def prepare_system_local(features, check_times):
 
     # prepare freebsd
     elif system == 'freebsd':
+        # Packages are already upgraded by default when installing a package,
+        # so to avoid mismatching dependency versions, inaccurate dynamic
+        # version fetching and other troubles, clean up local cache and
+        # install an arbitrary package to fetch remote first.
+        execute('sudo pkg clean -a -y')
+        execute('sudo pkg install -y pkg')
+
         packages = ['autoconf', 'automake', 'libtool', 'openssl', 'log4cplus', 'boost-libs', 'wget']
 
         if 'docs' in features: