Date: Fri, 11 Dec 2009 14:14:12 +0100 From: Gary Jennejohn <gary.jennejohn@freenet.de> To: Dag-Erling =?ISO-8859-1?Q?Sm=F8rgrav?= <des@des.no> Cc: svn-src-head@FreeBSD.org, Roman Divacky <rdivacky@FreeBSD.org>, Stefan Farfeleder <stefanf@FreeBSD.org>, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r200068 - head/usr.bin Message-ID: <20091211141412.15afcf43@ernst.jennejohn.org> In-Reply-To: <86k4wtn2p3.fsf@ds4.des.no> References: <200912031802.nB3I2txS021472@svn.freebsd.org> <20091210163118.GA66146@lizard.fafoe.narf.at> <20091210173231.GA93327@freebsd.org> <86k4wtn2p3.fsf@ds4.des.no>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 11 Dec 2009 12:57:12 +0100 Dag-Erling Sm__rgrav <des@des.no> wrote: > Roman Divacky <rdivacky@FreeBSD.org> writes: > > Stefan Farfeleder <stefanf@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. > root:ernst:~:bash:21> /usr/local/bin/unzip --help -u update files, create if necessary -n never overwrite existing files -o overwrite files WITHOUT prompting I deleted all but uon. -u has a totally different meaning. Evidently o and n can be combined without any problem. --- Gary Jennejohn
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091211141412.15afcf43>