add dnf_arch wrapper to workaround dnf.arch.basearch -> dnf.rpm.basearch change
Signed-off-by: Lubos Kocman <lkocman@redhat.com>
This commit is contained in:
parent
1a8f0bb0f9
commit
14784847d4
@ -25,13 +25,18 @@ import shutil
|
|||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
import dnf
|
import dnf
|
||||||
import dnf.arch
|
|
||||||
import dnf.conf
|
import dnf.conf
|
||||||
import dnf.repo
|
import dnf.repo
|
||||||
import dnf.sack
|
import dnf.sack
|
||||||
|
|
||||||
import pungi.arch
|
import pungi.arch
|
||||||
|
|
||||||
|
try:
|
||||||
|
import dnf.rpm as dnf_arch
|
||||||
|
except ImportError:
|
||||||
|
import dnf.arch as dnf_arch
|
||||||
|
|
||||||
|
|
||||||
class Conf(dnf.conf.Conf):
|
class Conf(dnf.conf.Conf):
|
||||||
# This is only modified to get our custom Substitutions class in.
|
# This is only modified to get our custom Substitutions class in.
|
||||||
@ -45,7 +50,7 @@ class Substitutions(dict):
|
|||||||
def __init__(self, arch):
|
def __init__(self, arch):
|
||||||
super(Substitutions, self).__init__()
|
super(Substitutions, self).__init__()
|
||||||
self['arch'] = arch
|
self['arch'] = arch
|
||||||
self['basearch'] = dnf.arch.basearch(arch)
|
self['basearch'] = dnf_arch.basearch(arch)
|
||||||
|
|
||||||
|
|
||||||
class DnfWrapper(dnf.Base):
|
class DnfWrapper(dnf.Base):
|
||||||
@ -145,7 +150,7 @@ class CompsWrapper(object):
|
|||||||
|
|
||||||
class ArchWrapper(object):
|
class ArchWrapper(object):
|
||||||
def __init__(self, arch):
|
def __init__(self, arch):
|
||||||
self.base_arch = dnf.arch.basearch(arch)
|
self.base_arch = dnf_arch.basearch(arch)
|
||||||
self.all_arches = pungi.arch.get_valid_arches(self.base_arch, multilib=True, add_noarch=True)
|
self.all_arches = pungi.arch.get_valid_arches(self.base_arch, multilib=True, add_noarch=True)
|
||||||
self.native_arches = pungi.arch.get_valid_arches(self.base_arch, multilib=False, add_noarch=True)
|
self.native_arches = pungi.arch.get_valid_arches(self.base_arch, multilib=False, add_noarch=True)
|
||||||
self.multilib_arches = pungi.arch.get_valid_multilib_arches(self.base_arch)
|
self.multilib_arches = pungi.arch.get_valid_multilib_arches(self.base_arch)
|
||||||
|
Loading…
Reference in New Issue
Block a user