Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 347213

Summary: [patch] sys-kernel/genkernel-3.4.10.907 rm: cannot remove `/var/cache/genkernel/src': Is a directory
Product: Gentoo Linux Reporter: Vladimir Berezhnoy <non7top>
Component: Current packagesAssignee: Gentoo Genkernel Maintainers <genkernel>
Status: RESOLVED FIXED    
Severity: normal CC: sping
Priority: High Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 351772    
Attachments: Check if is a directory and remove it with rm -rf.
Fix warning "rm: cannot remove `/var/cache/genkernel/src': Is a directory"

Description Vladimir Berezhnoy 2010-11-29 20:14:21 UTC
m ~ # genkernel all --lvm --mdadm
* Gentoo Linux Genkernel; Version 3.4.10.907
* Running with options: all --lvm --mdadm

* Clearing cache dir contents from /var/cache/genkernel
*        >> removing blkid-1.40.9-x86.bz2
*        >> removing busybox-1.7.4-x86.tar.bz2
*        >> removing src
rm: cannot remove `/var/cache/genkernel/src': Is a directory
* Linux Kernel 2.6.36-gentoo-r3-home2 for x86...
*         >> Running oldconfig...
* config: --no-clean is enabled; leaving the .config alone.


Reproducible: Always

Steps to Reproduce:
Why does genkernel tries to remove /var/cache/genkernel/src as a file? It is expected to be a directory containing its own required files. Anyway deleteing always fail producing misleading error message.
Comment 1 Sergey Vishnikin 2010-11-30 09:20:42 UTC
Created attachment 255927 [details, diff]
Check if is a directory and remove it with rm -rf.

See my first patch, maybe it will be useful.
Comment 2 Vladimir Berezhnoy 2010-12-02 17:12:35 UTC
removing directory is not an option


m linux # genkernel all --lvm --mdadm
* Gentoo Linux Genkernel; Version 3.4.10.907
* Running with options: all --lvm --mdadm

* Clearing cache dir contents from /var/cache/genkernel
Could not find source tarball /var/cache/genkernel/src/busybox-1.7.4.tar.bz2. Please refetch.
Comment 3 Sebastian Pipping gentoo-dev 2011-01-05 23:10:35 UTC
PS: Adding keyword "Inclusion" and "[patch] " prefix to better show this bug's nature in searches...
Comment 4 Sebastian Pipping gentoo-dev 2011-01-11 11:22:24 UTC
Created attachment 259533 [details, diff]
Fix warning "rm: cannot remove `/var/cache/genkernel/src': Is a directory"

This patch got pushed to the experimental branch exposed by genkernel-99999 (five nines).  Looks fixed to me, please report back.