[XEN v1] gitlab: automation: Fix the automation scripts

Ayan Kumar Halder posted 1 patch 1 year, 7 months ago
Test gitlab-ci failed
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20220809155711.39168-1-ayankuma@amd.com
automation/scripts/qemu-smoke-arm32.sh | 1 +
automation/scripts/qemu-smoke-arm64.sh | 1 +
2 files changed, 2 insertions(+)
[XEN v1] gitlab: automation: Fix the automation scripts
Posted by Ayan Kumar Halder 1 year, 7 months ago
One needs to run 'apt-get -qy upgrade' to upgrade the old packages so that
the missing dependent packages are also installed.

Signed-off-by: Ayan Kumar Halder <ayankuma@amd.com>
---

This is supposed to fix issues seen https://gitlab.com/xen-project/xen/-/jobs/2832045004
The failure is :-
root@4a175985cd71:/Users/ayankuma/alpine_vm/xen# apt-get -qy install --no-install-recommends u-boot-qemu u-boot-tools device-tree-compiler busybox-static cpio curl
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libc6-dev : Breaks: libglib2.0-dev (<= 2.72.3-1) but 2.70.2-1 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

For this we need to upgrade the packages which will resolve the dependencies.

 automation/scripts/qemu-smoke-arm32.sh | 1 +
 automation/scripts/qemu-smoke-arm64.sh | 1 +
 2 files changed, 2 insertions(+)

diff --git a/automation/scripts/qemu-smoke-arm32.sh b/automation/scripts/qemu-smoke-arm32.sh
index 530f3892fd..e7e733798c 100755
--- a/automation/scripts/qemu-smoke-arm32.sh
+++ b/automation/scripts/qemu-smoke-arm32.sh
@@ -4,6 +4,7 @@ set -ex
 
 export DEBIAN_FRONTENT=noninteractive
 apt-get -qy update
+apt-get -qy upgrade
 apt-get -qy install --no-install-recommends device-tree-compiler \
                                             curl \
                                             cpio
diff --git a/automation/scripts/qemu-smoke-arm64.sh b/automation/scripts/qemu-smoke-arm64.sh
index 497dbee15f..f714aacbb3 100755
--- a/automation/scripts/qemu-smoke-arm64.sh
+++ b/automation/scripts/qemu-smoke-arm64.sh
@@ -23,6 +23,7 @@ fi
 
 export DEBIAN_FRONTENT=noninteractive
 apt-get -qy update
+apt-get -qy upgrade
 apt-get -qy install --no-install-recommends u-boot-qemu \
                                             u-boot-tools \
                                             device-tree-compiler \
-- 
2.17.1
Re: [XEN v1] gitlab: automation: Fix the automation scripts
Posted by Stefano Stabellini 1 year, 7 months ago
Thanks Ayan. The issue is that Debian unstable moved forward so now
apt-get fails. I updated the build container and the issue went away (I
rebuilt (automation/build/debian/unstable-arm64v8.dockerfile). So the
issue is gone for now.

In general, I don't know if it is a good idea to apply this patch: on
one hand it would make the script harder to break in the future next
time Debian moves forward, but I am concerned about additional
bandwidth and unnecessary upgrading done to packages for every test that
we run.


On Tue, 9 Aug 2022, Ayan Kumar Halder wrote:
> One needs to run 'apt-get -qy upgrade' to upgrade the old packages so that
> the missing dependent packages are also installed.
> 
> Signed-off-by: Ayan Kumar Halder <ayankuma@amd.com>
> ---
> 
> This is supposed to fix issues seen https://gitlab.com/xen-project/xen/-/jobs/2832045004
> The failure is :-
> root@4a175985cd71:/Users/ayankuma/alpine_vm/xen# apt-get -qy install --no-install-recommends u-boot-qemu u-boot-tools device-tree-compiler busybox-static cpio curl
> Reading package lists...
> Building dependency tree...
> Reading state information...
> Some packages could not be installed. This may mean that you have
> requested an impossible situation or if you are using the unstable
> distribution that some required packages have not yet been created
> or been moved out of Incoming.
> The following information may help to resolve the situation:
> 
> The following packages have unmet dependencies:
>  libc6-dev : Breaks: libglib2.0-dev (<= 2.72.3-1) but 2.70.2-1 is to be installed
> E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
> 
> For this we need to upgrade the packages which will resolve the dependencies.
> 
>  automation/scripts/qemu-smoke-arm32.sh | 1 +
>  automation/scripts/qemu-smoke-arm64.sh | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/automation/scripts/qemu-smoke-arm32.sh b/automation/scripts/qemu-smoke-arm32.sh
> index 530f3892fd..e7e733798c 100755
> --- a/automation/scripts/qemu-smoke-arm32.sh
> +++ b/automation/scripts/qemu-smoke-arm32.sh
> @@ -4,6 +4,7 @@ set -ex
>  
>  export DEBIAN_FRONTENT=noninteractive
>  apt-get -qy update
> +apt-get -qy upgrade
>  apt-get -qy install --no-install-recommends device-tree-compiler \
>                                              curl \
>                                              cpio
> diff --git a/automation/scripts/qemu-smoke-arm64.sh b/automation/scripts/qemu-smoke-arm64.sh
> index 497dbee15f..f714aacbb3 100755
> --- a/automation/scripts/qemu-smoke-arm64.sh
> +++ b/automation/scripts/qemu-smoke-arm64.sh
> @@ -23,6 +23,7 @@ fi
>  
>  export DEBIAN_FRONTENT=noninteractive
>  apt-get -qy update
> +apt-get -qy upgrade
>  apt-get -qy install --no-install-recommends u-boot-qemu \
>                                              u-boot-tools \
>                                              device-tree-compiler \
> -- 
> 2.17.1
>