From 0f07f6ae45e4fc1de2ee219fb11dd95cc88f8e24 Mon Sep 17 00:00:00 2001 From: Zhang Qiang Date: Tue, 20 Sep 2011 17:12:37 +0800 Subject: [PATCH] zypp: simplify arch setting for zypp backend Using Arch class to create Arch for different architecture --- plugins/backend/zypppkgmgr.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/plugins/backend/zypppkgmgr.py b/plugins/backend/zypppkgmgr.py index dff4d52..3729525 100644 --- a/plugins/backend/zypppkgmgr.py +++ b/plugins/backend/zypppkgmgr.py @@ -417,14 +417,7 @@ class Zypp(BackendPlugin): arch_map = {} try: - if self.creator.target_arch == "armv7l": - arch_map["armv7l"] = zypp.Arch_armv7l() - elif self.creator.target_arch == "armv7nhl": - arch_map["armv7nhl"] = zypp.Arch_armv7nhl() - elif self.creator.target_arch == "armv7hl": - arch_map["armv7hl"] = zypp.Arch_armv7hl() - elif self.creator.target_arch == "armv5tel": - arch_map["armv5tel"] = zypp.Arch_armv5tel() + arch_map[self.creator.target_arch] = zypp.Arch(self.creator.target_arch) except AttributeError: msger.error('libzypp/python-zypp in host system cannot support arch %s, please' ' update it to enhanced version which can be found in repo.meego.com/tools'\ -- 2.7.4