New upstream version 1.5.0+ds1

This commit is contained in:
Roland Mas
2023-01-02 14:19:29 +01:00
parent 29e4ea6ec0
commit 5c4f97f88e
324 changed files with 15360 additions and 6668 deletions
+5 -2
View File
@@ -38,11 +38,14 @@ class FileSystemEndpointTest(BaseTest):
if not os.path.islink(os.path.join(os.environ["HOME"], ".aptly", path)):
raise Exception("path %s is not a symlink" % (path, ))
def is_hardlink(self, path):
return os.stat(os.path.join(os.environ["HOME"], ".aptly", path)).st_nlink >= 2
def check_is_hardlink(self, path):
if os.stat(os.path.join(os.environ["HOME"], ".aptly", path)) <= 1:
if not self.is_hardlink(path):
raise Exception("path %s is not a hardlink" % (path, ))
def check_is_copy(self, path):
fullpath = os.path.join(os.environ["HOME"], ".aptly", path)
if not (os.path.isfile(fullpath) and not self.check_is_hardlink(path)):
if not (os.path.isfile(fullpath) and not self.is_hardlink(path)):
raise Exception("path %s is not a copy" % (path, ))