← Back to team overview

canonical-ubuntu-qa team mailing list archive

Re: [Merge] ~andersson123/autopkgtest-cloud:proposed-package-images into autopkgtest-cloud:master

 

One inline comment.

In general: did you manage to test this?

Diff comments:

> diff --git a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/create-nova-image-with-proposed-package b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/create-nova-image-with-proposed-package
> index e48f3f4..2dc585f 100755
> --- a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/create-nova-image-with-proposed-package
> +++ b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/create-nova-image-with-proposed-package
> @@ -76,30 +88,36 @@ def setup_image(image_path, source):
>      # pylint: disable=line-too-long
>      img_shell.stdin.write(
>          (
> -            """
> +            f"""
>  set -e
>  echo '* Creating policy-rc.d'
>  printf '#!/bin/sh\\nexit 101\\n' > /usr/sbin/policy-rc.d
>  chmod 755 /usr/sbin/policy-rc.d
>  echo '* Generating apt sources for -proposed:'
> -sed -rn 's/^(deb|deb-src) +(\[.*\] *)?([^ ]*(ubuntu.com|debian.org|ftpmaster)[^ ]*) +([^ -]+) +(.*)$/\\1 \\2\\3 \\5-proposed \\6/p' /etc/apt/sources.list `ls /etc/apt/sources.list.d/*.list 2>/dev/null|| true` > /etc/apt/sources.list.d/proposed.list
> +
> +echo "deb     http://ftpmaster.internal/ubuntu/ {release}-proposed main restricted universe multiverse" > /etc/apt/sources.list.d/proposed.list
> +echo "deb-src http://ftpmaster.internal/ubuntu/ {release}-proposed main restricted universe multiverse" >> /etc/apt/sources.list.d/proposed.list
> +
>  cat /etc/apt/sources.list.d/proposed.list
>  
>  echo '* apt-get update'
> -apt-get update
> +apt-get -o "Dir::Etc::sourcelist=/etc/apt/sources.list.d/proposed.list" update
>  
> -echo '* Determining which binaries of source %(src)s are installed and have a new version...'
> -SRCS=$(python3 -c 'import sys, apt; src=sys.argv[1]; [print(pkg.name) for pkg in apt.Cache() if pkg.installed and pkg.candidate.source_name == src and pkg.candidate.version > pkg.installed.version]' %(src)s)
> +echo '* Determining which binaries of source {source} are installed and have a new version...'
> +SRCS=$(python3 -c 'import sys, apt; src=sys.argv[1]; [print(pkg.name) for pkg in apt.Cache() if pkg.installed and pkg.candidate.source_name == src and pkg.candidate.version > pkg.installed.version]' {source})
>  echo "$SRCS"
>  
> -echo '* Install the above packages'
> +-echo '* Install the above packages'

Is this inserting an extra -?

>  DEBIAN_FRONTEND=noninteractive apt-get install -y $SRCS
>  
> -echo '* Cleaning up'
> +echo '* Cleaning up apt'
> +rm /etc/apt/sources.list.d/proposed.list
> +apt-get update
>  apt-get clean
> +
> +echo '* Cleaning up'
>  rm -f /etc/machine-id /usr/sbin/policy-rc.d
>     """
> -            % {"src": source}
>          ).encode()
>      )
>  


-- 
https://code.launchpad.net/~andersson123/autopkgtest-cloud/+git/autopkgtest-cloud/+merge/465334
Your team Canonical's Ubuntu QA is requested to review the proposed merge of ~andersson123/autopkgtest-cloud:proposed-package-images into autopkgtest-cloud:master.



References