'Create a tar.bz2 file with the name \'pkg_name\' say test-blah.tar.bz2.
Includes the files specified in include_string, and excludes the files
specified on the exclude string, while tarring the source. Returns the
destination tarball path.
:param pkg_name: Package name.
:param src_dir: Directory that contains the data to be packaged.
:param dest_dir: Directory that will hold the destination tarball.
:param include_string: Pattern that represents the files that will be
added to the tar package.
:param exclude_string: Pattern that represents the files that should be
excluded from the tar package. It could be either a string or
a list.'

def tar_package(self, pkg_name, src_dir, dest_dir, include_string=None, exclude_string=None):

    tarball_path = os.path.join(dest_dir, pkg_name)
    temp_path = (tarball_path + '.tmp')
    cmd_list = ['tar', '-cf', temp_path, '-C', src_dir]
    if _PBZIP2_AVAILABLE:
        cmd_list.append('--use-compress-prog=pbzip2')
    else:
        cmd_list.append('-j')
    if (include_string is not None):
        cmd_list.append(include_string)
    if (exclude_string is not None):
        if isinstance(exclude_string, list):
            for exc_str in exclude_string:
                cmd_list.append(('--exclude    %s' % exc_str))
        else:
            if ('--exclude' not in exclude_string):
                cmd_list.append('--exclude')
            cmd_list.append(exclude_string)
    try:
        utils.system('    '.join(cmd_list))
    except Exception:
        os.unlink(temp_path)
        raise
    os.rename(temp_path, tarball_path)
    return tarball_path
