Merge ~oem-solutions-engineers/pc-enablement/+git/oem-scripts:recovery-from-iso-debsums-fix into ~oem-solutions-engineers/pc-enablement/+git/oem-scripts:master

Proposed by Yao Wei
Status: Needs review
Proposed branch: ~oem-solutions-engineers/pc-enablement/+git/oem-scripts:recovery-from-iso-debsums-fix
Merge into: ~oem-solutions-engineers/pc-enablement/+git/oem-scripts:master
Diff against target: 53 lines (+24/-4)
1 file modified
recovery-from-iso.sh (+24/-4)
Reviewer Review Type Date Requested Status
Shih-Yuan Lee Needs Fixing
Yuan-Chen Cheng Pending
Review via email: mp+424737@code.launchpad.net

Commit message

recovery-from-iso.sh: remove cert-sru-oobe-pressed and reinstall dell-recovery after installaion

To post a comment you must log in.
Revision history for this message
Yao Wei (medicalwei) wrote :
Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :
review: Needs Fixing
Revision history for this message
OEM Taipei Bot (oem-taipei-bot) wrote :

[autopkgtest]
autopkgtest-collect-credentials PASS
autopkgtest-oem-scripts-auto PASS
pkg-somerville-meta PASS
pkg-stella-meta PASS
pkg-sutton-meta PASS
bug-bind FAIL non-zero exit status 1
get-private-ppa FAIL non-zero exit status 1
jq-lp PASS
launchpad-api FAIL non-zero exit status 1
lp-bug FAIL non-zero exit status 4
pkg-list PASS
review-merge-proposal PASS
run-autopkgtest PASS
setup-apt-dir PASS
bootstrap-meta FAIL non-zero exit status 1
mir-bug FAIL non-zero exit status 1
oem-meta-packages SKIP exit status 77 and marked as skippable
git-url-insteadof-setting PASS
lp-dl-attm PASS
recovery-from-iso.sh PASS

https://oem-share.canonical.com/partners/lyoncore/share/artifacts/oem-scripts/oem-scripts-1.42-4cb8ac6-in-linux-container-jammy

Unmerged commits

4cb8ac6... by Yao Wei

recovery-from-iso.sh: remove cert-sru-oobe-pressed and reinstall dell-recovery after installaion

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/recovery-from-iso.sh b/recovery-from-iso.sh
index e9812f4..5172637 100755
--- a/recovery-from-iso.sh
+++ b/recovery-from-iso.sh
@@ -16,9 +16,6 @@ enable_sb="no"
1616
17clear_all() {17clear_all() {
18 rm -rf "$temp_folder"18 rm -rf "$temp_folder"
19 # remove Ubiquity in the end to match factory and Stock Ubuntu image behavior.
20 # and it also workaround some debsum error from ubiquity.
21 ssh -o StrictHostKeyChecking=no "$user_on_target"@"$target_ip" sudo apt-get -o DPkg::Lock::Timeout=-1 purge -y ubiquity
22}19}
23trap clear_all EXIT20trap clear_all EXIT
24# shellcheck disable=SC204621# shellcheck disable=SC2046
@@ -442,6 +439,29 @@ do_recovery() {
442 poll_recovery_status439 poll_recovery_status
443}440}
444441
442post_install() {
443 workaround_script="workaround_debsums.sh"
444 cat <<EOF > "$temp_folder/$workaround_script"
445#!/bin/bash
446set -x
447
448# Working around known debsums discrepancies:
449# Purge packages (ubiquity, cert-sru-oobe-preseed) that is not needed
450sudo apt-get -o DPkg::Lock::Timeout=-1 purge -y ubiquity cert-sru-oobe-preseed
451
452# Reinstall dell-recovery
453sudo umount /cdrom || true
454recover_p=\$(lsblk -l | grep efi | cut -d ' ' -f 1 | sed 's/.$/2'/)
455sudo mount /dev/\$recover_p /cdrom
456dell_recovery_debs=(/cdrom/debs/dell-recovery_*)
457sudo apt -o DPkg::Lock::Timeout=-1 install --reinstall -y "\${dell_recovery_debs[@]}"
458sudo umount /cdrom
459EOF
460 $SCP "$temp_folder"/"$workaround_script" "$user_on_target"@"$target_ip":~/
461 $SSH "$user_on_target"@"$target_ip" chmod +x "\$HOME/$workaround_script"
462 $SSH "$user_on_target"@"$target_ip" "\$HOME/$workaround_script"
463}
464
445main() {465main() {
446 while [ $# -gt 0 ]466 while [ $# -gt 0 ]
447 do467 do
@@ -503,7 +523,7 @@ main() {
503 done523 done
504 prepare524 prepare
505 do_recovery525 do_recovery
506 clear_all526 post_install
507}527}
508528
509if [ "${BASH_SOURCE[0]}" = "$0" ]; then529if [ "${BASH_SOURCE[0]}" = "$0" ]; then

Subscribers

People subscribed via source and target branches