Esempio n. 1
0
def get_uninstalled_dependencies():
    user_pkgs = []
    unistalled_pkgs = []

    user_pkgs = get_user_installed_pkgs()

    for pkg in PKGS_DEPENDENCIES:
        if pkg not in user_pkgs:
            unistalled_pkgs.append(pkg)

    return unistalled_pkgs
def get_uninstalled_dependencies():
    user_pkgs = []
    unistalled_pkgs = []

    user_pkgs = get_user_installed_pkgs()

    for pkg in PKGS_DEPENDENCIES:
        if pkg not in user_pkgs:
            unistalled_pkgs.append(pkg)

    return unistalled_pkgs
Esempio n. 3
0
    def __init__(self, item_score, user_id=0, arch=0, demo_profiles_set=0):
        """
        Set initial user attributes. pkg_profile gets the whole set of items,
        a random user_id is set if none was provided and the demographic
        profile defaults to 'desktop'.
        """
        self.item_score = item_score
        self.pkg_profile = self.items()
        self.installed_pkgs = data.get_user_installed_pkgs()
        self.arch = arch

        if user_id:
            self.user_id = user_id
        else:
            random.seed()
            self.id = random.getrandbits(128)

        if not demo_profiles_set:
            profiles_set = set(["desktop"])
        self.set_demographic_profile(profiles_set)
Esempio n. 4
0
    def __init__(self, item_score, user_id=0, arch=0, demo_profiles_set=0):
        """
        Set initial user attributes. pkg_profile gets the whole set of items,
        a random user_id is set if none was provided and the demographic
        profile defaults to 'desktop'.
        """
        self.item_score = item_score
        self.pkg_profile = self.items()
        self.installed_pkgs = data.get_user_installed_pkgs()
        self.arch = arch

        if user_id:
            self.user_id = user_id
        else:
            random.seed()
            self.id = random.getrandbits(128)

        if not demo_profiles_set:
            profiles_set = set(["desktop"])
        self.set_demographic_profile(profiles_set)
Esempio n. 5
0
def collect_all_user_pkgs():
    print "Collecting all user packages"

    if create_file(ALL_INSTALLED_PKGS):
        packages = get_user_installed_pkgs()
        save_list(packages, ALL_INSTALLED_PKGS)
def collect_all_user_pkgs():
    if create_file(ALL_INSTALLED_PKGS):
        packages = get_user_installed_pkgs()
        save_list(packages, ALL_INSTALLED_PKGS)