diff options
author | Guido Günther <agx@sigxcpu.org> | 2011-12-29 13:37:42 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2011-12-29 14:37:30 +0100 |
commit | ed4e52366be66dfb436d557c8c0526238ff3c345 (patch) | |
tree | cf939fa64e5f1efb2327e1074cf6b2460f58de85 /gbp/scripts/import_dsc.py | |
parent | 84d3bfb9af954ced15282fc8c35f1a1cbe140455 (diff) | |
download | git-buildpackage-ed4e52366be66dfb436d557c8c0526238ff3c345.tar.gz git-buildpackage-ed4e52366be66dfb436d557c8c0526238ff3c345.tar.bz2 git-buildpackage-ed4e52366be66dfb436d557c8c0526238ff3c345.zip |
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
Diffstat (limited to 'gbp/scripts/import_dsc.py')
-rw-r--r-- | gbp/scripts/import_dsc.py | 4 |
1 files changed, 4 insertions, 0 deletions
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 |