Building only the 'kernel' with the --minkernpackage produces the following error: * initrd: Not building since only the kernel was requested... * Creating kernel package * ERROR: Could not copy the initrd for the kernel package! In the runtime case statement in gen_cmdline.sh BUILD_INITRD is not properly set in one condition: all) BUILD_KERNEL=1 BUILD_INITRD=1 ;; initrd) BUILD_INITRD=1 ;; kernel) BUILD_KERNEL=1 ;; Then later this code is executed in gen_package.sh: [ "${BUILD_INITRD}" -ne 0 ] && cp "${TEMP}/initrd-${KV}" "${TEMP}/minker npackage/initrd-${KV}" || gen_die 'Could not copy the initrd for the kernel pack age!' Since BUILD_INITRD is set to 1 by default, this code exits genkernel and it cannot complete. I will attach a patch that sets BUILD_INITRD=0 in the 'kernel' build option. Reproducible: Always Steps to Reproduce: 1. genkernel <args> --minkernpackage=<pkg path> kernel 2. watch genkernel die Actual Results: * initrd: Not building since only the kernel was requested... * Creating kernel package * ERROR: Could not copy the initrd for the kernel package!
Created attachment 43364 [details, diff] patches bug in gen_cmdline.patch This is patched from the genkernel_bradmssw folder in the gentoo cvs module as of todays date. It's really just a 1 line patch, nothing special.
The previous submitted patch does not actually fix this bug. It does provide a bit of clarity in regards to the state of BUILD_INITRD. However, I realized that the real problem from the bug is in this line: [ "${BUILD_INITRD}" -ne 0 ] && cp "${TEMP}/initrd-${KV}" "${TEMP}/minker npackage/initrd-${KV}" || gen_die 'Could not copy the initrd for the kernel pack age!' operational precedence says that '&&' and '||' have the same precedence level. The code was written like this: smt1 && stm2 || throw up and die It appears to me it was meant to work like this: stm1 && (stm2 || throw up and die) But when the code is executed it actually does the following: (stmt 1 && stm2) || throw up and die I propose parenthesis are added so that the code execution is: stm1 && (stm2 || throw up and die)
Oh i see this is actually how the code is in cvs, so nevermind.
Fixed in genkernel-3.1.0d; please reopen this bug if you have any problems. Thanks!