imgcreate/kickstart.py | 9 ++++++--- tools/livecd-iso-to-disk.sh | 5 ++++- 2 files changed, 10 insertions(+), 4 deletions(-)
New commits: commit abfcd5f100d4f52e65ed674b8bd33db05fa8a155 Author: Jeremy Katz <[EMAIL PROTECTED]> Date: Thu Aug 28 15:41:50 2008 -0400 Allow later configs to override repos When you have a %include'd config file, it can be useful to override the repo config. This makes it so that the last specification of a specific repo name wins diff --git a/imgcreate/kickstart.py b/imgcreate/kickstart.py index e352e98..11eac7c 100644 --- a/imgcreate/kickstart.py +++ b/imgcreate/kickstart.py @@ -21,6 +21,7 @@ import os.path import shutil import subprocess import time +import logging import pykickstart.commands as kscommands import pykickstart.constants as ksconstants @@ -462,7 +463,7 @@ def get_default_kernel(ks, default = None): return ks.handler.bootloader.default def get_repos(ks, repo_urls = {}): - repos = [] + repos = {} for repo in ks.handler.repo.repoList: inc = [] if hasattr(repo, "includepkgs"): @@ -479,9 +480,11 @@ def get_repos(ks, repo_urls = {}): baseurl = repo_urls[repo.name] mirrorlist = None - repos.append((repo.name, baseurl, mirrorlist, inc, exc)) + if repos.has_key(repo.name): + logging.warn("Overriding already specified repo %s" %(repo.name,)) + repos[repo.name] = (repo.name, baseurl, mirrorlist, inc, exc) - return repos + return repos.values() def convert_method_to_repo(ks): try: commit 60d00e6aa7072b2269fbe52411a07e252497b102 Author: Jeremy Katz <[EMAIL PROTECTED]> Date: Thu Aug 28 15:36:01 2008 -0400 Add a --force to override the check for existing live images on a stick diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh index 48ae40b..a2f058e 100755 --- a/tools/livecd-iso-to-disk.sh +++ b/tools/livecd-iso-to-disk.sh @@ -258,6 +258,9 @@ while [ $# -gt 2 ]; do kernelargs=$2 shift ;; + --force) + force=1 + ;; *) usage ;; @@ -358,7 +361,7 @@ if [ $(($overlaysizemb + $homesizemb + $livesize)) -gt $(($free + $tbd)) ]; then exitclean fi -if [ -d $USBMNT/LiveOS ]; then +if [ -d $USBMNT/LiveOS -a -z "$force" ]; then echo "Already set up as live image." if [ -z "$keephome" -a -e $USBMNT/LiveOS/home.img ]; then echo "WARNING: Persistent /home will be deleted!!!" -- Fedora-livecd-list mailing list Fedora-livecd-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-livecd-list