On Wed, Apr 05, 2000 at 02:40:32PM +0200, Andreas Koenig wrote:
> I believe, the CPAN/authors/id/ directory needs a gentle cleanup.
> Currently there is no simple algorithm to generate the directory of an
> author from the userid. The only way to find out that JHI has the
> directory JHI/ is by trying which of JHI/ and J/JH/JHI/ exists.
>
> It would be a simple job to make the transition with backwards
> compatibility like so (tested):
>
> use File::Path qw(mkpath);
> opendir DIR, "."; # from authors/id
> for (readdir DIR){
> next if /^\./ or length($_)==1;
> my $targ = substr($_,0,1) . "/" . substr($_,0,2);
> mkpath $targ;
> rename $_, "$targ/$_";
> symlink "$targ/$_", $_;
> }
>
> But that will cause a huge avalanche of mirror traffic (both for
> mirror and rsync). So I suppose we'd have a sleep 3600 after each loop
> so that the job takes 12 days until all 290 directories are relocated.
>
> The question is: do you see any other problems I am not seeing? Is
> sleep 3600 OK? Is the whole idea sound? If nobody has objections, I'll
> start tomorrow by relocating my own directory, wait a week and if no
> problems are reported run the job with the sleep 3600. Otherwise,,,
>
> Opinions?
The idea is very good, Andreas. It would probably be a good idea _not_
to run it when the update daemons are running, or you might get very
confusing glitches in the moment between the rename and the symlink.
Peace,
* Kurt Starsinic ([EMAIL PROTECTED]) ---------- Senior Network Engineer *
| `The term `Internet' has the meaning given that term in |
| section 230(f)(1) of the Communications Act of 1934.' |
| -- H.R. 3028, Trademark Cyberpiracy Prevention Act |