Bug#934200: gbp import-orig is broken with multiple source tarballs

2022-05-28 Thread Guido Günther
Hi,
On Mon, Feb 17, 2020 at 09:25:51PM -0500, Sandro Tosi wrote:
> > this is still happening: i'm trying to upgrade dblatex to the latest
> > upstream release and the source package has 2 upstream tarballs.
> >
> > `gbp import-orig --uscan` imports only the "main" tarball but not the
> > additional component (`examples`,
> > https://salsa.debian.org/debian/dblatex/tree/pristine-tar) and `gbp
> > import-orig ../../dblatex*orig*` complains multiple files are
> > specified on the command-line, and i did not find a combination of
> > commands to import 2 tarballs one after the other.
> >
> > I'm not sure how frequent is the case of multiple tarballs, but it
> > would still be extra-useful if this bug could be addressed soon.
> 
> nevermind (i guess?), upon further reading i found out i need to use
> the `--component` cli option; maybe an example in the doc/manpage
> would be useful? thanks for maintaining gbp!

I've added more mentions to the manpage. If there's a reproducer where
importing with uscan fails when the components are given it would be
great to have a reproducer (preferably in a new issue as this one mixes
several things already).

We can certainly make component tarballs more automatic (#830490).
Cheers,
 -- Guido



Bug#934200: gbp import-orig is broken with multiple source tarballs

2022-02-17 Thread Yadd

Hi,

there are 2 bugs here:
 * --uscan option fails with components but uscan + 'gbp import-orig'
   works, except...
 * when there are many source files (node-babel7 for example),
   gbp-import-orig seems to succeed but drops some imports, then files
   are missing. The attached script works fine instead. But then CI job
   fails because `gbp buildpackage` is unable to restore all files
   (probably the same bug, it looks like a limit around 30 source files)#!/bin/bash

SOURCES=$@

set -ex
MASTER=`gbp config buildpackage.debian-branch`
UPSTREAM=`gbp config buildpackage.upstream-branch`
git checkout $UPSTREAM
git rm -rf .

for s in $SOURCES; do
CMP=${s#*orig-}
CMP=${CMP%.tar.*}
if [ "$CMP" == "${CMP%orig}" ]; then
mkdir $CMP
(cd $CMP && tar --strip 1 -a -x -f ../$s)
else
tar --strip 1 -a -x -f $s
fi
VERSION=${s%.orig*}
VERSION=${VERSION#*_}
done
for i in .gitattributes .gitignore; do
find . -name $i -delete
done
git add .
git commit -a -m "New upstream version $VERSION"
TAG=upstream/${VERSION//\~/_}
git tag $TAG
git checkout $MASTER
for s in $SOURCES; do
pristine-tar commit $s $TAG
done
git merge $UPSTREAM


Bug#934200: gbp import-orig is broken with multiple source tarballs

2020-02-17 Thread Sandro Tosi
> this is still happening: i'm trying to upgrade dblatex to the latest
> upstream release and the source package has 2 upstream tarballs.
>
> `gbp import-orig --uscan` imports only the "main" tarball but not the
> additional component (`examples`,
> https://salsa.debian.org/debian/dblatex/tree/pristine-tar) and `gbp
> import-orig ../../dblatex*orig*` complains multiple files are
> specified on the command-line, and i did not find a combination of
> commands to import 2 tarballs one after the other.
>
> I'm not sure how frequent is the case of multiple tarballs, but it
> would still be extra-useful if this bug could be addressed soon.

nevermind (i guess?), upon further reading i found out i need to use
the `--component` cli option; maybe an example in the doc/manpage
would be useful? thanks for maintaining gbp!



Bug#934200: gbp import-orig is broken with multiple source tarballs

2020-02-15 Thread Sandro Tosi
control: tags -1 - pending

On Thu, 08 Aug 2019 11:18:43 +0530 Pirate Praveen
 wrote:
> Package: git-buildpackage,devscripts
> severity: important
>
> You can try it with node-ajv (from 6.10.0-5 tag). It imported the
> component instead of the main tar ball.
>
> node-ajv$ gbp import-orig --pristine-tar --uscan
> gbp:info: Launching uscan...
> gbp:info: Using uscan downloaded tarball
> ../node-ajv_6.10.2.orig-fast-json-stable-stringify.tar.gz
> What is the upstream version? [6.10.2]
> gbp:info: ../node-ajv_6.10.2.orig.tar.gz already exists, moving to
> ../node-ajv_6.10.2.orig.tar.gz.1565242303
> gbp:info: Importing
> '../node-ajv_6.10.2.orig-fast-json-stable-stringify.tar.gz' to branch
> 'upstream'...
> gbp:info: Source package is node-ajv
> gbp:info: Upstream version is 6.10.2
> gbp:info: Replacing upstream source on 'master'
> gbp:info: Successfully imported version 6.10.2 of
> ../node-ajv_6.10.2.orig-fast-json-stable-stringify.tar.gz

this is still happening: i'm trying to upgrade dblatex to the latest
upstream release and the source package has 2 upstream tarballs.

`gbp import-orig --uscan` imports only the "main" tarball but not the
additional component (`examples`,
https://salsa.debian.org/debian/dblatex/tree/pristine-tar) and `gbp
import-orig ../../dblatex*orig*` complains multiple files are
specified on the command-line, and i did not find a combination of
commands to import 2 tarballs one after the other.

I'm not sure how frequent is the case of multiple tarballs, but it
would still be extra-useful if this bug could be addressed soon.

Regards,
Sandro