+ @staticmethod
+ def reject_invalid_packages(pkgs):
+ """filter package names
+
+ reject package names that start with . or /, as they are
+ not valid package names, but can be used to install local files
+ which we do not want.
+ """
+ new_pkgs = []
+ for p in pkgs:
+ if p.startswith('.') or p.startswith('/'):
+ die("invalid package name: %s"%(p,))
+ new_pkgs.append(p)
+ return new_pkgs
+