Bug#881750: gbp --import-orig --merge-mode=replace behaves as --merge-mode=merge

2017-11-15 Thread Guido Günther
control: retitle -1 import-orig silently fails if upstream tarball contains 
debian/ directory

Hi,
On Wed, Nov 15, 2017 at 06:48:38PM +0100, Guido Günther wrote:
> Hi,
> On Wed, Nov 15, 2017 at 05:16:29PM +0100, Víctor Cuadrado Juan wrote:
> > 
> > 
> > On 15/11/17 17:00, Guido Günther wrote:
> > > Hi,
> > > On Wed, Nov 15, 2017 at 04:21:58PM +0100, Víctor Cuadrado Juan wrote:
> > >>
> > >>
> > >> On 15/11/17 15:53, Guido Günther wrote:
> > >>> Hi,
> > >>> On Wed, Nov 15, 2017 at 03:02:33PM +0100, Víctor Cuadrado Juan wrote:
> > 
> > 
> >  On 14/11/17 22:47, Guido Günther wrote:
> > > Hi,
> > >
> > > This wired and I wouldn't expect uncommitted changes but since I don't
> > > know about your setup and what you're doing (the upstream repo
> > > e.g. already has the version you're trying to import) you'd have to
> > > provide better instructions to reproduce and tell me what you actually
> > > think is wrong.
> >  With git-buildpackage 0.8.12.2 in Stretch, if I take Debian's guitarix 
> >  up
> >  until 0.35.6, I can do
> > 
> >    gbp --import-orig --uscan --merge-mode=replace
> > 
> >  and it will correctly import the new 0.36.0 upstream version, merge it 
> >  to master
> >  and preserve the already existing contents at debian/*.
> > 
> >  With git-buildpackage 0.9.2 (today in Testing and Unstable), doing the 
> >  same
> >  will overwrite the contents at debian/* with upstream sources, 
> >  contrary to
> >  what --merge-mode=replace should do.
> > >>>
> > >>> That would be a grave bug. Can you still reproduce it? If so please send
> > >>> me the refs of the branches (master and upstream) before you run uscn so
> > >>> I can try to reproduce.
> > >>>
> >  Sadly I wanted to keep working on guitarix and submit a new upload, so 
> >  I
> >  already committed 0.36.0 to the guitarix repo at
> >  https://anonscm.debian.org/cgit/pkg-multimedia/guitarix.git/ .
> > 
> > >  Can you reproduce this with other packages?
> > 
> >  I tried to reproduce it with git-buildpackage 0.9.1 against python-pyo 
> >  and
> >  lv2proc packages, and it worked fine.
> > 
> >  So if you see no problem on gbp output as said, feel free to close the 
> >  bug.
> >  Maybe it was a fluke caused by several people working in guitarix's
> >  repo.
> > >>>
> > >>> See above. Can you try to pass me the commits (or even better prepare a
> > >>> repo in the exact state) that I need to run gbp import-orig against? I
> > >>> tried several variants here but it always worked (as it did with the
> > >>> test run on the rest of the archive on my last sweep). Even the debian/
> > >>> tree from your logs (c4a8a211261fc53b556732b1b724f938060d0135) is the
> > >>> same one that my invocation uses as is the parent commit on upstream.
> > >>>
> > >>> If you could provide more information on how to reproduce this that'd be
> > >>> great. If not let's close this for the moment. Should you hit that again
> > >>> please tar the _whole_ git repo and send me link so I can infer things
> > >>> from the reflog.
> > >>>
> > >>> Cheers,
> > >>>  -- Guido
> > >>>
> > >>
> > >> I have taken https://anonscm.debian.org/cgit/pkg-multimedia/guitarix.git/
> > >> and do `git reset --hard`, deleted tags and removed the debian remote to 
> > >> have
> > >> it look as it was before importing upstream's 0.36.0, and I can
> > >> reproduce
> > > 
> > > That's what I did yesterday.
> > > 
> > >> the bug in it:
> > >>
> > >> git clone https://github.com/viccuad/example-bug-gbp && cd 
> > >> example-bug-gbp
> > >> git fetch origin upstream:upstream pristine-tar:pristine-tar
> > >> gbp import-orig --pristine-tar --uscan --merge-mode=replace # or 
> > >> auto, is the same
> > >> # notice that debian/* has changes to be committed
> > >>
> > >> I will delete that repo once this bug is closed/fixed.
> > > 
> > > Thanks. But then again, same output as in my previous
> > > attempts. Everything looks fine. Is it possible that you're somehow
> > > picking old gbp code from a pip install or similar? What's in your
> > > gbp.conf? Can you make sure with "strace -e file -s2048 " that
> > > the right gbp and git are being used?
> > > 
> > > Cheers,
> > >  -- Guido
> > > 
> > 
> > Sadly I keep reproducing it in a fresh Sid VM, with no gbp.conf
> > (see attached file with strace output).
> 
> I can reproduce this now in a clean sid chroot. Thanks a lot!
Another fallout of the changed string handling in Python3, sigh.
Sorry for the trouble and thanks again for providing a reproducer.

Cheers,
 -- Guido



Bug#881750: gbp --import-orig --merge-mode=replace behaves as --merge-mode=merge

2017-11-15 Thread Guido Günther
control: tags -1 -moreinfo
control: tags -1 -unreproducible
control: retitle -1 import-orig silently fails to commit debian/ on guitarix

Hi,
On Wed, Nov 15, 2017 at 05:16:29PM +0100, Víctor Cuadrado Juan wrote:
> 
> 
> On 15/11/17 17:00, Guido Günther wrote:
> > Hi,
> > On Wed, Nov 15, 2017 at 04:21:58PM +0100, Víctor Cuadrado Juan wrote:
> >>
> >>
> >> On 15/11/17 15:53, Guido Günther wrote:
> >>> Hi,
> >>> On Wed, Nov 15, 2017 at 03:02:33PM +0100, Víctor Cuadrado Juan wrote:
> 
> 
>  On 14/11/17 22:47, Guido Günther wrote:
> > Hi,
> >
> > This wired and I wouldn't expect uncommitted changes but since I don't
> > know about your setup and what you're doing (the upstream repo
> > e.g. already has the version you're trying to import) you'd have to
> > provide better instructions to reproduce and tell me what you actually
> > think is wrong.
>  With git-buildpackage 0.8.12.2 in Stretch, if I take Debian's guitarix up
>  until 0.35.6, I can do
> 
>    gbp --import-orig --uscan --merge-mode=replace
> 
>  and it will correctly import the new 0.36.0 upstream version, merge it 
>  to master
>  and preserve the already existing contents at debian/*.
> 
>  With git-buildpackage 0.9.2 (today in Testing and Unstable), doing the 
>  same
>  will overwrite the contents at debian/* with upstream sources, contrary 
>  to
>  what --merge-mode=replace should do.
> >>>
> >>> That would be a grave bug. Can you still reproduce it? If so please send
> >>> me the refs of the branches (master and upstream) before you run uscn so
> >>> I can try to reproduce.
> >>>
>  Sadly I wanted to keep working on guitarix and submit a new upload, so I
>  already committed 0.36.0 to the guitarix repo at
>  https://anonscm.debian.org/cgit/pkg-multimedia/guitarix.git/ .
> 
> >  Can you reproduce this with other packages?
> 
>  I tried to reproduce it with git-buildpackage 0.9.1 against python-pyo 
>  and
>  lv2proc packages, and it worked fine.
> 
>  So if you see no problem on gbp output as said, feel free to close the 
>  bug.
>  Maybe it was a fluke caused by several people working in guitarix's
>  repo.
> >>>
> >>> See above. Can you try to pass me the commits (or even better prepare a
> >>> repo in the exact state) that I need to run gbp import-orig against? I
> >>> tried several variants here but it always worked (as it did with the
> >>> test run on the rest of the archive on my last sweep). Even the debian/
> >>> tree from your logs (c4a8a211261fc53b556732b1b724f938060d0135) is the
> >>> same one that my invocation uses as is the parent commit on upstream.
> >>>
> >>> If you could provide more information on how to reproduce this that'd be
> >>> great. If not let's close this for the moment. Should you hit that again
> >>> please tar the _whole_ git repo and send me link so I can infer things
> >>> from the reflog.
> >>>
> >>> Cheers,
> >>>  -- Guido
> >>>
> >>
> >> I have taken https://anonscm.debian.org/cgit/pkg-multimedia/guitarix.git/
> >> and do `git reset --hard`, deleted tags and removed the debian remote to 
> >> have
> >> it look as it was before importing upstream's 0.36.0, and I can
> >> reproduce
> > 
> > That's what I did yesterday.
> > 
> >> the bug in it:
> >>
> >> git clone https://github.com/viccuad/example-bug-gbp && cd 
> >> example-bug-gbp
> >> git fetch origin upstream:upstream pristine-tar:pristine-tar
> >> gbp import-orig --pristine-tar --uscan --merge-mode=replace # or auto, 
> >> is the same
> >> # notice that debian/* has changes to be committed
> >>
> >> I will delete that repo once this bug is closed/fixed.
> > 
> > Thanks. But then again, same output as in my previous
> > attempts. Everything looks fine. Is it possible that you're somehow
> > picking old gbp code from a pip install or similar? What's in your
> > gbp.conf? Can you make sure with "strace -e file -s2048 " that
> > the right gbp and git are being used?
> > 
> > Cheers,
> >  -- Guido
> > 
> 
> Sadly I keep reproducing it in a fresh Sid VM, with no gbp.conf
> (see attached file with strace output).

I can reproduce this now in a clean sid chroot. Thanks a lot!
 -- Guido



Bug#881750: gbp --import-orig --merge-mode=replace behaves as --merge-mode=merge

2017-11-15 Thread Víctor Cuadrado Juan


On 15/11/17 17:00, Guido Günther wrote:
> Hi,
> On Wed, Nov 15, 2017 at 04:21:58PM +0100, Víctor Cuadrado Juan wrote:
>>
>>
>> On 15/11/17 15:53, Guido Günther wrote:
>>> Hi,
>>> On Wed, Nov 15, 2017 at 03:02:33PM +0100, Víctor Cuadrado Juan wrote:


 On 14/11/17 22:47, Guido Günther wrote:
> Hi,
>
> This wired and I wouldn't expect uncommitted changes but since I don't
> know about your setup and what you're doing (the upstream repo
> e.g. already has the version you're trying to import) you'd have to
> provide better instructions to reproduce and tell me what you actually
> think is wrong.
 With git-buildpackage 0.8.12.2 in Stretch, if I take Debian's guitarix up
 until 0.35.6, I can do

   gbp --import-orig --uscan --merge-mode=replace

 and it will correctly import the new 0.36.0 upstream version, merge it to 
 master
 and preserve the already existing contents at debian/*.

 With git-buildpackage 0.9.2 (today in Testing and Unstable), doing the same
 will overwrite the contents at debian/* with upstream sources, contrary to
 what --merge-mode=replace should do.
>>>
>>> That would be a grave bug. Can you still reproduce it? If so please send
>>> me the refs of the branches (master and upstream) before you run uscn so
>>> I can try to reproduce.
>>>
 Sadly I wanted to keep working on guitarix and submit a new upload, so I
 already committed 0.36.0 to the guitarix repo at
 https://anonscm.debian.org/cgit/pkg-multimedia/guitarix.git/ .

>  Can you reproduce this with other packages?

 I tried to reproduce it with git-buildpackage 0.9.1 against python-pyo and
 lv2proc packages, and it worked fine.

 So if you see no problem on gbp output as said, feel free to close the bug.
 Maybe it was a fluke caused by several people working in guitarix's
 repo.
>>>
>>> See above. Can you try to pass me the commits (or even better prepare a
>>> repo in the exact state) that I need to run gbp import-orig against? I
>>> tried several variants here but it always worked (as it did with the
>>> test run on the rest of the archive on my last sweep). Even the debian/
>>> tree from your logs (c4a8a211261fc53b556732b1b724f938060d0135) is the
>>> same one that my invocation uses as is the parent commit on upstream.
>>>
>>> If you could provide more information on how to reproduce this that'd be
>>> great. If not let's close this for the moment. Should you hit that again
>>> please tar the _whole_ git repo and send me link so I can infer things
>>> from the reflog.
>>>
>>> Cheers,
>>>  -- Guido
>>>
>>
>> I have taken https://anonscm.debian.org/cgit/pkg-multimedia/guitarix.git/
>> and do `git reset --hard`, deleted tags and removed the debian remote to have
>> it look as it was before importing upstream's 0.36.0, and I can
>> reproduce
> 
> That's what I did yesterday.
> 
>> the bug in it:
>>
>> git clone https://github.com/viccuad/example-bug-gbp && cd 
>> example-bug-gbp
>> git fetch origin upstream:upstream pristine-tar:pristine-tar
>> gbp import-orig --pristine-tar --uscan --merge-mode=replace # or auto, 
>> is the same
>> # notice that debian/* has changes to be committed
>>
>> I will delete that repo once this bug is closed/fixed.
> 
> Thanks. But then again, same output as in my previous
> attempts. Everything looks fine. Is it possible that you're somehow
> picking old gbp code from a pip install or similar? What's in your
> gbp.conf? Can you make sure with "strace -e file -s2048 " that
> the right gbp and git are being used?
> 
> Cheers,
>  -- Guido
> 

Sadly I keep reproducing it in a fresh Sid VM, with no gbp.conf
(see attached file with strace output).


-- 
Víctor Cuadrado Juan   m...@viccuad.me

PGP key ID: 4096R: 0xA2591E231E251F36
Key fingerprint: E3C5 114C 0C5B 4C49 BA03  0991 A259 1E23 1E25 1F36
My signed E-Mails are trustworthy.
vagrant@desktop:~$ git clone https://github.com/viccuad/example-bug-gbp && cd 
example-bug-gbp
Cloning into 'example-bug-gbp'...
remote: Counting objects: 10959, done.
remote: Compressing objects: 100% (2843/2843), done.
remote: Total 10959 (delta 7949), reused 10959 (delta 7949), pack-reused 0
Receiving objects: 100% (10959/10959), 88.72 MiB | 1.28 MiB/s, done.
Resolving deltas: 100% (7949/7949), done.
vagrant@desktop:~/example-bug-gbp$ git fetch origin upstream:upstream 
pristine-tar:pristine-tar
From https://github.com/viccuad/example-bug-gbp
 * [new branch]  upstream -> upstream
 * [new branch]  pristine-tar -> pristine-tar
vagrant@desktop:~/example-bug-gbp$ strace -e file -s2048 gbp import-orig 
--pristine-tar --uscan --merge-mode=replace
execve("/usr/bin/gbp", ["gbp", "import-orig", "--pristine-tar", "--uscan", 
"--merge-mode=replace"], 0x7ffc897c43c8 /* 24 vars */) = 0
access("/etc/ld.so.nohwcap", F_OK)  = -1 ENOENT (No such file or directory)
access("/etc/ld.so.preload", R_OK)  = -1 ENOENT (No such 

Bug#881750: gbp --import-orig --merge-mode=replace behaves as --merge-mode=merge

2017-11-15 Thread Guido Günther
Hi,
On Wed, Nov 15, 2017 at 04:21:58PM +0100, Víctor Cuadrado Juan wrote:
> 
> 
> On 15/11/17 15:53, Guido Günther wrote:
> > Hi,
> > On Wed, Nov 15, 2017 at 03:02:33PM +0100, Víctor Cuadrado Juan wrote:
> >>
> >>
> >> On 14/11/17 22:47, Guido Günther wrote:
> >>> Hi,
> >>>
> >>> This wired and I wouldn't expect uncommitted changes but since I don't
> >>> know about your setup and what you're doing (the upstream repo
> >>> e.g. already has the version you're trying to import) you'd have to
> >>> provide better instructions to reproduce and tell me what you actually
> >>> think is wrong.
> >> With git-buildpackage 0.8.12.2 in Stretch, if I take Debian's guitarix up
> >> until 0.35.6, I can do
> >>
> >>   gbp --import-orig --uscan --merge-mode=replace
> >>
> >> and it will correctly import the new 0.36.0 upstream version, merge it to 
> >> master
> >> and preserve the already existing contents at debian/*.
> >>
> >> With git-buildpackage 0.9.2 (today in Testing and Unstable), doing the same
> >> will overwrite the contents at debian/* with upstream sources, contrary to
> >> what --merge-mode=replace should do.
> > 
> > That would be a grave bug. Can you still reproduce it? If so please send
> > me the refs of the branches (master and upstream) before you run uscn so
> > I can try to reproduce.
> > 
> >> Sadly I wanted to keep working on guitarix and submit a new upload, so I
> >> already committed 0.36.0 to the guitarix repo at
> >> https://anonscm.debian.org/cgit/pkg-multimedia/guitarix.git/ .
> >>
> >>>  Can you reproduce this with other packages?
> >>
> >> I tried to reproduce it with git-buildpackage 0.9.1 against python-pyo and
> >> lv2proc packages, and it worked fine.
> >>
> >> So if you see no problem on gbp output as said, feel free to close the bug.
> >> Maybe it was a fluke caused by several people working in guitarix's
> >> repo.
> > 
> > See above. Can you try to pass me the commits (or even better prepare a
> > repo in the exact state) that I need to run gbp import-orig against? I
> > tried several variants here but it always worked (as it did with the
> > test run on the rest of the archive on my last sweep). Even the debian/
> > tree from your logs (c4a8a211261fc53b556732b1b724f938060d0135) is the
> > same one that my invocation uses as is the parent commit on upstream.
> > 
> > If you could provide more information on how to reproduce this that'd be
> > great. If not let's close this for the moment. Should you hit that again
> > please tar the _whole_ git repo and send me link so I can infer things
> > from the reflog.
> > 
> > Cheers,
> >  -- Guido
> > 
> 
> I have taken https://anonscm.debian.org/cgit/pkg-multimedia/guitarix.git/
> and do `git reset --hard`, deleted tags and removed the debian remote to have
> it look as it was before importing upstream's 0.36.0, and I can
> reproduce

That's what I did yesterday.

> the bug in it:
> 
> git clone https://github.com/viccuad/example-bug-gbp && cd example-bug-gbp
> git fetch origin upstream:upstream pristine-tar:pristine-tar
> gbp import-orig --pristine-tar --uscan --merge-mode=replace # or auto, is 
> the same
> # notice that debian/* has changes to be committed
> 
> I will delete that repo once this bug is closed/fixed.

Thanks. But then again, same output as in my previous
attempts. Everything looks fine. Is it possible that you're somehow
picking old gbp code from a pip install or similar? What's in your
gbp.conf? Can you make sure with "strace -e file -s2048 " that
the right gbp and git are being used?

Cheers,
 -- Guido



Bug#881750: gbp --import-orig --merge-mode=replace behaves as --merge-mode=merge

2017-11-15 Thread Víctor Cuadrado Juan


On 15/11/17 15:53, Guido Günther wrote:
> Hi,
> On Wed, Nov 15, 2017 at 03:02:33PM +0100, Víctor Cuadrado Juan wrote:
>>
>>
>> On 14/11/17 22:47, Guido Günther wrote:
>>> Hi,
>>>
>>> This wired and I wouldn't expect uncommitted changes but since I don't
>>> know about your setup and what you're doing (the upstream repo
>>> e.g. already has the version you're trying to import) you'd have to
>>> provide better instructions to reproduce and tell me what you actually
>>> think is wrong.
>> With git-buildpackage 0.8.12.2 in Stretch, if I take Debian's guitarix up
>> until 0.35.6, I can do
>>
>>   gbp --import-orig --uscan --merge-mode=replace
>>
>> and it will correctly import the new 0.36.0 upstream version, merge it to 
>> master
>> and preserve the already existing contents at debian/*.
>>
>> With git-buildpackage 0.9.2 (today in Testing and Unstable), doing the same
>> will overwrite the contents at debian/* with upstream sources, contrary to
>> what --merge-mode=replace should do.
> 
> That would be a grave bug. Can you still reproduce it? If so please send
> me the refs of the branches (master and upstream) before you run uscn so
> I can try to reproduce.
> 
>> Sadly I wanted to keep working on guitarix and submit a new upload, so I
>> already committed 0.36.0 to the guitarix repo at
>> https://anonscm.debian.org/cgit/pkg-multimedia/guitarix.git/ .
>>
>>>  Can you reproduce this with other packages?
>>
>> I tried to reproduce it with git-buildpackage 0.9.1 against python-pyo and
>> lv2proc packages, and it worked fine.
>>
>> So if you see no problem on gbp output as said, feel free to close the bug.
>> Maybe it was a fluke caused by several people working in guitarix's
>> repo.
> 
> See above. Can you try to pass me the commits (or even better prepare a
> repo in the exact state) that I need to run gbp import-orig against? I
> tried several variants here but it always worked (as it did with the
> test run on the rest of the archive on my last sweep). Even the debian/
> tree from your logs (c4a8a211261fc53b556732b1b724f938060d0135) is the
> same one that my invocation uses as is the parent commit on upstream.
> 
> If you could provide more information on how to reproduce this that'd be
> great. If not let's close this for the moment. Should you hit that again
> please tar the _whole_ git repo and send me link so I can infer things
> from the reflog.
> 
> Cheers,
>  -- Guido
> 

I have taken https://anonscm.debian.org/cgit/pkg-multimedia/guitarix.git/
and do `git reset --hard`, deleted tags and removed the debian remote to have
it look as it was before importing upstream's 0.36.0, and I can reproduce
the bug in it:

git clone https://github.com/viccuad/example-bug-gbp && cd example-bug-gbp
git fetch origin upstream:upstream pristine-tar:pristine-tar
gbp import-orig --pristine-tar --uscan --merge-mode=replace # or auto, is 
the same
# notice that debian/* has changes to be committed

I will delete that repo once this bug is closed/fixed.

Cheers,

-- 
Víctor Cuadrado Juan   m...@viccuad.me

PGP key ID: 4096R: 0xA2591E231E251F36
Key fingerprint: E3C5 114C 0C5B 4C49 BA03  0991 A259 1E23 1E25 1F36
My signed E-Mails are trustworthy.



signature.asc
Description: OpenPGP digital signature


Bug#881750: gbp --import-orig --merge-mode=replace behaves as --merge-mode=merge

2017-11-15 Thread Guido Günther
Hi,
On Wed, Nov 15, 2017 at 03:02:33PM +0100, Víctor Cuadrado Juan wrote:
> 
> 
> On 14/11/17 22:47, Guido Günther wrote:
> > Hi,
> > 
> > This wired and I wouldn't expect uncommitted changes but since I don't
> > know about your setup and what you're doing (the upstream repo
> > e.g. already has the version you're trying to import) you'd have to
> > provide better instructions to reproduce and tell me what you actually
> > think is wrong.
> With git-buildpackage 0.8.12.2 in Stretch, if I take Debian's guitarix up
> until 0.35.6, I can do
> 
>   gbp --import-orig --uscan --merge-mode=replace
> 
> and it will correctly import the new 0.36.0 upstream version, merge it to 
> master
> and preserve the already existing contents at debian/*.
> 
> With git-buildpackage 0.9.2 (today in Testing and Unstable), doing the same
> will overwrite the contents at debian/* with upstream sources, contrary to
> what --merge-mode=replace should do.

That would be a grave bug. Can you still reproduce it? If so please send
me the refs of the branches (master and upstream) before you run uscn so
I can try to reproduce.

> Sadly I wanted to keep working on guitarix and submit a new upload, so I
> already committed 0.36.0 to the guitarix repo at
> https://anonscm.debian.org/cgit/pkg-multimedia/guitarix.git/ .
> 
> >  Can you reproduce this with other packages?
> 
> I tried to reproduce it with git-buildpackage 0.9.1 against python-pyo and
> lv2proc packages, and it worked fine.
> 
> So if you see no problem on gbp output as said, feel free to close the bug.
> Maybe it was a fluke caused by several people working in guitarix's
> repo.

See above. Can you try to pass me the commits (or even better prepare a
repo in the exact state) that I need to run gbp import-orig against? I
tried several variants here but it always worked (as it did with the
test run on the rest of the archive on my last sweep). Even the debian/
tree from your logs (c4a8a211261fc53b556732b1b724f938060d0135) is the
same one that my invocation uses as is the parent commit on upstream.

If you could provide more information on how to reproduce this that'd be
great. If not let's close this for the moment. Should you hit that again
please tar the _whole_ git repo and send me link so I can infer things
from the reflog.

Cheers,
 -- Guido



Bug#881750: gbp --import-orig --merge-mode=replace behaves as --merge-mode=merge

2017-11-15 Thread Víctor Cuadrado Juan


On 14/11/17 22:47, Guido Günther wrote:
> Hi,
> 
> This wired and I wouldn't expect uncommitted changes but since I don't
> know about your setup and what you're doing (the upstream repo
> e.g. already has the version you're trying to import) you'd have to
> provide better instructions to reproduce and tell me what you actually
> think is wrong.
With git-buildpackage 0.8.12.2 in Stretch, if I take Debian's guitarix up
until 0.35.6, I can do

  gbp --import-orig --uscan --merge-mode=replace

and it will correctly import the new 0.36.0 upstream version, merge it to master
and preserve the already existing contents at debian/*.

With git-buildpackage 0.9.2 (today in Testing and Unstable), doing the same
will overwrite the contents at debian/* with upstream sources, contrary to
what --merge-mode=replace should do.

Sadly I wanted to keep working on guitarix and submit a new upload, so I
already committed 0.36.0 to the guitarix repo at
https://anonscm.debian.org/cgit/pkg-multimedia/guitarix.git/ .

>  Can you reproduce this with other packages?

I tried to reproduce it with git-buildpackage 0.9.1 against python-pyo and
lv2proc packages, and it worked fine.

So if you see no problem on gbp output as said, feel free to close the bug.
Maybe it was a fluke caused by several people working in guitarix's repo.




-- 
Víctor Cuadrado Juan   m...@viccuad.me

PGP key ID: 4096R: 0xA2591E231E251F36
Key fingerprint: E3C5 114C 0C5B 4C49 BA03  0991 A259 1E23 1E25 1F36
My signed E-Mails are trustworthy.



signature.asc
Description: OpenPGP digital signature


Bug#881750: gbp --import-orig --merge-mode=replace behaves as --merge-mode=merge

2017-11-14 Thread Guido Günther
Hi,
On Tue, Nov 14, 2017 at 08:00:42PM +0100, Víctor Cuadrado Juan wrote:
> Package: git-buildpackage
> Version: 0.9.1
> Severity: normal
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA512
> 
> Hello,
> 
> While importing upstream's version 0.36.0 of package guitarix, I've found that
> `gbp --import-orig --merge-mode=replace` and `--merge-mode=auto` behaves as
> `--merge-mode=merge`. To reproduce do:
> 
> I've reproduced this bug against gbp 0.9.1 and 0.9.2. Please see attached
> output on clean unstable machine.
> root@desktop:~# git clone 
> git://anonscm.debian.org/pkg-multimedia/guitarix.git guitarix && cd guitarix
> Cloning into 'guitarix'...
> remote: Counting objects: 11042, done.
> remote: Compressing objects: 100% (4054/4054), done.
> remote: Total 11042 (delta 7947), reused 9746 (delta 6821)
> Receiving objects: 100% (11042/11042), 88.77 MiB | 4.60 MiB/s, done.
> Resolving deltas: 100% (7947/7947), done.
> root@desktop:~/guitarix# git fetch origin upstream:upstream 
> pristine-tar:pristine-tar
> From git://anonscm.debian.org/pkg-multimedia/guitarix
>  * [new branch]  upstream -> upstream
>  * [new branch]  pristine-tar -> pristine-tar
> root@desktop:~/guitarix# gbp import-orig --pristine-tar --uscan --verbose 
> --merge-mode=replace
> gbp:debug: ['git', 'rev-parse', '--show-cdup']
> gbp:debug: ['git', 'rev-parse', '--is-bare-repository']
> gbp:debug: ['git', 'rev-parse', '--git-dir']
> gbp:debug: ['git', 'for-each-ref', '--format=%(refname:short)', 'refs/heads/']
> gbp:debug: ['git', 'show-ref', 'refs/heads/upstream']
> gbp:debug: ['git', 'status', '--porcelain']
> gbp:info: Launching uscan...
> uscan: Newest version of guitarix on remote site is 0.36.0, local version is 
> 0.35.6
> uscan:=> Newer package available from
>   http://qa.debian.org/watch/sf.php/guitarix/guitarix2-0.36.0.tar.xz
> gbp:info: Using uscan downloaded tarball ../guitarix_0.36.0.orig.tar.xz
> What is the upstream version? [0.36.0]
> gbp:debug: ['git', 'tag', '-l', 'upstream/0.36.0']
> gbp:debug: tar ['-C', '../tmp2_xslh4t', '-a', '-xf', 
> '../guitarix_0.36.0.orig.tar.xz'] []
> gbp:debug: Unpacked '../guitarix_0.36.0.orig.tar.xz' to 
> '../tmp2_xslh4t/guitarix-0.36.0'
> gbp:info: Importing '../guitarix_0.36.0.orig.tar.xz' to branch 'upstream'...
> gbp:info: Source package is guitarix
> gbp:info: Upstream version is 0.36.0
> gbp:debug: ['git', 'show-ref', 'refs/heads/upstream']
> gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', 'upstream']
> gbp:debug: ['git', 'add', '-f', '.']
> gbp:debug: ['git', 'write-tree']
> gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', 'upstream']
> gbp:debug: ['git', 'commit-tree', '3e9fc90df9d883cc4ee657c9466ea835336eeb94', 
> '-p', 'b71e4eb38c6b8d9a35d1e88d6ff72a095a7cb7b1']
> gbp:debug: ['git', 'update-ref', '-m', 'gbp: New upstream version 0.36.0', 
> 'refs/heads/upstream', '87a3e934062d1ad81c6d9c557afe8b94ffc6a17d', 
> 'b71e4eb38c6b8d9a35d1e88d6ff72a095a7cb7b1']
> gbp:debug: ['git', 'show-ref', 'refs/heads/pristine-tar']
> gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', 'pristine-tar']
> gbp:debug: ['git', 'ls-tree', '-z', 'upstream', '--']
> gbp:debug: ['git', 'mktree', '-z']
> gbp:debug: pristine-tar [] ['commit', '../guitarix_0.36.0.orig.tar.xz', 
> '3e9fc90df9d883cc4ee657c9466ea835336eeb94']
> gbp:debug: ['git', 'tag', '-m', 'Upstream version 0.36.0', 'upstream/0.36.0', 
> '87a3e934062d1ad81c6d9c557afe8b94ffc6a17d']
> gbp:debug: ['git', 'show-ref', 'refs/heads/master']
> gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', 'master']
> gbp:info: Replacing upstream source on 'master'
> gbp:debug: ['git', 'ls-tree', '-z', 'upstream/0.36.0^{tree}', '--']
> gbp:debug: ['git', 'ls-tree', '-z', 'master^{tree}', '--']
> gbp:debug: Using c4a8a211261fc53b556732b1b724f938060d0135 as debian/ tree

This all looks fine so I don't see a bug here. 

> gbp:debug: ['git', 'mktree', '-z']
> gbp:debug: ['git', 'commit-tree', 'e6fc6f222c9d84c3f8af093e743a220bd633d59f', 
> '-p', 'master^{commit}', '-p', 'upstream/0.36.0^{commit}']
> gbp:debug: ['git', 'update-ref', '-m', 'gbp: Updating master after import of 
> upstream/0.36.0', 'refs/heads/master', 
> '69f13f7d26624e430f433432f35f5cf4c59392fc']
> gbp:debug: ['git', 'reset', '--quiet', '--hard', 
> '69f13f7d26624e430f433432f35f5cf4c59392fc', '--']
> gbp:debug: ['git', 'symbolic-ref', 'HEAD']
> gbp:debug: ['git', 'show-ref', 'refs/heads/master']
> gbp:debug: rm ['-rf', '../tmp2_xslh4t'] []
> gbp:info: Successfully imported version 0.36.0 of 
> ../guitarix_0.36.0.orig.tar.xz
> root@desktop:~/guitarix# git status
> On branch master
> Your branch is ahead of 'origin/master' by 2 commits.
>   (use "git push" to publish your local commits)
> 
> Changes to be committed:
>   (use "git reset HEAD ..." to unstage)
> 
> new file:   debian/NEWS.Debian
> typechange: debian/changelog
> new file:   debian/clean
> modified:   debian/compat
> modified:   debian/control
> modified:   

Bug#881750: gbp --import-orig --merge-mode=replace behaves as --merge-mode=merge

2017-11-14 Thread Víctor Cuadrado Juan
Package: git-buildpackage
Version: 0.9.1
Severity: normal

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Hello,

While importing upstream's version 0.36.0 of package guitarix, I've found that
`gbp --import-orig --merge-mode=replace` and `--merge-mode=auto` behaves as
`--merge-mode=merge`. To reproduce do:

I've reproduced this bug against gbp 0.9.1 and 0.9.2. Please see attached
output on clean unstable machine.

Kind regards,


- -- System Information:
Debian Release: buster/sid
  APT prefers testing-debug
  APT policy: (500, 'testing-debug'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.13.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages git-buildpackage depends on:
ii  devscripts 2.17.11
ii  git1:2.15.0-1
ii  man-db 2.7.6.1-2
ii  python33.6.3-2
ii  python3-dateutil   2.6.1-1
ii  python3-pkg-resources  36.6.0-1

Versions of packages git-buildpackage recommends:
ii  cowbuilder0.85
ii  pbuilder  0.229
ii  pristine-tar  1.42
ii  python3-requests  2.18.1-1
ii  sbuild0.73.0-4

Versions of packages git-buildpackage suggests:
pn  python3-notify2  
ii  sudo 1.8.21p2-2
ii  unzip6.0-21

- -- no debconf information

-BEGIN PGP SIGNATURE-

iQEzBAEBCgAdFiEELLKv6mdE0z94m2FAIj8VylqvDngFAloLPVYACgkQIj8Vylqv
DnjIbwgAwWxoIQTTb4mvkOtk7c2boYolotWByaUxa2wmb1GVUgJIVVidjq3lWIah
7CQRULeD58T5nMSkxZ4Dbx4G1P39OQZgIuTlwejRn55NrAntxSJKsIH8nJVhUc96
yrwtCDlTa0jocMuSJDdhyEvGJOEXYqwvru6gRvBGUZW60vnQqPaXMa0vM48RWOaV
2fZ8rOeH2t8W0sWdsWDOMbWCo0Os4Wj/pbWYf/bJxhalupvS4ZMjdSCKl0o+l9q5
TXJICcv2zkGS7hCECddMtdSzhpTJYH8A4kiV7qbPTBUOTDxm0ya54A3QtWDi6Lpe
caUPdPRhPU7HTtHlcomWGLSEeL0nVw==
=ABdf
-END PGP SIGNATURE-
root@desktop:~# git clone git://anonscm.debian.org/pkg-multimedia/guitarix.git 
guitarix && cd guitarix
Cloning into 'guitarix'...
remote: Counting objects: 11042, done.
remote: Compressing objects: 100% (4054/4054), done.
remote: Total 11042 (delta 7947), reused 9746 (delta 6821)
Receiving objects: 100% (11042/11042), 88.77 MiB | 4.60 MiB/s, done.
Resolving deltas: 100% (7947/7947), done.
root@desktop:~/guitarix# git fetch origin upstream:upstream 
pristine-tar:pristine-tar
>From git://anonscm.debian.org/pkg-multimedia/guitarix
 * [new branch]  upstream -> upstream
 * [new branch]  pristine-tar -> pristine-tar
root@desktop:~/guitarix# gbp import-orig --pristine-tar --uscan --verbose 
--merge-mode=replace
gbp:debug: ['git', 'rev-parse', '--show-cdup']
gbp:debug: ['git', 'rev-parse', '--is-bare-repository']
gbp:debug: ['git', 'rev-parse', '--git-dir']
gbp:debug: ['git', 'for-each-ref', '--format=%(refname:short)', 'refs/heads/']
gbp:debug: ['git', 'show-ref', 'refs/heads/upstream']
gbp:debug: ['git', 'status', '--porcelain']
gbp:info: Launching uscan...
uscan: Newest version of guitarix on remote site is 0.36.0, local version is 
0.35.6
uscan:=> Newer package available from
  http://qa.debian.org/watch/sf.php/guitarix/guitarix2-0.36.0.tar.xz
gbp:info: Using uscan downloaded tarball ../guitarix_0.36.0.orig.tar.xz
What is the upstream version? [0.36.0]
gbp:debug: ['git', 'tag', '-l', 'upstream/0.36.0']
gbp:debug: tar ['-C', '../tmp2_xslh4t', '-a', '-xf', 
'../guitarix_0.36.0.orig.tar.xz'] []
gbp:debug: Unpacked '../guitarix_0.36.0.orig.tar.xz' to 
'../tmp2_xslh4t/guitarix-0.36.0'
gbp:info: Importing '../guitarix_0.36.0.orig.tar.xz' to branch 'upstream'...
gbp:info: Source package is guitarix
gbp:info: Upstream version is 0.36.0
gbp:debug: ['git', 'show-ref', 'refs/heads/upstream']
gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', 'upstream']
gbp:debug: ['git', 'add', '-f', '.']
gbp:debug: ['git', 'write-tree']
gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', 'upstream']
gbp:debug: ['git', 'commit-tree', '3e9fc90df9d883cc4ee657c9466ea835336eeb94', 
'-p', 'b71e4eb38c6b8d9a35d1e88d6ff72a095a7cb7b1']
gbp:debug: ['git', 'update-ref', '-m', 'gbp: New upstream version 0.36.0', 
'refs/heads/upstream', '87a3e934062d1ad81c6d9c557afe8b94ffc6a17d', 
'b71e4eb38c6b8d9a35d1e88d6ff72a095a7cb7b1']
gbp:debug: ['git', 'show-ref', 'refs/heads/pristine-tar']
gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', 'pristine-tar']
gbp:debug: ['git', 'ls-tree', '-z', 'upstream', '--']
gbp:debug: ['git', 'mktree', '-z']
gbp:debug: pristine-tar [] ['commit', '../guitarix_0.36.0.orig.tar.xz', 
'3e9fc90df9d883cc4ee657c9466ea835336eeb94']
gbp:debug: ['git', 'tag', '-m', 'Upstream version 0.36.0', 'upstream/0.36.0', 
'87a3e934062d1ad81c6d9c557afe8b94ffc6a17d']
gbp:debug: ['git', 'show-ref', 'refs/heads/master']
gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', 'master']
gbp:info: Replacing upstream source on 'master'
gbp:debug: ['git', 'ls-tree', '-z',