[kteam-tools][PATCH v2 6/7] git-build-kernel: special case no-orig-tarball src packages
Kamal Mostafa
kamal at canonical.com
Thu Aug 2 22:40:34 UTC 2018
The "meta" and "signed" source packages do not use an orig tarball, so
do not try to symlink to one, and do use --no-tgz-check to inhibit checking
for one (the latter is explicitly required just for "signed" since its
non-Debian-native version number implies that there will be a orig tarball).
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
git-build-kernel/git-build-kernel | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/git-build-kernel/git-build-kernel b/git-build-kernel/git-build-kernel
index 3c19587..02994db 100755
--- a/git-build-kernel/git-build-kernel
+++ b/git-build-kernel/git-build-kernel
@@ -142,10 +142,23 @@ touch "$WORKDIR/building"
trap "rm -rf $WORKDIR/building $BUILDDIR" 0
[ $do_source_pkg = 1 ] && {
- orig_tarball="${SRCPKG}_${VERSION%%-*}.orig.tar.gz"
- # Careful: $ORIG_TARBALLS_DIR must be accessible from within the chroot.
- # (Alternately, use "cp -p" instead of "ln -s" if that's not an option)
- ln -s $ORIG_TARBALLS_DIR/$orig_tarball $WORKDIR/
+ ### Special case for linux-signed and linux-meta packages, which
+ ### have no .orig tarball
+ [ ${SRCPKG/-signed} != $SRCPKG ] && no_orig_tarball=1
+ [ ${SRCPKG/-meta} != $SRCPKG ] && no_orig_tarball=1
+ if [ "$no_orig_tarball" = 1 ]
+ then
+ srcpkg_debopts="--no-tgz-check $srcpkg_debopts"
+ else
+ orig_tarball="${SRCPKG}_${VERSION%%-*}.orig.tar.gz"
+ # Careful: $ORIG_TARBALLS_DIR must be accessible from within the chroot.
+ # (Alternately, use "cp -p" instead of "ln -s" if that's not an option)
+ [ -e "$ORIG_TARBALLS_DIR/$orig_tarball" ] || {
+ echo "fatal: missing $ORIG_TARBALLS_DIR/$orig_tarball" 1>&2
+ exit 1
+ }
+ ln -s $ORIG_TARBALLS_DIR/$orig_tarball $WORKDIR/
+ fi
}
###
--
2.7.4
More information about the kernel-team
mailing list