1
# Copyright (C) 2010 Canonical
4
# Didier Roche <didrocks@ubuntu.com>
6
# This program is free software; you can redistribute it and/or modify it under
7
# the terms of the GNU General Public License as published by the Free Software
8
# Foundation; version 3.
10
# This program is distributed in the hope that it will be useful, but WITHOUT
11
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
15
# You should have received a copy of the GNU General Public License along with
16
# this program; if not, write to the Free Software Foundation, Inc.,
17
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22
LOG = logging.getLogger(__name__)
24
from oneconf.distributor import Distro
29
ONECONF_SERVER = "https://apps.ubuntu.com/cat/api/1.0"
31
def compute_local_packagelist(self):
32
'''Introspect what's installed on this hostid
34
Return: installed_packages list
37
LOG.debug ('Compute package list for current host')
38
apt_cache = apt.Cache()
40
# get list of all apps installed
41
installed_packages = {}
44
installed_packages[pkg.name] = {"auto": pkg.is_auto_installed}
46
return installed_packages