snapcraft doesn't remove the build.sh scripts after part cleanup

Bug #1882793 reported by Dmitrii Shcherbakov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
New
Undecided
Unassigned

Bug Description

Build scripts don't get cleaned up and so changes such as adding a variable to the "build_environment" do not propagate there after running `snapcraft` another time.

snapcraft 4.0.4 4862 latest/candidate canonical✓ classic

snapcraft clean --use-lxd cluster openstack-projects launch init
Launching a container.
Waiting for container to be ready
Waiting for network to be ready...
snap "core20" has no updates available
Cleaning pull step (and all subsequent steps) for cluster
Cleaning pull step (and all subsequent steps) for openstack-projects
Cleaned 'openstack-projects', which makes the following parts out of date: 'cinder-config', 'glance-config', 'horizon-config', 'keystone-config', 'nova-config', and 'openstack-wrapper'
Cleaning pull step (and all subsequent steps) for launch
Cleaning pull step (and all subsequent steps) for init

lxc exec snapcraft-microstack bash

# looks like the files are still there

stat parts/cluster/run/build.sh
  File: parts/cluster/run/build.sh
  Size: 2831 Blocks: 8 IO Block: 4096 regular file
Device: 10fc80h/1113216d Inode: 12718852 Links: 1
Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2020-06-09 14:30:58.492119801 +0000
Modify: 2020-06-09 14:30:58.484119758 +0000
Change: 2020-06-09 14:30:58.488119779 +0000
 Birth: -
snapcraft-microstack # stat parts/{cluster,openstack-projects,launch,init}/run/build.sh
  File: parts/cluster/run/build.sh
  Size: 2831 Blocks: 8 IO Block: 4096 regular file
Device: 10fc80h/1113216d Inode: 12718852 Links: 1
Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2020-06-09 14:30:58.492119801 +0000
Modify: 2020-06-09 14:30:58.484119758 +0000
Change: 2020-06-09 14:30:58.488119779 +0000
 Birth: -
  File: parts/openstack-projects/run/build.sh
  Size: 3440 Blocks: 8 IO Block: 4096 regular file
Device: 10fc80h/1113216d Inode: 6291651 Links: 1
Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2020-06-09 14:26:26.790630890 +0000
Modify: 2020-06-09 14:26:26.786630868 +0000
Change: 2020-06-09 14:26:26.786630868 +0000
 Birth: -
  File: parts/launch/run/build.sh
  Size: 2757 Blocks: 8 IO Block: 4096 regular file
Device: 10fc80h/1113216d Inode: 13633939 Links: 1
Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2020-06-09 14:31:43.496361459 +0000
Modify: 2020-06-09 14:31:43.492361438 +0000
Change: 2020-06-09 14:31:43.492361438 +0000
 Birth: -
  File: parts/init/run/build.sh
  Size: 2739 Blocks: 8 IO Block: 4096 regular file
Device: 10fc80h/1113216d Inode: 13501066 Links: 1
Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2020-06-09 14:31:22.168247078 +0000
Modify: 2020-06-09 14:31:22.164247056 +0000
Change: 2020-06-09 14:31:22.164247056 +0000
 Birth: -

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

While leaving the script behind on clean is a bug, we write over build.sh on every run of the "build" step. A rebuild can essentially be forced by modifying the sources.

Revision history for this message
Sergio Schvezov (sergiusens) wrote :
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

This is the expected behavior, we will document it.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.