summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/data/SPECS/kernel-2/kernel-desktop1.spec20
-rw-r--r--t/data/SPECS/kernel-2/kernel-desktop2.spec20
-rw-r--r--t/data/SPECS/kernel-2/kernel-desktop3.spec20
-rw-r--r--t/data/SPECS/kernel-2/kernel-desktop4.spec20
-rw-r--r--t/data/SPECS/kernel-2/kernel-desktop5.spec20
-rw-r--r--t/superuser--orphans-kernels.t7
6 files changed, 105 insertions, 2 deletions
diff --git a/t/data/SPECS/kernel-2/kernel-desktop1.spec b/t/data/SPECS/kernel-2/kernel-desktop1.spec
new file mode 100644
index 00000000..ca218706
--- /dev/null
+++ b/t/data/SPECS/kernel-2/kernel-desktop1.spec
@@ -0,0 +1,20 @@
+Summary: x
+Name: kernel-desktop
+Version: 5.15.41
+Release: 1
+License: x
+
+%package -n kernel-desktop-latest
+Summary: x
+Requires: kernel-desktop = %{version}-%{release}
+
+%description
+Kernel naming as used in mga9+.
+Each kernel is named "kernel".
+So we can have multiple packages named "kernel" installed at the same time, with different versions
+
+%description -n kernel-desktop-latest
+x
+
+%files
+%files -n kernel-desktop-latest
diff --git a/t/data/SPECS/kernel-2/kernel-desktop2.spec b/t/data/SPECS/kernel-2/kernel-desktop2.spec
new file mode 100644
index 00000000..f42de4d0
--- /dev/null
+++ b/t/data/SPECS/kernel-2/kernel-desktop2.spec
@@ -0,0 +1,20 @@
+Summary: x
+Name: kernel-desktop
+Version: 5.15.42
+Release: 1
+License: x
+
+%package -n kernel-desktop-latest
+Summary: x
+Requires: kernel-desktop = %{version}-%{release}
+
+%description
+Kernel naming as used in mga9+.
+Each kernel is named "kernel".
+So we can have multiple packages named "kernel" installed at the same time, with different versions
+
+%description -n kernel-desktop-latest
+x
+
+%files
+%files -n kernel-desktop-latest
diff --git a/t/data/SPECS/kernel-2/kernel-desktop3.spec b/t/data/SPECS/kernel-2/kernel-desktop3.spec
new file mode 100644
index 00000000..ff40fec8
--- /dev/null
+++ b/t/data/SPECS/kernel-2/kernel-desktop3.spec
@@ -0,0 +1,20 @@
+Summary: x
+Name: kernel-desktop
+Version: 5.15.43
+Release: 1
+License: x
+
+%package -n kernel-desktop-latest
+Summary: x
+Requires: kernel-desktop = %{version}-%{release}
+
+%description
+Kernel naming as used in mga9+.
+Each kernel is named "kernel".
+So we can have multiple packages named "kernel" installed at the same time, with different versions
+
+%description -n kernel-desktop-latest
+x
+
+%files
+%files -n kernel-desktop-latest
diff --git a/t/data/SPECS/kernel-2/kernel-desktop4.spec b/t/data/SPECS/kernel-2/kernel-desktop4.spec
new file mode 100644
index 00000000..edbd9745
--- /dev/null
+++ b/t/data/SPECS/kernel-2/kernel-desktop4.spec
@@ -0,0 +1,20 @@
+Summary: x
+Name: kernel-desktop
+Version: 5.15.44
+Release: 1
+License: x
+
+%package -n kernel-desktop-latest
+Summary: x
+Requires: kernel-desktop = %{version}-%{release}
+
+%description
+Kernel naming as used in mga9+.
+Each kernel is named "kernel".
+So we can have multiple packages named "kernel" installed at the same time, with different versions
+
+%description -n kernel-desktop-latest
+x
+
+%files
+%files -n kernel-desktop-latest
diff --git a/t/data/SPECS/kernel-2/kernel-desktop5.spec b/t/data/SPECS/kernel-2/kernel-desktop5.spec
new file mode 100644
index 00000000..e22152a9
--- /dev/null
+++ b/t/data/SPECS/kernel-2/kernel-desktop5.spec
@@ -0,0 +1,20 @@
+Summary: x
+Name: kernel-desktop
+Version: 5.15.45
+Release: 1
+License: x
+
+%package -n kernel-desktop-latest
+Summary: x
+Requires: kernel-desktop = %{version}-%{release}
+
+%description
+Kernel naming as used in mga9+.
+Each kernel is named "kernel".
+So we can have multiple packages named "kernel" installed at the same time, with different versions
+
+%description -n kernel-desktop-latest
+x
+
+%files
+%files -n kernel-desktop-latest
diff --git a/t/superuser--orphans-kernels.t b/t/superuser--orphans-kernels.t
index 2b6e00dd..f101f1f5 100644
--- a/t/superuser--orphans-kernels.t
+++ b/t/superuser--orphans-kernels.t
@@ -19,14 +19,17 @@ set_urpmi_cfg_global_options({ 'nb-of-new-unrequested-pkgs-between-auto-select-o
# old naming, each kernel NVR is N=kernel-desktop-5.6.2-1, V=1 R=1.mga8
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');
sub test_unorphan_kernels {
- my ($medium, $pkg) = @_;
+ my ($medium, $pkg, $o_pkg2) = @_;
my $base_kversion = '5.15.4';
+ $o_pkg2 ||= "kernel-desktop-${base_kversion}5-1.mga8";
print "# test_unorphan_kernels($pkg) ($base_kversion)\n";
urpmi("--media $medium --auto $pkg-${base_kversion}$_-1") foreach 1..4;
urpmi("--media $medium --auto $pkg");
urpme("--auto --auto-orphans");
- check_installed_and_remove($pkg, "kernel-desktop-${base_kversion}5-1.mga8");
+ check_installed_and_remove($pkg, $o_pkg2);
}