[devscripts] 06/07: uupdate: work around missing debian.tar.xz etc.

Osamu Aoki osamu at moszumanska.debian.org
Sun Sep 13 11:53:59 UTC 2015


This is an automated email from the git hooks/post-receive script.

osamu pushed a commit to branch master
in repository devscripts.

commit d2f5ef5a3ba2292222aa310d045e2a5820ed1f1e
Author: Osamu Aoki <osamu at debian.org>
Date:   Sun Sep 13 17:14:35 2015 +0900

    uupdate: work around missing debian.tar.xz etc.
    
        https://bugs.debian.org/798133
        Work around with missing debian.tar.xz
    
       * work around missing debian.tar.xz
         This makes our life easy to use uupdate
         from VCS checkout directory for 3.0 (quilt).
    
    This is a new fix for missing debian.tar.xz.
    
    The old fix was reverted in:
     Revert "uupdate: work around missing debian.tar.xz etc."
---
 scripts/uupdate.sh | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/scripts/uupdate.sh b/scripts/uupdate.sh
index 91f7c67..6cd98ca 100755
--- a/scripts/uupdate.sh
+++ b/scripts/uupdate.sh
@@ -741,6 +741,33 @@ else
 	DIFF="../${PACKAGE}_$SVERSION.debian.tar.xz"
 	DIFFTYPE=tar
 	DIFFUNPACK="tar --xz -xf"
+    else
+	# non-native package and missing diff.gz/debian.tar.xz.
+	cd $OPWD
+	if [ ! -d debian ]; then
+	    echo "$PROGNAME: None of *.diff.gz, *.debian.tar.xz, or debian/* found. failed;" >&2
+	    echo "aborting..." >&2
+	    exit 1
+	fi
+	if [ -d debian/source -a -r debian/source/format ]; then
+	    if [ "`cat debian/source/format`" = "3.0 (quilt)" ]; then
+		# This is convenience for VCS users.
+		echo "$PROGNAME: debian/source/format is \"3.0 (quilt)\"." >&2
+		echo "$PROGNAME: Auto-generating ${PACKAGE}_$SVERSION.debian.tar.xz" >&2
+		tar --xz -cf ../${PACKAGE}_$SVERSION.debian.tar.xz debian
+		DIFF="../${PACKAGE}_$SVERSION.debian.tar.xz"
+		DIFFTYPE=tar
+		DIFFUNPACK="tar --xz -xf"
+	    else
+		echo "$PROGNAME: debian/source/format isn't \"3.0 (quilt)\"." >&2
+		echo "$PROGNAME: Skip auto-generating ${PACKAGE}_$SVERSION.debian.tar.xz" >&2
+	    fi
+	else
+	    echo "$PROGNAME: debian/source/format is missing." >&2
+	    echo "$PROGNAME: Skip auto-generating ${PACKAGE}_$SVERSION.debian.tar.xz" >&2
+	fi
+	# return back to upstream source
+	cd ../$PACKAGE-$SNEW_VERSION
     fi
 
     if [ "$DIFFTYPE" = diff ]; then

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git



More information about the devscripts-devel mailing list