Zypper 和 rpm 的关系是怎样的?

1.rpm 负责记录软件的安装信息,创建软件包数据库?
2.zypp 只是用来解决依赖的么?
3.zypper 先用 libzypp 获得依赖信息,然后使用 rpm 安砖所需依赖及软件本身?

RPM/Deb 都是后端软件包数据库,zypper/yum/dpkg 都是前端软件包管理器。

软件包数据库的作用是定义软件包格式,处理依赖,生成数据库记录安装的软件和它们的依赖关系。

前端只管安装卸载和别的东西。依赖关系都是后端处理的。

因为交给前端处理的话那就会发行版间不兼容,比如有些 RPM tag 就是 openSUSE 专有的,红帽的 yum 就不认识,不过近些年的 specfile 里见的少了。

ZYpp (or libzypp) is a package management engine that powers Linux applications like YaST, Zypper and the openSUSE/SUSE Linux Enterprise implementation of PackageKit.[1] Unlike other common package managers, it provides a powerful satisfiability solver to compute package dependencies and a convenient package management API.[2] It is an open source and free software project sponsored by Novell and licensed under the terms of the GNU General Public License v2 or later.

Zypper is the native command line interface of the ZYpp package manager for installing, removing, updating and querying software packages of local or remote (networked) media. Its graphical equivalent is the YaST package manager module.

RPM 是不是跟网络中的协议一样,有各种不同的实现,而 libzypp 是其中的一种。
zypper 前段负责安装,卸载。那具体的工作还得调用 libzypp,zypper 单纯的只是负责解析命令么?

RPM 是一种包格式, 可以使用 rpm 命令来进行安装和查询相关信息;
libzypp 提供了从软件源解析 RPM 抱的依赖关系,使得可以自动下载和安装相应的依赖。而 zypper 和 YaST 软件管理界面都是通过调用 libzypp 来实现的前端应用。