diff options
| author | PMR <pmr@pmr-lander> | 2019-06-11 07:26:05 +0000 |
|---|---|---|
| committer | PMR <pmr@pmr-lander> | 2019-06-11 07:26:05 +0000 |
| commit | c44bcc07c634aee99b514abbe063541bf3376b60 (patch) | |
| tree | 0dbfa30bf6ce02be5defb7ab937ba5a7bb2d7fa7 | |
| parent | 67926cbb0c3c7cf34d846151bc5994620da9e521 (diff) | |
| parent | 43b5ee11e1fde73b81e606509c1846a34414a0f7 (diff) | |
Merge #368600 from ~alextu/oem-qa-checkbox/+git/somerville-platform-meta-update:somerville-platform-meta-update
| -rwxr-xr-x | bin/platform_meta_test | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/bin/platform_meta_test b/bin/platform_meta_test index 99b5325..f099dd9 100755 --- a/bin/platform_meta_test +++ b/bin/platform_meta_test @@ -2,13 +2,20 @@ echo "Beginning Platform Metapackage Test" 1>&2 -for meta in $(ubuntu-drivers list | grep meta); do - modaliases=$(apt-cache show "${meta}" | grep Modaliases) - if [[ "${modaliases}" =~ ChengMing|Inspiron|Latitude|OptiPlex|Precision|Vostro|XPS ]]; then - echo "Platform Metapackage found: ${meta}" - exit 0 - fi -done - -echo "Platform Metapackage cannot be found" + +failed(){ +[ -n "$1" ] && echo $1 +echo "$0 failed!!" exit 1 +} + +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 || failed "no platform meta be installed." + +grep ${platform_tag} /etc/apt/sources.list.d/* > /dev/null || failed "no platform archive in source list" + +echo "platform meta found" +exit 0 |
