From ed4e52366be66dfb436d557c8c0526238ff3c345 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= Date: Thu, 29 Dec 2011 13:37:42 +0100 Subject: import_dsc: remove debian dir from upstream source after importing it. This gives as the orig tarball on upstream but the debian branch looks the same as with dpkg-source -x. Closes: #653472 --- gbp/scripts/import_dsc.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gbp/scripts/import_dsc.py') diff --git a/gbp/scripts/import_dsc.py b/gbp/scripts/import_dsc.py index 4d512e3f..ce65f8cf 100644 --- a/gbp/scripts/import_dsc.py +++ b/gbp/scripts/import_dsc.py @@ -20,6 +20,7 @@ import ConfigParser import sys import re import os +import shutil import tempfile import glob import pipes @@ -77,6 +78,9 @@ def apply_patch(diff): def apply_deb_tgz(deb_tgz): """Apply .debian.tar.gz (V3 source format)""" + # Remove any existing data in debian/ as dpkg-source -x does + if os.path.isdir('debian'): + shutil.rmtree('debian') gbpc.UnpackTarArchive(deb_tgz, ".")() return True -- cgit v1.2.3