diff options
author | Peter Robinson <pbrobinson@gmail.com> | 2011-08-24 22:58:51 (GMT) |
---|---|---|
committer | Anish Mangal <anish@sugarlabs.org> | 2011-10-14 19:33:25 (GMT) |
commit | 4efa3ed24050a135f4f05102d28ad213f7246c2d (patch) | |
tree | 4d463e3b1fa863a3feba659dc9fa86c2f27de846 | |
parent | f7bf9ea51e32919e08390e334c0b113574364037 (diff) |
repos: add ability to specify arch for fedora repos
Needed for ARM support.
-rw-r--r-- | modules/repos/README | 13 | ||||
-rw-r--r-- | modules/repos/ksmain.50.repos.py | 20 |
2 files changed, 20 insertions, 13 deletions
diff --git a/modules/repos/README b/modules/repos/README index c69ef14..b1d9927 100644 --- a/modules/repos/README +++ b/modules/repos/README @@ -12,7 +12,7 @@ Firstly, the 'fedora' and 'fedora_arch' options: [repos] fedora_arch=i386 -fedora=fedora,fedora_updates,fedora_updates_testing +fedora=fedora,fedora-updates,fedora-updates-testing This is a comma-separated list of official Fedora repositories to enable for the build. The 4 possible options are fedora, fedora_updates, @@ -22,17 +22,6 @@ If using the fedora option, the fedora_arch option must be specified too. This specifies the processor architecture to use for Fedora package selection. See http://mirrors.fedoraproject.org/ for the available values. -A Fedora mirror is normally automatically selected by yum through Fedora's -mirrorlist mechanism. If you wish to override the mirror selection choice, -you can either add the repos as custom repos (see below), or you can use -"url_" override settings, e.g.: - -[repos] -fedora=fedora,fedora_updates -fedora_arch=i386 -url_fedora_updates=http://www.mirrorservice.org/sites/download.fedora.redhat.com/pub/fedora/linux/updates/16/i386/ -url_fedora=http://www.mirrorservice.org/sites/download.fedora.redhat.com/pub/fedora/linux/development/16/i386/os/ - The olpc_frozen_ options: diff --git a/modules/repos/ksmain.50.repos.py b/modules/repos/ksmain.50.repos.py index e1dee21..ba33d7e 100644 --- a/modules/repos/ksmain.50.repos.py +++ b/modules/repos/ksmain.50.repos.py @@ -27,7 +27,13 @@ def add_to_excludes(baseurl, addexcludes): data = fd.read() fd.close() fd = GzipFile(fileobj=StringIO(data)) - ooblib.add_packages_from_xml(fd, addexcludes, farch) + ooblib.add_packages_from_xml(fd, addexcludes) + +excludepkgs = set() +addexcludes = ooblib.read_config('repos', 'add_excludes_to') +fedora = ooblib.read_config('repos', 'fedora') +fver = ooblib.read_config('global', 'fedora_release').strip() +farch = ooblib.read_config('repos', 'fedora_arch').strip() # clean up addexcludes list if addexcludes is not None: @@ -82,12 +88,24 @@ def get_fedora_repo(name, version, arch): if fedora is not None: for repo in fedora.split(','): +<<<<<<< HEAD repo = repo.strip().replace('-', '_') repotype, url = get_fedora_repo(repo, fver, farch) if repotype: repos[repo] = (repotype, url) else: print >>sys.stderr, "Unknown Fedora repo:", repo +======= + repo = repo.strip() + if repo == "fedora": + repos["fedora"] = ("mirrorlist", "http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-%s&arch=%s" % (fver, farch)) + elif repo == "fedora-updates": + repos["fedora-updates"] = ("mirrorlist", "http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f%s&arch=%s" % (fver, farch)) + elif repo == "fedora-updates-testing": + repos["fedora-updates-testing"] = ("mirrorlist", "http://mirrors.fedoraproject.org/mirrorlist?repo=updates-testing-f%s&arch=%s" % (fver, farch)) + elif repo == "rawhide": + repos["rawhide"] = ("mirrorlist", "http://mirrors.fedoraproject.org/mirrorlist?repo=rawhide&arch=%s" % farch) +>>>>>>> repos: add ability to specify arch for fedora repos # generate repo lines including excludes excludepkgs = list(excludepkgs) |