Hi Grigoryev,
I am facing the same issue here and finally understood what is going on.
Hopefully it won't be too late.
I am pretty sure the issue is related to the RPM database location. I am also
having this issue in a Leap 15 host trying to build a CentOS 7 image. In
recent versions openSUSE updated the RPM database location in line with
upstream changes, the database location is defined in /usr/lib/rpm/macros thus
I assume this is system wide for both, yum and zypper. I believe that the yum
package from opensuse is also parsing this rpm config file and thus placing
database location in a different place of what yum inside CentOS expect
(<imageroot>/usr/lib/rpm/macros defines a different rpm database location).
See yum complaints about this:
> No such file or directory:
> '/tmp/74-oem/var/lib/rpm/Packages'
This is old (in still current in case of CentOS) default package database
location. The odd part is that it fails in bootstrap phase which could also
point to a YUM issue or bug having this path hardcoded somewhere else beyond /
usr/lib/rpm/macros, otherwise it would not have failed at this point.
The only ugly workaround I have for now is just copying the database the have
been initialized in a different location to the expected one and then rerun
the build with the flag --allow-existing-root to let KIWI reuse the buildroot
created during the first attempt.
To successfully build I did:
$ kiwi system build --description <pathtocentosimage> --target-dir
<destinationdir>
$ cp -rvp <destinationdir>/build/image-root/usr/lib/sysimage/rpm/*
<destinationdir>/build/image-root/var/lib/rpm
$ kiwi system build --description <pathtocentosimage> --target-dir
<destinationdir> --allow-existing-root
I'll dig a bit more to see if there is something that needs to be done from
KIWI side to fix it, but it looks like the issue might go beyond the KIWI
scope.
Regards,
David