svn commit: r200068 - head/usr.bin

Dag-Erling Smørgrav des at des.no
Fri Dec 11 11:57:15 UTC 2009


Roman Divacky <rdivacky at FreeBSD.org> writes:
> Stefan Farfeleder <stefanf at FreeBSD.org> wrote:
> > For me this breaks the ooo-3 build with:
> > 
> > unzip: -n, -o and -u are contradictory
> > 
> > The failing command is 'unzip -quo jurt_src.zip'.
>
> I dont see a reason why this check is there:
>
>         if (n_opt + o_opt + u_opt > 1)
>                 errorx("-n, -o and -u are contradictory");
>
>
> dag, can you comment?

s/dag/des/, please.

The bug is in OOo.

If you look at extract_file(), you'll see that these three options are
handled in three separate branches of a multi-branch if.

-n means "never overwrite"
-o means "always overwrite"
-u means "sometimes overwrite"

so -uo does not make much sense, and -n along with either -u or -o does
not make any sense whatsoever.

> /usr/local/bin/unzip seems to accept those together happilly..

You should check if:

 a) -uo gives the same result as -u
 b) -uo gives the same result as -o
 c) -ou gives the same result as -u
 d) -ou gives the same result as -o
 e) -uo and -ou give the same result

My guess would be either bc or bde.  In either case, there is a risk
that this is not what the user wanted, so IMHO the best solution is to
not do anything at all.

DES
-- 
Dag-Erling Smørgrav - des at des.no


More information about the svn-src-head mailing list