Re: ENOENT (was Re: [PATCH] added --force-* options for conffile handling)
On Tue, Oct 12, 1999 at 10:41:15AM +0200, Bart Schuller wrote:
> On Tue, Oct 12, 1999 at 03:19:18AM +0200, Wichert Akkerman wrote:
> > Previously Marcus Brinkmann wrote:
> > > #31620:
> > > * scripts/dpkg-divert and update-alternatives: Don't hardcode ENOENT!
> > Where do you propose we get ENOENT for? POSIX might not be available
> > and we have to get it somewhere..
> We could perhaps include $CPAN/modules/by-module/Errno/ in perl-base or
> whatever it's called nowadays.
Please forgive me if the answer is obvious, but why is dpkg-divert
checking for ENOENT _in addition to_ checking for a successful lstat()?
It seems to me that all possible failure modes of lstat() should have the
same significance in dpkg-divert. It also seems that update-alternatives
is checking for ENOENT after the fact where -e or -l before the fact would
more correctly and portably fulfill the intention.
I'm not arguing for/against adding Errno to perl-5.005-base, nor am
I criticizing the dpkg team's code; I'd just like to understand if there
are deeper issues I'm missing here.
* Kurt Starsinic (Kurt.Starsinic@isinet.com) --------- Technical Specialist *
| `The future masters of technology will have to be lighthearted and |
| intelligent. The machine easily masters the grim and the dumb.' |
| -- Marshall McLuhan |
Institute for Scientific Information http://www.isinet.com/