Return package name from repositories

def _splitting_packages(self, pkg, repo, name):
        """Return package name from repositories
        """
        if name and repo != "sbo":
            pkg = split_package(pkg)[0]
        elif not name and repo != "sbo":
            pkg = pkg[:-4]
        return pkg