Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 261992 - emerging coreutils-7.1 gives "OSError: [Errno 36] File name too long:" error - confdir3
Summary: emerging coreutils-7.1 gives "OSError: [Errno 36] File name too long:" error ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 210077 261959
  Show dependency tree
 
Reported: 2009-03-10 16:23 UTC by Wilbur Pan
Modified: 2009-03-13 20:48 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
output for emerge coreutils (emerge coreutils output.txt,52.01 KB, text/plain)
2009-03-10 16:24 UTC, Wilbur Pan
Details
emerge --info (emerge --info.txt,3.56 KB, text/plain)
2009-03-10 16:24 UTC, Wilbur Pan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wilbur Pan 2009-03-10 16:23:56 UTC
This may have to do with portage-2.2_rc24, as I just upgraded it today, but on the other hand this confdir3 error has been reported with other versions of coreutils.

emerge log and emerge --info are attached.



Reproducible: Always
Comment 1 Wilbur Pan 2009-03-10 16:24:27 UTC
Created attachment 184583 [details]
output for emerge coreutils
Comment 2 Wilbur Pan 2009-03-10 16:24:45 UTC
Created attachment 184585 [details]
emerge --info
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-03-10 16:33:39 UTC
Could be a sandbox issue. The same had been reported with coreutils-5.0 in bug #21766 tough I'm not sure this is a real duplicate as that bug is over six years old.
Comment 4 Alex Legler (RETIRED) archtester gentoo-dev Security 2009-03-10 17:51:30 UTC
I have no clue what that is, but rm'ing /var/tmp/portage/sys-apps/coreutils and rerunning the emerge "fixed" it for me. 
Comment 5 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-03-10 22:22:24 UTC
Wilbur can you please verify that the "fix" Alex suggested works for you as well?
Comment 6 Wilbur Pan 2009-03-10 22:39:29 UTC
I just tried that, and it did work.

Although I'm puzzled -- I would assume that one of the first things that the emerge process would do is to clear out any workfiles in /var/tmp/portage that are sitting there from a previously aborted emerge, no?
Comment 7 Zac Medico gentoo-dev 2009-03-11 04:02:33 UTC
(In reply to comment #6)
> Although I'm puzzled -- I would assume that one of the first things that the
> emerge process would do is to clear out any workfiles in /var/tmp/portage that
> are sitting there from a previously aborted emerge, no?

That's what it was trying to do when the unexpected "OSError: [Errno 36] File name too long" exception happened.
Comment 8 Wilbur Pan 2009-03-11 04:21:43 UTC
(In reply to comment #7)

I see, sort of.  I'm not a programmer by any means (at least not for the past 25 years), but I don't see why that situation should show up in an emerge process.  The package is being emerged, so there's not reason to keep the files from the old aborted process around.  So it would seem to me that the algorithm should be like this:

IF "/var/tmp/portage/aborted_package" exists, THEN "rm -rf /var/tmp/portage/aborted_package"

I fully understand that it could be that I'm just being a moron here.  :-)
Comment 9 Zac Medico gentoo-dev 2009-03-11 04:36:49 UTC
(In reply to comment #8)
> IF "/var/tmp/portage/aborted_package" exists, THEN "rm -rf
> /var/tmp/portage/aborted_package"

It was doing something equivalent to that when the exception occurred. The shutil.rmtree() function is what failed, and that function is like a python version of rm -rf. This is the first time that I've seen the shutil.rmtree() fail like this. I think I'll fix it to call rm -rf instead.
Comment 10 SpanKY gentoo-dev 2009-03-11 10:50:11 UTC
iirc, `rm -rf` with a full path will fail as well

you might want to chdir($PORTAGE_TMPDIR/$CATEGORY) and then do the removal on $PF
Comment 11 SpanKY gentoo-dev 2009-03-11 23:41:18 UTC
since ive fixed sandbox, you might want an easy way to reproduce this ...

sandbox has getcwd-gnulib_tst.c in its tests subdir.  if you run `make check`, the build system will generate the binary for you.  edit that and go down to where the comment is "Leaving behind such a deep directory is not polite".  if you put an exit() before that comment, the deep confdir tree will be left behind.
Comment 12 Zac Medico gentoo-dev 2009-03-12 05:41:06 UTC
(In reply to comment #10)
> iirc, `rm -rf` with a full path will fail as well

I was able to reproduce it like this:

  for x in {1..1000} ; do mkdir confdir3 ; cd confdir3 ; done

For me, rm worked when shutil.rmtree() failed. I've removed the relevant shutil.rmtree() call in svn r13071.
Comment 13 Zac Medico gentoo-dev 2009-03-12 10:09:16 UTC
This is fixed in 2.2_rc25 which is in package.mask. I'll close this bug when
it's also released in 2.1.6.8.
Comment 14 Zac Medico gentoo-dev 2009-03-13 20:48:48 UTC
This is released in 2.1.6.8.