X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=scripts%2Fdebian%2Fdep11-basic-validate.py;h=6ee3042b11f096a88b6268e12c50a6ec69decaa1;hb=HEAD;hp=03cd80c0c2b2845756483043fdb91b5f6ac1348b;hpb=01cd7e04d54a175c07fa052be1e8f5dd682fe78c;p=dak.git diff --git a/scripts/debian/dep11-basic-validate.py b/scripts/debian/dep11-basic-validate.py index 03cd80c0..6ee3042b 100755 --- a/scripts/debian/dep11-basic-validate.py +++ b/scripts/debian/dep11-basic-validate.py @@ -169,9 +169,13 @@ def validate_dir(dirname): ret = True for root, subfolders, files in os.walk(dirname): for fname in files: - if fname.endswith(".yml.gz") or fname.endswith(".yml.xz"): - if not validate_file(os.path.join(root, fname)): - ret = False + fpath = os.path.join(root, fname) + if os.path.islink(fpath): + add_issue("FATAL: Symlinks are not allowed") + return False + if fname.endswith(".yml.gz") or fname.endswith(".yml.xz"): + if not validate_file(fpath): + ret = False return ret @@ -187,6 +191,9 @@ def main(): if os.path.isdir(fname): ret = validate_dir(fname) + elif os.path.islink(fname): + add_issue("FATAL: Symlinks are not allowed") + ret = False else: ret = validate_file(fname) if ret: