Example #1
0
def is_30_quilt(repo, options):
    format_file = DebianSourceFormat.format_file
    try:
        content = GitVfs(repo, options.debian_branch).open(format_file).read()
    except IOError:
        return False
    return str(DebianSourceFormat(content)) == "3.0 (quilt)"
Example #2
0
    def is_native(self):
        """
        Whether this is a native Debian package
        """
        try:
            with self._vfs.open('debian/source/format') as ff:
                f = DebianSourceFormat(ff.read())
            if f.type:
                return f.type == 'native'
        except IOError as e:
            pass  # Fall back to changelog parsing

        try:
            return '-' not in self.changelog.version
        except IOError as e:
            raise DebianSourceError("Failed to determine source format: %s" % e)