This would also erronously detect SLES as Opensuse.
MeeGo.
+=item \"opensuse\"
+
+OpenSUSE.
+
=item \"pardus\"
Pardus.
Possible strings include: C<yum>, C<up2date>,
C<apt> (for all Debian derivatives),
-C<portage>, C<pisi>, C<pacman>, C<urpmi>.
+C<portage>, C<pisi>, C<pacman>, C<urpmi>, C<zypper>.
Future versions of libguestfs may return other strings.
Please read L<guestfs(3)/INSPECTION> for more details.");
OS_DISTRO_SCIENTIFIC_LINUX,
OS_DISTRO_TTYLINUX,
OS_DISTRO_MAGEIA,
+ OS_DISTRO_OPENSUSE,
};
enum inspect_os_package_format {
OS_PACKAGE_MANAGEMENT_PORTAGE,
OS_PACKAGE_MANAGEMENT_PISI,
OS_PACKAGE_MANAGEMENT_URPMI,
+ OS_PACKAGE_MANAGEMENT_ZYPPER,
};
struct inspect_fs {
case OS_DISTRO_MAGEIA: ret = safe_strdup (g, "mageia"); break;
case OS_DISTRO_MANDRIVA: ret = safe_strdup (g, "mandriva"); break;
case OS_DISTRO_MEEGO: ret = safe_strdup (g, "meego"); break;
+ case OS_DISTRO_OPENSUSE: ret = safe_strdup (g, "opensuse"); break;
case OS_DISTRO_PARDUS: ret = safe_strdup (g, "pardus"); break;
case OS_DISTRO_REDHAT_BASED: ret = safe_strdup (g, "redhat-based"); break;
case OS_DISTRO_RHEL: ret = safe_strdup (g, "rhel"); break;
case OS_PACKAGE_MANAGEMENT_PORTAGE: ret = safe_strdup (g, "portage"); break;
case OS_PACKAGE_MANAGEMENT_PISI: ret = safe_strdup (g, "pisi"); break;
case OS_PACKAGE_MANAGEMENT_URPMI: ret = safe_strdup (g, "urpmi"); break;
+ case OS_PACKAGE_MANAGEMENT_ZYPPER: ret = safe_strdup (g, "zypper"); break;
case OS_PACKAGE_MANAGEMENT_UNKNOWN:
default:
ret = safe_strdup (g, "unknown");
case OS_DISTRO_RHEL:
case OS_DISTRO_MAGEIA:
case OS_DISTRO_MANDRIVA:
+ case OS_DISTRO_OPENSUSE:
case OS_DISTRO_CENTOS:
case OS_DISTRO_SCIENTIFIC_LINUX:
fs->package_format = OS_PACKAGE_FORMAT_RPM;
fs->package_management = OS_PACKAGE_MANAGEMENT_URPMI;
break;
+ case OS_DISTRO_OPENSUSE:
+ fs->package_management = OS_PACKAGE_MANAGEMENT_ZYPPER;
+ break;
+
case OS_DISTRO_SLACKWARE:
case OS_DISTRO_TTYLINUX:
case OS_DISTRO_WINDOWS:
if (guestfs___parse_major_minor (g, fs) == -1)
return -1;
}
+ else if (guestfs_exists (g, "/etc/SuSE-release") > 0) {
+ fs->distro = OS_DISTRO_OPENSUSE;
+
+ if (parse_release_file (g, fs, "/etc/SuSE-release") == -1)
+ return -1;
+
+ if (guestfs___parse_major_minor (g, fs) == -1)
+ return -1;
+ }
+
skip_release_checks:;