我有一个配方来编译打印机驱动程序,并有一些简单的行在do_install中运行 .
do_install() {
install -d ${D}${libdir}/cups/filter
install -m 755 ${B}/src/rastertoprinter ${D}${libdir}/cups/filter/
install -d ${D}${sysconfdir}/cups/ppd
install -m 755 ${B}/../rastertoprinter/printer_name.ppd ${D}${sysconfdir}/cups/ppd/
}
为了编译源代码我在杯子上有一个DEPENDS,在杯子上也有一个RDEPENDS,因为操作系统需要安装杯子来打印 .
打印机驱动程序不公开,因此我将其重命名为rastertoprinter并更改了我的路径名 .
基本上我需要简单地创建或确保目录/ usr / lib / cups / filter存在,并在那里复制rastertoprinter程序 . 我还需要创建或确保目录/ etc / cups / ppd存在并将.ppd文件复制到该目录中 .
前两行运行良好,但第三行引发以下错误:
file /etc/cups conflicts between attempted installs of printername-r0.corei7_64 and cups-2.2.2-r0.corei7_64
file /etc/cups/ppd conflicts between attempted installs of printername-r0.corei7_64 and cups-2.2.2-r0.corei7_64
我不明白为什么两个食谱都不能创建这个目录并把东西放进去?奇怪的是我能够做第一个/ usr / lib / cups / filter目录虽然很好 .
1 回答
事实证明,每个要打包在Yocto中的文件也会为每个文件的每个父级生成一个
%dir
. 我们不想拥有另一个包所拥有的目录,因此如果您将其添加到您的配方中:它将导致您的包不拥有您打包的文件的父目录 .
这将生成没有
%dir
条目的rpm spec文件 .