UBUNTU: snapcraft.yaml: convert prepare, build and install to override-build

Message ID 1533569115-21532-2-git-send-email-paolo.pisati@canonical.com
State New
Headers show
Series
  • UBUNTU: snapcraft.yaml: convert prepare, build and install to override-build
Related show

Commit Message

Paolo Pisati Aug. 6, 2018, 3:25 p.m.
BugLink: http://bugs.launchpad.net/bugs/1785653

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
---
 snapcraft.yaml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Stefan Bader Aug. 16, 2018, 9:16 a.m. | #1
On 06.08.2018 17:25, Paolo Pisati wrote:
> BugLink: http://bugs.launchpad.net/bugs/1785653
> 
> Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
> ---
>  snapcraft.yaml | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/snapcraft.yaml b/snapcraft.yaml
> index 480f7ec..49d064a 100644
> --- a/snapcraft.yaml
> +++ b/snapcraft.yaml
> @@ -17,12 +17,11 @@ parts:
>      kconfigflavour: snapdragon
>      kconfigs:
>        - CONFIG_DEBUG_INFO=n
> +    kernel-image-target: Image
>      override-build: |
>        cp debian/scripts/retpoline-extract-one \
>          $SNAPCRAFT_PART_BUILD/scripts/ubuntu-retpoline-extract-one
>        snapcraftctl build
> -    kernel-image-target: Image
> -    install: |
>        cp $SNAPCRAFT_PART_INSTALL/dtbs/qcom/apq8016-sbc-snappy.dtb $SNAPCRAFT_PART_INSTALL/dtbs/qcom/apq8016-sbc.dtb
>        cp $SNAPCRAFT_PART_INSTALL/dtbs/qcom/*.dtb $SNAPCRAFT_PART_INSTALL/dtbs/
>    firmware:
> @@ -35,7 +34,8 @@ parts:
>      prime:
>        - -usr
>        - -lib
> -    install: |
> +    override-build: |
> +      snapcraftctl build
>        mkdir -p $SNAPCRAFT_PART_INSTALL/firmware/wlan
>        ln -s /run/macaddr0 $SNAPCRAFT_PART_INSTALL/firmware/wlan/
>      build-packages:
>

Patch

diff --git a/snapcraft.yaml b/snapcraft.yaml
index 480f7ec..49d064a 100644
--- a/snapcraft.yaml
+++ b/snapcraft.yaml
@@ -17,12 +17,11 @@  parts:
     kconfigflavour: snapdragon
     kconfigs:
       - CONFIG_DEBUG_INFO=n
+    kernel-image-target: Image
     override-build: |
       cp debian/scripts/retpoline-extract-one \
         $SNAPCRAFT_PART_BUILD/scripts/ubuntu-retpoline-extract-one
       snapcraftctl build
-    kernel-image-target: Image
-    install: |
       cp $SNAPCRAFT_PART_INSTALL/dtbs/qcom/apq8016-sbc-snappy.dtb $SNAPCRAFT_PART_INSTALL/dtbs/qcom/apq8016-sbc.dtb
       cp $SNAPCRAFT_PART_INSTALL/dtbs/qcom/*.dtb $SNAPCRAFT_PART_INSTALL/dtbs/
   firmware:
@@ -35,7 +34,8 @@  parts:
     prime:
       - -usr
       - -lib
-    install: |
+    override-build: |
+      snapcraftctl build
       mkdir -p $SNAPCRAFT_PART_INSTALL/firmware/wlan
       ln -s /run/macaddr0 $SNAPCRAFT_PART_INSTALL/firmware/wlan/
     build-packages: