summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xanaconda4
-rwxr-xr-xdracut/parse-anaconda-options.sh1
-rw-r--r--pyanaconda/flags.py1
-rw-r--r--pyanaconda/packaging/yumpayload.py12
-rw-r--r--pyanaconda/ui/gui/spokes/source.py5
5 files changed, 21 insertions, 2 deletions
diff --git a/anaconda b/anaconda
index 324d31eec..297061795 100755
--- a/anaconda
+++ b/anaconda
@@ -235,6 +235,7 @@ def parseOptions(argv=None, cmdline=None):
op.add_option("--multilib", dest="multiLib", action="store_true", default=False)
op.add_option("-m", "--method", dest="method", default=None)
+ op.add_option("--askmethod", dest="askmethod", action="store_true", default=False)
op.add_option("--repo", dest="method", default=None)
op.add_option("--stage2", dest="stage2", default=None)
op.add_option("--noverifyssl", action="store_true", default=False)
@@ -655,6 +656,9 @@ if __name__ == "__main__":
from pyanaconda.flags import flags, can_touch_runtime_system
(opts, args, depr) = parseOptions(cmdline=flags.cmdline)
+ if opts.askmethod:
+ flags.askmethod = True
+
# Set up logging as early as possible.
import logging
from pyanaconda import anaconda_log
diff --git a/dracut/parse-anaconda-options.sh b/dracut/parse-anaconda-options.sh
index 0bc760516..aa9c6b929 100755
--- a/dracut/parse-anaconda-options.sh
+++ b/dracut/parse-anaconda-options.sh
@@ -86,7 +86,6 @@ check_removed_arg ethtool
# interactive junk in initramfs
# (maybe we'll bring it back someday?)
-check_removed_arg askmethod "Use an appropriate 'inst.repo=' argument instead."
check_removed_arg asknetwork "Use an appropriate 'ip=' argument instead."
# lang & keymap
diff --git a/pyanaconda/flags.py b/pyanaconda/flags.py
index 7fb3a780a..c6fdcc79f 100644
--- a/pyanaconda/flags.py
+++ b/pyanaconda/flags.py
@@ -68,6 +68,7 @@ class Flags(object):
self.imageInstall = False
self.automatedInstall = False
self.dirInstall = False
+ self.askmethod = False
# for non-physical consoles like some ppc and sgi altix,
# we need to preserve the console device and not try to
# do things like bogl on them. this preserves what that
diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
index 9fe60adef..c72b69f21 100644
--- a/pyanaconda/packaging/yumpayload.py
+++ b/pyanaconda/packaging/yumpayload.py
@@ -25,7 +25,6 @@
TODO
- document all methods
- YumPayload
- - preupgrade
- write test cases
- more logging in key methods
- handling of proxy needs cleanup
@@ -416,6 +415,17 @@ reposdir=%s
# start with a fresh YumBase instance
self.reset(root=root)
+ # If askmethod was given on the command line, we don't want to do
+ # anything. Just disable all repos and return. This should avoid
+ # metadata fetching.
+ if flags.askmethod:
+ with _yum_lock:
+ for repo in self._yum.repos.repos.values():
+ self.disableRepo(repo.id)
+
+ self._yumCacheDirHack()
+ return
+
# see if we can get a usable base repo from self.data.method
try:
self._configureBaseRepo(self.storage, checkmount=checkmount)
diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py
index 87ebb898e..5751ca0ff 100644
--- a/pyanaconda/ui/gui/spokes/source.py
+++ b/pyanaconda/ui/gui/spokes/source.py
@@ -439,6 +439,11 @@ class SourceSpoke(NormalSpoke):
def apply(self):
import copy
+ # If askmethod was provided on the command line, entering the source
+ # spoke wipes that out.
+ if flags.askmethod:
+ flags.askmethod = False
+
old_source = copy.copy(self.data.method)
if self._autodetectButton.get_active():