diff options
| author | PMR <pmr@pmr-lander> | 2019-07-10 06:16:01 +0000 |
|---|---|---|
| committer | PMR <pmr@pmr-lander> | 2019-07-10 06:16:01 +0000 |
| commit | 29d06ef1000fa185524396382171b9c184f16e76 (patch) | |
| tree | b25947be14ed4adea39969d24600d68794c878ec | |
| parent | 1e877437f31f8f6701b772291cd2abb48005a4e6 (diff) | |
| parent | c5e68e2f04052164373396db6d368ae802e5b336 (diff) | |
Merge #369920 from ~fourdollars/oem-qa-checkbox:master
| -rwxr-xr-x | bin/platform_meta_test | 2 | ||||
| -rwxr-xr-x | bin/platform_meta_test_bios_id | 24 |
2 files changed, 23 insertions, 3 deletions
diff --git a/bin/platform_meta_test b/bin/platform_meta_test index 56a6b9a..b5b72c3 100755 --- a/bin/platform_meta_test +++ b/bin/platform_meta_test @@ -13,7 +13,7 @@ platform_tag=$(ubuntu-report show | grep DCD | awk -F'+' '{print $2}') [ -n "${platform_tag}" ] || failed "no platform tag in ubuntu-report" -dpkg -l ${platform_tag}-meta > /dev/null || dpkg -l oem-${platform_tag}-meta > /dev/null || failed "no platform meta is installed." +dpkg -l ${platform_tag}-meta > /dev/null 2>&1 || dpkg -l oem-${platform_tag}-meta > /dev/null 2>&1 || failed "no platform meta is installed." grep ${platform_tag} /etc/apt/sources.list.d/* > /dev/null || failed "no platform archive in source list" diff --git a/bin/platform_meta_test_bios_id b/bin/platform_meta_test_bios_id index 136696c..1df2048 100755 --- a/bin/platform_meta_test_bios_id +++ b/bin/platform_meta_test_bios_id @@ -3,8 +3,13 @@ # 1. Platform meta pacakge: PLATFORM_NAME-meta, e.g. turis-vegas-mlk-glk-meta # 2. BIOS ID meta package: dell-BIOS_ID-RELEASE-meta or dell-BIOS_ID-meta. # e.g. dell-086b-bionic-meta +# From somerville bionic-osp1 and after, the BIOS ID package is deprecated and replaced +# by modaliases in platform meta package. +# 1. Platform meta pacakge: oem-PLATFORM_NAME-meta, e.g. oem-beaver-osp1-worm-meta +# 2. BIOS ID modaliases in platform meta package: +# e.g. Modaliases: hwe(pci:*sv00001028sd0000096E*, pci:*sv00001028sd0000096F*) -echo "Beginning Platform Metapackage Test" 1>&2 +echo "Beginning Platform Metapackage BIOS ID Test" 1>&2 biosid=`lspci -s 00:00.0 -nnv | grep Subsystem | grep -o -E "[[:xdigit:]]{4}:[[:xdigit:]]{4}" | cut -d ":" -f 2` release=`lsb_release -c | awk '{print $2}'` @@ -17,5 +22,20 @@ for meta in $(dpkg -l |grep ".*-meta" |awk '{print ($2)}'); do fi done -echo "Platform Metapackage cannot be found" +ptag=$(ubuntu-report show | grep DCD | awk -F'+' '{print $2}') + +if [ -n "$ptag" ]; then + if dpkg-query -W oem-$ptag-meta >/dev/null 2>&1; then + pmeta="oem-$ptag-meta" + elif dpkg-query -W $ptag-meta; then + pmeta="$ptag-meta" + fi +fi + +if [ -n "$pmeta" ] && apt-cache show $pmeta | grep ^Modaliases | grep -i sv00001028sd0000$biosid; then + echo "Found platform meta package '$pmeta' containing BIOS ID '$biosid'" + exit 0 +fi + +echo "Platform Metapackage BIOS ID cannot be found" exit 1 |
