snapcraft doesn't remove the build.sh scripts after part cleanup
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-
Cleaning pull step (and all subsequent steps) for launch
Cleaning pull step (and all subsequent steps) for init
lxc exec snapcraft-
# looks like the files are still there
stat parts/cluster/
File: parts/cluster/
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-
File: parts/cluster/
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
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/
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/
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: -
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.