def build_from_fmri(f): if not f: return f pub, name, version = f.tuple() pub = fmri.strip_pub_pfx(pub) return PackageInfo(pkg_stem=name, publisher=pub, version=version.release, build_release=version.build_release, branch=version.branch, packaging_date=version.get_timestamp().strftime("%c"), pfmri=str(f))
def build_from_fmri(f): if not f: return f pub, name, version = f.tuple() pub = fmri.strip_pub_pfx(pub) return PackageInfo(pkg_stem=name, publisher=pub, version=version.release, build_release=version.build_release, branch=version.branch, packaging_date=version.get_timestamp().strftime("%c"), pfmri=f)