Merge ~os369510/fisterra/+git/nitrogen6x-gadget:18-classic-devel into ~fisterra-team/fisterra/+git/nitrogen6x-gadget:18-classic

Proposed by jeremyszu
Status: Merged
Merged at revision: 1c8a7372554423467b956060fd28bce01488dec8
Proposed branch: ~os369510/fisterra/+git/nitrogen6x-gadget:18-classic-devel
Merge into: ~fisterra-team/fisterra/+git/nitrogen6x-gadget:18-classic
Diff against target: 62 lines (+14/-6)
2 files modified
build.sh (+11/-5)
snapcraft.yaml (+3/-1)
Reviewer Review Type Date Requested Status
ethan.hsieh Approve
Soar Huang (community) Approve
The Fisterra team Pending
Review via email: mp+385796@code.launchpad.net

Commit message

$ git log
commit 1c8a7372554423467b956060fd28bce01488dec8 (HEAD -> 18-classic, myppa/18-classic-devel)
Author: Jeremy Su <email address hidden>
Date: Tue Jun 16 16:04:48 2020 +0800

    fix warning from shellcheck

commit 9a1c073eb7502dae4aea73981a7848ba7e4e294d
Author: Jeremy Su <email address hidden>
Date: Tue Jun 16 16:04:27 2020 +0800

    fix build fail when using snapcraft from snap repo

Description of the change

The generic build script changed to use snapcraft from snap store.
After that, the gadget will get build fail due to the latest snapcraft changes.

To post a comment you must log in.
Revision history for this message
Soar Huang (soarhuang) :
review: Approve
Revision history for this message
ethan.hsieh (ethan.hsieh) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/build.sh b/build.sh
2index c52ae23..4e1cc0b 100644
3--- a/build.sh
4+++ b/build.sh
5@@ -17,7 +17,7 @@
6 usage()
7 {
8 echo "Please use either --core or --classic"
9- exit -1
10+ exit 255
11 }
12
13 core=""
14@@ -41,11 +41,17 @@ done
15
16 set -x
17
18+if [ "$(systemd-detect-virt)" != "none" ]; then
19+ destructive_mode="--destructive-mode"
20+else
21+ destructive_mode=""
22+fi
23+
24 if [ -z "${core}" ] && [ -z "${classic}" ]; then
25 usage
26-elif [ ! -z "${core}" ] && [ ! -z "${classic}" ]; then
27+elif [ -n "${core}" ] && [ -n "${classic}" ]; then
28 usage
29 fi
30-sudo snapcraft clean
31-sudo snapcraft ${args} prime ${parts[@]}
32-sudo snapcraft ${args} pack prime
33+sudo snapcraft clean "${destructive_mode}"
34+sudo snapcraft "${args}" prime "${parts[@]}" "${destructive_mode}"
35+sudo snapcraft "${args}" pack prime
36diff --git a/snapcraft.yaml b/snapcraft.yaml
37index 86faf9b..16bd3cf 100644
38--- a/snapcraft.yaml
39+++ b/snapcraft.yaml
40@@ -1,5 +1,5 @@
41 name: nitrogen6x
42-version: 18
43+version: "18"
44 summary: Nitrogen6x support package
45 description: |
46 Support files for booting Boundary devices Nitrogen6x
47@@ -12,6 +12,7 @@ grade: stable
48 parts:
49 core-meta:
50 plugin: nil
51+ source: .
52 after:
53 - uboot-fw
54 - uboot-env
55@@ -24,6 +25,7 @@ parts:
56 cp snap.yaml $SNAPCRAFT_PART_INSTALL/meta
57 classic-meta:
58 plugin: nil
59+ source: .
60 after:
61 - uboot-fw
62 - uboot-bootscript

Subscribers

People subscribed via source and target branches

to all changes: