Fix some small problems in RepoParser
authorHuang Hao <hao.h.huang@intel.com>
Fri, 24 Aug 2012 05:31:41 +0000 (13:31 +0800)
committerHuang Hao <hao.h.huang@intel.com>
Fri, 24 Aug 2012 06:16:45 +0000 (14:16 +0800)
commitbaffe10766d29028ae10ef0a30c11c542cf977b1
tree4cc5dd253b81b109c168cd6a16bd019c92016f58
parentcc6cd1f869d72a738101dbe70ad120e64042cfc7
Fix some small problems in RepoParser

RepoParser.parse() is a bit of hard for understanding. try to make
it more cleaner and readable.

 - remove useless self.archs
 - split local path out first, otherwise urlgrab will complain
    "<url> malformed" for local path
 - get_repos_by_arch() should return local+standard repos at least
 - check self.buildconf each time before getting repo's build.conf
 - self.repos is used only in one place in self.parse(), it can
    be a local var and passed by argument
 - build meta of one repo should not be used for another repo, so
    self.buildmeta can also be a local var in for loop
 - add a function is_standard_repo() to check repomd.xml file
 - add a function fetch() to fetch a remote file into self.cachedir

Change-Id: I1d5d8f9347a5426a323aa04e7edf8c5e75c1c65a
gitbuildsys/utils.py