[lkml]   [2001]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
On Mon, Jan 08, 2001 at 12:31:29PM -0500, Mohammad A. Haque wrote:
> I fail to see why this is useful. you can't do anything in the directory
> afterwards.
> bash# mkdir foobar
> bash# cd foobar/
> bash# ls
> bash# rmdir .
> bash# touch foooooo
> touch: foooooo: Operation not permitted
> bash# ls
> Whats the point of it?

To type less characters. I'll show you the code that is failing:

def binutils():
print 'Checking out binutils'
if os.system('%s update -A -d -P' % CVS):
print 'failed binutils checkout'

print 'Compiling and installing binutils'
binutils_build = 'binutils-build-%s' % BUILD
if os.system('../binutils/configure --target=x86_64-unknown-linux --prefix=%s && make && make install' % install_dir):
print 'failed binutils compile'

Why should I write:


when I can simply write:


I know in the above case I really could avoid the os.chdir(binutils_build) and
to use `cd %s; ...` % (binutils_dir, install_dir) and probably
it wouldn't make much difference, but the above looks simpler and I may have
other things to run while inside the binutils_dir too so it could make lots of
sense to os.chdir there as I just did.

To workaround this misfeature I can simply implement a derivative class of
shutil in my robot and to wrap the rmtree method to emulate the 2.2.x behaviour
in userspace, but I think the old behaviour was more flexible (it was also
showing how much our dcache is powerful) and I still don't see why it's been
removed. Maybe it was to remove a branch from a fast path? (if so I don't
think it was a good idea, there are many more overhead things that matters more
and that aren't even visible to userspace)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:52    [W:0.105 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site