在 Oracle® Solaris 11.2 中使用映像包管理系统打包和交付软件

退出打印视图

更新时间: 2014 年 7 月
 
 

验证已转换的软件包

转换 SVR4 软件包时的一个常见错误源自通过 SVR4 软件包交付的目录与通过 IPS 软件包交付的相同目录中存在不匹配的属性。

在此示例中的 SVR4 软件包中,样例清单中 /opt 的目录操作的属性与系统软件包为该目录定义的属性不同。

目录操作一节说明所有的引用计数操作必须使用相同的属性。当尝试安装目前生成的 mypkg 版本时,出现以下错误:

$ pkg install mypkg
Creating Plan /
pkg install: The requested change to the system attempts to install multiple actions
for dir 'opt' with conflicting attributes:

    1 package delivers 'dir group=bin mode=0755 owner=root path=opt':
        pkg://mypublisher/mypkg@1.0,5.11-0:20111017T020042Z
    3 packages deliver 'dir group=sys mode=0755 owner=root path=opt':
        pkg://solaris/developer/build/onbld@0.5.11,5.11-0.175.0.0.0.1.0:20111012T010101Z
        pkg://solaris/system/core-os@0.5.11,5.11-0.175.0.0.0.1.0:20111012T023456Z

These packages may not be installed together. Any non-conflicting set may
be, or the packages must be corrected before they can be installed.

要在发布软件包之前(而不是安装时)捕捉到错误,可以对引用系统信息库使用 pkglint(1) 命令,如以下示例所示:

$ pkglint -c ./cache -r file:///scratch/solaris-repo ./mypkg.mf.res
Lint engine setup...

PHASE                                          ITEMS
4                                          4292/4292
Starting lint run...

ERROR pkglint.dupaction007        path opt is reference-counted but has different attributes across 5
duplicates: group: bin -> mypkg group: sys -> developer/build/onbld system/core-os system/ldoms/ldomsmanager

请注意有关 path opt 在不同软件包中包含不同属性的错误消息。

pkglint 报告的额外 ldomsmanager 软件包位于引用软件包系统信息库中,但没有安装在测试系统中。先前由 pkg install 报告的错误中没有列出 ldomsmanager 软件包,因为该软件包没有安装。