diff --git a/pisi/build.py b/pisi/build.py index 95942a02..4fdcfb87 100644 --- a/pisi/build.py +++ b/pisi/build.py @@ -375,7 +375,7 @@ class Builder: try: # broken links can cause problem fsize = str(os.path.getsize(fpath)) except OSError: - fsize = "0" + fsize = None d[frpath] = FileInfo(frpath, ftype, fsize, fhash) for (p, fileinfo) in d.iteritems(): files.append(fileinfo) diff --git a/pisi/files.py b/pisi/files.py index ec2b1446..337a858c 100644 --- a/pisi/files.py +++ b/pisi/files.py @@ -67,8 +67,6 @@ class FileInfo: err = Checks() err.has_tag(self.path, "File", "Path") err.has_tag(self.type, "File", "Type") - err.has_tag(self.size, "File", "Size") - #err.has_tag(self.hash, "File", "SHA1Sum") return err.list def __str__(self): diff --git a/pisi/util.py b/pisi/util.py index b92749a2..f34bad3a 100644 --- a/pisi/util.py +++ b/pisi/util.py @@ -282,8 +282,10 @@ def get_file_hashes(top, exclude_prefix=None, removePrefix=None): except FileError, e: if os.path.islink(f): ctx.ui.warning(_('Ignoring "external" link %s') % f) -# else: -# raise e + elif os.path.isdir(f): + ctx.ui.warning(_('Ignoring directory %s') % f) + else: + raise e return None # also handle single files