Skip to content

Conversation

@justinvreeland
Copy link
Contributor

@justinvreeland justinvreeland commented Sep 29, 2025

I made this with claude to help debug some tricky build issues I was encountering. I'm posting a draft to see if there's interest in cleaning it up. The docs might be a bit behind the current implementation but it work.

justin@justins-MBP ~/scratch/melange_btrfs/wolfi ((no description set) s a) 
❯ MELANGE_EXTRA_OPTS="--save-scripts" make debug/ack
....
2025/09/29 15:30:47 INFO qemu: setting up local workspace
2025/09/29 15:30:47 INFO Pre-generating pipeline scripts for export...
2025/09/29 15:30:47 INFO Successfully pre-generated scripts for 6 pipeline steps
2025/09/29 15:30:47 INFO running step "fetch"
2025/09/29 15:30:47 INFO 🛑 BREAKPOINT: Pausing before pipeline step ''
2025/09/29 15:30:47 INFO === PIPELINE STEP DETAILS ===
2025/09/29 15:30:47 INFO Step name: 
2025/09/29 15:30:47 INFO Working directory: /home/build
2025/09/29 15:30:47 INFO Environment variables:
2025/09/29 15:30:47 INFO   PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin
2025/09/29 15:30:47 INFO Command that would be executed:
2025/09/29 15:30:47 INFO   /bin/sh -c set -ex
[ -d '/home/build' ] || mkdir -p '/home/build'
cd '/home/build'

exit 0
2025/09/29 15:30:47 INFO
2025/09/29 15:30:47 INFO === INTERACTIVE DEBUGGING ===
2025/09/29 15:30:47 INFO Dropping into interactive shell in pod ""
2025/09/29 15:30:47 INFO You can:
2025/09/29 15:30:47 INFO   • Examine the current environment
2025/09/29 15:30:47 INFO   • Test commands manually
2025/09/29 15:30:47 INFO   • Check file states
2025/09/29 15:30:47 INFO   • Modify files for testing
2025/09/29 15:30:47 INFO
2025/09/29 15:30:47 INFO When ready:
2025/09/29 15:30:47 INFO   • Type 'exit 0' to SKIP this step and continue with the next
2025/09/29 15:30:47 INFO   • Type 'exit 1' to ABORT the entire build
2025/09/29 15:30:47 INFO   • Type 'exit 2' to CONTINUE and run this pipeline step
2025/09/29 15:30:47 INFO   • Type 'exit 3' to STOP here and skip all remaining pipeline steps
2025/09/29 15:30:47 INFO To enter this environment: ssh root@localhost -p 63706
...

/home/build # tree .melange-scripts/
.melange-scripts/
|-- environment.sh
|-- run-all.sh
|-- unnamed-step-01.sh
|-- unnamed-step-02.sh
|-- unnamed-step-03.sh
|-- unnamed-step-04.sh
|-- unnamed-step-05.sh
`-- unnamed-step-06.sh

0 directories, 8 files
/home/build # tree melange-out/ack/
melange-out/ack/

0 directories, 0 files
/home/build # .melange-scripts/run-all.sh
=== Running All Melange Pipeline Scripts ===
Script directory: /home/build/.melange-scripts
Current directory: /home/build

Loading environment...
Melange environment loaded
  HOME: /root
...
+ exit 0
✓ unnamed-step-06.sh completed successfully

=== All pipeline scripts completed successfully ===
/home/build # tree ./melange-out/
./melange-out/
`-- ack
    `-- usr
        |-- bin
        |   `-- ack
        |-- lib
        |   `-- perl5
        |       |-- core_perl
        |       `-- vendor_perl
        |           `-- auto
        |               `-- ack
        `-- share
            |-- man
            |   `-- man1
            |       `-- ack.1
            `-- perl5
                `-- vendor_perl
                    `-- App
                        |-- Ack
                        |   |-- ConfigDefault.pm
                        |   |-- ConfigFinder.pm
                        |   |-- ConfigLoader.pm
                        |   |-- File.pm
                        |   |-- Files.pm
                        |   |-- Filter
                        |   |   |-- Collection.pm
                        |   |   |-- Default.pm
                        |   |   |-- Extension.pm
                        |   |   |-- ExtensionGroup.pm
                        |   |   |-- FirstLineMatch.pm
                        |   |   |-- Inverse.pm
                        |   |   |-- Is.pm
                        |   |   |-- IsGroup.pm
                        |   |   |-- IsPath.pm
                        |   |   |-- IsPathGroup.pm
                        |   |   |-- Match.pm
                        |   |   `-- MatchGroup.pm
                        |   `-- Filter.pm
                        `-- Ack.pm

17 directories, 21 files


diff --git i/ack.yaml w/ack.yaml
index b02ca1de0d..572518d06b 100644
--- i/ack.yaml
+++ w/ack.yaml
@@ -23,9 +23,9 @@ pipeline:
     with:
       expected-sha256: 94ed477e3b3f94d126cec7329f0e8399f1d0ce82c7c4d882a94adb150e7ffc90
       uri: https://cpan.metacpan.org/authors/id/P/PE/PETDANCE/ack-v${{package.version}}.tar.gz
+    break-before: true
 
   - runs: PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant