I debug the codes and have new questions.
(imgcreate/live.py)
557
558 def __get_image_stanzas(self, isodir):
559 kernels = self._get_kernel_versions() <==== here return empty dict: {}
560 kernel_options = self._get_kernel_options()
561 checkisomd5 = self._has_checkisomd5()
AND
(imgcreate/creater.py function _get_kernel_versions defined here)
278 version = None
279 for f in header['filenames']:
280 if f.startswith('/boot/vmlinuz-'):
281 version = f[14:]
282 return version
283
284 ts = rpm.TransactionSet(self._instroot)
285
286 ret = {}
287 for header in ts.dbMatch('provides', 'kernel'): <===== ts.dbMatch.count is 0 (so no header and empty ret)
288 version = get_version(header)
289 if version is None:
290 continue
291
292 name = header['name']
293 if not name in ret:
294 ret[name] = [version]
295 elif not version in ret[name]:
296 ret[name].append(version)
297
298 return ret
I tried to understand what's rpm.TransactionSet here, but I found this is imported from a .so file.
I have no idea to find where the source codes of this 'ts'
BTW, the value of self._instroot is '/var/tmp/imgcreate_asdda/install_root' and my kickstart file is standard I think:
lang en_US.UTF-8
keyboard us
timezone US/Eastern
auth --useshadow --enablemd5
selinux --enforcing
firewall --disabled
part / --size 1024
repo --name=development --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=rawhide&arch=$basearch
%packages
@standard
%end