Hi  James, Hi Russ,
On Tue, Jan 17, 2017 at 05:42:37PM +0000, James Clarke wrote:
> On Sat, Jan 07, 2017 at 06:42:12PM +0100, Guido Günther wrote:
> > On Sat, Jan 07, 2017 at 09:30:57AM -0800, Russ Allbery wrote:
> > > Mattia Rizzolo <mat...@debian.org> writes:
> > > > On Fri, Jan 06, 2017 at 06:18:14PM -0800, Russ Allbery wrote:
> > >
> > > >> Yeah, it does that because I didn't know how to do better (and this
> > > >> started life as my personal script for my workflow, and at the time all
> > > >> *_source.changes files were garbage).
> > >
> > > > umh, $pkg_$version_source.changes? :)
> > >
> > > Okay, how do I get $pkg and $version?  :)  git-pbuilder right now doesn't
> > > know any of that stuff.  I suppose I could try to parse debian/changelog
> > > using dpkg-parsechangelog or something....
> >
> > gbp buildpackage could pass this in env vars too. In fact I already
> > looked how this could be done and wonder if we should do at least that
> > for stretch? If so I can fix this up in gbp and git-pbuilder until
> > pbuilder is fixed.
> 
> pbuilder (well, pdebuild) is now fixed as of 0.228; could you please
> drop this in git-pbuilder? Thanks :)

I've removed the code in gbp with the attached patch. Russ, can this be
folded into the next git-pbuilder release?
Cheers,
 -- Guido

> 
> > Slightly related: What would be nice if gbp would know which changes
> > file got created by git-pbuilder / pdebuild so it doesn't have to guess
> > which one to use for an upload:
> >
> >     
> > https://github.com/agx/git-buildpackage/blob/master/examples/gbp-posttag-push#L147
> >
> > > But if pdebuild stops generating the bad *_source.changes file, then I can
> > > just delete all that code and everything becomes easier.
> > >
> > > >> >     Now, I'm of the view that dpkg-source -b should be used instead,
> > > >> >     which is what sbuild uses to create the dsc. This also has the
> > > >> >     advantage of not generating .buildinfo files (no annoying
> > > >> >     debian/files lingering after the build, either). Then the only
> > > >> >     _source.changes generated by pbuilder would be if the user 
> > > >> > requested
> > > >> >     it, and therefore having it deleted by git-pbuilder would be 
> > > >> > wrong.
> > > >>
> > > >> Yeah, this seems reasonable to me.  Definitely happy to change
> > > >> git-pbuilder once pdebuild is fixed to not produce the spurious and
> > > >> useless *_changes.file.
> > >
> > > > Indeed, is this a suggestion for pdebuild?
> > >
> > > Yeah, I think you might not have gotten the original message, since I
> > > think the X-Debugs-Cc may have been in the wrong spot?
> 
>From 0a34605b7b14b8b0484906f055e271625884ca64 Mon Sep 17 00:00:00 2001
Message-Id: <0a34605b7b14b8b0484906f055e271625884ca64.1484723006.git....@sigxcpu.org>
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <a...@sigxcpu.org>
Date: Wed, 18 Jan 2017 07:51:39 +0100
Subject: [PATCH] git-pbuilder: Don't remove changes file

Closes: #85047
---
 bin/git-pbuilder | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/bin/git-pbuilder b/bin/git-pbuilder
index aa15cf5e..e67698de 100644
--- a/bin/git-pbuilder
+++ b/bin/git-pbuilder
@@ -320,11 +320,7 @@ fi
 # Add all of the additional arguments we got on the command line, but quote
 # them from the shell since they'll undergo another round of shell expansion
 # when the pbuilder runs debbuild.
-source_only=false
 for arg in "$@" ; do
-    if [ x'-S' = x"$arg" ] ; then
-        source_only=true
-    fi
     DEBBUILDOPTS+=" $(shell_quote "$arg")"
 done
 
@@ -337,11 +333,7 @@ else
     pdebuild --buildresult "$OUTPUT_DIR" --pbuilder "$BUILDER" \
         --debbuildopts "$DEBBUILDOPTS" "${PDEBUILDOPTS[@]}" -- "${OPTIONS[@]}"
 fi
-status="$?"
-if [ -n "`ls ../*_source.changes`" ] && [ true != "$source_only" ] ; then
-    rm ../*_source.changes
-fi
-exit "$status"
+exit "$?"
 
 # Documentation.  Use a hack to hide this from the shell.  Because of the
 # above exit line, this should never be executed.
-- 
2.11.0

Reply via email to