[PATCH] Remove yumpayload.py, its support files, and most references to yum.

Chris Lumens clumens at redhat.com
Thu May 7 14:15:43 UTC 2015


The nodnf option is also gone, because it doesn't do anything anymore.  The
yum versions of kickstart_tests are no longer needed.  In a lot of places
where we reference yum (comments, suggesting "yum install whatever", etc.),
change those to reference to dnf.  A couple of those cannot change due to
being directories or log files people have come to expect.

Note I've also added a couple FIXMEs in places where I do not know if
something is still necessary or not.
---
 Makefile.am                                        |    6 +-
 anaconda                                           |    8 +-
 anaconda.spec.in                                   |    2 -
 data/anaconda_options.txt                          |   12 +-
 docs/driverdisc.rst                                |    4 +-
 docs/translations.txt                              |    2 +-
 pyanaconda/anaconda.py                             |   10 +-
 pyanaconda/exception.py                            |    3 +-
 pyanaconda/flags.py                                |    3 +-
 pyanaconda/installclass.py                         |    2 +-
 pyanaconda/packaging/__init__.py                   |    1 +
 pyanaconda/packaging/dnfpayload.py                 |    2 +-
 pyanaconda/packaging/yumpayload.py                 | 1518 --------------------
 pyanaconda/ui/gui/spokes/source.py                 |    8 +-
 pyanaconda/ui/tui/__init__.py                      |    2 +-
 pyanaconda/ui/tui/spokes/software.py               |    2 +-
 pyanaconda/ui/tui/spokes/source.py                 |    2 +-
 scripts/Makefile.am                                |    2 +-
 scripts/anaconda-yum                               |  418 ------
 scripts/githooks/commit-msg                        |    2 +-
 scripts/githooks/pre-push                          |    2 +-
 scripts/makeupdates                                |    2 +-
 scripts/zramswapon                                 |    2 +-
 tests/install/run_install_test.sh                  |    6 +-
 tests/kickstart_tests/basic-ftp-yum.ks             |   24 -
 tests/kickstart_tests/basic-ftp-yum.sh             |   48 -
 tests/kickstart_tests/groups-and-envs-yum-1.ks     |   38 -
 tests/kickstart_tests/groups-and-envs-yum-1.sh     |   48 -
 tests/kickstart_tests/groups-and-envs-yum-2.ks     |   82 --
 tests/kickstart_tests/groups-and-envs-yum-2.sh     |   48 -
 tests/kickstart_tests/nfs-repo-and-addon-yum.ks    |   80 --
 tests/kickstart_tests/nfs-repo-and-addon-yum.sh    |   69 -
 tests/kickstart_tests/packages-and-groups-yum-1.ks |   75 -
 tests/kickstart_tests/packages-and-groups-yum-1.sh |   48 -
 tests/pylint/preconf.py                            |   44 -
 tests/pylint/pylint-one.sh                         |    2 +-
 36 files changed, 36 insertions(+), 2591 deletions(-)
 delete mode 100644 pyanaconda/packaging/yumpayload.py
 delete mode 100755 scripts/anaconda-yum
 delete mode 100644 tests/kickstart_tests/basic-ftp-yum.ks
 delete mode 100755 tests/kickstart_tests/basic-ftp-yum.sh
 delete mode 100644 tests/kickstart_tests/groups-and-envs-yum-1.ks
 delete mode 100755 tests/kickstart_tests/groups-and-envs-yum-1.sh
 delete mode 100644 tests/kickstart_tests/groups-and-envs-yum-2.ks
 delete mode 100755 tests/kickstart_tests/groups-and-envs-yum-2.sh
 delete mode 100644 tests/kickstart_tests/nfs-repo-and-addon-yum.ks
 delete mode 100755 tests/kickstart_tests/nfs-repo-and-addon-yum.sh
 delete mode 100644 tests/kickstart_tests/packages-and-groups-yum-1.ks
 delete mode 100755 tests/kickstart_tests/packages-and-groups-yum-1.sh
 delete mode 100644 tests/pylint/preconf.py

diff --git a/Makefile.am b/Makefile.am
index 47aeeb1..d26572f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -55,7 +55,7 @@ tag:
 	@echo "Tagged as $(ARCHIVE_TAG)"
 
 po-pull:
-	rpm -q zanata-python-client &>/dev/null || ( echo "need to run: yum install zanata-python-client"; exit 1 )
+	rpm -q zanata-python-client &>/dev/null || ( echo "need to run: dnf install zanata-python-client"; exit 1 )
 	zanata pull $(ZANATA_PULL_ARGS)
 
 po-empty:
@@ -114,14 +114,14 @@ bumpver: po-pull
 install-buildrequires:
 	srcdir="$(srcdir)" && \
 	: $${srcdir:=.} && \
-	yum install $$(grep ^BuildRequires: $${srcdir}/anaconda.spec.in | cut -d ' ' -f 2)
+	dnf install $$(grep ^BuildRequires: $${srcdir}/anaconda.spec.in | cut -d ' ' -f 2)
 
 # Install all packages specified as Requires in the Anaconda specfile
 # -> installs packages needed to run Anaconda and the Anaconda unit tests
 install-requires:
 	srcdir="$(srcdir)" && \
 	: $${srcdir:=.} && \
-	yum install $$(grep ^Requires: $${srcdir}/anaconda.spec.in | cut -d ' ' -f 2 | grep -v ^anaconda)
+	dnf install $$(grep ^Requires: $${srcdir}/anaconda.spec.in | cut -d ' ' -f 2 | grep -v ^anaconda)
 
 # Generate an updates.img based on the changed files since the release
 # was tagged.  Updates are copied to ./updates-img and then the image is
diff --git a/anaconda b/anaconda
index c7c06a0..a6948d5 100755
--- a/anaconda
+++ b/anaconda
@@ -367,8 +367,6 @@ def parseArguments(argv=None, boot_cmdline=None):
                     help=help_parser.help_text("extlinux"))
     ap.add_argument("--nombr", action="store_true", default=False,
                     help=help_parser.help_text("nombr"))
-    ap.add_argument("--nodnf", action="store_false", dest="dnf", default=True,
-                    help=help_parser.help_text("nodnf"))
     ap.add_argument("--mpathfriendlynames", action="store_true", default=True,
                     help=help_parser.help_text("mpathfriendlynames"))
     ap.add_argument("--kexec", action="store_true", default=False,
@@ -1039,7 +1037,6 @@ if __name__ == "__main__":
     flags.armPlatform = opts.armPlatform
     flags.extlinux = opts.extlinux
     flags.nombr = opts.nombr
-    flags.dnf = opts.dnf
     flags.mpathFriendlyNames = opts.mpathfriendlynames
     flags.debug = opts.debug
     flags.askmethod = opts.askmethod
@@ -1176,7 +1173,7 @@ if __name__ == "__main__":
     if flags.noverifyssl:
         ksdata.method.noverifyssl = flags.noverifyssl
     if opts.multiLib:
-        # sets yum's multilib_policy to "all" (as opposed to "best")
+        # sets dnf's multilib_policy to "all" (as opposed to "best")
         ksdata.packages.multiLib = opts.multiLib
 
     # set ksdata.method based on anaconda.method if it isn't already set
@@ -1213,8 +1210,9 @@ if __name__ == "__main__":
             # the kickstart might have specified a mirror list,
             # so we need to clear it here if plain url source is provided
             # by a bootoption, because having both url & mirror list
-            # set at once is not supported and breaks Yum in
+            # set at once is not supported and breaks dnf in
             # unpredictable ways
+            # FIXME: Is this still needed for dnf?
             ksdata.method.mirrorlist = None
         elif anaconda.methodstr.startswith("livecd"):
             ksdata.method.method = "harddrive"
diff --git a/anaconda.spec.in b/anaconda.spec.in
index 6fe8cd4..200a8b6 100644
--- a/anaconda.spec.in
+++ b/anaconda.spec.in
@@ -22,7 +22,6 @@ Source0: %{name}-%{version}.tar.bz2
 %define gettextver 0.18.3
 %define intltoolver 0.31.2-3
 %define pykickstartver 2.6
-%define yumver 3.4.3-91
 %define dnfver 0.6.4
 %define partedver 1.8.1
 %define pypartedver 2.5-2
@@ -91,7 +90,6 @@ Requires: libselinux-python
 Requires: rpm-python >= %{rpmver}
 Requires: parted >= %{partedver}
 Requires: pyparted >= %{pypartedver}
-Requires: yum >= %{yumver}
 Requires: python-requests
 Requires: python-kickstart >= %{pykickstartver}
 Requires: langtable-data >= %{langtablever}
diff --git a/data/anaconda_options.txt b/data/anaconda_options.txt
index fe4d8b5..de13323 100644
--- a/data/anaconda_options.txt
+++ b/data/anaconda_options.txt
@@ -39,7 +39,7 @@ armplatform
 Can be used to specify the ARM platform for the installation by passing the appropriate PLATFORM_ID.
 
 multilib
-Enable yum's multlib_policy of "all" instead of the default of "best".
+Enable dnf's multlib_policy of "all" instead of the default of "best".
 
 method
 This option is deprecated in favor of the repo option. For now, it does the same thing as repo,
@@ -52,7 +52,7 @@ you can enter the spoke and change it, you can pass this option.
 
 repo
 This option tells Anaconda where to find the packages for installation. This option must point to a
-valid yum repository (or, for some protocols, a Fedora DVD ISO image). It is analogous to the older
+valid package repository (or, for some protocols, a Fedora DVD ISO image). It is analogous to the older
 method option, but repo makes it more clear exactly what is meant. This option may appear only once
 on the command line. It corresponds to the kickstart command install (whereas kickstart command repo
 is used for additional repositories). As of Fedora 16, you can (optionally) add a specific .iso file
@@ -112,7 +112,7 @@ with the lang kickstart command.
 loglevel
 Set the minimum level required for messages to be logged on a terminal (log files always
 contain messages of all levels). Values for LEVEL are "debug", "info", "warning", "error",
-"critical" and "lock" (the "lock" level has been added in F21 and is used for debugging YUM locking).
+"critical" and "lock" (the "lock" level has been added in F21 and is used for debugging dnf locking).
 The default value is "info".
 
 syslog
@@ -223,12 +223,6 @@ installed OS will be booted.  /etc/grub.d/40_custom can be used with
 manually created menuentrys which can use configfile to point to the
 grub.cfg on the newly installed OS.
 
-nodnf
-Don't use the DNF package management backend (default since F22) and
-use the legacy YUM backend instead.
-For more information about the DNF project see:
-http://dnf.baseurl.org
-
 mpathfriendlynames
 Tell multipathd to use user friendly names when naming devices during the installation.
 See the multipathd documentation for more info.
diff --git a/docs/driverdisc.rst b/docs/driverdisc.rst
index dfde6ee..bb84cf5 100644
--- a/docs/driverdisc.rst
+++ b/docs/driverdisc.rst
@@ -68,7 +68,7 @@ any anaconda's supported filesystem (vfat, squashfs, ext2 and ext3).
     /
     |rhdd3   - DD marker, contains the DD's description string
     /rpms
-      |  /i386 - contains RPMs for this arch and acts as Yum repo
+      |  /i386 - contains RPMs for this arch and acts as package repo
       |  /i586
       |  /x86_64
       |  /ppc
@@ -116,7 +116,7 @@ Package installation
 
 It is also possible to include arbitrary packages on the DriverDisc media and
 mark them for installation. You just have to include the package name in the
-Yum repo for correct architecture and mark it as mandatory.
+package repo for correct architecture and mark it as mandatory.
 
 
 Summary
diff --git a/docs/translations.txt b/docs/translations.txt
index 50a529d..999a9a9 100644
--- a/docs/translations.txt
+++ b/docs/translations.txt
@@ -18,7 +18,7 @@ CLIENT SETUP
 Setting up the zanata-python-client on your system for anaconda builds.
 
 1) Install the zanata-python-client package:
-       yum install zanata-python-client
+       dnf install zanata-python-client
 
 2) Create a Zanata account at https://fedora.zanata.org
    NOTE:  This system is linked to FAS, but the 'remember my login' option
diff --git a/pyanaconda/anaconda.py b/pyanaconda/anaconda.py
index e5bf56a..d97f1a0 100644
--- a/pyanaconda/anaconda.py
+++ b/pyanaconda/anaconda.py
@@ -130,15 +130,9 @@ class Anaconda(object):
                 elif self.ksdata.method.method == "liveimg":
                     from pyanaconda.packaging.livepayload import LiveImageKSPayload
                     klass = LiveImageKSPayload
-                elif flags.dnf:
-                    try:
-                        from pyanaconda.packaging.dnfpayload import DNFPayload
-                        klass = DNFPayload
-                    except ImportError:
-                        log.critical('Importing DNF  failed.', exc_info=True)
                 else:
-                    from pyanaconda.packaging.yumpayload import YumPayload
-                    klass = YumPayload
+                    from pyanaconda.packaging.dnfpayload import DNFPayload
+                    klass = DNFPayload
 
             self._payload = klass(self.ksdata)
 
diff --git a/pyanaconda/exception.py b/pyanaconda/exception.py
index 977c52d..e30b5f6 100644
--- a/pyanaconda/exception.py
+++ b/pyanaconda/exception.py
@@ -251,8 +251,7 @@ def initExceptionHandling(anaconda):
                                 "_intf.storage.encryptionPassphrase",
                                 "_bootloader.encrypted_password",
                                 "_bootloader.password",
-                                "payload._groups",
-                                "payload._yum"],
+                                "payload._groups"]
                   localSkipList=["passphrase", "password", "_oldweak", "_password"],
                   fileList=fileList)
 
diff --git a/pyanaconda/flags.py b/pyanaconda/flags.py
index 5abf3f5..33d8d95 100644
--- a/pyanaconda/flags.py
+++ b/pyanaconda/flags.py
@@ -65,7 +65,6 @@ class Flags(object):
         self.gpt = False
         self.leavebootorder = False
         self.testing = False
-        self.dnf = True
         self.mpathFriendlyNames = True
         # ksprompt is whether or not to prompt for missing ksdata
         self.ksprompt = True
@@ -81,7 +80,7 @@ class Flags(object):
 
     def read_cmdline(self):
         for f in ("selinux", "debug", "leavebootorder", "testing", "extlinux",
-                  "nombr", "gpt", "dnf", "noefi"):
+                  "nombr", "gpt", "noefi"):
             self.set_cmdline_bool(f)
 
         if not selinux.is_selinux_enabled():
diff --git a/pyanaconda/installclass.py b/pyanaconda/installclass.py
index e58c56c..86a0e23 100644
--- a/pyanaconda/installclass.py
+++ b/pyanaconda/installclass.py
@@ -82,7 +82,7 @@ class BaseInstallClass(object):
 
     def getBackend(self):
         # The default is to return None here, which means anaconda should
-        # use live or yum (whichever can be detected).  This method is
+        # use live or dnf (whichever can be detected).  This method is
         # provided as a way for other products to specify their own.
         return None
 
diff --git a/pyanaconda/packaging/__init__.py b/pyanaconda/packaging/__init__.py
index ba2a181..e867e6d 100644
--- a/pyanaconda/packaging/__init__.py
+++ b/pyanaconda/packaging/__init__.py
@@ -1256,6 +1256,7 @@ class PayloadManager(object):
             return
 
         try:
+            # FIXME: Is this still needed for dnf?
             # Grabbing the list of groups could potentially take a long time the
             # first time (yum does a lot of magic property stuff, some of which
             # involves side effects like network access) so go ahead and grab
diff --git a/pyanaconda/packaging/dnfpayload.py b/pyanaconda/packaging/dnfpayload.py
index c102687..f2e3f72 100644
--- a/pyanaconda/packaging/dnfpayload.py
+++ b/pyanaconda/packaging/dnfpayload.py
@@ -467,7 +467,7 @@ class DNFPayload(packaging.PackagePayload):
 
     @property
     def baseRepo(self):
-        # is any locking needed here as in the yumpayload?
+        # is any locking needed here?
         repo_names = [constants.BASE_REPO_NAME] + self.DEFAULT_REPOS
         for repo in self._base.repos.iter_enabled():
             if repo.id in repo_names:
diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
deleted file mode 100644
index aa9019f..0000000
--- a/pyanaconda/packaging/yumpayload.py
+++ /dev/null
@@ -1,1518 +0,0 @@
-# yumpayload.py
-# Yum/rpm software payload management.
-#
-# Copyright (C) 2012  Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use,
-# modify, copy, or redistribute it subject to the terms and conditions of
-# the GNU General Public License v.2, or (at your option) any later version.
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY expressed or implied, including the implied warranties of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
-# Public License for more details.  You should have received a copy of the
-# GNU General Public License along with this program; if not, write to the
-# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.  Any Red Hat trademarks that are incorporated in the
-# source code or documentation are not subject to the GNU General Public
-# License and may only be used or replicated with the express permission of
-# Red Hat, Inc.
-#
-# Red Hat Author(s): David Lehman <dlehman at redhat.com>
-#                    Chris Lumens <clumens at redhat.com>
-#
-
-"""
-    TODO
-        - document all methods
-        - YumPayload
-            - write test cases
-            - more logging in key methods
-            - handling of proxy needs cleanup
-                - passed to anaconda as --proxy, --proxyUsername, and
-                  --proxyPassword
-                    - drop the use of a file for proxy and ftp auth info
-                - specified via KS as a URL
-
-"""
-
-import ConfigParser
-import os
-import shutil
-import sys
-import time
-from pyanaconda.iutil import execReadlines
-from functools import wraps
-
-import logging
-log = logging.getLogger("packaging")
-
-try:
-    import rpm
-except ImportError:
-    log.error("import of rpm failed")
-    rpm = None
-
-try:
-    import yum
-    # This is a bit of a hack to short circuit yum's internal logging
-    # handler setup.  We already set one up so we don't need it to run.
-    # yum may give us an API to fiddle this at a later time.
-    yum.logginglevels._added_handlers = True
-    from yum.Errors import RepoError, RepoMDError, GroupsError
-except ImportError:
-    log.error("import of yum failed")
-    yum = None
-
-from pyanaconda.constants import BASE_REPO_NAME, MOUNT_DIR, LOGLVL_LOCK, IPMI_ABORTED
-from pyanaconda.flags import flags
-
-from pyanaconda import iutil
-from pyanaconda.iutil import ProxyString, ProxyStringError
-from pyanaconda.i18n import _
-from pyanaconda.nm import nm_is_connected
-from pyanaconda.product import isFinal
-from blivet.size import Size
-import blivet.util
-import blivet.arch
-
-from pyanaconda.errors import ERROR_RAISE, errorHandler, CmdlineError
-from pyanaconda.packaging import DependencyError, MetadataError, NoNetworkError, NoSuchGroup, \
-                                 NoSuchPackage, PackagePayload, PayloadError, PayloadInstallError, \
-                                 PayloadSetupError
-from pyanaconda.progress import progressQ
-
-from pyanaconda.localization import langcode_matches_locale
-
-from pykickstart.constants import GROUP_ALL, GROUP_DEFAULT, KS_MISSING_IGNORE
-
-YUM_PLUGINS = ["fastestmirror", "langpacks"]
-BASE_REPO_NAMES = [BASE_REPO_NAME] + PackagePayload.DEFAULT_REPOS
-YUM_REPOS_DIR = "/etc/yum.repos.d/"
-
-import inspect
-import threading
-_private_yum_lock = threading.RLock()
-
-class YumLock(object):
-    def __enter__(self):
-        if isFinal:
-            _private_yum_lock.acquire()
-            return _private_yum_lock
-
-        frame = inspect.stack()[2]
-        threadName = threading.currentThread().name
-
-        log.log(LOGLVL_LOCK, "about to acquire _yum_lock for %s at %s:%s (%s)", threadName, frame[1], frame[2], frame[3])
-        _private_yum_lock.acquire()
-        log.log(LOGLVL_LOCK, "have _yum_lock for %s", threadName)
-        return _private_yum_lock
-
-    def __exit__(self, exc_type, exc_val, exc_tb):
-        _private_yum_lock.release()
-
-        if not isFinal:
-            log.log(LOGLVL_LOCK, "gave up _yum_lock for %s", threading.currentThread().name)
-
-def refresh_base_repo(cond_fn=None):
-    """
-    Function returning decorator for methods that invalidate base repo.
-    After the method has been run the base repo will be refreshed
-
-    :param cond_fn: condition function telling if base repo should be
-                    invalidated or not (HAS TO TAKE THE SAME ARGUMENTS AS THE
-                    DECORATED FUNCTION)
-
-    While the method runs the base_repo is set to None.
-    """
-    def decorator(method):
-        """
-        Decorator for methods that invalidate base repo cache.
-
-        :param method: decorated method of the YumPayload class
-
-        """
-        @wraps(method)
-        def inner_method(yum_payload, *args, **kwargs):
-            if cond_fn is None or cond_fn(yum_payload, *args, **kwargs):
-                with yum_payload._base_repo_lock:
-                    yum_payload._base_repo = None
-
-            ret = method(yum_payload, *args, **kwargs)
-
-            if cond_fn is None or cond_fn(yum_payload, *args, **kwargs):
-                yum_payload._refreshBaseRepo()
-            return ret
-
-        return inner_method
-
-    return decorator
-
-_yum_lock = YumLock()
-_yum_cache_dir = "/tmp/yum.cache"
-_yum_installer_langpack_conf = "/tmp/yum.pluginconf.d/langpacks.conf"
-_yum_target_langpack_conf = "/etc/yum/pluginconf.d/langpacks.conf"
-
-class YumPayload(PackagePayload):
-    """ A YumPayload installs packages onto the target system using yum.
-
-        User-defined (aka: addon) repos exist both in ksdata and in yum. They
-        are the only repos in ksdata.repo. The repos we find in the yum config
-        only exist in yum. Lastly, the base repo exists in yum and in
-        ksdata.method.
-    """
-
-
-    def __init__(self, data):
-        if rpm is None or yum is None:
-            raise PayloadError("unsupported payload type")
-
-        PackagePayload.__init__(self, data)
-
-        self._root_dir = "/tmp/yum.root"
-        self._repos_dir = "/etc/yum.repos.d,/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anaconda.repos.d"
-        self._yum = None
-        self._setup = False
-
-        self._groups = None
-        self._packages = []
-
-        # base repo caching
-        self._base_repo = None
-        self._base_repo_lock = threading.RLock()
-
-        self.reset()
-
-    def reset(self):
-        """ Reset this instance to its initial (unconfigured) state. """
-
-        super(YumPayload, self).reset()
-        # This value comes from a default install of the x86_64 Fedora 18.  It
-        # is meant as a best first guess only.  Once package metadata is
-        # available we can use that as a better value.
-        self._space_required = Size("3000 MB")
-
-        self._resetYum()
-
-    def setup(self, storage, instClass):
-        super(YumPayload, self).setup(storage, instClass)
-
-        self._writeYumConfig()
-        self._setup = True
-
-    def unsetup(self):
-        super(YumPayload, self).unsetup()
-        self._setup = False
-
-    def _resetYum(self, root=None, keep_cache=False, releasever=None):
-        """ Delete and recreate the payload's YumBase instance.
-
-            Setup _yum.preconf -- DO NOT TOUCH IT OUTSIDE THIS METHOD
-            NOTE:  This is enforced by tests/pylint/preconf.py.  If the name
-            of this method changes, change it there too.
-        """
-        self._groups = None
-        self._packages = []
-
-        if root is None:
-            root = self._root_dir
-
-        with _yum_lock:
-            if self._yum:
-                if not keep_cache:
-                    for repo in self._yum.repos.listEnabled():
-                        if repo.name == BASE_REPO_NAME and \
-                           os.path.isdir(repo.cachedir):
-                            shutil.rmtree(repo.cachedir)
-
-                del self._yum
-
-            self._writeYumConfig()
-            self._yum = yum.YumBase()
-
-            self._yum.use_txmbr_in_callback = True
-
-            # Set some configuration parameters that don't get set through a config
-            # file.  yum will know what to do with these.
-            # Only enable non-interactive yum plugins
-            self._yum.preconf.plugin_types = yum.plugins.TYPE_CORE
-            self._yum.preconf.enabled_plugins = YUM_PLUGINS
-            self._yum.preconf.fn = "/tmp/anaconda-yum.conf"
-            self._yum.preconf.root = root
-            if releasever is None:
-                self._yum.preconf.releasever = self._getReleaseVersion(None)
-            else:
-                self._yum.preconf.releasever = releasever
-
-        self.txID = None
-
-    def _writeLangpacksConfig(self):
-        langs = [self.data.lang.lang] + self.data.lang.addsupport
-        log.debug("configuring langpacks for %s", langs)
-        iutil.mkdirChain(os.path.dirname(_yum_installer_langpack_conf))
-        shutil.copy2(_yum_target_langpack_conf,
-                     _yum_installer_langpack_conf)
-        with open(_yum_installer_langpack_conf, "a") as f:
-            f.write("# Added by Anaconda\n")
-            f.write("langpack_locales = %s\n" % ", ".join(langs))
-
-    def _copyLangpacksConfigToTarget(self):
-        shutil.copy2(_yum_installer_langpack_conf,
-                     iutil.getSysroot()+_yum_target_langpack_conf)
-
-    def _writeYumConfig(self):
-        """ Write out anaconda's main yum configuration file. """
-        buf = """
-[main]
-cachedir=%s
-keepcache=0
-logfile=/tmp/yum.log
-metadata_expire=never
-pluginpath=/usr/lib/yum-plugins,/tmp/updates/yum-plugins
-pluginconfpath=%s,/etc/yum/pluginconf.d,/tmp/updates/pluginconf.d
-plugins=1
-debuglevel=3
-errorlevel=6
-reposdir=%s
-""" % (_yum_cache_dir, os.path.dirname(_yum_installer_langpack_conf),
-       self._repos_dir)
-
-        if flags.noverifyssl:
-            buf += "sslverify=0\n"
-
-        if self.data.packages.multiLib:
-            buf += "multilib_policy=all\n"
-
-        if hasattr(self.data.method, "proxy") and self.data.method.proxy:
-            try:
-                proxy = ProxyString(self.data.method.proxy)
-                buf += "proxy=%s\n" % (proxy.noauth_url,)
-                if proxy.username:
-                    buf += "proxy_username=%s\n" % (proxy.username,)
-                if proxy.password:
-                    buf += "proxy_password=%s\n" % (proxy.password,)
-            except ProxyStringError as e:
-                log.error("Failed to parse proxy for _writeYumConfig %s: %s",
-                          self.data.method.proxy, e)
-
-        open("/tmp/anaconda-yum.conf", "w").write(buf)
-
-    # YUMFIXME: yum should allow a cache dir outside of the installroot
-    def _yumCacheDirHack(self):
-        # This is what it takes to get yum to use a cache dir outside the
-        # install root. We do this so we don't have to re-gather repo meta-
-        # data after we change the install root to sysroot, which can only
-        # happen after we've enabled the new storage configuration.
-        with _yum_lock:
-            if not self._yum.conf.cachedir.startswith(self._yum.conf.installroot):
-                return
-
-            root = self._yum.conf.installroot
-            self._yum.conf.cachedir = self._yum.conf.cachedir[len(root):]
-
-    def _writeYumRepo(self, repo, repo_path):
-        """ Write a repo object to a yum repo.conf file
-
-            :param repo: Yum repository object
-            :param string repo_path: Path to write the repo to
-            :raises: PayloadSetupError if the repo doesn't have a url
-        """
-        with open(repo_path, "w") as f:
-            f.write("[%s]\n" % repo.id)
-            f.write("name=%s\n" % repo.id)
-            if self.isRepoEnabled(repo.id):
-                f.write("enabled=1\n")
-            else:
-                f.write("enabled=0\n")
-
-            if repo.mirrorlist:
-                f.write("mirrorlist=%s\n" % repo.mirrorlist)
-            elif repo.metalink:
-                f.write("metalink=%s\n" % repo.metalink)
-            elif repo.baseurl:
-                f.write("baseurl=%s\n" % repo.baseurl[0])
-            else:
-                f.close()
-                os.unlink(repo_path)
-                raise PayloadSetupError("repo %s has no baseurl, mirrorlist or metalink", repo.id)
-
-            # kickstart repo modifiers
-            ks_repo = self.getAddOnRepo(repo.id)
-
-            if not ks_repo and not repo.sslverify:
-                f.write("sslverify=0\n")
-
-            if not ks_repo:
-                return
-
-            if ks_repo.noverifyssl:
-                f.write("sslverify=0\n")
-
-            if ks_repo.proxy:
-                try:
-                    proxy = ProxyString(ks_repo.proxy)
-                    f.write("proxy=%s\n" % (proxy.noauth_url,))
-                    if proxy.username:
-                        f.write("proxy_username=%s\n" % (proxy.username,))
-                    if proxy.password:
-                        f.write("proxy_password=%s\n" % (proxy.password,))
-                except ProxyStringError as e:
-                    log.error("Failed to parse proxy for _writeInstallConfig %s: %s",
-                              ks_repo.proxy, e)
-
-            if ks_repo.cost:
-                f.write("cost=%d\n" % ks_repo.cost)
-
-            if ks_repo.includepkgs:
-                f.write("includepkgs=%s\n"
-                        % ",".join(ks_repo.includepkgs))
-
-            if ks_repo.excludepkgs:
-                f.write("exclude=%s\n"
-                        % ",".join(ks_repo.excludepkgs))
-
-            if ks_repo.ignoregroups:
-                f.write("enablegroups=0\n")
-
-
-    def _writeInstallConfig(self):
-        """ Write out the yum config that will be used to install packages.
-
-            Write out repo config files for all enabled repos, then
-            create a new YumBase instance with the new filesystem tree as its
-            install root.
-
-            This needs to be called from inside a yum_lock
-        """
-        self._repos_dir = "/tmp/yum.repos.d"
-        if not os.path.isdir(self._repos_dir):
-            os.mkdir(self._repos_dir)
-
-        for repo in self._yum.repos.listEnabled():
-            cfg_path = "%s/%s.repo" % (self._repos_dir, repo.id)
-            log.debug("writing repository file %s for repository %s", cfg_path, repo.id)
-            try:
-                self._writeYumRepo(repo, cfg_path)
-            except PayloadSetupError as e:
-                log.error(e)
-
-        releasever = self._yum.conf.yumvar['releasever']
-        self._writeYumConfig()
-        self._writeLangpacksConfig()
-        log.debug("setting releasever to previous value of %s", releasever)
-        self._resetYum(root=iutil.getSysroot(), keep_cache=True, releasever=releasever)
-        self._yumCacheDirHack()
-        self.gatherRepoMetadata()
-
-        # trigger setup of self._yum.config
-        log.debug("installation yum config repos: %s",
-                  ",".join(r.id for r in self._yum.repos.listEnabled()))
-
-    # YUMFIXME: there should be a way to reset package sacks without all this
-    #           knowledge of the yum internals or, better yet, some convenience
-    #           functions for multi-threaded applications
-    def release(self):
-        from yum.packageSack import MetaSack
-        with _yum_lock:
-            log.debug("deleting package sacks")
-            if hasattr(self._yum, "_pkgSack"):
-                self._yum._pkgSack = None
-
-            self._yum.repos.pkgSack = MetaSack()
-
-            for repo in self._yum.repos.repos.values():
-                repo._sack = None
-
-    def deleteYumTS(self):
-        with _yum_lock:
-            log.debug("deleting yum transaction info")
-            self._yum.closeRpmDB()
-            del self._yum.tsInfo
-            del self._yum.ts
-
-    def preStorage(self):
-        self.release()
-        with _yum_lock:
-            self._yum.close()
-
-    ###
-    ### METHODS FOR WORKING WITH REPOSITORIES
-    ###
-    @property
-    def repos(self):
-        if not self._setup:
-            return []
-
-        _repos = []
-        with _yum_lock:
-            _repos = self._yum.repos.repos.keys()
-
-        return _repos
-
-    @property
-    def baseRepo(self):
-        """ Return the current base repo id
-            :returns: repo id or None
-
-            Methods that change (or could change) the base_repo
-            need to be decorated with @refresh_base_repo
-        """
-        return self._base_repo
-
-    def _refreshBaseRepo(self):
-        """ Examine the enabled repos and update _base_repo
-        """
-        with _yum_lock:
-            for repo_name in BASE_REPO_NAMES:
-                if repo_name in self.repos and \
-                   self._yum.repos.getRepo(repo_name).enabled:
-                    with self._base_repo_lock:
-                        self._base_repo = repo_name
-                    break
-            else:
-                # didn't find any base repo set and enabled
-                with self._base_repo_lock:
-                    log.debug("No base_repo found in %s", BASE_REPO_NAMES)
-                    self._base_repo = None
-
-    @property
-    def mirrorEnabled(self):
-        with _yum_lock:
-            # yum initializes with plugins disabled, and when plugins are disabled
-            # _yum.plugins is a DummyYumPlugins object, which has no useful attributes.
-            if hasattr(self._yum.plugins, "enabledPlugins"):
-                return "fastestmirror" in self._yum.plugins.enabledPlugins
-            else:
-                return False
-
-    def getRepo(self, repo_id):
-        """ Return the yum repo object. """
-        with _yum_lock:
-            repo = self._yum.repos.getRepo(repo_id)
-
-        return repo
-
-    def isRepoEnabled(self, repo_id):
-        """ Return True if repo is enabled. """
-        try:
-            return self.getRepo(repo_id).enabled
-        except RepoError:
-            return super(YumPayload, self).isRepoEnabled(repo_id)
-
-    @refresh_base_repo()
-    def updateBaseRepo(self, fallback=True, checkmount=True):
-        """ Update the base repo based on self.data.method.
-
-            - Tear down any previous base repo devices, symlinks, &c.
-            - Reset the YumBase instance.
-            - Try to convert the new method to a base repo.
-            - If that fails, we'll use whatever repos yum finds in the config.
-            - Set up addon repos.
-            - Filter out repos that don't make sense to have around.
-            - Get metadata for all enabled repos, disabling those for which the
-              retrieval fails.
-        """
-        log.info("configuring base repo")
-
-        self.reset_install_device()
-        try:
-            url, mirrorlist, sslverify = self._setupInstallDevice(self.storage, checkmount)
-        except PayloadSetupError:
-            self.data.method.method = None
-
-        releasever = None
-        method = self.data.method
-        if method.method:
-            try:
-                releasever = self._getReleaseVersion(url)
-                log.debug("releasever from %s is %s", url, releasever)
-            except ConfigParser.MissingSectionHeaderError as e:
-                log.error("couldn't set releasever from base repo (%s): %s",
-                          method.method, e)
-
-        # start with a fresh YumBase instance & tear down old install device
-        self._resetYum(releasever=releasever)
-        self._yumCacheDirHack()
-
-        # If this is a kickstart install and no method has been set up, or
-        # 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 (not method.method and flags.automatedInstall) or \
-           flags.askmethod:
-            with _yum_lock:
-                for repo in self._yum.repos.repos.values():
-                    self.disableRepo(repo.id)
-            return
-
-        # see if we can get a usable base repo from self.data.method
-        if method.method:
-            try:
-                if releasever is None:
-                    raise PayloadSetupError("base repo is unusable")
-
-                if hasattr(method, "proxy"):
-                    proxyurl = method.proxy
-                else:
-                    proxyurl = None
-
-                self._addYumRepo(BASE_REPO_NAME, url, mirrorlist=mirrorlist,
-                                 proxyurl=proxyurl, sslverify=sslverify)
-            except (MetadataError, PayloadError) as e:
-                log.error("base repo (%s/%s) not valid -- removing it",
-                          method.method, url)
-                self._removeYumRepo(BASE_REPO_NAME)
-                if not fallback:
-                    with _yum_lock:
-                        for repo in self._yum.repos.repos.values():
-                            if repo.enabled:
-                                self.disableRepo(repo.id)
-                    return
-
-                # this preserves the method details while disabling it
-                method.method = None
-                self.install_device = None
-
-        with _yum_lock:
-            if BASE_REPO_NAME not in self._yum.repos.repos.keys():
-                log.info("using default repos from local yum configuration")
-                if self._yum.conf.yumvar['releasever'] == "rawhide" and \
-                   "rawhide" in self.repos:
-                    self.enableRepo("rawhide")
-
-        # set up addon repos
-        # FIXME: driverdisk support
-        for repo in self.data.repo.dataList():
-            if not repo.enabled:
-                continue
-            try:
-                self._configureAddOnRepo(repo)
-            except NoNetworkError as e:
-                log.error("repo %s needs an active network connection", repo.name)
-                self.disableRepo(repo.name)
-            except PayloadError as e:
-                log.error("repo %s setup failed: %s", repo.name, e)
-                self.disableRepo(repo.name)
-
-        # now disable and/or remove any repos that don't make sense
-        with _yum_lock:
-            for repo in self._yum.repos.repos.values():
-                # Rules for which repos to enable/disable/remove
-                #
-                # - always remove
-                #     - source, debuginfo
-                # - disable if isFinal
-                #     - rawhide, development
-                # - disable all other built-in repos if rawhide is enabled
-                # - remove any repo when not isFinal and repo not enabled
-                # - if a base repo is defined, disable any repo not defined by
-                #   the user that is not the base repo
-                #
-                # FIXME: updates needs special handling
-                if repo.id in self.addOns:
-                    continue
-
-                if "-source" in repo.id or "-debuginfo" in repo.id:
-                    self._removeYumRepo(repo.id)
-                elif isFinal and ("rawhide" in repo.id or "development" in repo.id):
-                    # XXX the "development" part seems a bit heavy handed
-                    self._removeYumRepo(repo.id)
-                elif self._yum.conf.yumvar['releasever'] == "rawhide" and \
-                     "rawhide" in self.repos and \
-                     self._yum.repos.getRepo("rawhide").enabled and \
-                     repo.id not in (BASE_REPO_NAME, "rawhide"):
-                    self.disableRepo(repo.id)
-                elif method.method and \
-                     repo.id != BASE_REPO_NAME and \
-                     repo.id not in (r.name for r in self.data.repo.dataList()):
-                    # if a method/repo was given, disable all default repos
-                    self.disableRepo(repo.id)
-
-    @refresh_base_repo()
-    def gatherRepoMetadata(self):
-        # now go through and get metadata for all enabled repos
-        log.info("gathering repo metadata")
-        for repo_id in self.repos:
-            with _yum_lock:
-                repo = self._yum.repos.getRepo(repo_id)
-                if repo.enabled:
-                    try:
-                        log.info("gathering repo metadata for %s", repo_id)
-                        self._getRepoMetadata(repo)
-                    except PayloadError as e:
-                        log.error("failed to grab repo metadata for %s: %s",
-                                  repo_id, e)
-                        self.disableRepo(repo_id)
-                else:
-                    log.info("skipping disabled repo %s", repo_id)
-
-        # Make sure environmentAddon information is current
-        self._refreshEnvironmentAddons()
-
-        log.info("metadata retrieval complete")
-
-    @refresh_base_repo()
-    def _configureAddOnRepo(self, repo):
-        """ Configure a single ksdata repo. """
-        url = repo.baseurl
-        if url and url.startswith("nfs://"):
-            # Let the assignment throw ValueError for bad NFS urls from kickstart
-            (server, path) = url[6:].split(":", 1)
-            mountpoint = "%s/%s.nfs" % (MOUNT_DIR, repo.name)
-            self._setupNFS(mountpoint, server, path, None)
-
-            url = "file://" + mountpoint
-
-        if self._repoNeedsNetwork(repo) and not nm_is_connected():
-            raise NoNetworkError
-
-        if repo.proxy:
-            proxy = repo.proxy
-        elif hasattr(self.data.method, "proxy"):
-            proxy = self.data.method.proxy
-        else:
-            proxy = None
-
-        sslverify = not (flags.noverifyssl or repo.noverifyssl)
-
-        # this repo is already in ksdata, so we only add it to yum here
-        self._addYumRepo(repo.name, url, repo.mirrorlist, cost=repo.cost,
-                         exclude=repo.excludepkgs, includepkgs=repo.includepkgs,
-                         proxyurl=proxy, sslverify=sslverify)
-
-        addons = self._getAddons(url or repo.mirrorlist,
-                                 proxy,
-                                 sslverify)
-
-        # Addons are added to the kickstart, but are disabled by default
-        for addon in addons:
-            # Does this repo already exist? If so, it was already added and may have
-            # been edited by the user so skip adding it again.
-            if self.getAddOnRepo(addon[1]):
-                log.debug("Skipping %s, already exists.", addon[1])
-                continue
-
-            log.info("Adding addon repo %s", addon[1])
-            ks_repo = self.data.RepoData(name=addon[1],
-                                         baseurl=addon[2],
-                                         proxy=repo.proxy,
-                                         enabled=False)
-            self.data.repo.dataList().append(ks_repo)
-
-    def _getAddons(self, baseurl, proxy_url, sslverify):
-        """ Check the baseurl or mirrorlist for a repository, see if it has any
-            valid addon repos and if so, return a list of (repo name, repo URL).
-
-            :param baseurl: url of the repo
-            :type baseurl: string
-            :param proxy_url: Full URL of optional proxy or ""
-            :type proxy_url: string
-            :param sslverify: True if SSL certificate should be varified
-            :type sslverify: bool
-            :returns: list of tuples of addons (id, name, url)
-            :rtype: list of tuples
-        """
-        retval = []
-
-        # If there's no .treeinfo for this repo, don't bother looking for addons.
-        treeinfo = self._getTreeInfo(baseurl, proxy_url, sslverify)
-        if not treeinfo:
-            return retval
-
-        # We need to know which variant is being installed so we know what addons
-        # are valid options.
-        try:
-            c = ConfigParser.ConfigParser()
-            ConfigParser.ConfigParser.read(c, treeinfo)
-            variant = c.get("general", "variant")
-        except ConfigParser.Error:
-            return retval
-
-        section = "variant-%s" % variant
-        if c.has_section(section) and c.has_option(section, "addons"):
-            validAddons = c.get(section, "addons").split(",")
-        else:
-            return retval
-        log.debug("Addons found: %s", validAddons)
-
-        for addon in validAddons:
-            addonSection = "addon-%s" % addon
-            if not c.has_section(addonSection) or not c.has_option(addonSection, "repository"):
-                continue
-
-            url = "%s/%s" % (baseurl, c.get(addonSection, "repository"))
-            retval.append((addon, c.get(addonSection, "name"), url))
-
-        return retval
-
-    def _getRepoMetadata(self, yumrepo):
-        """ Retrieve repo metadata if we don't already have it. """
-        # And try to grab its metadata.  We do this here so it can be done
-        # on a per-repo basis, so we can then get some finer grained error
-        # handling and recovery.
-        log.debug("getting repo metadata for %s", yumrepo.id)
-        with _yum_lock:
-            try:
-                yumrepo.getPrimaryXML()
-            except RepoError as e:
-                raise MetadataError(e.value)
-
-            # Not getting group info is bad, but doesn't seem like a fatal error.
-            # At the worst, it just means the groups won't be displayed in the UI
-            # which isn't too bad, because you may be doing a kickstart install and
-            # picking packages instead.
-            log.debug("getting group info for %s", yumrepo.id)
-            try:
-                yumrepo.getGroups()
-            except RepoMDError:
-                log.error("failed to get groups for repo %s", yumrepo.id)
-
-    def _replaceVars(self, url):
-        """ Replace url variables with their values
-
-            :param url: url string to do replacement on
-            :type url:  string
-            :returns:   string with variables substituted
-            :rtype:     string or None
-
-            Currently supports $releasever and $basearch
-        """
-        if not url:
-            return url
-
-        with _yum_lock:
-            url = url.replace("$releasever", self._yum.conf.yumvar['releasever'])
-        url = url.replace("$basearch", blivet.arch.getArch())
-
-        return url
-
-    def _addYumRepo(self, name, baseurl, mirrorlist=None, proxyurl=None, **kwargs):
-        """ Add a yum repo to the YumBase instance. """
-        needsAdding = True
-
-        # First, delete any pre-existing repo with the same name.
-        # First, check for any pre-existing repo with the same name.
-        with _yum_lock:
-            if name in self._yum.repos.repos:
-                if not baseurl and not mirrorlist:
-                    # This is a repo we already have a config file in /etc/anaconda.repos.d,
-                    # so we just need to enable it here.  See the kickstart docs for the repo
-                    # command.
-                    self.enableRepo(name)
-                    obj = self._yum.repos.repos[name]
-                    needsAdding = False
-                else:
-                    self._yum.repos.delete(name)
-
-        if proxyurl and needsAdding:
-            try:
-                proxy = ProxyString(proxyurl)
-                kwargs["proxy"] = proxy.noauth_url
-                if proxy.username:
-                    kwargs["proxy_username"] = proxy.username
-                if proxy.password:
-                    kwargs["proxy_password"] = proxy.password
-            except ProxyStringError as e:
-                log.error("Failed to parse proxy for _addYumRepo %s: %s",
-                          proxyurl, e)
-
-        if baseurl:
-            baseurl = self._replaceVars(baseurl)
-        if mirrorlist:
-            mirrorlist = self._replaceVars(mirrorlist)
-        log.info("adding yum repo, name: %s, baseurl: %s, mirrorlist: %s",
-                 name, baseurl, mirrorlist)
-        with _yum_lock:
-            if needsAdding:
-                # Then add it to yum's internal structures.
-                obj = self._yum.add_enable_repo(name,
-                                                baseurl=[baseurl],
-                                                mirrorlist=mirrorlist,
-                                                **kwargs)
-
-            # this will trigger retrieval of repomd.xml, which is small and yet
-            # gives us some assurance that the repo config is sane
-            # YUMFIXME: yum's instant policy doesn't work as advertised
-            obj.mdpolicy = "meh"
-            try:
-                obj.repoXML
-            except RepoError as e:
-                raise MetadataError(e.value)
-
-        # Adding a new repo means the cached packages and groups lists
-        # are out of date.  Clear them out now so the next reference to
-        # either will cause it to be regenerated.
-        self._groups = None
-        self._packages = []
-
-    @refresh_base_repo(lambda s, r_id: r_id in BASE_REPO_NAMES)
-    def addRepo(self, newrepo):
-        """ Add a ksdata repo. """
-        log.debug("adding new repo %s", newrepo.name)
-        self._addYumRepo(newrepo.name, newrepo.baseurl, newrepo.mirrorlist, newrepo.proxy)   # FIXME: handle MetadataError
-        super(YumPayload, self).addRepo(newrepo)
-
-    def _removeYumRepo(self, repo_id):
-        if repo_id in self.repos:
-            with _yum_lock:
-                self._yum.repos.delete(repo_id)
-                self._groups = None
-                self._packages = []
-
-    @refresh_base_repo(lambda s, r_id: r_id in BASE_REPO_NAMES)
-    def removeRepo(self, repo_id):
-        """ Remove a repo as specified by id. """
-        log.debug("removing repo %s", repo_id)
-
-        # if this is an NFS repo, we'll want to unmount the NFS mount after
-        # removing the repo
-        mountpoint = None
-        with _yum_lock:
-            yum_repo = self._yum.repos.getRepo(repo_id)
-            ks_repo = self.getAddOnRepo(repo_id)
-            if yum_repo and ks_repo and ks_repo.baseurl.startswith("nfs:"):
-                mountpoint = yum_repo.baseurl[0][7:]    # strip leading "file://"
-
-        self._removeYumRepo(repo_id)
-        super(YumPayload, self).removeRepo(repo_id)
-
-        if mountpoint and os.path.ismount(mountpoint):
-            try:
-                blivet.util.umount(mountpoint)
-            except SystemError as e:
-                log.error("failed to unmount nfs repo %s: %s", mountpoint, e)
-
-    @refresh_base_repo(lambda s, r_id: r_id in BASE_REPO_NAMES)
-    def enableRepo(self, repo_id):
-        """ Enable a repo as specified by id. """
-        log.debug("enabling repo %s", repo_id)
-        if repo_id in self.repos:
-            with _yum_lock:
-                self._yum.repos.enableRepo(repo_id)
-        super(YumPayload, self).enableRepo(repo_id)
-
-    @refresh_base_repo(lambda s, r_id: r_id in BASE_REPO_NAMES)
-    def disableRepo(self, repo_id):
-        """ Disable a repo as specified by id. """
-        log.debug("disabling repo %s", repo_id)
-        if repo_id in self.repos:
-            with _yum_lock:
-                self._yum.repos.disableRepo(repo_id)
-
-            self._groups = None
-            self._packages = []
-        super(YumPayload, self).disableRepo(repo_id)
-
-    ###
-    ### METHODS FOR WORKING WITH ENVIRONMENTS
-    ###
-    @property
-    def environments(self):
-        """ List of environment ids. """
-        environments = []
-        yum_groups = self._yumGroups
-        if yum_groups:
-            with _yum_lock:
-                environments = [i.environmentid for i in yum_groups.get_environments()]
-
-        return environments
-
-    def environmentSelected(self, environmentid):
-        groups = self._yumGroups
-        if not groups:
-            return False
-
-        with _yum_lock:
-            if not groups.has_environment(environmentid):
-                raise NoSuchGroup(environmentid)
-
-            environment = groups.return_environment(environmentid)
-            for group in environment.groups:
-                if not self.groupSelected(group):
-                    return False
-            return True
-
-    def environmentHasOption(self, environmentid, grpid):
-        groups = self._yumGroups
-        if not groups:
-            return False
-
-        with _yum_lock:
-            if not groups.has_environment(environmentid):
-                raise NoSuchGroup(environmentid)
-
-            environment = groups.return_environment(environmentid)
-            if grpid in environment.options:
-                return True
-        return False
-
-    def environmentOptionIsDefault(self, environmentid, grpid):
-        groups = self._yumGroups
-        if not groups:
-            return False
-
-        with _yum_lock:
-            if not groups.has_environment(environmentid):
-                raise NoSuchGroup(environmentid)
-
-            environment = groups.return_environment(environmentid)
-            if grpid in environment.defaultoptions:
-                return True
-        return False
-
-    def environmentDescription(self, environmentid):
-        """ Return name/description tuple for the environment specified by id. """
-        groups = self._yumGroups
-        if not groups:
-            return (environmentid, environmentid)
-
-        with _yum_lock:
-            if not groups.has_environment(environmentid):
-                raise NoSuchGroup(environmentid)
-
-            environment = groups.return_environment(environmentid)
-
-            return (environment.ui_name, environment.ui_description)
-
-    def environmentGroups(self, environmentid, optional=True):
-        groups = self._yumGroups
-        if not groups:
-            return []
-
-        with _yum_lock:
-            if not groups.has_environment(environmentid):
-                raise NoSuchGroup(environmentid)
-
-            environment = groups.return_environment(environmentid)
-            if optional:
-                return environment.groups + environment.options
-            else:
-                return environment.groups
-
-    ###
-    ### METHODS FOR WORKING WITH GROUPS
-    ###
-    @property
-    def _yumGroups(self):
-        """ yum.comps.Comps instance. """
-        if not self._setup:
-            return []
-
-        with _yum_lock:
-            if not self._groups:
-                if not self.needsNetwork or nm_is_connected():
-                    try:
-                        self._groups = self._yum.comps
-                    except (RepoError, GroupsError) as e:
-                        log.error("failed to get group info: %s", e)
-
-        return self._groups
-
-    @property
-    def groups(self):
-        """ List of group ids. """
-        groups = []
-        yum_groups = self._yumGroups
-        if yum_groups:
-            with _yum_lock:
-                groups = [g.groupid for g in yum_groups.get_groups()]
-
-        return groups
-
-    def languageGroups(self):
-        yum_groups = self._yumGroups
-        if not yum_groups:
-            return []
-
-        lang_codes = [self.data.lang.lang] + self.data.lang.addsupport
-        lang_groups = set()
-
-        with _yum_lock:
-            groups = yum_groups.get_groups()
-            for lang_code in lang_codes:
-                for group in groups:
-                    if langcode_matches_locale(group.langonly, lang_code):
-                        lang_groups.add(group.groupid)
-
-        return list(lang_groups)
-
-    def groupDescription(self, groupid):
-        """ Return name/description tuple for the group specified by id. """
-        groups = self._yumGroups
-        if not groups:
-            return (groupid, groupid)
-
-        with _yum_lock:
-            if not groups.has_group(groupid):
-                raise NoSuchGroup(groupid)
-
-            group = groups.return_group(groupid)
-
-            return (group.ui_name, group.ui_description)
-
-    def _isGroupVisible(self, groupid):
-        groups = self._yumGroups
-        if not groups:
-            return False
-
-        with _yum_lock:
-            if not groups.has_group(groupid):
-                return False
-
-            group = groups.return_group(groupid)
-            return group.user_visible
-
-    def _groupHasInstallableMembers(self, groupid):
-        groups = self._yumGroups
-        if not groups:
-            return False
-
-        with _yum_lock:
-            if not groups.has_group(groupid):
-                return False
-
-            group = groups.return_group(groupid)
-            pkgs = group.mandatory_packages.keys() + group.default_packages.keys()
-            if pkgs:
-                return True
-            return False
-
-    def _selectYumGroup(self, groupid, default=True, optional=False, required=False):
-        # select the group in comps
-        pkg_types = ['mandatory']
-        if default:
-            pkg_types.append("default")
-
-        if optional:
-            pkg_types.append("optional")
-
-        log.debug("select group %s", groupid)
-        with _yum_lock:
-            try:
-                self._yum.selectGroup(groupid, group_package_types=pkg_types)
-            except yum.Errors.GroupsError:
-                raise NoSuchGroup(groupid, required=required)
-
-    def _deselectYumGroup(self, groupid):
-        # deselect the group in comps
-        log.debug("deselect group %s", groupid)
-        with _yum_lock:
-            try:
-                self._yum.deselectGroup(groupid, force=True)
-            except yum.Errors.GroupsError:
-                raise NoSuchGroup(groupid, adding=False)
-
-    ###
-    ### METHODS FOR WORKING WITH PACKAGES
-    ###
-    @property
-    def packages(self):
-        with _yum_lock:
-            if not self._packages:
-                if self.needsNetwork and not nm_is_connected():
-                    raise NoNetworkError
-
-                try:
-                    self._packages = self._yum.pkgSack.returnPackages()
-                except RepoError as e:
-                    log.error("failed to get package list: %s", e)
-
-            return self._packages
-
-    def _selectYumPackage(self, pkgid, required=False):
-        """Mark a package for installation.
-
-           pkgid - The name of a package to be installed.  This could include
-                   a version or architecture component.
-        """
-        log.debug("select package %s", pkgid)
-        with _yum_lock:
-            try:
-                self._yum.install(pattern=pkgid)
-            except yum.Errors.InstallError:
-                raise NoSuchPackage(pkgid, required=required)
-
-    def _deselectYumPackage(self, pkgid):
-        """Mark a package to be excluded from installation.
-
-           pkgid - The name of a package to be excluded.  This could include
-                   a version or architecture component.
-        """
-        log.debug("deselect package %s", pkgid)
-        with _yum_lock:
-            self._yum.tsInfo.deselect(pkgid)
-
-    ###
-    ### METHODS FOR QUERYING STATE
-    ###
-    @property
-    def spaceRequired(self):
-        """ The total disk space (Size) required for the current selection. """
-        return self._space_required
-
-    def calculateSpaceNeeds(self):
-        # XXX this will only be useful if you've run checkSoftwareSelection
-        total = 0
-        with _yum_lock:
-            for txmbr in self._yum.tsInfo.getMembers():
-                total += getattr(txmbr.po, "installedsize", 0)
-
-        total += total * 0.35   # add 35% to account for the fact that the above
-                                # method is laughably inaccurate
-        self._space_required = Size(total)
-
-        return self._space_required
-
-    ###
-    ### METHODS FOR INSTALLING THE PAYLOAD
-    ###
-    def _removeTxSaveFile(self):
-        # remove the transaction save file
-        with _yum_lock:
-            if self._yum._ts_save_file:
-                try:
-                    os.unlink(self._yum._ts_save_file)
-                except (OSError, IOError):
-                    pass
-                else:
-                    self._yum._ts_save_file = None
-
-    def _handleMissing(self, exn):
-        if self.data.packages.handleMissing == KS_MISSING_IGNORE:
-            return
-
-        # If we're doing non-interactive ks install, raise CmdlineError,
-        # otherwise the system will just reboot automatically
-        if flags.automatedInstall and not flags.ksprompt:
-            errtxt = _("CmdlineError: Missing package: %s") % str(exn)
-            log.error(errtxt)
-            raise CmdlineError(errtxt)
-        elif errorHandler.cb(exn) == ERROR_RAISE:
-            # The progress bar polls kind of slowly, thus installation could
-            # still continue for a bit before the quit message is processed.
-            # Let's sleep forever to prevent any further actions and wait for
-            # the main thread to quit the process.
-            progressQ.send_quit(1)
-            while True:
-                time.sleep(100000)
-
-    def _applyYumSelections(self):
-        """ Apply the selections in ksdata to yum.
-
-            This follows the same ordering/pattern as kickstart.py.
-        """
-        if self.data.packages.nocore:
-            log.info("skipping core group due to %%packages --nocore; system may not be complete")
-        else:
-            self._selectYumGroup("core")
-
-        env = None
-
-        if self.data.packages.default and self.environments:
-            env = self.environments[0]
-        elif self.data.packages.environment:
-            env = self.data.packages.environment
-
-        if env:
-            try:
-                self.selectEnvironment(env)
-            except NoSuchGroup as e:
-                self._handleMissing(e)
-
-        for group in self.data.packages.groupList:
-            default = False
-            optional = False
-            if group.include == GROUP_DEFAULT:
-                default = True
-            elif group.include == GROUP_ALL:
-                default = True
-                optional = True
-
-            try:
-                self._selectYumGroup(group.name, default=default, optional=optional)
-            except NoSuchGroup as e:
-                self._handleMissing(e)
-
-        for group in self.data.packages.excludedGroupList:
-            try:
-                self._deselectYumGroup(group.name)
-            except NoSuchGroup as e:
-                self._handleMissing(e)
-
-        for package in self.data.packages.packageList:
-            try:
-                self._selectYumPackage(package)
-            except NoSuchPackage as e:
-                self._handleMissing(e)
-
-        for package in self.data.packages.excludedList:
-            self._deselectYumPackage(package)
-
-        self._select_kernel_package()
-        self.selectRequiredPackages()
-
-    def checkSoftwareSelection(self):
-        log.info("checking software selection")
-        self.txID = time.time()
-
-        self.release()
-        self.deleteYumTS()
-
-        self._applyYumSelections()
-
-        with _yum_lock:
-            # doPostSelection
-            # select kernel packages
-            # select packages needed for storage, bootloader
-
-            # check dependencies
-            log.info("checking dependencies")
-            (code, msgs) = self._yum.buildTransaction(unfinished_transactions_check=False)
-            log.debug("buildTransaction = (%s, %s)", code, msgs)
-            self._removeTxSaveFile()
-            if code == 0:
-                # empty transaction?
-                log.debug("empty transaction")
-            elif code == 2:
-                # success
-                log.debug("success")
-            else:
-                for msg in msgs:
-                    log.warning(msg)
-
-                raise DependencyError(msgs)
-
-        self.calculateSpaceNeeds()
-        with _yum_lock:
-            log.info("%d packages selected totalling %s",
-                     len(self._yum.tsInfo.getMembers()), self.spaceRequired)
-
-    def _select_kernel_package(self):
-        kernels = self.kernelPackages
-        selected = None
-        # XXX This is optimistic. I'm curious if yum will DTRT if I just say
-        #     "select this kernel" without jumping through hoops to figure out
-        #     which arch it should use.
-        for kernel in kernels:
-            try:
-                # XXX might need explicit arch specification
-                self._selectYumPackage(kernel)
-            except NoSuchPackage:
-                log.info("no %s package", kernel)
-                continue
-            else:
-                log.info("selected %s", kernel)
-                selected = kernel
-                # select module packages for this kernel
-
-                # select the devel package if gcc will be installed
-                with _yum_lock:
-                    if self._yum.tsInfo.matchNaevr(name="gcc"):
-                        log.info("selecting %s-devel", kernel)
-                        # XXX might need explicit arch specification
-                        self._selectYumPackage("%s-devel" % kernel)
-                break
-
-        if not selected:
-            log.error("failed to select a kernel from %s", kernels)
-
-    def selectRequiredPackages(self):
-        try:
-            for package in self.requiredPackages:
-                self._selectYumPackage(package, required=True)
-
-            for group in self.requiredGroups:
-                self._selectYumGroup(group, required=True)
-        except (NoSuchPackage, NoSuchGroup) as e:
-            self._handleMissing(e)
-
-    def preInstall(self, packages=None, groups=None):
-        """ Perform pre-installation tasks. """
-        super(YumPayload, self).preInstall(packages, groups)
-        progressQ.send_message(_("Starting package installation process"))
-
-        self.requiredPackages = ["yum"]
-        if packages:
-            self.requiredPackages += packages
-        self.requiredGroups = groups
-
-        self.addDriverRepos()
-
-        if self.install_device:
-            self._setupMedia(self.install_device)
-
-        with _yum_lock:
-            self._writeInstallConfig()
-
-        # We have this block twice.  For kickstart installs, this is the only
-        # place dependencies will be checked.  If a dependency error is hit
-        # here, there's nothing the user can do about it since you cannot go
-        # back to the first hub.
-        try:
-            self.checkSoftwareSelection()
-        except DependencyError as e:
-            if errorHandler.cb(e) == ERROR_RAISE:
-                progressQ.send_quit(1)
-                while True:
-                    time.sleep(100000)
-
-
-    def install(self):
-        """ Install the payload.
-
-            This writes out the yum transaction and then uses a Process thread
-            to execute it in a totally separate process.
-
-            It monitors the status of the install and logs debug info, updates
-            the progress meter and cleans up when it is done.
-        """
-        progress_map = {
-            "PROGRESS_PREP"    : _("Preparing transaction from installation source"),
-            "PROGRESS_INSTALL" : _("Installing"),
-            "PROGRESS_POST"    : _("Performing post-installation setup tasks")
-        }
-
-        ts_file = iutil.getSysroot()+"/anaconda-yum.yumtx"
-        with _yum_lock:
-            # Save the transaction, this will be loaded and executed by the new
-            # process.
-            self._yum.save_ts(ts_file)
-
-            # Try and clean up yum before the fork
-            self.release()
-            self.deleteYumTS()
-            self._yum.close()
-
-        script_log = "/tmp/rpm-script.log"
-        release = self._getReleaseVersion(None)
-
-        args = ["--config", "/tmp/anaconda-yum.conf",
-                "--tsfile", ts_file,
-                "--rpmlog", script_log,
-                "--installroot", iutil.getSysroot(),
-                "--release", release,
-                "--arch", blivet.arch.getArch()]
-
-        for macro in self.rpmMacros:
-            args.extend(["--macro", macro[0], macro[1]])
-
-        log.info("Running anaconda-yum to install packages")
-        # Watch output for progress, debug and error information
-        install_errors = []
-        prev = 0
-        try:
-            for line in execReadlines("/usr/libexec/anaconda/anaconda-yum", args):
-                if line.startswith("PROGRESS_"):
-                    key, text = line.split(":", 1)
-                    msg = progress_map[key] + text
-                    progressQ.send_message(msg)
-                    log.debug(msg)
-                elif line.startswith("PERCENT:"):
-                    _key, pct = line.split(":", 1)
-
-                    if float(pct) // 10 > prev // 10:
-                        progressQ.send_step()
-                        prev = float(pct)
-                elif line.startswith("DEBUG:"):
-                    log.debug(line[6:])
-                elif line.startswith("INFO:"):
-                    log.info(line[5:])
-                elif line.startswith("WARN:"):
-                    log.warn(line[5:])
-                elif line.startswith("ERROR:"):
-                    log.error(line[6:])
-                    install_errors.append(line[6:])
-                else:
-                    log.debug(line)
-        except IOError as e:
-            log.error("Error running anaconda-yum: %s", e)
-            exn = PayloadInstallError(str(e))
-            if errorHandler.cb(exn) == ERROR_RAISE:
-                progressQ.send_quit(1)
-                iutil.ipmi_report(IPMI_ABORTED)
-                sys.exit(1)
-        finally:
-            # log the contents of the scriptlet logfile if any
-            if os.path.exists(script_log):
-                log.info("==== start rpm scriptlet logs ====")
-                with open(script_log) as f:
-                    for l in f:
-                        log.info(l)
-                log.info("==== end rpm scriptlet logs ====")
-                os.unlink(script_log)
-
-        if install_errors:
-            exn = PayloadInstallError("\n".join(install_errors))
-            if errorHandler.cb(exn) == ERROR_RAISE:
-                progressQ.send_quit(1)
-                iutil.ipmi_report(IPMI_ABORTED)
-                sys.exit(1)
-
-    def writeMultiLibConfig(self):
-        if not self.data.packages.multiLib:
-            return
-
-        # write out the yum config with the new multilib_policy value
-        # FIXME: switch to using yum-config-manager once it stops expanding
-        #        all yumvars and writing out the expanded pairs to the conf
-        yb = yum.YumBase()
-        yum_conf_path = "/etc/yum.conf"
-        # pylint: disable=bad-preconf-access
-        yb.preconf.fn = iutil.getSysroot() + yum_conf_path
-        yb.conf.multilib_policy = "all"
-
-        # this will appear in yum.conf, which is silly
-        yb.conf.config_file_path = yum_conf_path
-
-        # hack around yum having expanded $basearch in the cachedir value
-        cachedir = yb.conf.cachedir.replace("/%s/" % yb.arch.basearch,
-                                            "/$basearch/")
-        yb.conf.cachedir = cachedir
-        yum_conf = iutil.getSysroot() + yum_conf_path
-        if os.path.exists(yum_conf):
-            try:
-                os.rename(yum_conf, yum_conf + ".anacbak")
-            except OSError as e:
-                log.error("failed to back up yum.conf: %s", e)
-
-        try:
-            yb.conf.write(open(yum_conf, "w"))
-        except IOError as e:
-            log.error("failed to write out yum.conf: %s", e)
-
-    def postInstall(self):
-        """ Perform post-installation tasks. """
-        with _yum_lock:
-            # clean up repo tmpdirs
-            self._yum.cleanPackages()
-            self._yum.cleanHeaders()
-
-            # remove cache dirs of install-specific repos
-            for repo in self._yum.repos.listEnabled():
-                if repo.name == BASE_REPO_NAME or repo.id.startswith("anaconda-"):
-                    shutil.rmtree(repo.cachedir)
-
-        self._removeTxSaveFile()
-
-        self.writeMultiLibConfig()
-        self._copyLangpacksConfigToTarget()
-
-        # Write selected kickstart repos to target system
-        for ks_repo in (ks for ks in (self.getAddOnRepo(r) for r in self.addOns) if ks.install):
-            try:
-                repo = self.getRepo(ks_repo.name)
-                if not repo:
-                    continue
-            except RepoError:
-                continue
-            repo_path = iutil.getSysroot() + YUM_REPOS_DIR + "%s.repo" % repo.id
-            try:
-                log.info("Writing %s.repo to target system.", repo.id)
-                self._writeYumRepo(repo, repo_path)
-            except PayloadSetupError as e:
-                log.error(e)
-
-        super(YumPayload, self).postInstall()
-
-        # Make sure yum is really done and gone and lets go of the yum.log
-        self._yum.close()
-        del self._yum
diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py
index c140347..a52b22c 100644
--- a/pyanaconda/ui/gui/spokes/source.py
+++ b/pyanaconda/ui/gui/spokes/source.py
@@ -432,7 +432,7 @@ class SourceSpoke(NormalSpoke, GUISpokeInputCheckHandler):
             if url == "":
                 return False
 
-            # Make sure the URL starts with the protocol.  yum will want that
+            # Make sure the URL starts with the protocol.  dnf will want that
             # to know how to fetch, and the refresh method needs that to know
             # which element of the combo to default to should this spoke be
             # revisited.
@@ -1142,13 +1142,15 @@ class SourceSpoke(NormalSpoke, GUISpokeInputCheckHandler):
         # Remove repos from payload that were removed in the UI
         for repo_name in [r for r in self.payload.addOns if r not in ui_orig_names]:
             repo = self.payload.getAddOnRepo(repo_name)
-            # TODO: Need an API to do this w/o touching yum (not addRepo)
+            # TODO: Need an API to do this w/o touching dnf (not addRepo)
+            # FIXME: Is this still needed for dnf?
             self.payload.data.repo.dataList().remove(repo)
             changed = True
 
         for repo, orig_repo in [(r[REPO_OBJ], self.payload.getAddOnRepo(r[REPO_OBJ].orig_name)) for r in self._repoStore]:
             if not orig_repo:
-                # TODO: Need an API to do this w/o touching yum (not addRepo)
+                # TODO: Need an API to do this w/o touching dnf (not addRepo)
+                # FIXME: Is this still needed for dnf?
                 self.payload.data.repo.dataList().append(repo)
                 changed = True
             elif not cmp_obj_attrs(orig_repo, repo, REPO_ATTRS):
diff --git a/pyanaconda/ui/tui/__init__.py b/pyanaconda/ui/tui/__init__.py
index 9b6d2c1..8b325cb 100644
--- a/pyanaconda/ui/tui/__init__.py
+++ b/pyanaconda/ui/tui/__init__.py
@@ -68,7 +68,7 @@ class TextUserInterface(ui.UserInterface):
         :param storage: storage backend reference
         :type storage: instance of pyanaconda.Storage
 
-        :param payload: payload (usually yum) reference
+        :param payload: payload (usually dnf) reference
         :type payload: instance of payload handler
 
         :param instclass: install class reference
diff --git a/pyanaconda/ui/tui/spokes/software.py b/pyanaconda/ui/tui/spokes/software.py
index 7657648..8117679 100644
--- a/pyanaconda/ui/tui/spokes/software.py
+++ b/pyanaconda/ui/tui/spokes/software.py
@@ -256,5 +256,5 @@ class SoftwareSpoke(NormalTUISpoke):
 
     @property
     def txid_valid(self):
-        """ Whether we have a valid yum tx id. """
+        """ Whether we have a valid dnf tx id. """
         return self._tx_id == self.payload.txID
diff --git a/pyanaconda/ui/tui/spokes/source.py b/pyanaconda/ui/tui/spokes/source.py
index 970a77d..4ae6a66 100644
--- a/pyanaconda/ui/tui/spokes/source.py
+++ b/pyanaconda/ui/tui/spokes/source.py
@@ -497,6 +497,6 @@ class SelectISOSpoke(NormalTUISpoke, SourceSwitchHandler):
 
         if self._current_iso_path:
             self.set_source_hdd_iso(self._device, self._current_iso_path)
-        # unmount the device - the (YUM) payload will remount it anyway
+        # unmount the device - the payload will remount it anyway
         # (if it uses it)
         self._unmount_device()
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 61df441..20d3dbd 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -18,7 +18,7 @@
 # Author: David Cantrell <dcantrell at redhat.com>
 
 scriptsdir = $(libexecdir)/$(PACKAGE_NAME)
-dist_scripts_SCRIPTS = upd-updates run-anaconda anaconda-yum zramswapon zramswapoff zram-stats
+dist_scripts_SCRIPTS = upd-updates run-anaconda zramswapon zramswapoff zram-stats
 dist_noinst_SCRIPTS  = upd-kernel makeupdates
 
 dist_bin_SCRIPTS = analog anaconda-cleanup instperf anaconda-disable-nm-ibft-plugin
diff --git a/scripts/anaconda-yum b/scripts/anaconda-yum
deleted file mode 100755
index 8cc4d8b..0000000
--- a/scripts/anaconda-yum
+++ /dev/null
@@ -1,418 +0,0 @@
-#!/usr/bin/python2
-# pylint: disable=bad-preconf-access
-#
-# Copyright (C) 2013  Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use,
-# modify, copy, or redistribute it subject to the terms and conditions of
-# the GNU General Public License v.2, or (at your option) any later version.
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY expressed or implied, including the implied warranties of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
-# Public License for more details.  You should have received a copy of the
-# GNU General Public License along with this program; if not, write to the
-# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.  Any Red Hat trademarks that are incorporated in the
-# source code or documentation are not subject to the GNU General Public
-# License and may only be used or replicated with the express permission of
-# Red Hat, Inc.
-#
-# Red Hat Author(s): Brian C. Lane <bcl at redhat.com>
-#
-import os
-import sys
-import argparse
-import time
-import rpm
-import rpmUtils
-import yum
-from urlgrabber.grabber import URLGrabError
-from pyanaconda.iutil import xprogressive_delay, eintr_retry_call
-
-YUM_PLUGINS = ["fastestmirror", "langpacks"]
-
-MAX_DOWNLOAD_RETRIES = 10
-
-def setup_parser():
-    """ Setup argparse with supported arguments
-
-        :rtype: ArgumentParser
-    """
-    parser = argparse.ArgumentParser(description="anaconda-yum")
-    parser.add_argument("-a", "--arch", required=True, help="Arch to install")
-    parser.add_argument("-c", "--config", help="Path to yum config file", default="/tmp/anaconda-yum.conf")
-    parser.add_argument("-t", "--tsfile", required=True, help="Path to yum transaction file")
-    parser.add_argument("-l", "--rpmlog", help="Path to rpm script logfile", default="/tmp/rpm-script.log")
-    parser.add_argument("-r", "--release", required=True, help="Release version")
-    parser.add_argument("-i", "--installroot", help="Path to top directory of installroot", default="/mnt/sysimage")
-    parser.add_argument("-T", "--test", action="store_true", help="Test transaction, don't actually install")
-    parser.add_argument("-d", "--debug", action="store_true", help="Extra debugging output")
-    parser.add_argument("-m", "--macro", action="append", metavar=('NAME', 'VALUE'), nargs=2, help="Macros to add to the rpm transaction")
-
-    return parser
-
-
-def run_yum_transaction(release, arch, yum_conf, install_root, ts_file, script_log,
-                        testing=False, debug=False, macros=None):
-    """ Execute a yum transaction loaded from a transaction file
-
-        :param release: The release version to use
-        :type release: string
-        :param arch: The arch to install
-        :type arch: string
-        :param yum_conf: Path to yum config file to use
-        :type yum_conf: string
-        :param install_root: Path to install root
-        :type install_root: string
-        :param ts_file: Path to yum transaction file to load and execute
-        :type ts_file: string
-        :param script_log: Path to file to store rpm script logs in
-        :type script_log: string
-        :param testing: True sets RPMTRANS_FLAG_TEST (default is false)
-        :type testing: bool
-        :param debug: True set verbosity to "debug"
-        :type debug: bool
-        :param macros: Macros to define in the rpm transaction
-        :type macros: list
-        :returns: Nothing
-
-        This is used to run the yum transaction in a separate process, preventing
-        problems with threads and rpm chrooting during the install.
-    """
-    from yum.Errors import PackageSackError, RepoError, YumBaseError, YumRPMTransError
-
-    # remove some environmental variables that can cause problems with package scripts
-    # pylint: disable=environment-modify
-    env_remove = ('DISPLAY', 'DBUS_SESSION_BUS_ADDRESS')
-    for k in env_remove:
-        if k in os.environ:
-            os.environ.pop(k)
-
-    # Initialize the rpm macros
-    if macros:
-        for macro in macros:
-            rpm.addMacro(macro[0], macro[1])
-
-    try:
-        # Setup the basics, point to the config file and install_root
-        yb = yum.YumBase()
-        yb.use_txmbr_in_callback = True
-
-        # Set some configuration parameters that don't get set through a config
-        # file.  yum will know what to do with these.
-        # Enable all types of yum plugins. We're somewhat careful about what
-        # plugins we put in the environment.
-        yb.preconf.plugin_types = yum.plugins.ALL_TYPES
-        yb.preconf.enabled_plugins = YUM_PLUGINS
-        yb.preconf.fn = yum_conf
-        yb.preconf.root = install_root
-        yb.preconf.releasever = release
-
-        if debug:
-            yb.preconf.debuglevel = 10
-            yb.preconf.errorlevel = 10
-            yb.preconf.rpmverbosity = "debug"
-
-        # Setup yum cache dir outside the installroot
-        if yb.conf.cachedir.startswith(yb.conf.installroot):
-            root = yb.conf.installroot
-            yb.conf.cachedir = yb.conf.cachedir[len(root):]
-
-        # Load the transaction file and execute it
-        yb.load_ts(ts_file)
-        yb.initActionTs()
-
-        if rpmUtils and rpmUtils.arch.isMultiLibArch():
-            yb.ts.ts.setColor(3)
-
-        print("INFO: populate transaction set")
-        xdelay = xprogressive_delay()
-
-        for retry_count in range(0, MAX_DOWNLOAD_RETRIES+1):
-            # retry count == 0 -> first attempt
-            # retry count > 0  -> retry
-            if retry_count:
-                # retry after waiting a bit
-                time.sleep(next(xdelay))
-                print("PROGRESS_INSTALL: error populating transaction, retrying (%d/%d)"
-                      % (retry_count, MAX_DOWNLOAD_RETRIES))
-            try:
-                # uses dsCallback.transactionPopulation
-                yb.populateTs(keepold=0)
-                break
-            except RepoError as e:
-                continue
-        else:
-            # else = no break called = no successful attempt
-            print("ERROR: error populating transaction after %d retries: %s"
-                  % (retry_count, e))
-            # we don't need to print "QUIT:" there, the finally clause
-            # of the toplevel try-block will do that for us
-            return
-
-        print("INFO: check transaction set")
-        yb.ts.check()
-        print("INFO: order transaction set")
-        yb.ts.order()
-        yb.ts.clean()
-
-        # Write scriptlet output to a file to be logged later
-        logfile = eintr_retry_call(os.open, script_log, os.O_WRONLY|os.O_CREAT)
-        yb.ts.ts.scriptFd = logfile
-        rpm.setLogFile(logfile)
-
-        # create the install callback
-        rpmcb = RPMCallback(yb, arch, logfile, debug)
-
-        if testing:
-            yb.ts.setFlags(rpm.RPMTRANS_FLAG_TEST)
-
-        print("INFO: running transaction")
-        try:
-            yb.runTransaction(cb=rpmcb)
-        except PackageSackError as e:
-            print("ERROR: PackageSackError: %s" % e)
-        except YumRPMTransError as e:
-            print("ERROR: YumRPMTransError: %s" % e)
-            for error in e.errors:
-                print("ERROR:    %s" % error[0])
-        except YumBaseError as e:
-            print("ERROR: YumBaseError: %s" % e)
-            for error in e.errors:
-                print("ERROR:    %s" % error)
-        else:
-            print("INFO: transaction complete")
-        finally:
-            yb.ts.close()
-            eintr_retry_call(os.close, logfile)
-    except YumBaseError as e:
-        print("ERROR: transaction error: %s" % e)
-    finally:
-        print("QUIT:")
-
-
-class RPMCallback(object):
-    """ Custom RPMTransaction Callback class. You need one of these to actually
-        make a transaction work.
-        If you subclass it, make sure you preserve the behavior of
-        inst_open_file and inst_close_file, or nothing will actually happen.
-    """
-    callback_map = dict((rpm.__dict__[k], k[12:].lower())
-                         for k in rpm.__dict__
-                         if k.startswith('RPMCALLBACK_'))
-
-    def callback(self, what, amount, total, key, data):
-        """ Handle calling appropriate method, if it exists.
-        """
-        if what not in self.callback_map:
-            print("DEBUG: Ignoring unknown callback number %i", what)
-            return
-        name = self.callback_map[what]
-        func = getattr(self, name, None)
-        if callable(func):
-            return func(amount, total, key, data)
-
-    def __init__(self, yb, arch, log, debug=False):
-        """ :param yb: YumBase object
-            :type yb: YumBase
-            :param log: file-descriptor of script logfile
-            :type log: int
-            :param statusQ: status communication back to other process
-            :type statusQ: Queue
-        """
-        self.yb = yb                # yum.YumBase
-        self.base_arch = arch
-        self.install_log = log      # fd of logfile for yum script logs
-        self.debug = debug
-
-        self.package_file = None    # file instance (package file management)
-        self.total_actions = 0
-        self.completed_actions = None   # will be set to 0 when starting tx
-
-    def _get_txmbr(self, key):
-        """ Return a (name, TransactionMember) tuple from cb key. """
-        if hasattr(key, "po"):
-            # New-style callback, key is a TransactionMember
-            txmbr = key
-            name = key.name
-        else:
-            # cleanup/remove error
-            name = key
-            txmbr = None
-
-        return (name, txmbr)
-
-    def trans_start(self, amount, total, key, data):
-        """ Start of the install transaction
-
-            Reset the actions counter and save the total to be completed.
-        """
-        if amount == 6:
-            print("PROGRESS_PREP:")
-        self.total_actions = total
-        self.completed_actions = 0
-
-    def inst_open_file(self, amount, total, key, data):
-        """ Open a file for installation
-
-            :returns: open file descriptor
-            :rtype: int
-        """
-        txmbr = self._get_txmbr(key)[1]
-        if self.debug:
-            print("DEBUG: txmbr = %s" % txmbr)
-
-        # If self.completed_actions is still None, that means this package
-        # is being opened to retrieve a %pretrans script. Don't log that
-        # we're installing the package unless trans_start() has been called.
-        if self.completed_actions is not None:
-            self.completed_actions += 1
-            msg_format = "%s (%d/%d)"
-            progress_package = txmbr.name
-            if txmbr.arch not in ["noarch", self.base_arch]:
-                progress_package = "%s.%s" % (txmbr.name, txmbr.arch)
-
-            progress_msg =  msg_format % (progress_package,
-                                          self.completed_actions,
-                                          self.total_actions)
-            log_msg = msg_format % (txmbr.po,
-                                    self.completed_actions,
-                                    self.total_actions)
-            eintr_retry_call(os.write, self.install_log, log_msg+"\n")
-            print("PROGRESS_INSTALL: %s" % progress_msg)
-
-        try:
-            repo = self.yb.repos.getRepo(txmbr.po.repoid)
-        except yum.Errors.RepoError as e:
-            print("ERROR: getRepo failed: %s" % e)
-            raise Exception("rpmcallback getRepo failed")
-
-        self.package_file = None
-        retry_message = ""
-        error_message = ""
-        exception_message = ""
-        xdelay = xprogressive_delay()
-
-        for retry_count in range(0, MAX_DOWNLOAD_RETRIES+1):
-            # retry count == 0 -> first attempt
-            # retry count > 0  -> retry
-            if retry_count and retry_message:
-                time.sleep(next(xdelay))  # wait a bit before retry
-                print("PROGRESS_INSTALL: %s (%d/%d)" % (retry_message, retry_count, MAX_DOWNLOAD_RETRIES))
-
-            try:
-                # checkfunc gets passed to yum's use of URLGrabber which
-                # then calls it with the file being fetched. verifyPkg
-                # makes sure the checksum matches the one in the metadata.
-                #
-                # From the URLGrab documents:
-                # checkfunc=(function, ('arg1', 2), {'kwarg': 3})
-                # results in a callback like:
-                #   function(obj, 'arg1', 2, kwarg=3)
-                #     obj.filename = '/tmp/stuff'
-                #     obj.url = 'http://foo.com/stuff'
-                checkfunc = (self.yb.verifyPkg, (txmbr.po, 1), {})
-                if self.debug:
-                    print("DEBUG: getPackage %s" % txmbr.name)
-                package_path = repo.getPackage(txmbr.po, checkfunc=checkfunc)
-                break
-            except URLGrabError as e:
-                if retry_count < MAX_DOWNLOAD_RETRIES:
-                    retry_message = "rpmcallback failed (URLGrabError), retrying"
-                else:
-                    # run out of retries
-                    error_message = "rpmcallback failed (URLGrabError) after %d retries: %s" % \
-                                    (retry_count, e)
-                    exception_message = "rpmcallback failed"
-
-            except (yum.Errors.NoMoreMirrorsRepoError, IOError) as e:
-                # for some reason, this is the exception you will get if
-                # the package file you want to download vanishes, not URLGrabError
-
-                if retry_count < MAX_DOWNLOAD_RETRIES:
-                    retry_message = "retrying download of %s" % txmbr.po
-                    # remove any unfinished downloads of this package
-                    if os.path.exists(txmbr.po.localPkg()):
-                        os.unlink(txmbr.po.localPkg())
-                else:
-                    # run out of retries
-                    error_message = "getPackage error after %d retries: %s" % \
-                                    (retry_count, e)
-                    exception_message = "getPackage failed"
-
-            except yum.Errors.RepoError as e:
-                if retry_count < MAX_DOWNLOAD_RETRIES:
-                    retry_message = "RepoError, retrying: %s" % e
-                else:
-                    # run out of retries
-                    error_message = "RepoError after %d retries: %s" % \
-                                    (retry_count, e)
-                    exception_message = "too many (%d) consecutive repo errors" % \
-                                        retry_count
-
-        else:  # report what went wrong & abort installation
-            print("ERROR: %s" % error_message)
-            raise Exception(exception_message)
-
-        # if we got this far, there should be a package available
-        self.package_file = open(package_path)
-
-        if self.debug:
-            print("DEBUG: opening package %s" % self.package_file.name)
-        return self.package_file.fileno()
-
-    def inst_close_file(self, amount, total, key, data):
-        """ close and remove the file
-
-            Update the count of installed packages
-        """
-        package_path = self.package_file.name
-        self.package_file.close()
-        self.package_file = None
-
-        if package_path.startswith(self.yb.conf.cachedir):
-            try:
-                os.unlink(package_path)
-            except OSError as e:
-                print("WARN: unable to remove file %s" % e.strerror)
-
-        # rpm doesn't tell us when it's started post-trans stuff which can
-        # take a very long time.  So when it closes the last package, just
-        # display the message.
-        if self.completed_actions == self.total_actions:
-            print("PROGRESS_POST:")
-        elif self.completed_actions is not None and self.total_actions is not None:
-            pct = 100 * (self.completed_actions / float(self.total_actions))
-            print("PERCENT: %f" % pct)
-
-    def cpio_error(self, amount, total, key, data):
-        name = self._get_txmbr(key)[0]
-        print("ERROR: cpio error with package %s" % name)
-        raise Exception("cpio error")
-
-    def unpack_error(self, amount, total, key, data):
-        name = self._get_txmbr(key)[0]
-        print("ERROR: unpack error with package %s" % name)
-        raise Exception("unpack error")
-
-    def script_error(self, amount, total, key, data):
-        name = self._get_txmbr(key)[0]
-        # Script errors store whether or not they're fatal in "total".
-        if total:
-            print("ERROR: script error with package %s" % name)
-            raise Exception("script error")
-
-
-if __name__ == "__main__":
-    try:
-        arg_parser = setup_parser()
-        args = arg_parser.parse_args()
-
-        # force output to be flushed
-        sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0)
-
-        run_yum_transaction(args.release, args.arch, args.config, args.installroot,
-                            args.tsfile, args.rpmlog, args.test, args.debug, args.macro)
-        # pylint: disable=broad-except
-    except Exception as e:
-        print("ERROR: unexpected error: %s" % e)
diff --git a/scripts/githooks/commit-msg b/scripts/githooks/commit-msg
index 8fa2f8d..7682d47 100755
--- a/scripts/githooks/commit-msg
+++ b/scripts/githooks/commit-msg
@@ -51,7 +51,7 @@ fi
 
 ${bzcmd} >/dev/null 2>&1
 if [ $? -eq 127 ]; then
-    echo "*** 'yum install python-bugzilla' to validate bug references." >&2
+    echo "*** 'dnf install python-bugzilla' to validate bug references." >&2
 
     msg="$(mktemp $(pwd)/commit.msg.XXXXXXXXXX)"
     cp "${1}" "${msg}"
diff --git a/scripts/githooks/pre-push b/scripts/githooks/pre-push
index ca84b53..e22d56f 100755
--- a/scripts/githooks/pre-push
+++ b/scripts/githooks/pre-push
@@ -64,7 +64,7 @@ fi
 
 ${bzcmd} >/dev/null 2>&1
 if [ $? -eq 127 ]; then
-    echo "*** 'yum install python-bugzilla' to validate bug references."
+    echo "*** 'dnf install python-bugzilla' to validate bug references."
 
     msg="$(mktemp $(pwd)/commit.msg.XXXXXXXXXX)"
     cp "${1}" "${msg}"
diff --git a/scripts/makeupdates b/scripts/makeupdates
index 7eff938..575a1be 100755
--- a/scripts/makeupdates
+++ b/scripts/makeupdates
@@ -339,7 +339,7 @@ def copyUpdatedFiles(tag, updates, cwd, builddir):
         elif gitfile.startswith("data/post-scripts/"):
             install_to_dir(gitfile, "usr/share/anaconda/post-scripts")
         elif any(gitfile.endswith(libexec_script) for libexec_script in \
-                 ("anaconda-yum", "zramswapon", "zramswapoff", "zram-stats")):
+                 ("zramswapon", "zramswapoff", "zram-stats")):
             install_to_dir(gitfile, "usr/libexec/anaconda")
         elif gitfile.endswith("AnacondaWidgets.py"):
             import gi
diff --git a/scripts/zramswapon b/scripts/zramswapon
index a415a07..63dd3c6 100755
--- a/scripts/zramswapon
+++ b/scripts/zramswapon
@@ -54,7 +54,7 @@ swapon -p 100 /dev/zram0
 
 if [ $mem_total_kb -le "1048576" ]; then
     # less than 1 GB or RAM -> less than 512 MB /tmp (tmpfs defaults to
-    # 0.5*RAM), bump up the /tmp's size, yum may need it
+    # 0.5*RAM), bump up the /tmp's size, dnf may need it
     mount -o remount,size=512M /tmp
 fi
 
diff --git a/tests/install/run_install_test.sh b/tests/install/run_install_test.sh
index e137953..782ade6 100755
--- a/tests/install/run_install_test.sh
+++ b/tests/install/run_install_test.sh
@@ -18,7 +18,7 @@
 #
 # Red Hat Author(s): Chris Lumens <clumens at redhat.com>
 
-# Have to be root to run this test, as yum is stupid.
+# Have to be root to run this test.
 if [ ${EUID} != 0 ]; then
    exit 77
 fi
@@ -54,12 +54,12 @@ enabled=1
 gpgcheck=0
 EOF
 
-yum install -y -c ${tmpdir}/yum.conf --installroot=${tmpdir} --releasever=rawhide \
+dnf install -y -c ${tmpdir}/yum.conf --installroot=${tmpdir} --releasever=rawhide \
             --disablerepo=\* --enablerepo=anaconda --enablerepo=anaconda-rawhide \
             anaconda
 status=$?
 
-# yum's return value is not especially helpful (it can return 0 even on error)
+# dnf's return value is not especially helpful (it can return 0 even on error)
 # but just in case it told us it failed, exit out here.
 if [ $? != 0 ]; then
     rm -r ${tmpdir}
diff --git a/tests/kickstart_tests/basic-ftp-yum.ks b/tests/kickstart_tests/basic-ftp-yum.ks
deleted file mode 100644
index 9d1ebc7..0000000
--- a/tests/kickstart_tests/basic-ftp-yum.ks
+++ /dev/null
@@ -1,24 +0,0 @@
-url --url=ftp://mirror.utexas.edu/pub/fedora/linux/development/$releasever/$basearch/os/
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all
-part --fstype=ext4 --size=4400 /
-part --fstype=ext4 --size=500 /boot
-part --fstype=swap --size=500 swap
-
-keyboard us
-lang en
-timezone America/New_York
-rootpw qweqwe
-shutdown
-
-%packages
-%end
-
-%post
-# If we made it post, that's good enough
-echo SUCCESS > /root/RESULT
-%end
diff --git a/tests/kickstart_tests/basic-ftp-yum.sh b/tests/kickstart_tests/basic-ftp-yum.sh
deleted file mode 100755
index d3a484f..0000000
--- a/tests/kickstart_tests/basic-ftp-yum.sh
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/bash
-#
-# Copyright (C) 2015  Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use,
-# modify, copy, or redistribute it subject to the terms and conditions of
-# the GNU General Public License v.2, or (at your option) any later version.
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY expressed or implied, including the implied warranties of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
-# Public License for more details.  You should have received a copy of the
-# GNU General Public License along with this program; if not, write to the
-# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.  Any Red Hat trademarks that are incorporated in the
-# source code or documentation are not subject to the GNU General Public
-# License and may only be used or replicated with the express permission of
-# Red Hat, Inc.
-#
-# Red Hat Author(s): David Shea <dshea at redhat.com>
-
-kernel_args() {
-    echo vnc inst.nodnf
-}
-
-prepare() {
-    ks=$1
-    tmpdir=$2
-
-    echo ${ks}
-}
-
-validate() {
-    img=$1
-
-    # There should be a /root/RESULT file with results in it.  Check
-    # its contents and decide whether the test finally succeeded or
-    # not.
-    result=$(virt-cat -a ${img} -m /dev/sda2 /root/RESULT)
-    if [[ $? != 0 ]]; then
-        status=1
-        echo '*** /root/RESULT does not exist in VM image.'
-    elif [[ "${result}" != "SUCCESS" ]]; then
-        status=1
-        echo "${result}"
-    fi
-
-    return ${status}
-}
diff --git a/tests/kickstart_tests/groups-and-envs-yum-1.ks b/tests/kickstart_tests/groups-and-envs-yum-1.ks
deleted file mode 100644
index 3ff575d..0000000
--- a/tests/kickstart_tests/groups-and-envs-yum-1.ks
+++ /dev/null
@@ -1,38 +0,0 @@
-url --url=http://dl.fedoraproject.org/pub/fedora/linux/development/$releasever/$basearch/os/
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all
-part --fstype=ext4 --size=4400 /
-part --fstype=ext4 --size=500 /boot
-part --fstype=swap --size=500 swap
-
-keyboard us
-lang en
-timezone America/New_York
-rootpw qweqwe
-shutdown
-
-%packages
- at core
- at c-development
-@^web-server-environment
-%end
-
-%post
-# We don't have a way of determining if a group/env is installed or not.
-# These sentinel packages will have to do.
-rpm -q httpd
-if [[ $? != 0 ]]; then
-    echo '*** web-server-environment was not installed' > /root/RESULT
-else
-    rpm -q gcc
-    if [[ $? != 0 ]]; then
-        echo '*** c-development was not installed' > /root/RESULT
-    else
-        echo SUCCESS > /root/RESULT
-    fi
-fi
-%end
diff --git a/tests/kickstart_tests/groups-and-envs-yum-1.sh b/tests/kickstart_tests/groups-and-envs-yum-1.sh
deleted file mode 100755
index 31fe340..0000000
--- a/tests/kickstart_tests/groups-and-envs-yum-1.sh
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# Copyright (C) 2014  Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use,
-# modify, copy, or redistribute it subject to the terms and conditions of
-# the GNU General Public License v.2, or (at your option) any later version.
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY expressed or implied, including the implied warranties of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
-# Public License for more details.  You should have received a copy of the
-# GNU General Public License along with this program; if not, write to the
-# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.  Any Red Hat trademarks that are incorporated in the
-# source code or documentation are not subject to the GNU General Public
-# License and may only be used or replicated with the express permission of
-# Red Hat, Inc.
-#
-# Red Hat Author(s): Chris Lumens <clumens at redhat.com>
-
-kernel_args() {
-    echo vnc inst.nodnf
-}
-
-prepare() {
-    ks=$1
-    tmpdir=$2
-
-    echo ${ks}
-}
-
-validate() {
-    img=$1
-
-    # There should be a /root/RESULT file with results in it.  Check
-    # its contents and decide whether the test finally succeeded or
-    # not.
-    result=$(virt-cat -a ${img} -m /dev/sda2 /root/RESULT)
-    if [[ $? != 0 ]]; then
-        status=1
-        echo '*** /root/RESULT does not exist in VM image.'
-    elif [[ "${result}" != "SUCCESS" ]]; then
-        status=1
-        echo "${result}"
-    fi
-
-    return ${status}
-}
-
diff --git a/tests/kickstart_tests/groups-and-envs-yum-2.ks b/tests/kickstart_tests/groups-and-envs-yum-2.ks
deleted file mode 100644
index fc87cc6..0000000
--- a/tests/kickstart_tests/groups-and-envs-yum-2.ks
+++ /dev/null
@@ -1,82 +0,0 @@
-url --url=http://dl.fedoraproject.org/pub/fedora/linux/development/$releasever/$basearch/os/
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all
-part --fstype=ext4 --size=4400 /
-part --fstype=ext4 --size=500 /boot
-part --fstype=swap --size=500 swap
-
-keyboard us
-lang en
-timezone America/New_York
-rootpw qweqwe
-shutdown
-
-%packages
-# (1) Test that you can remove a group that's part of an environment.
-@^xfce-desktop-environment
-- at dial-up
-
-# (2) Test that you can add and then remove a group.
- at 3d-printing
-- at 3d-printing
-
-# (3) Test that --optional works.
- at container-management --optional
-
-# (4) Test that --nodefaults works.
- at rpm-development-tools --nodefaults
-%end
-
-%post
-# We don't have a way of determining if a group/env is installed or not.
-# These sentinel packages will have to do.
-
-# Testing #1 - lrzsz is only part of dial-up, and should not be installed.
-rpm -q lrzsz
-if [[ $? == 0 ]]; then
-    echo '*** dial-up group should not have been installed' > /root/RESULT
-    exit 1
-fi
-
-# Testing #2 - RepetierHost is only part of 3d-printing, and should not
-# be installed.
-rpm -q RepetierHost
-if [[ $? == 0 ]]; then
-    echo '*** 3d-printing group should not have been installed' > /root/RESULT
-    exit 1
-fi
-
-# Testing #3 - docker-registry is only part of container-management, where
-# it is optional, so it should be installed.
-rpm -q docker-registry
-if [[ $? != 0 ]]; then
-    echo '*** docker-registry was not installed' > /root/RESULT
-    exit 1
-fi
-
-# Testing #4 - rpm-build is mandatory so it should be installed.  rpmdevtools is
-# default so it should not.  rpmlint is optional so it should not.
-rpm -q rpm-build
-if [[ $? != 0 ]]; then
-    echo '*** Mandatory package from rpm-development-tools was not installed' > /root/RESULT
-    exit 1
-else
-    rpm -q rpmdevtools
-    if [[ $? == 0 ]]; then
-        echo '*** Default package from rpm-development-tools should not have been installed' > /root/RESULT
-        exit 1
-    else
-        rpm -q rpmlint
-        if [[ $? == 0 ]]; then
-            echo '*** Optional package from rpm-development-tools should not have been installed' > /root/RESULT
-            exit 1
-        fi
-    fi
-fi
-
-echo SUCCESS > /root/RESULT
-%end
diff --git a/tests/kickstart_tests/groups-and-envs-yum-2.sh b/tests/kickstart_tests/groups-and-envs-yum-2.sh
deleted file mode 100755
index 113c927..0000000
--- a/tests/kickstart_tests/groups-and-envs-yum-2.sh
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# Copyright (C) 2015  Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use,
-# modify, copy, or redistribute it subject to the terms and conditions of
-# the GNU General Public License v.2, or (at your option) any later version.
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY expressed or implied, including the implied warranties of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
-# Public License for more details.  You should have received a copy of the
-# GNU General Public License along with this program; if not, write to the
-# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.  Any Red Hat trademarks that are incorporated in the
-# source code or documentation are not subject to the GNU General Public
-# License and may only be used or replicated with the express permission of
-# Red Hat, Inc.
-#
-# Red Hat Author(s): Chris Lumens <clumens at redhat.com>
-
-kernel_args() {
-    echo vnc inst.nodnf
-}
-
-prepare() {
-    ks=$1
-    tmpdir=$2
-
-    echo ${ks}
-}
-
-validate() {
-    img=$1
-
-    # There should be a /root/RESULT file with results in it.  Check
-    # its contents and decide whether the test finally succeeded or
-    # not.
-    result=$(virt-cat -a ${img} -m /dev/sda2 /root/RESULT)
-    if [[ $? != 0 ]]; then
-        status=1
-        echo '*** /root/RESULT does not exist in VM image.'
-    elif [[ "${result}" != "SUCCESS" ]]; then
-        status=1
-        echo "${result}"
-    fi
-
-    return ${status}
-}
-
diff --git a/tests/kickstart_tests/nfs-repo-and-addon-yum.ks b/tests/kickstart_tests/nfs-repo-and-addon-yum.ks
deleted file mode 100644
index 17840bd..0000000
--- a/tests/kickstart_tests/nfs-repo-and-addon-yum.ks
+++ /dev/null
@@ -1,80 +0,0 @@
-nfs --server=NFS-SERVER --dir=NFS-PATH
-
-# The addon repos are setup with the following packages:
-# NFS:
-#   - testpkg-nfs-core, to be installed with @core
-#   - testpkg-nfs-addon, to be installed because we ask for it
-#   - testpkg-share1, contains a file /usr/share/testpkg-2/nfs. To be installed by excluding
-#                     the HTTP version.
-#   - testpkg-share2, contains a file /usr/share/testpkg-3/nfs. To be excluded via cost
-# HTTP:
-#   - testpkg-http-core, to be installed with @core
-#   - testpkg-http-addon, to be installed because we ask for it
-#   - testpkg-share1, contains a file /usr/share/testpkg-2/http. To be excluded via excludepkgs.
-#   - testpkg-share2, contains a file /usr/share/testpkg-3/http. To be included via cost.
-repo --name=kstest-nfs --baseurl=NFS-ADDON-REPO --cost=50 --install
-repo --name=kstest-http --baseurl=HTTP-ADDON-REPO --cost=25 --excludepkgs=testpkg-share2 --install
-
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all
-part --fstype=ext4 --size=4400 /
-part --fstype=ext4 --size=500 /boot
-part --fstype=swap --size=500 swap
-
-keyboard us
-lang en
-timezone America/New_York
-rootpw qweqwe
-shutdown
-
-%packages
-testpkg-nfs-addon
-testpkg-http-addon
-testpkg-share1
-testpkg-share2
-%end
-
-%post
-status=0
-
-# Check that all the packages were installed
-for pkg in testpkg-nfs-core testpkg-nfs-addon testpkg-http-core testpkg-http-addon \
-           testpkg-share1 testpkg-share2 ; do
-    if ! rpm -q $pkg ; then
-        echo "*** package $pkg was not installed" >> /root/RESULT
-        status=1
-    fi
-done
-
-if [[ "${status}" -eq 0 ]]; then
-    # Check that the right packages were installed
-    if [[ -e /usr/share/testpkg-1/http ]]; then
-        echo "*** wrong version of testpkg-share1 was installed" >> /root/RESULT
-        status=1
-    fi
-
-    if [[ -e /usr/share/testpkg-2/nfs ]]; then
-        echo "*** wrong version of testpkg-share2 was installed" >> /root/RESULT
-        status=1
-    fi
-
-    # Double check that the correct marker files are in place
-    if [[ -e /usr/share/testpkg-1/nfs ]]; then
-        echo "*** unable to find marker for testpkg-share1" >> /root/RESULT
-        status=1
-    fi
-
-    if [[ -e /usr/share/testpkg-2/http ]]; then
-        echo "*** unable to find marker for testpkg-share2" >> /root/RESULT
-        status=1
-    fi
-fi
-
-if [[ "${status}" -eq 0 ]]; then
-    echo SUCCESS > /root/RESULT
-fi
-%end
diff --git a/tests/kickstart_tests/nfs-repo-and-addon-yum.sh b/tests/kickstart_tests/nfs-repo-and-addon-yum.sh
deleted file mode 100755
index cc4c36b..0000000
--- a/tests/kickstart_tests/nfs-repo-and-addon-yum.sh
+++ /dev/null
@@ -1,69 +0,0 @@
-#
-# Copyright (C) 2015  Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use,
-# modify, copy, or redistribute it subject to the terms and conditions of
-# the GNU General Public License v.2, or (at your option) any later version.
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY expressed or implied, including the implied warranties of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
-# Public License for more details.  You should have received a copy of the
-# GNU General Public License along with this program; if not, write to the
-# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.  Any Red Hat trademarks that are incorporated in the
-# source code or documentation are not subject to the GNU General Public
-# License and may only be used or replicated with the express permission of
-# Red Hat, Inc.
-#
-# Red Hat Author(s): David Shea <dshea at redhat.com>
-
-kernel_args() {
-    echo vnc inst.nodnf
-}
-
-prepare() {
-    ks=$1
-    tmpdir=$2
-
-    if [[ "${TEST_ADDON_NFS_REPO}" == "" ]]; then
-        echo \$TEST_ADDON_NFS_REPO is not set.
-        return 1
-    fi
-
-    if [[ "${TEST_ADDON_HTTP_REPO}" == "" ]]; then
-        echo \$TEST_ADDON_HTTP_REPO is not set.
-        return 1
-    fi
-
-    if [[ "${TEST_NFS_SERVER}" == "" ]]; then
-        echo \$TEST_NFS_SERVER is not set
-        return 1
-    fi
-
-    if [[ "${TEST_NFS_PATH}" == "" ]]; then
-        echo \$TEST_NFS_PATH is not set
-        return 1
-    fi
-
-    sed -e "/^nfs/ s|NFS-SERVER|${TEST_NFS_SERVER}|" \
-        -e "/^nfs/ s|NFS-PATH|${TEST_NFS_PATH}|" \
-        -e "/^repo/ s|NFS-ADDON-REPO|${TEST_ADDON_NFS_REPO}|" \
-        -e "/^repo/ s|HTTP-ADDON-REPO|${TEST_ADDON_HTTP_REPO}|" ${ks} > ${tmpdir}/kickstart.ks
-    echo ${tmpdir}/kickstart.ks
-}
-
-validate() {
-    img=$1
-
-    # Check the /root/RESULT file for whether the test succeeded or not
-    result=$(virt-cat -a ${img} -m /dev/sda2 /root/RESULT)
-    if [[ $? != 0 ]]; then
-        status=1
-        echo '*** /root/RESULT does not exist in VM image.'
-    elif [[ "${result}" != "SUCCESS" ]]; then
-        status=1
-        echo "${result}"
-    fi
-
-    return ${status}
-}
diff --git a/tests/kickstart_tests/packages-and-groups-yum-1.ks b/tests/kickstart_tests/packages-and-groups-yum-1.ks
deleted file mode 100644
index 52513ef..0000000
--- a/tests/kickstart_tests/packages-and-groups-yum-1.ks
+++ /dev/null
@@ -1,75 +0,0 @@
-url --url=http://dl.fedoraproject.org/pub/fedora/linux/development/$releasever/$basearch/os/
-install
-network --bootproto=dhcp
-
-bootloader --timeout=1
-zerombr
-clearpart --all
-part --fstype=ext4 --size=6500 /
-part --fstype=ext4 --size=500 /boot
-part --fstype=swap --size=500 swap
-
-keyboard us
-lang en
-timezone America/New_York
-rootpw qweqwe
-shutdown
-
-%packages
-@^xfce-desktop-environment
-
-# (1) Test that you can remove a package that's part of a group
- at c-development
--valgrind
-
-# (2) Test that you can add and then remove the same package.
-qemu-kvm
--qemu-kvm
-
-# (3) Test that you can add packages with a glob.
-kacst*
-
-# (4) Test that you can remove packages with a glob.
--ibus*
-%end
-
-%post
-# We don't have a way of determining if a group/env is installed or not.
-# These sentinel packages will have to do.
-
-# Testing #1 - gcc should be installed, but not valgrind
-rpm -q gcc
-if [[ $? != 0 ]]; then
-    echo '*** c-development group was not installed' > /root/RESULT
-    exit 1
-fi
-
-rpm -q valgrind
-if [[ $? == 0 ]]; then
-    echo '*** valgrind package should not have been installed' > /root/RESULT
-    exit 1
-fi
-
-# Testing #2 - qemu-kvm should not be installed.
-rpm -q qemu-kvm
-if [[ $? == 0 ]]; then
-    echo '*** qemu-kvm package should not have been installed' > /root/RESULT
-    exit 1
-fi
-
-# Testing #3 - kacst font stuff should be installed.
-count=$(rpm -qa kacst\* | wc -l)
-if [[ $count -lt 5 ]]; then
-    echo '*** kacst glob was not installed' > /root/RESULT
-    exit 1
-fi
-
-# Testing #4 - ibus stuff should not be installed.
-rpm -qa ibus\*
-if [[ $? == 0 ]]; then
-    echo '*** ibus glob should not have been installed' > /root/RESULT
-    exit 1
-fi
-
-echo SUCCESS > /root/RESULT
-%end
diff --git a/tests/kickstart_tests/packages-and-groups-yum-1.sh b/tests/kickstart_tests/packages-and-groups-yum-1.sh
deleted file mode 100755
index 113c927..0000000
--- a/tests/kickstart_tests/packages-and-groups-yum-1.sh
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# Copyright (C) 2015  Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use,
-# modify, copy, or redistribute it subject to the terms and conditions of
-# the GNU General Public License v.2, or (at your option) any later version.
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY expressed or implied, including the implied warranties of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
-# Public License for more details.  You should have received a copy of the
-# GNU General Public License along with this program; if not, write to the
-# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.  Any Red Hat trademarks that are incorporated in the
-# source code or documentation are not subject to the GNU General Public
-# License and may only be used or replicated with the express permission of
-# Red Hat, Inc.
-#
-# Red Hat Author(s): Chris Lumens <clumens at redhat.com>
-
-kernel_args() {
-    echo vnc inst.nodnf
-}
-
-prepare() {
-    ks=$1
-    tmpdir=$2
-
-    echo ${ks}
-}
-
-validate() {
-    img=$1
-
-    # There should be a /root/RESULT file with results in it.  Check
-    # its contents and decide whether the test finally succeeded or
-    # not.
-    result=$(virt-cat -a ${img} -m /dev/sda2 /root/RESULT)
-    if [[ $? != 0 ]]; then
-        status=1
-        echo '*** /root/RESULT does not exist in VM image.'
-    elif [[ "${result}" != "SUCCESS" ]]; then
-        status=1
-        echo "${result}"
-    fi
-
-    return ${status}
-}
-
diff --git a/tests/pylint/preconf.py b/tests/pylint/preconf.py
deleted file mode 100644
index 809db76..0000000
--- a/tests/pylint/preconf.py
+++ /dev/null
@@ -1,44 +0,0 @@
-# yum preconf pylint module
-#
-# Copyright (C) 2013  Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use,
-# modify, copy, or redistribute it subject to the terms and conditions of
-# the GNU General Public License v.2, or (at your option) any later version.
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY expressed or implied, including the implied warranties of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
-# Public License for more details.  You should have received a copy of the
-# GNU General Public License along with this program; if not, write to the
-# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.  Any Red Hat trademarks that are incorporated in the
-# source code or documentation are not subject to the GNU General Public
-# License and may only be used or replicated with the express permission of
-# Red Hat, Inc.
-#
-# Red Hat Author(s): Chris Lumens <clumens at redhat.com>
-#
-
-import astroid
-
-from pylint.checkers import BaseChecker
-from pylint.checkers.utils import check_messages
-from pylint.interfaces import IAstroidChecker
-
-class PreconfChecker(BaseChecker):
-    __implements__ = (IAstroidChecker, )
-    name = "Yum preconf"
-    msgs = {"W9910": ("Accessing yum.preconf outside of _resetYum",
-                      "bad-preconf-access",
-                      "Accessing yum.preconf outside of _resetYum will cause tracebacks"),
-           }
-
-    @check_messages("bad-preconf-access")
-    def visit_getattr(self, node):
-        if node.attrname == "preconf":
-            if not isinstance(node.scope(), astroid.Function) or not node.scope().name == "_resetYum":
-                self.add_message("W9910", node=node)
-
-def register(linter):
-    """required method to auto register this checker """
-    linter.register_checker(PreconfChecker(linter))
diff --git a/tests/pylint/pylint-one.sh b/tests/pylint/pylint-one.sh
index 8a88f59..88a0964 100755
--- a/tests/pylint/pylint-one.sh
+++ b/tests/pylint/pylint-one.sh
@@ -18,7 +18,7 @@ pylint_output="$(pylint \
     --dummy-variables-rgx=_ \
     --ignored-classes=DefaultInstall,Popen,QueueFactory,TransactionSet \
     --defining-attr-methods=__init__,_grabObjects,initialize,reset,start,setUp \
-    --load-plugins=intl,preconf,markup,eintr,pointless-override,environ \
+    --load-plugins=intl,markup,eintr,pointless-override,environ \
     --init-import=y \
     --init-hook=\
 'import gi.overrides, os;
-- 
2.2.2



More information about the anaconda-patches mailing list