You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my case (I don't create the sqlite files), it's much easier/nicer to use createrepo_c.XmlFile than createrepo_c.PrimaryXmlFile and friends. However:
to create an instance of createrepo_c.XmlFile, I need a type constant (e.g. createrepo_c.XMLFILE_PRIMARY)
I need the name of the type (e.g. primary) as well to compose the file name (e.g. path/primary.xml.gz) - (Well, I don't need it. The name can be arbitrary. But it's a common practice to use these names.)
I need the name of the type to refer to the file in a createrepo_c.RepomdRecord instance
I can think of multiple solutions:
there can be a mapping from type constants to their names and/or the opposite mapping
there can be a factory function that creates file instances for given type constant (optionally with the default file name)
there can be a "builder" that has an add_pkg method and a dump method (it will create all the needed files in a given directory)
there can be a function that transforms a metadata file into a createrepo_c.RepomdRecord
the createrepo_c.Repomd class can have a method that does the same as set_record but accepts metadata files
the createrepo_c.XmlFile.__init__ can accept type names
the createrepo_c.RepomdRecord.__init__ can accept the type constants
but I don't insist on any of them.
The text was updated successfully, but these errors were encountered:
In my case (I don't create the sqlite files), it's much easier/nicer to use
createrepo_c.XmlFile
thancreaterepo_c.PrimaryXmlFile
and friends. However:createrepo_c.XmlFile
, I need a type constant (e.g.createrepo_c.XMLFILE_PRIMARY
)primary
) as well to compose the file name (e.g.path/primary.xml.gz
) - (Well, I don't need it. The name can be arbitrary. But it's a common practice to use these names.)createrepo_c.RepomdRecord
instanceI can think of multiple solutions:
add_pkg
method and adump
method (it will create all the needed files in a given directory)createrepo_c.RepomdRecord
createrepo_c.Repomd
class can have a method that does the same asset_record
but accepts metadata filescreaterepo_c.XmlFile.__init__
can accept type namescreaterepo_c.RepomdRecord.__init__
can accept the type constantsbut I don't insist on any of them.
The text was updated successfully, but these errors were encountered: