summaryrefslogtreecommitdiff
diff options
authorNathan Pratta Teodosio <nathan.teodosio@canonical.com>2025-10-07 12:29:29 +0200
committerNathan Pratta Teodosio <nathan.teodosio@canonical.com>2025-10-07 12:38:49 +0200
commit0c2842fcf2337431eee39f22ef5de764e8d1d76b (patch)
treedfb7f0afeb5fba011b9ff6f25d709b48ff6f4f8f
parent212198435fb96c6d105c0b88144242445cfe8ec9 (diff)
Only remove sources if in Launchpad.
-rw-r--r--snapcraft.yaml7
1 files changed, 4 insertions, 3 deletions
diff --git a/snapcraft.yaml b/snapcraft.yaml
index cc925e8..714a574 100644
--- a/snapcraft.yaml
+++ b/snapcraft.yaml
@@ -266,11 +266,12 @@ parts:
> $CRAFT_PART_INSTALL/man1/chrome.1
gzip -9n $CRAFT_PART_INSTALL/man1/chrome.1
- # Builder gets out of space because of the duplication of
+ # Launchpad's builder gets out of space because of the duplication of
# SRC->BUILD. Remove SRC then.
# https://forum.snapcraft.io/t/duplicated-directories-src-and-build-are-a-space-issue/44618
- # Delete this workaround if trying to build locally iteratively.
- rm -rf "$CRAFT_PART_SRC"
+ if snap info snapcraft | grep 'tracking: *launchpad-buildd'; then
+ rm -rf "$CRAFT_PART_SRC"
+ fi
# Find all patches that don't apply anymore before running Quilt, as it
# stops at the 1st unappliable and doesn't tells us how the file looks.