'Returns a list of information on the RPM packages found on koji
:type pkg: KojiPkgSpec
:param pkg: a package specification
:type arch: string
:param arch: packages built for this architecture, but also including
architecture independent (noarch) packages'

def get_pkg_rpm_info(self, pkg, arch=None):

    if (arch is None):
        arch = utils.get_arch()
    rpms = []
    info = self.get_pkg_info(pkg)
    if info:
        rpms = self.session.listRPMs(buildID=info['id'], arches=[arch, 'noarch'])
        if pkg.subpackages:
            rpms = [d for d in rpms if (d['name'] in pkg.subpackages)]
    return rpms
