On Wed, 2015-05-27 at 21:25 +0900, Osamu Aoki wrote:
> 
> So I think best thing is warn user for .pc directory and error exit.
> 

Well, I changed the tar.py locally, it

 * checks if .pc exists in the current source tree,
   if so, error and exit. else: continue.

this change prevents me from making upstream tarball
from a wrong source tree.

patch is attached.
diff --git a/tar.bak b/tar.py
index c1b594a..49e5585 100644
--- a/tar.bak
+++ b/tar.py
@@ -39,6 +39,12 @@ import debmake.yn
 ###########################################################################
 def tar(tarball, targz, srcdir, parent, yes):
     print('I: pwd = "{}"'.format(os.getcwd()), file=sys.stderr)
+    # first let's check if the current directory is suspicious
+    if os.path.exists('{}/.pc'.format(os.getcwd())):
+        if os.path.isdir('{}/.pc'.format(os.getcwd())):
+            print ('E: directory "{}/.pc" exists.'.format(os.getcwd()))
+            print ('E: are you sure the current tree is original upstream source ?')
+            exit (1)
     #######################################################################
     # make distribution tarball using tar excluding debian/ directory
     # VCS tree are not copied.

Reply via email to