(1) Get rid of the else branch in addDriverRepos. Driver disk RPMs may be stored under /run/install/DD-* directly, not necessarily in any arch-specific directory. If no RPMs are found, we'll fail out at the createrepo step anyway so this branch is unnecessary.
(2) preInstall runs after addDriverRepos, which means the requiredPackages list gets blanked out by preInstall. Thus we do not actually install any RPMs from any driver disks. Append to the list instead of resetting it.
(3) In the installer environment, driver disk kernel modules end up in an arch-specific directory, not a kernel version-specific directory. --- pyanaconda/packaging/__init__.py | 6 ++---- pyanaconda/packaging/dnfpayload.py | 2 +- tests/kickstart_tests/driverdisk-disk.ks | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/pyanaconda/packaging/__init__.py b/pyanaconda/packaging/__init__.py index 6d9e8b7..a260d7b 100644 --- a/pyanaconda/packaging/__init__.py +++ b/pyanaconda/packaging/__init__.py @@ -1018,14 +1018,12 @@ class PackagePayload(Payload): if not os.path.isdir(repo): break
- # Drivers are under /<arch>/ or /DD-net/ + # Drivers may be under /<arch>/ or /DD-net/, but they can also be + # in the top level of the DD repo. if os.path.isdir(repo+"DD-net"): repo += "DD-net" elif os.path.isdir(repo+blivet.arch.getArch()): repo += blivet.arch.getArch() - else: - log.debug("No driver repo in %s", repo) - continue
# Run createrepo if there are rpms and no repodata if not os.path.isdir(repo+"/repodata"): diff --git a/pyanaconda/packaging/dnfpayload.py b/pyanaconda/packaging/dnfpayload.py index 3a5ee87..608a636 100644 --- a/pyanaconda/packaging/dnfpayload.py +++ b/pyanaconda/packaging/dnfpayload.py @@ -715,7 +715,7 @@ class DNFPayload(packaging.PackagePayload):
def preInstall(self, packages=None, groups=None): super(DNFPayload, self).preInstall(packages, groups) - self.requiredPackages = ["dnf"] + self.requiredPackages += ["dnf"] if packages: self.requiredPackages += packages self.requiredGroups = groups diff --git a/tests/kickstart_tests/driverdisk-disk.ks b/tests/kickstart_tests/driverdisk-disk.ks index e8025cd..9603b37 100644 --- a/tests/kickstart_tests/driverdisk-disk.ks +++ b/tests/kickstart_tests/driverdisk-disk.ks @@ -26,7 +26,7 @@ RESULTFILE=$SYSROOT/root/RESULT fail() { echo "*** $*" >> $RESULTFILE; }
# check the installer environment -[ -f /lib/modules/`uname -r`/updates/fake-dd.ko ] || fail "kmod not loaded" +[ -f /lib/modules/`uname -m`/updates/fake-dd.ko ] || fail "kmod not loaded" [ -f /usr/bin/fake-dd-bin ] || fail "installer-enhancement not loaded"
# check the installed system
On Wed, 2015-07-29 at 16:58 -0400, Chris Lumens wrote:
(1) Get rid of the else branch in addDriverRepos. Driver disk RPMs may be stored under /run/install/DD-* directly, not necessarily in any arch -specific directory. If no RPMs are found, we'll fail out at the createrepo step anyway so this branch is unnecessary.
Yep - this was a (semi-intentional) behavior change introduced during the rewrite, so this is the right fix.
(2) preInstall runs after addDriverRepos, which means the requiredPackages list gets blanked out by preInstall. Thus we do not actually install any RPMs from any driver disks. Append to the list instead of resetting it.
Hey, I love it when testing catches errors.
(3) In the installer environment, driver disk kernel modules end up in an arch-specific directory, not a kernel version-specific directory.
Actually, no - this is another bug discovered by the test!
This bit of driver_updates.py got mixed up when I refactored the os.uname() calls out:
ARCH = os.uname()[4] KERNELVER = os.uname()[2]
MODULE_UPDATES_DIR = "/lib/modules/%s/updates" % ARCH
/lib/modules/x86_64/updates? Nope. That should have been KERNELVER.
So yeah, replace the third change with this and that's a big ACK. And thanks!
-w
anaconda-patches@lists.fedorahosted.org