diff options
author | stanley31 <stanley.huang@canonical.com> | 2022-01-13 15:01:15 +0800 |
---|---|---|
committer | stanley31 <stanley.huang@canonical.com> | 2022-02-16 11:31:17 +0800 |
commit | ae2a3d6976bdfaff0ef0cdc443c9440b4597e181 (patch) | |
tree | c94c2431e00f16cead6bfd8ec3a9a4496091edf4 /jobs | |
parent | c275ad1e1ab57e56887e8fb67b74118909dda481 (diff) |
Fix: fix sutton sources list test
Fix sutton sources list test, query sutton meta package by dpkg-query
Diffstat (limited to 'jobs')
-rw-r--r-- | jobs/sutton/sourcelist.txt.in | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/jobs/sutton/sourcelist.txt.in b/jobs/sutton/sourcelist.txt.in index 1ab4d3a..e43c8a1 100644 --- a/jobs/sutton/sourcelist.txt.in +++ b/jobs/sutton/sourcelist.txt.in @@ -50,7 +50,15 @@ _description: plugin: shell category_id: sutton id: sutton/sourceslist/meta -command: sources_test /etc/apt/sources.list.d/`cat /etc/buildstamp | awk -F\-focal\- '/-/{print "oem-" $1}' |sed s/-/./2| tail -1`*.list "^deb http://[[:alnum:]]\+.archive.canonical.com/ focal sutton,^deb http://[[:alnum:]]\+.archive.canonical.com/ focal `cat /etc/buildstamp | awk -F\-focal\- '/-/{print $1}' |sed 's/-/./1'`" +command: + PLATFORM_SERIES=`dpkg-query -f='${Package}\n' -W | grep -e "oem-sutton\.[a-z]*-meta" | awk -F'-' '{print $2 }'` + if [ -z "$PLATFORM_SERIES" ]; then + echo "Failed to retrieve platform meta package, please double check" + exit 1 + else + echo "Platform series: $PLATFORM_SERIES" + sources_test /etc/apt/sources.list.d/oem-$PLATFORM_SERIES-*.list "^deb http://[[:alnum:]]\+.archive.canonical.com/ focal sutton,^deb http://[[:alnum:]]\+.archive.canonical.com/ focal $PLATFORM_SERIES" + fi _description: - Check if project sources list under source.list.d contains correct repository + Check if project sources list under source.list.d contains correct repository |