All,

I've noticed that rpms.py seems to have a section of the script commented out 
which might be the reason.
I installed via func-0.24-1.el5 rpm.

    def inventory(self, flatten=True):
        """
        Returns information on all installed packages.
        By default, 'flatten' is passed in as True, which makes printouts very
        clean in diffs for use by func-inventory.  If you are writting another
        software application, using flatten=False will prevent the need to
        parse the returns.
        """
        # I have not been able to get flatten=False to work if there
        # is more than 491 entries in the dict -- ashcrow
        ts = rpm.TransactionSet()
#        mi = ts.dbMatch()
#        results = []
#        for hdr in mi:
#            name = hdr['name']
#            epoch = (hdr['epoch'] or 0)
#            version = hdr['version']
#            release = hdr['release']
#            arch = hdr['arch']
#            if flatten:
#                results.append("%s %s %s %s %s" % (name, epoch, version,
#                                                   release, arch))
#            else:
#                results.append([name, epoch, version, release, arch])
        results = []
        return results


I tried uncommenting those lines, but it doesn't seem to take.
Unfortunately, I'm not a python expert, so I wasn't able to re-generate the 
compiled binaries for rpms.pyc and rpms.pyo.
I'm not sure what else I can do.

Any info is greatly appreciated.


Thanks,
Jeff


From: [email protected] [mailto:[email protected]] On 
Behalf Of Jeff Liu
Sent: Thursday, May 28, 2009 9:24 AM
To: '[email protected]'
Subject: [Func-list] func rpm: returns null

Just wondering if anyone can help.

I'm relatively new to func, and I'm attempting to gather rpm inventory.

I'm calling func's rpm module, but it's not returning any values.
The target minion is running CentOS 5.2.


func nj1qmlt01 call rpms inventory
{'nj1qmlt01': []}


I've checked /var/log/func/func.log on both the overlord and the minion, but 
there are no errors.
I'm not sure how to turn up the debugging level.

Any help would be greatly appreciated.

Thanks in advance,
Jeff

_______________________________________________
Func-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/func-list

Reply via email to