2
# -*- coding: utf-8 -*-
4
# Copyright (C) 2013 ~ 2014 National University of Defense Technology(NUDT) & Kylin Ltd
5
# This program is free software: you can redistribute it and/or modify it
6
# under the terms of the GNU General Public License version 3, as published
7
# by the Free Software Foundation.
9
# This program is distributed in the hope that it will be useful, but
10
# WITHOUT ANY WARRANTY; without even the implied warranties of
11
# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
12
# PURPOSE. See the GNU General Public License for more details.
14
# You should have received a copy of the GNU General Public License along
15
# with this program. If not, see <http://www.gnu.org/licenses/>.
22
class SoftwareConfigfile():
26
def scan_configfile_packages(self):
27
cache = common.get_cache_list()
28
final_softwareconfigfile_list = []
30
status, output = subprocess.getstatusoutput('dpkg -l')
31
result = [(line.split()[1]).split(':')[0] for line in output.split('\n') if line.startswith('rc')]
33
final_softwareconfigfile_list.append(cache[one])
34
return final_softwareconfigfile_list
35
def get_configfile_packages(self):
36
cache = common.get_cache_list()
37
softwareconfigfile_list = []
39
status, output = subprocess.getstatusoutput('dpkg -l')
40
result = [(line.split()[1]).split(':')[0] for line in output.split('\n') if line.startswith('rc')]
43
softwareconfigfile_list.append('Name:' + pkg.name + ';' + 'Summary:' + ';' + 'Size:')
44
return softwareconfigfile_list
47
if __name__ == '__main__':
48
obj = SoftwareConfigfile()
49
a = obj.scan_configfile_packages()