From: Andrei Pavel Date: Mon, 5 Sep 2022 19:32:58 +0000 (+0300) Subject: [#2539] hammer.py: reinstall pkg to update repositories X-Git-Tag: Kea-2.2.1~46 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4c91147256435528e01e4ece1e6d7f7489cd4b88;p=thirdparty%2Fkea.git [#2539] hammer.py: reinstall pkg to update repositories 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 --- diff --git a/hammer.py b/hammer.py index aefefed65b..72feae5db6 100755 --- a/hammer.py +++ b/hammer.py @@ -1759,6 +1759,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: