Don't fail on missing debian/rules
authorGuido Günther <agx@sigxcpu.org>
Thu, 16 Sep 2010 07:49:42 +0000 (09:49 +0200)
committerGuido Günther <agx@sigxcpu.org>
Thu, 16 Sep 2010 07:49:42 +0000 (09:49 +0200)
LP: #638371

git-import-dsc

index 1a5d10b..f51dc1e 100755 (executable)
@@ -94,7 +94,8 @@ def apply_debian_patch(repo, unpack_dir, src, options, parents):
         if src.deb_tgz and not apply_deb_tgz(src.deb_tgz, unpack_dir):
             raise GbpError
 
-        os.chmod('debian/rules', 0755)
+        if os.path.exists('debian/rules'):
+            os.chmod('debian/rules', 0755)
         os.chdir(repo.path)
 
         dch = parse_changelog(os.path.join(unpack_dir, 'debian/changelog'))