canonical / snapcraft

Package, distribute, and update any app for Linux and IoT.
https://snapcraft.io
GNU General Public License v3.0
1.18k stars 440 forks source link

Build "part" action forces clean build #4806

Open kubiko opened 3 months ago

kubiko commented 3 months ago

Bug Description

When calling snapcraft build <part> incremental build steps are expected to be performed on the part Instead part is cleaned and build again

To Reproduce

call: snapcraft build <part>

Environment

Snapcraft 8.x

snapcraft.yaml

name: test-build
summary: Test
description: |
 ta

version: 1
base: core24
platforms:
  arm64:
    build-on: [amd64, arm64]
    build-for: arm64

confinement: strict
grade: stable

parts:
  optee-client:
    plugin: make
    source: https://github.com/OP-TEE/optee_client.git
    source-type: git
    source-tag: 3.19.0
    source-depth: 1
    make-parameters:
      - ARCH="arm64"
      - DEBUG=0
      - CROSS_COMPILE="${CRAFT_ARCH_TRIPLET_BUILD_FOR}-"
      - CFG_TEE_CLIENT_LOAD_PATH="/"
      - CFG_TA_TEST_PATH=n
      - CFG_TEE_SUPP_LOG_LEVEL=0
      - SBINDIR=/usr/sbin
      - LIBDIR=/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}

Relevant log output

Initialising lifecycle
Installing build-packages
Installing build-snaps
Skipping pull for optee-client (already ran)
Rebuilding optee-client (requested step)
...

Additional context

Even the comment states clearly "rebuilding" I assume there should be dedicated lifecycle action for rebuild and build should do just incremental build

syncronize-issues-to-jira[bot] commented 3 months ago

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-2911.

This message was autogenerated

mr-cal commented 3 months ago

https://github.com/canonical/craft-parts/pull/727