Sean Whitton writes ("Re: Bug#914317: dgit: sometimes ignores configured clean-mode"): > On Sun 06 Jan 2019 at 01:13pm GMT, Ian Jackson wrote: > > I tried quite hard to investigate this allegation that the clean mode > > was honoured differently according to whether it was specified in the > > git config, or on the command line; with no success. I also traced > > the code. I think you are mistaken on that. > > Fair enough! I am able to reproduce as many times as you like, but I'm > not going to send you my root filesystem image :)
You expressed confidence on irc too, so I thought we should compare notes more systematically. Here is my non-repro. You said on irc: 20:20 <spwhitton> It's the repro from my original report 20:20 <spwhitton> Which is almost a script :) Please find attached two scripts, and the combined stdout/stderr of running the second one `repro-4'. As you can see, it producs the same bad error both times. That is with dgit 8.1. Also attached is log2 which is with my current master (8.2~). In that, as you can see, it produces the same better error both times. On your setup, does my repro-{3,4} script pair behave consistently regardless of how you ask it to set the clean mode ? Ian.
#!/bin/bash # run as # cd /home/ian/things/Dgit/Bugs/914317/git-annex # ../repro-3 CHROOT CONFIG-PFX CLEAN-OPT # # where # CONFIG-PFX is '' to have the clean mode set in config # CONFIG-PFX is : to NOT have the clean mode set in config # # CLEAN_OPT is # # Eg # ../repro-3 build '' '' # ../repro-3 build : -wgf set -ex chroot=$1; shift config_pfx=$1; shift clean_opt=$1; shift export HOME=$(cd .. && pwd) rm -f ../.gitconfig $config_pfx git config --global dgit.default.clean-mode git-ff git config -l git-deborig ||: # Tidy up any previous stuff git clean -xdff git reset --hard c6dda1ee~1 # 1) Make some changes to upstream files # 2) Stage them git cherry-pick -n c6dda1ee # 3) dgit --include-dirty build-source dgit -wdd --include-dirty build-source # 4) Now you have uncommitted debian/patches, but ignore that, and instead # commit your upstream changes git commit -m X # 5) dgit sbuild (or whatever), and you get: dgit $clean_opt sbuild -c $chroot -A
#!/bin/bash set -x # no -e ../repro-3 build '' '' ../repro-3 build : -wgf
+ ../repro-3 build '' '' + chroot=build + shift + config_pfx= + shift + clean_opt= + shift ++ cd .. ++ pwd + export HOME=/home/ian/things/Dgit/Bugs/914317 + HOME=/home/ian/things/Dgit/Bugs/914317 + rm -f ../.gitconfig + git config --global dgit.default.clean-mode git-ff + git config -l dgit.default.clean-mode=git-ff core.repositoryformatversion=0 core.filemode=true core.bare=false core.logallrefupdates=true remote.origin.url=https://salsa.debian.org/haskell-team/git-annex remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* branch.master.remote=origin branch.master.merge=refs/heads/master + git-deborig ../git-annex_7.20181121.orig.tar.xz already exists: not overwriting without -f + : + git clean -xdff + git reset --hard c6dda1ee~1 HEAD is now at b20ad8343 changelog + git cherry-pick -n c6dda1ee + dgit -wdd --include-dirty build-source dpkg-buildpackage: info: source package git-annex dpkg-buildpackage: info: source version 7.20181121-1 dpkg-buildpackage: info: source distribution UNRELEASED dpkg-buildpackage: info: source changed by Sean Whitton <spwhit...@spwhitton.name> fakeroot debian/rules clean dpkg-buildpackage: info: host architecture amd64 dh clean dh_auto_clean make -j1 clean make[1]: Entering directory '/home/ian/things/Dgit/Bugs/914317/git-annex' if [ "./Setup" != ./Setup ] && [ "./Setup" != cabal ]; then ./Setup clean; fi rm -rf tmp dist git-annex configure *.tix .hpc \ doc/.ikiwiki html dist tags Build/SysConfig Build/Version \ Setup Build/InstallDesktopFile \ Build/Standalone Build/OSXMkLibs Build/LinuxMkLibs \ Build/DistributionUpdate Build/BuildVersion Build/MakeMans \ git-annex-shell git-union-merge .tasty-rerun-log find . -name \*.o -exec rm {} \; find . -name \*.hi -exec rm {} \; make[1]: Leaving directory '/home/ian/things/Dgit/Bugs/914317/git-annex' dh_clean Format `3.0 (quilt)', need to check/update patch stack starting quiltify (single-debian-patch) dpkg-source: info: using options from work/debian/source/options: --single-debian-patch --auto-commit dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building git-annex using existing ./git-annex_7.20181121.orig.tar.xz dpkg-source: info: building git-annex in git-annex_7.20181121-1.debian.tar.xz dpkg-source: info: building git-annex in git-annex_7.20181121-1.dsc dpkg-source: warning: extracting unsigned source package (git-annex_7.20181121-1.dsc) dpkg-source: info: extracting git-annex in git-annex-7.20181121 dpkg-source: info: unpacking git-annex_7.20181121.orig.tar.xz dpkg-source: info: unpacking git-annex_7.20181121-1.debian.tar.xz nothing quilty to commit, ok. dpkg-source: info: using options from git-annex/debian/source/options: --single-debian-patch --auto-commit dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building git-annex using existing ./git-annex_7.20181121.orig.tar.xz dpkg-source: info: local changes detected, the modified files are: git-annex/COPYRIGHT dpkg-source: info: local changes have been recorded in a new patch: git-annex/debian/patches/debian-changes dpkg-source: info: building git-annex in git-annex_7.20181121-1.debian.tar.xz dpkg-source: info: building git-annex in git-annex_7.20181121-1.dsc package seems new, not specifying -v<version> dpkg-genchanges: info: including full source code in upload dgit ok: source built, results in git-annex_7.20181121-1.dsc and git-annex_7.20181121-1_source.changes + git commit -m X [master 0ac654c33] X Committer: Ian Jackson <i...@zealot.relativity.greenend.org.uk> Your name and email address were configured automatically based on your username and hostname. Please check that they are accurate. You can suppress this message by setting them explicitly: git config --global user.name "Your Name" git config --global user.email y...@example.com After doing this, you may fix the identity used for this commit with: git commit --amend --reset-author 2 files changed, 7 insertions(+), 3 deletions(-) + dgit sbuild -c build -A Format `3.0 (quilt)', need to check/update patch stack starting quiltify (single-debian-patch) dpkg-source: info: using options from work/debian/source/options: --single-debian-patch --auto-commit dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building git-annex using existing ./git-annex_7.20181121.orig.tar.xz dpkg-source: info: local changes detected, the modified files are: work/COPYRIGHT dpkg-source: info: local changes have been recorded in a new patch: work/debian/patches/debian-changes dpkg-source: info: building git-annex in git-annex_7.20181121-1.debian.tar.xz dpkg-source: info: building git-annex in git-annex_7.20181121-1.dsc dpkg-source: warning: extracting unsigned source package (git-annex_7.20181121-1.dsc) dpkg-source: info: extracting git-annex in git-annex-7.20181121 dpkg-source: info: unpacking git-annex_7.20181121.orig.tar.xz dpkg-source: info: unpacking git-annex_7.20181121-1.debian.tar.xz dpkg-source: info: applying debian-changes Commit Debian 3.0 (quilt) metadata [dgit (8.1) quilt-fixup] [master c342ccbb9] Commit Debian 3.0 (quilt) metadata Committer: Ian Jackson <i...@zealot.relativity.greenend.org.uk> Your name and email address were configured automatically based on your username and hostname. Please check that they are accurate. You can suppress this message by setting them explicitly: git config --global user.name "Your Name" git config --global user.email y...@example.com After doing this, you may fix the identity used for this commit with: git commit --amend --reset-author 2 files changed, 41 insertions(+) create mode 100644 debian/patches/debian-changes create mode 100644 debian/patches/series error: The following untracked working tree files would be overwritten by merge: debian/patches/debian-changes debian/patches/series Please move or remove them before you merge. Aborting dgit: failed command: git pull --ff-only -q /home/ian/things/Dgit/Bugs/914317/git-annex/.git/dgit/unpack/work master dgit: error: subprocess failed with error exit status 1 + ../repro-3 build : -wgf + chroot=build + shift + config_pfx=: + shift + clean_opt=-wgf + shift ++ cd .. ++ pwd + export HOME=/home/ian/things/Dgit/Bugs/914317 + HOME=/home/ian/things/Dgit/Bugs/914317 + rm -f ../.gitconfig + : git config --global dgit.default.clean-mode git-ff + git config -l core.repositoryformatversion=0 core.filemode=true core.bare=false core.logallrefupdates=true remote.origin.url=https://salsa.debian.org/haskell-team/git-annex remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* branch.master.remote=origin branch.master.merge=refs/heads/master + git-deborig ../git-annex_7.20181121.orig.tar.xz already exists: not overwriting without -f + : + git clean -xdff Removing .pc/ Removing debian/patches/ + git reset --hard c6dda1ee~1 HEAD is now at b20ad8343 changelog + git cherry-pick -n c6dda1ee + dgit -wdd --include-dirty build-source dpkg-buildpackage: info: source package git-annex dpkg-buildpackage: info: source version 7.20181121-1 dpkg-buildpackage: info: source distribution UNRELEASED dpkg-buildpackage: info: source changed by Sean Whitton <spwhit...@spwhitton.name> fakeroot debian/rules clean dpkg-buildpackage: info: host architecture amd64 dh clean dh_auto_clean make -j1 clean make[1]: Entering directory '/home/ian/things/Dgit/Bugs/914317/git-annex' if [ "./Setup" != ./Setup ] && [ "./Setup" != cabal ]; then ./Setup clean; fi rm -rf tmp dist git-annex configure *.tix .hpc \ doc/.ikiwiki html dist tags Build/SysConfig Build/Version \ Setup Build/InstallDesktopFile \ Build/Standalone Build/OSXMkLibs Build/LinuxMkLibs \ Build/DistributionUpdate Build/BuildVersion Build/MakeMans \ git-annex-shell git-union-merge .tasty-rerun-log find . -name \*.o -exec rm {} \; find . -name \*.hi -exec rm {} \; make[1]: Leaving directory '/home/ian/things/Dgit/Bugs/914317/git-annex' dh_clean Format `3.0 (quilt)', need to check/update patch stack starting quiltify (single-debian-patch) dpkg-source: info: using options from work/debian/source/options: --single-debian-patch --auto-commit dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building git-annex using existing ./git-annex_7.20181121.orig.tar.xz dpkg-source: info: building git-annex in git-annex_7.20181121-1.debian.tar.xz dpkg-source: info: building git-annex in git-annex_7.20181121-1.dsc dpkg-source: warning: extracting unsigned source package (git-annex_7.20181121-1.dsc) dpkg-source: info: extracting git-annex in git-annex-7.20181121 dpkg-source: info: unpacking git-annex_7.20181121.orig.tar.xz dpkg-source: info: unpacking git-annex_7.20181121-1.debian.tar.xz nothing quilty to commit, ok. dpkg-source: info: using options from git-annex/debian/source/options: --single-debian-patch --auto-commit dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building git-annex using existing ./git-annex_7.20181121.orig.tar.xz dpkg-source: info: local changes detected, the modified files are: git-annex/COPYRIGHT dpkg-source: info: local changes have been recorded in a new patch: git-annex/debian/patches/debian-changes dpkg-source: info: building git-annex in git-annex_7.20181121-1.debian.tar.xz dpkg-source: info: building git-annex in git-annex_7.20181121-1.dsc package seems new, not specifying -v<version> dpkg-genchanges: info: including full source code in upload dgit ok: source built, results in git-annex_7.20181121-1.dsc and git-annex_7.20181121-1_source.changes + git commit -m X [master d33d7c2e4] X Committer: Ian Jackson <i...@zealot.relativity.greenend.org.uk> Your name and email address were configured automatically based on your username and hostname. Please check that they are accurate. You can suppress this message by setting them explicitly. Run the following command and follow the instructions in your editor to edit your configuration file: git config --global --edit After doing this, you may fix the identity used for this commit with: git commit --amend --reset-author 2 files changed, 7 insertions(+), 3 deletions(-) + dgit -wgf sbuild -c build -A Format `3.0 (quilt)', need to check/update patch stack starting quiltify (single-debian-patch) dpkg-source: info: using options from work/debian/source/options: --single-debian-patch --auto-commit dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building git-annex using existing ./git-annex_7.20181121.orig.tar.xz dpkg-source: info: local changes detected, the modified files are: work/COPYRIGHT dpkg-source: info: local changes have been recorded in a new patch: work/debian/patches/debian-changes dpkg-source: info: building git-annex in git-annex_7.20181121-1.debian.tar.xz dpkg-source: info: building git-annex in git-annex_7.20181121-1.dsc dpkg-source: warning: extracting unsigned source package (git-annex_7.20181121-1.dsc) dpkg-source: info: extracting git-annex in git-annex-7.20181121 dpkg-source: info: unpacking git-annex_7.20181121.orig.tar.xz dpkg-source: info: unpacking git-annex_7.20181121-1.debian.tar.xz dpkg-source: info: applying debian-changes Commit Debian 3.0 (quilt) metadata [dgit (8.1) quilt-fixup] [master 49316665f] Commit Debian 3.0 (quilt) metadata Committer: Ian Jackson <i...@zealot.relativity.greenend.org.uk> Your name and email address were configured automatically based on your username and hostname. Please check that they are accurate. You can suppress this message by setting them explicitly. Run the following command and follow the instructions in your editor to edit your configuration file: git config --global --edit After doing this, you may fix the identity used for this commit with: git commit --amend --reset-author 2 files changed, 41 insertions(+) create mode 100644 debian/patches/debian-changes create mode 100644 debian/patches/series error: The following untracked working tree files would be overwritten by merge: debian/patches/debian-changes debian/patches/series Please move or remove them before you merge. Aborting dgit: failed command: git pull --ff-only -q /home/ian/things/Dgit/Bugs/914317/git-annex/.git/dgit/unpack/work master dgit: error: subprocess failed with error exit status 1
-- Ian Jackson <ijack...@chiark.greenend.org.uk> These opinions are my own. If I emailed you from an address @fyvzl.net or @evade.org.uk, that is a private address which bypasses my fierce spamfilter.