]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Prevent symlinks to be added to the tree
authorarmando-migliaccio <armamig@gmail.com>
Sun, 21 Dec 2014 04:55:35 +0000 (20:55 -0800)
committerarmando-migliaccio <armamig@gmail.com>
Sun, 21 Dec 2014 04:57:54 +0000 (20:57 -0800)
Symlinks cannot be allowed because they are not supported by distutils.
Adding them results into package build failures.

This patch add a check that verifies that no symlinks can slip in.

Closes-bug: #1404605

Change-Id: I0d308127081bb2fa4ff7d7e0ed2f1b6e915163c9

tox.ini

diff --git a/tox.ini b/tox.ini
index 301d453d041a8d9d46893cd7ae114e28a6ddec65..571b571407ddce1401d18ac43ffb3a7d9a163899 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -47,6 +47,7 @@ downloadcache = ~/cache/pip
 
 [testenv:pep8]
 commands =
+  sh -c "if [ $(find . -type l ! -path '*.tox*' | wc -l) -ge 1 ]; then echo 'Symlinks are not allowed!' && exit 1; fi"
   sh ./tools/check_bash.sh
   flake8
   neutron-db-manage check_migration