From ac2d312f8167f13adda3cc17b0f638c6e23d9bce Mon Sep 17 00:00:00 2001 From: Tom Zanussi Date: Sun, 3 Aug 2014 18:19:29 -0500 Subject: wic: Remove proxy support wic doesn't use proxy support, so remove it. Also remove anything related to proxies in misc and conf, and while we're at it, remove all the obviously unneeded code from those files - it's easier to just remove it than to figure out the callchain to the proxy code usages. Basically the extra stuff relates to packaging, images, and config files we don't use. (From OE-Core rev: 041f9e2ca52681cd6f5c2fb804dd45f05358c9f9) Signed-off-by: Tom Zanussi Signed-off-by: Richard Purdie --- scripts/lib/mic/conf.py | 58 +------------------------------------------------ 1 file changed, 1 insertion(+), 57 deletions(-) (limited to 'scripts/lib/mic/conf.py') diff --git a/scripts/lib/mic/conf.py b/scripts/lib/mic/conf.py index b850d80520..1fe6edd724 100644 --- a/scripts/lib/mic/conf.py +++ b/scripts/lib/mic/conf.py @@ -20,7 +20,7 @@ import ConfigParser from mic import msger from mic import kickstart -from mic.utils import misc, runner, proxy, errors +from mic.utils import misc, runner, errors def get_siteconf(): @@ -55,8 +55,6 @@ class ConfigMgr(object): "pack_to": None, "name_prefix": None, "name_suffix": None, - "proxy": None, - "no_proxy": None, "copy_kernel": False, "install_pkgs": None, "repourl": {}, @@ -104,16 +102,6 @@ class ConfigMgr(object): for sec, vals in self.DEFAULTS.iteritems(): setattr(self, sec, vals) - def __set_siteconf(self, siteconf): - try: - self.__siteconf = siteconf - self._parse_siteconf(siteconf) - except ConfigParser.Error, error: - raise errors.ConfigError("%s" % error) - def __get_siteconf(self): - return self.__siteconf - _siteconf = property(__get_siteconf, __set_siteconf) - def __set_ksconf(self, ksconf): if not os.path.isfile(ksconf): msger.error('Cannot find ks file: %s' % ksconf) @@ -124,50 +112,6 @@ class ConfigMgr(object): return self.__ksconf _ksconf = property(__get_ksconf, __set_ksconf) - def _parse_siteconf(self, siteconf): - if not siteconf: - return - - if not os.path.exists(siteconf): - msger.warning("cannot read config file: %s" % siteconf) - return - - parser = ConfigParser.SafeConfigParser() - parser.read(siteconf) - - for section in parser.sections(): - if section in self.DEFAULTS: - getattr(self, section).update(dict(parser.items(section))) - - # append common section items to other sections - for section in self.DEFAULTS.keys(): - if section != "common": - getattr(self, section).update(self.common) - - # check and normalize the scheme of proxy url - if self.create['proxy']: - m = re.match('^(\w+)://.*', self.create['proxy']) - if m: - scheme = m.group(1) - if scheme not in ('http', 'https', 'ftp', 'socks'): - msger.error("%s: proxy scheme is incorrect" % siteconf) - else: - msger.warning("%s: proxy url w/o scheme, use http as default" - % siteconf) - self.create['proxy'] = "http://" + self.create['proxy'] - - proxy.set_proxies(self.create['proxy'], self.create['no_proxy']) - - # bootstrap option handling - self.set_runtime(self.create['runtime']) - if isinstance(self.bootstrap['packages'], basestring): - packages = self.bootstrap['packages'].replace('\n', ' ') - if packages.find(',') != -1: - packages = packages.split(',') - else: - packages = packages.split() - self.bootstrap['packages'] = packages - def _parse_kickstart(self, ksconf=None): if not ksconf: return -- cgit v1.2.3-54-g00ecf