It needs to check for the minor version, not major version.

Fixes commit a442d2c3217f709128f0e377f88649fb6ba90f45.
---
 builder/repository_main.ml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/builder/repository_main.ml b/builder/repository_main.ml
index bb440563b..9932fbae4 100644
--- a/builder/repository_main.ml
+++ b/builder/repository_main.ml
@@ -178,7 +178,7 @@ let compute_short_id distro major minor =
     sprintf "%s%d" distro major
   | ("fedora"|"mageia") ->
     sprintf "%s%d" distro major
-  | "sles" when major = 0 ->
+  | "sles" when minor = 0 ->
     sprintf "%s%d" distro major
   | "sles" ->
     sprintf "%s%dsp%d" distro major minor
-- 
2.14.3

_______________________________________________
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs

Reply via email to