Front page | perl.perl5.porters |
Postings from June 2014
[perl #122002] Better handling of symlink creation in Configure
Thread Previous
From:
Tony Cook via RT
Date:
June 25, 2014 03:14
Subject:
[perl #122002] Better handling of symlink creation in Configure
Message ID:
rt-4.0.18-13714-1403666065-1026.122002-15-0@perl.org
On Thu Jun 12 08:29:26 2014, doughera wrote:
> On Thu, Jun 12, 2014 at 12:07:42AM -0700, "Tony Cook via RT" wrote:
> > On Tue Jun 10 22:40:21 2014, afresh1@openbsd.org wrote:
> > > On Tue, Jun 10, 2014 at 10:32:25PM -0700, Tony Cook via RT wrote:
> > > > On Sat May 31 15:56:30 2014, afresh1@openbsd.org wrote:
> > > > > This brings in improved symlinking of the build tree as as been
> > > > > used
> > > > > by OpenBSD for the last couple of years.
> > > >
> > > > As Andy pointed out, this isn't portable.
> > > >
> > > > Would you like to submit an updated patch, or should I reject it?
> > >
> > > I'm having trouble finding a copy of old awk. I have an in-
> > > progress
> > > patch that I want to test, but not sure it works on old awk, or if
> > > it is
> > > better than what is there. If someone has a pointer to where I can
> > > get
> > > a copy of olde awk, I'll submit a new patch.
>
> I don't know any easy source for it. (Debian distributes
> a package called "original-awk", and Kernighan's web site,
> http://www.cs.princeton.edu/~bwk/btl.mirror/ , also has source,
> but I think both are for 'nawk', not the very old 'awk'.
>
> Anyway, I think the simplest thing to do is perhaps to use the awk
> associative arrays to
> reduce the number of system calls needed, but still use sed to break
> pathnames up into
> directory and filename, and still use /bin/sh to do the actual calls
> to mkdir and ln.
>
> Here's a version that should be about as fast as your original, but
> work
> with either new or old awk. It does have two disadvantages:
> 1. It doesn't do the detailed item-by-item error checking of the
> original
> (but the OpenBSD patch included some spot checking, so that's
> probably
> ok).
> 2. It does end up with some very long lines, depending on the
> length of
> $src, which might cause a /bin/sh line length problem, but
> didn't in
> any of my quick tests.
I've attached it as a patch against Configure. Tested on Solaris 11.
Please test it elsewhere.
> > > Do we need to support spaces in the path to the perl source tree?
>
> Yes, ideally, but my version above would need an extra set of quotes
> in the last
> print line to deal with it.
Unfortunately Configure fails well before the mksymlinks logic when the source
path includes spaces, so I didn't try to follow-up on spaces.
Tony
---
via perlbug: queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=122002
Thread Previous