Hi, On Sat, Dec 28, 2024 at 05:25:06PM +0100, Chris Hofstaedtler wrote: > Package: git-buildpackage > Version: 0.9.36 > > Hi, > > apparently this is new behaviour: when gbp-buildpackage aborts, it > now also produces this python traceback. This is mostly confusing. > > Repro: > > % gbp clone [email protected]:debian/shadow.git > % cd shadow > % touch blah > % gbp buildpackage --git-builder=sbuild -s --no-clean-source > --git-ignore-branch > gbp:error: You have uncommitted changes in your source tree: > gbp:error: On branch master > Your branch is up to date with 'origin/master'. > > Untracked files: > (use "git add <file>..." to include in what will be committed) > blah > > nothing added to commit but untracked files present (use "git add" to track) > > gbp:error: Use --git-ignore-new to ignore. > Traceback (most recent call last): > File "/usr/bin/gbp", line 149, in <module> > sys.exit(supercommand()) > ^^^^^^^^^^^^^^ > File "/usr/bin/gbp", line 145, in supercommand > return module.main(args) > ^^^^^^^^^^^^^^^^^ > File "/usr/lib/python3/dist-packages/gbp/scripts/buildpackage.py", line > 610, in main > RemoveTree(export_dir)() > ^^^^^^^^^^ > UnboundLocalError: cannot access local variable 'export_dir' where it is not > associated with a value
This needs `--git-export-dir=` on the command line (or gbp.conf) to trigger. https://salsa.debian.org/agx/git-buildpackage/-/merge_requests/33 fixes this. If someone wants to add more tests for the `--export-dir` path, be my guest. It's nothing I'm using. Cheers, -- Guido

