Func Verification Method – Release 0.4

This is the release 0.4 of my project.
http://zenit.senecac.on.ca/wiki/index.php/Func/Rpms_Module_-_Function_Verify#To_do_List

The file is available at:
http://matrix.senecac.on.ca/~mpaivaneto/rpms.py

This is the method I am creating will verify the integrity of all the installed packages on a given system

———
def verify(self, flatten=True):
“””
Returns information of the verification of all installed packages.
“””
import subprocess
ts = rpm.TransactionSet()
mi = ts.dbMatch()
results = []
for hdr in mi:
name = hdr[‘name’]
if flatten:
results.append(“%s” % (name))
proc = subprocess.Popen([‘/bin/rpm -V ‘ + name], shell=True, stdout=subprocess.PIPE)
stdout_value = proc.communicate()[0]
results.append(“%s” % (stdout_value))
else:
results.append([name])
return results

———

func-logo-small1Func Project
https://fedorahosted.org/func/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: