Skip to content

build: fix flaky issue with FreeBSD repos updates #164

Open
@avtikhon

Description

@avtikhon

Bug description

Found that repositories on FreeBSD saved old registries for available
packages. Trying to install any new packages failed on it. Found that
the issue is well known [1]:

sudo pkg fetch py37-yaml
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following packages will be fetched: 

New packages to be FETCHED:
        py37-yaml-5.2 (81 KiB: 100.00% of the 81 KiB to download)

Number of packages to be fetched: 1

81 KiB to be downloaded.

Proceed with fetching packages? [y/N]: y
pkg: http://pkg.FreeBSD.org/FreeBSD:12:amd64/quarterly/All/py37-yaml-5.2.txz: Not Found

and fix solution is to force it's update with:

  pkg update -f

[1] - https://stackoverflow.com/questions/29770779/freebsd-pkg-repository-not-updating-and-thinks-it-is-up-to-date

  • OS: FreeBSD
  • OS Version: FreeBSD 12
  • Architecture: amd64

2.8.0-28-g93de918a5

Steps to reproduce

use sh4 host, login to gitlab-runner and start VM VBox host with:

~/run_vm.sh freebsd_12_1 restore,start,login

Clone sources and try to install new packages with the patch (python27 based packages not available, so removed not to fail the command)::

git clone --recurse-submodules http://github.com/tarantool/tarantool tnt
cd tnt

cat >gh-5749.patch <<EOF
diff --git a/.travis.mk b/.travis.mk
index 50524007c..664c95481 100644
--- a/.travis.mk
+++ b/.travis.mk
@@ -370,7 +370,7 @@ test_static_build_cmake_osx: base_deps_osx
 
 deps_freebsd:
        sudo pkg install -y git cmake gmake icu libiconv \\
-               python27 py27-yaml py27-six py27-gevent
+               python37 py37-yaml py37-six py37-gevent
 
 build_freebsd:
        cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_WERROR=ON ${CMAKE_EXTRA_PARAMS}
EOF
# change every added starting spaces to TAB
TAB=$(printf '\t') ; sed -I -e "s#^+ *#+$TAB#g" tarantool/tarantool-qa#164.patch
patch -l -p 1 -i tarantool/tarantool-qa#164.patch

start build with:

make -f .travis.mk deps_freebsd

Actual behavior

Fails on installing new packages

Expected behavior

Installs new packages

Suggested fix

diff --git a/.travis.mk b/.travis.mk
index 50524007c..cd2130fb4 100644
--- a/.travis.mk
+++ b/.travis.mk
@@ -369,6 +369,7 @@ test_static_build_cmake_osx: base_deps_osx
 ###########
 
 deps_freebsd:
+       echo y | sudo pkg update -f
        sudo pkg install -y git cmake gmake icu libiconv \
                python27 py27-yaml py27-six py27-gevent
 

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions