Replace python-decoratortools per error message 77/3977/5
authorPaul Carver <pcarver@att.com>
Tue, 8 Dec 2020 18:31:36 +0000 (13:31 -0500)
committerPaul Carver <pcarver@att.com>
Tue, 29 Dec 2020 16:33:29 +0000 (11:33 -0500)
According to the error message during the ARM64 verify job,
python-decoratortools is not available but the package
python-peak.util.decorators replaces it.

See
https://jenkins.akraino.org/job/ta-infra-ansible-arm64-master-verify/47/console
for details of the error.

Additionally, there seems to be an error due to a conflict between the
Ubuntu 18.04 of the builder VM vs the CentOS packages we're trying to
build. It seems the conflict didn't occur on the older Ubuntu 16.04
builder VMs that we used to use. Since the builder VMs get thrown away
and we don't really care about them after we finish building, we'll
force overwrite the Ubuntu version of '/usr/bin/annotate-output' with
the CentOS copy that is coming from the CentOS RPM that we care about.

This change also fixes a harmlessly incorrect redirection of stderr.

Finally, the build is failing due to missing lxml and urllib3 modules
for Python. It's not clear where these were coming from before the issue
mentioned above, but they are needed so this change adds them.

Signed-off-by: Paul Carver <pcarver@att.com>
Change-Id: Ib4e446190f718ef326a02087dc88fbfd8bdd293e

jjb/akraino-templates/akraino-ta-common-macros.yaml

index a0d578c..ef068d8 100644 (file)
             #  Skip RPM build in case no *.spec file is found within the {project-to-build}
             if [ -n "$(find {project-to-build} -name '*.spec')" ]
             then
-                if apt --version 2>1 >/dev/null; then
+                if apt --version >/dev/null 2>&1; then
                     # We need a specific version of mock (1.4.14) and devtools
                     # not available in Ubuntu/Debian repos, so fetch them from RHEL mirrors
                     if [ "$(mock --version 2>/dev/null)" != '1.4.14' ]; then
                         sudo apt update
                         # Explicitly install mock dependencies
                         sudo apt install -y createrepo alien systemd-container python-pip \
-                                            python-decoratortools yum-utils usermode pigz
+                                            python-peak.util.decorators yum-utils usermode pigz
                         wget http://vault.centos.org/centos/7.6.1810/os/x86_64/Packages/rpmdevtools-8.3-5.el7.noarch.rpm \
                              https://kojipkgs.fedoraproject.org/packages/mock/1.4.14/2.el7/noarch/mock-1.4.14-2.el7.noarch.rpm
                         sudo alien -d *.rpm
-                        sudo dpkg -i *.deb
+                        sudo dpkg --force-overwrite -i *.deb
                         rm -rf *.rpm *.deb
                         # RHEL tools hardcode the full path for certain distro tools
                         sudo ln -sf /bin/tar /usr/bin/gtar
                         sudo ln -sf /bin/machinectl /bin/df /usr/bin/
                         # Some mock dependencies are only available via pip
-                        sudo pip install distro pyroute2
+                        sudo pip install distro pyroute2 lxml urllib3
                     fi
                 else
                     sudo yum install -y createrepo