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