Bug 186654 - [PATCH genkernel 4/4] Cleanup of bogus error output
Bug#: 186654 Product:  Gentoo Hosted Projects Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: genkernel@gentoo.org Reported By: robbat2@gentoo.org
Component: genkernel
URL: 
Summary: [PATCH genkernel 4/4] Cleanup of bogus error output
Keywords:  
Status Whiteboard: 
Opened: 2007-07-26 07:51 0000
Description:   Opened: 2007-07-26 07:51 0000
Clean up a bogus and cosmetic error introduced by the symlink patch:
${GK_SHARE}/gen_funcs.sh: line 431: popd:
/var/tmp/genkernel/3996.6301.23048.13838/initramfs-modules-${KV}-temp: No such
file or directory

------- Comment #1 From Robin Johnson 2007-07-26 07:51:27 0000 -------
Created an attachment (id=126050) [details]
0004-Cleanup-of-bogus-error-output.patch

------- Comment #2 From Andrew Gaffney 2007-07-26 16:16:19 0000 -------
This patch doesn't even make sense to me. How does changing to that directory
before trying to remove it with the full path help anything?

------- Comment #3 From Robin Johnson 2007-07-26 17:37:42 0000 -------
Existing code in gen_initramfs.sh:

append_modules() first:
First the existing code takes us into a directory
  cd "${TEMP}/initramfs-modules-${KV}-temp/"
Then it makes the cpio
  find . | cpio ${CPIO_ARGS} --append -F "${CPIO}"
Now the directory gets removed
  rm -r "${TEMP}/initramfs-modules-${KV}-temp/"
At this point you are in the directory that was just removed.
popd will give you an error unless you go to somewhere that does exist.

You are in the non-existent directory, you run pushd /boot, and then run popd
afterwards, and it spews the error.

Thus error is triggered via copy_image_with_preserve (gen_funcs.sh):
  pushd ${BOOTDIR} >/dev/null
  ...
  popd >/dev/null

------- Comment #4 From Andrew Gaffney 2007-07-26 18:09:44 0000 -------
Ah, I see. I misunderstood where the error was coming from. I assumed it was
when the directory was removed. That's what I get for assuming :)

------- Comment #5 From Robin Johnson 2007-07-27 06:41:16 0000 -------
inSVN.

------- Comment #6 From Robin Johnson 2007-07-27 16:23:06 0000 -------
convert to open with keyword=InSVN

------- Comment #7 From Chris Gianelloni (RETIRED) 2007-08-22 19:54:15 0000 -------
Please test genkernel 3.4.9_prer1 or better.  This should be fixed now.

------- Comment #8 From Erik Zeek 2008-04-23 15:33:02 0000 -------
I'm still seeing this in sys-kernel/genkernel-3.4.10_pre9.

* Gentoo Linux Genkernel; Version 3.4.10_pre9
* Running with options: --splash=livecd-2007.0 --disklabel --install
--kernel-config=/usr/src/linux-2.6.25-gentoo/.config --bootloader=grub
--symlink all

* Linux Kernel 2.6.25-gentoo-r1 for x86...
* kernel: >> Running mrproper...
* config: Using config from /usr/src/linux-2.6.25-gentoo/.config
*         Previous config backed up to .config.bak
*         >> Running oldconfig...
* kernel: >> Cleaning...
*         >> Compiling 2.6.25-gentoo-r1 bzImage...
*         >> Compiling 2.6.25-gentoo-r1 modules...
* Copying config for successful build to
/etc/kernels/kernel-config-x86-2.6.25-gentoo-r1
* busybox: >> Applying patches...
* busybox: >> Configuring...
* busybox: >> Removing stale cache...
* busybox: >> Compiling...
* busybox: >> Copying to cache...
* initramfs: >> Initializing...
*         >> Appending base_layout cpio data...
*         >> Appending auxilary cpio data...
*         >> Appending busybox cpio data...
*         >> Appending modules cpio data...
*         >> Appending blkid cpio data...
*         >> Appending splash cpio data...
*   >> Installing splash [ using the livecd-2007.0 theme ]...
/usr/share/genkernel/gen_funcs.sh: line 427: popd:
/var/tmp/genkernel/32180.16855.26784.5739/initramfs-splash-temp: No such file
or directory
*
* Adding kernel to /boot/grub/grub.conf...
*
* Kernel compiled successfully!
*
* Required Kernel Parameters:
*     real_root=/dev/$ROOT
*
*     Where $ROOT is the device node for your root partition as the
*     one specified in /etc/fstab
*
* If you require Genkernel's hardware detection features; you MUST
* tell your bootloader to use the provided INITRAMFS file. Otherwise;
* substitute the root argument for the real_root argument if you are
* not planning to use the initrd...

* WARNING... WARNING... WARNING...
* Additional kernel cmdline arguments that *may* be required to boot
properly...
* add "vga=791 splash=silent,theme:livecd-2007.0 console=tty1 quiet" if you use
a splash framebuffer ]

* Do NOT report kernel bugs as genkernel bugs unless your bug
* is about the default genkernel configuration...
*
* Make sure you have the latest genkernel before reporting bugs.