summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--t/data/SPECS/kernel-1/virtualbox-kernel-desktop1.spec19
-rw-r--r--t/data/SPECS/kernel-1/virtualbox-kernel-desktop2.spec19
-rw-r--r--t/data/SPECS/kernel-1/virtualbox-kernel-desktop3.spec19
-rw-r--r--t/data/SPECS/kernel-1/virtualbox-kernel-desktop4.spec19
-rw-r--r--t/data/SPECS/kernel-1/virtualbox-kernel-desktop5.spec18
-rw-r--r--t/data/SPECS/kernel-2/virtualbox-kernel-desktop1.spec19
-rw-r--r--t/data/SPECS/kernel-2/virtualbox-kernel-desktop2.spec19
-rw-r--r--t/data/SPECS/kernel-2/virtualbox-kernel-desktop3.spec19
-rw-r--r--t/data/SPECS/kernel-2/virtualbox-kernel-desktop4.spec19
-rw-r--r--t/data/SPECS/kernel-2/virtualbox-kernel-desktop5.spec18
-rw-r--r--t/superuser--orphans-kernels.t23
11 files changed, 207 insertions, 4 deletions
diff --git a/t/data/SPECS/kernel-1/virtualbox-kernel-desktop1.spec b/t/data/SPECS/kernel-1/virtualbox-kernel-desktop1.spec
new file mode 100644
index 00000000..34306fb7
--- /dev/null
+++ b/t/data/SPECS/kernel-1/virtualbox-kernel-desktop1.spec
@@ -0,0 +1,19 @@
+%global kver 5.15.41
+Summary: x
+Name: virtualbox-kernel-%{kver}-desktop-1
+Version: 6.1.36
+Release: 1
+License: x
+
+%package -n virtualbox-kernel-desktop-latest
+Summary: x
+Requires: virtualbox-kernel-%{kver}-desktop-1 = 6.1.36-1
+
+%description
+x
+
+%description -n virtualbox-kernel-desktop-latest
+x
+
+%files
+%files -n virtualbox-kernel-desktop-latest
diff --git a/t/data/SPECS/kernel-1/virtualbox-kernel-desktop2.spec b/t/data/SPECS/kernel-1/virtualbox-kernel-desktop2.spec
new file mode 100644
index 00000000..eba571ef
--- /dev/null
+++ b/t/data/SPECS/kernel-1/virtualbox-kernel-desktop2.spec
@@ -0,0 +1,19 @@
+%global kver 5.15.42
+Summary: x
+Name: virtualbox-kernel-%{kver}-desktop-1
+Version: 6.1.36
+Release: 2
+License: x
+
+%package -n virtualbox-kernel-desktop-latest
+Summary: x
+Requires: virtualbox-kernel-%{kver}-desktop-1 = 6.1.36-2
+
+%description
+x
+
+%description -n virtualbox-kernel-desktop-latest
+x
+
+%files
+%files -n virtualbox-kernel-desktop-latest
diff --git a/t/data/SPECS/kernel-1/virtualbox-kernel-desktop3.spec b/t/data/SPECS/kernel-1/virtualbox-kernel-desktop3.spec
new file mode 100644
index 00000000..76e56f0e
--- /dev/null
+++ b/t/data/SPECS/kernel-1/virtualbox-kernel-desktop3.spec
@@ -0,0 +1,19 @@
+%global kver 5.15.43
+Summary: x
+Name: virtualbox-kernel-%{kver}-desktop-1
+Version: 6.1.36
+Release: 3
+License: x
+
+%package -n virtualbox-kernel-desktop-latest
+Summary: x
+Requires: virtualbox-kernel-%{kver}-desktop-1 = 6.1.36-3
+
+%description
+x
+
+%description -n virtualbox-kernel-desktop-latest
+x
+
+%files
+%files -n virtualbox-kernel-desktop-latest
diff --git a/t/data/SPECS/kernel-1/virtualbox-kernel-desktop4.spec b/t/data/SPECS/kernel-1/virtualbox-kernel-desktop4.spec
new file mode 100644
index 00000000..a6a68765
--- /dev/null
+++ b/t/data/SPECS/kernel-1/virtualbox-kernel-desktop4.spec
@@ -0,0 +1,19 @@
+%global kver 5.15.44
+Summary: x
+Name: virtualbox-kernel-%{kver}-desktop-1
+Version: 6.1.36
+Release: 4
+License: x
+
+%package -n virtualbox-kernel-desktop-latest
+Summary: x
+Requires: virtualbox-kernel-%{kver}-desktop-1 = 6.1.36-4
+
+%description
+x
+
+%description -n virtualbox-kernel-desktop-latest
+x
+
+%files
+%files -n virtualbox-kernel-desktop-latest
diff --git a/t/data/SPECS/kernel-1/virtualbox-kernel-desktop5.spec b/t/data/SPECS/kernel-1/virtualbox-kernel-desktop5.spec
new file mode 100644
index 00000000..4e8b8d7b
--- /dev/null
+++ b/t/data/SPECS/kernel-1/virtualbox-kernel-desktop5.spec
@@ -0,0 +1,18 @@
+%global kver 5.15.45
+Summary: x
+Name: virtualbox-kernel-%{kver}-desktop-1
+Version: 6.1.36
+Release: 5
+License: x
+
+%package -n virtualbox-kernel-desktop-latest
+Summary: x
+Requires: virtualbox-kernel-%{kver}-desktop-1 = 6.1.36-5
+%description
+x
+
+%description -n virtualbox-kernel-desktop-latest
+x
+
+%files
+%files -n virtualbox-kernel-desktop-latest
diff --git a/t/data/SPECS/kernel-2/virtualbox-kernel-desktop1.spec b/t/data/SPECS/kernel-2/virtualbox-kernel-desktop1.spec
new file mode 100644
index 00000000..34306fb7
--- /dev/null
+++ b/t/data/SPECS/kernel-2/virtualbox-kernel-desktop1.spec
@@ -0,0 +1,19 @@
+%global kver 5.15.41
+Summary: x
+Name: virtualbox-kernel-%{kver}-desktop-1
+Version: 6.1.36
+Release: 1
+License: x
+
+%package -n virtualbox-kernel-desktop-latest
+Summary: x
+Requires: virtualbox-kernel-%{kver}-desktop-1 = 6.1.36-1
+
+%description
+x
+
+%description -n virtualbox-kernel-desktop-latest
+x
+
+%files
+%files -n virtualbox-kernel-desktop-latest
diff --git a/t/data/SPECS/kernel-2/virtualbox-kernel-desktop2.spec b/t/data/SPECS/kernel-2/virtualbox-kernel-desktop2.spec
new file mode 100644
index 00000000..eba571ef
--- /dev/null
+++ b/t/data/SPECS/kernel-2/virtualbox-kernel-desktop2.spec
@@ -0,0 +1,19 @@
+%global kver 5.15.42
+Summary: x
+Name: virtualbox-kernel-%{kver}-desktop-1
+Version: 6.1.36
+Release: 2
+License: x
+
+%package -n virtualbox-kernel-desktop-latest
+Summary: x
+Requires: virtualbox-kernel-%{kver}-desktop-1 = 6.1.36-2
+
+%description
+x
+
+%description -n virtualbox-kernel-desktop-latest
+x
+
+%files
+%files -n virtualbox-kernel-desktop-latest
diff --git a/t/data/SPECS/kernel-2/virtualbox-kernel-desktop3.spec b/t/data/SPECS/kernel-2/virtualbox-kernel-desktop3.spec
new file mode 100644
index 00000000..76e56f0e
--- /dev/null
+++ b/t/data/SPECS/kernel-2/virtualbox-kernel-desktop3.spec
@@ -0,0 +1,19 @@
+%global kver 5.15.43
+Summary: x
+Name: virtualbox-kernel-%{kver}-desktop-1
+Version: 6.1.36
+Release: 3
+License: x
+
+%package -n virtualbox-kernel-desktop-latest
+Summary: x
+Requires: virtualbox-kernel-%{kver}-desktop-1 = 6.1.36-3
+
+%description
+x
+
+%description -n virtualbox-kernel-desktop-latest
+x
+
+%files
+%files -n virtualbox-kernel-desktop-latest
diff --git a/t/data/SPECS/kernel-2/virtualbox-kernel-desktop4.spec b/t/data/SPECS/kernel-2/virtualbox-kernel-desktop4.spec
new file mode 100644
index 00000000..a6a68765
--- /dev/null
+++ b/t/data/SPECS/kernel-2/virtualbox-kernel-desktop4.spec
@@ -0,0 +1,19 @@
+%global kver 5.15.44
+Summary: x
+Name: virtualbox-kernel-%{kver}-desktop-1
+Version: 6.1.36
+Release: 4
+License: x
+
+%package -n virtualbox-kernel-desktop-latest
+Summary: x
+Requires: virtualbox-kernel-%{kver}-desktop-1 = 6.1.36-4
+
+%description
+x
+
+%description -n virtualbox-kernel-desktop-latest
+x
+
+%files
+%files -n virtualbox-kernel-desktop-latest
diff --git a/t/data/SPECS/kernel-2/virtualbox-kernel-desktop5.spec b/t/data/SPECS/kernel-2/virtualbox-kernel-desktop5.spec
new file mode 100644
index 00000000..4e8b8d7b
--- /dev/null
+++ b/t/data/SPECS/kernel-2/virtualbox-kernel-desktop5.spec
@@ -0,0 +1,18 @@
+%global kver 5.15.45
+Summary: x
+Name: virtualbox-kernel-%{kver}-desktop-1
+Version: 6.1.36
+Release: 5
+License: x
+
+%package -n virtualbox-kernel-desktop-latest
+Summary: x
+Requires: virtualbox-kernel-%{kver}-desktop-1 = 6.1.36-5
+%description
+x
+
+%description -n virtualbox-kernel-desktop-latest
+x
+
+%files
+%files -n virtualbox-kernel-desktop-latest
diff --git a/t/superuser--orphans-kernels.t b/t/superuser--orphans-kernels.t
index f101f1f5..4fe25d43 100644
--- a/t/superuser--orphans-kernels.t
+++ b/t/superuser--orphans-kernels.t
@@ -5,12 +5,15 @@
use strict;
use lib '.', 't';
use helper;
+use urpm::cfg;
use urpm::orphans;
use Test::More 'no_plan';
need_root_and_prepare();
+my $arch = urpm::cfg::get_arch();
my $name = 'kernel';
+my $dkms_name = 'virtualbox';
urpmi_addmedia("$name-1 $::pwd/media/$name-1");
urpmi_addmedia("$name-2 $::pwd/media/$name-2");
@@ -22,14 +25,26 @@ test_unorphan_kernels("$name-1", 'kernel-desktop-latest');
# new naming, each kernel NVR is N=kernel-desktop, V=5.6.2 R=1.mga8
test_unorphan_kernels("$name-2", 'kernel-desktop-latest', 'kernel-desktop');
+# FIXME: add virtualbox-kernel-XXX -> kernel-XXX
sub test_unorphan_kernels {
my ($medium, $pkg, $o_pkg2) = @_;
my $base_kversion = '5.15.4';
- $o_pkg2 ||= "kernel-desktop-${base_kversion}5-1.mga8";
+ my $dkms_version = '6.1.36';
+ #my $latest_dkms_dep = 'virtualbox-kernel-5.15.45-desktop-1'; # harcoded but no choice...
+ my $latest_dkms_dep = "virtualbox-kernel-${base_kversion}5-desktop-1"; # harcoded but no choice...
+ my ($latest_kpkg, $latest_dpkg);
print "# test_unorphan_kernels($pkg) ($base_kversion)\n";
- urpmi("--media $medium --auto $pkg-${base_kversion}$_-1") foreach 1..4;
- urpmi("--media $medium --auto $pkg");
+ foreach (1..5) {
+ $latest_kpkg = "$pkg-${base_kversion}$_-1";
+ urpmi("--media $medium --auto $latest_kpkg");
+ # Add some DKMS packages:
+ $latest_dpkg = "$dkms_name-$pkg-${dkms_version}-$_.$arch";
+ urpmi("--media $medium --auto $latest_dpkg");
+ }
+ #urpmi("--media $medium --auto $pkg");
urpme("--auto --auto-orphans");
- check_installed_and_remove($pkg, $o_pkg2);
+ $o_pkg2 ||= $latest_kpkg;
+ $o_pkg2 =~ s/-latest//;
+ check_installed_and_remove($pkg, 'virtualbox-kernel-desktop-latest', $o_pkg2, $latest_dkms_dep);
}