def METHOD_NAME(self):
    '''
    Install the basic packages to support perf
    '''
    # Check for basic utilities
    smm = SoftwareManager()
    run_type = self.params.get('type', default='distro')
    detected_distro = distro.detect()
    deps = ['gcc', 'make']
    if run_type == 'distro':
        if 'Ubuntu' in detected_distro.name:
            deps.extend(['linux-tools-common', 'linux-tools-%s' %
                         platform.uname()[2]])
        elif 'debian' in detected_distro.name:
            deps.extend(['linux-tools-%s' % platform.uname()[2][3]])
        elif detected_distro.name in ['rhel', 'SuSE', 'fedora', 'centos']:
            deps.extend(['perf', 'gcc-c++'])
            if 'SuSE' in detected_distro.name:
                deps.extend(['kernel-default-debuginfo'])
            else:
                deps.extend(['clang', 'kernel-debuginfo',
                             'perf-debuginfo'])
        else:
            self.cancel("Install the package for perf supported\
                      by %s" % detected_distro.name)
    if run_type == 'upstream':
        if 'rhel' in detected_distro.name:
            deps.extend(['systemtap-sdt-devel', 'slang-devel',
                         'perl-ExtUtils-Embed', 'libcap-devel',
                         'numactl-devel', 'libbabeltrace-devel',
                         'libpfm-devel', 'java-1.8.0-openjdk-devel',
                         'libtraceevent-devel'])
            if int(detected_distro.version) >= 9:
                deps.extend(['libunwind-devel'])
        # TODO I could only locate systemtap-sdt-devel, libunwind-devel,
        # slang-devel, and libcap-devel packages. Missing list includes
        # elfutils-devel, libbabeltrace-devel, java-1.8.0-openjdk-devel
        # and libpfm4-devel. For now cancel the test due to missing
        # dependent packages
        if 'SuSE' in detected_distro.name:
            self.cancel("Install the required dependent packages")
    for package in deps:
        if not smm.check_installed(package) and not smm.install(package):
            self.cancel('%s is needed for the test to be run' % package)
    if run_type == 'upstream':
        self.buildPerf()