Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Dec 2015 05:56:31 +0000
From:      Dangling Pointer <danglingpointer@outlook.com>
To:        Ben Woods <woodsb02@gmail.com>
Cc:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   RE: Unzip utility choice decision
Message-ID:  <BAY169-W71CF3A8E16B1C9CD623C54A7E60@phx.gbl>
In-Reply-To: <CAOc73CAWJd05L0P833XzmgMXuUDd3hX2ypcbUmQfNxCBoS2rHA@mail.gmail.com>
References:  <BAY169-W9776556FEBDA58E22FA457A71A0@phx.gbl>, <CAOc73CAWJd05L0P833XzmgMXuUDd3hX2ypcbUmQfNxCBoS2rHA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Those options are not contradictory with `pkg install unzip` version. That =
-uoq combination is an advance usage which save us from a race condition.
What I am really saying is:
There is a universally known unzip utility which offers many options and th=
en there is FreeBSD version of unzip with less options. That makes no sense=
 to me. Why would you want to have a separate unzip utility?

> Date: Sat=2C 21 Nov 2015 09:02:19 +0100
> Subject: Re: Unzip utility choice decision
> From: woodsb02@gmail.com
> To: danglingpointer@outlook.com
> CC: freebsd-questions@freebsd.org
>=20
> On Friday=2C 20 November 2015=2C Dangling Pointer <danglingpointer@outloo=
k.com>
> wrote:
>=20
> >
> >
> >
> > Hi=2C
> > The unzip utility which comes OOTB is different than the one which
> > installs with `pkg install unzip`. The latter one is the real unzip uti=
lity
> > which accepts -uoq switches together. The former one complains "unzip: =
-n=2C
> > -o and -u are contradictory".
> > Without being able to -uoq causes a race with two unzips attempting to
> > overwrite the same file at the same time. -u prevents existing files fr=
om
> > being overwritten if they haven't been updated and allows us to run any
> > number of unzips in parallel.
> > After installing FreeBSD=2C I have to rename "/usr/bin/unzip" to
> > "/usr/bin/unzip2" followed by "pkg install unzip" and then "ln -s
> > /usr/local/bin/unzip /usr/bin/unzip".
> > If the licensing permits=2C please consider replacing the default unzip
> > utility with the one available in ports. This way it is convenient to w=
rite
> > a cross-platform build/install scripts for software without additional
> > checks.
> > Thanks.
> >
>=20
> Having just read the manpage of both the FreeBSD version and the info-zip
> version=2C it sounds to me like those -o and -u options ARE contradictory=
.
>=20
> -o tells unzip to overwrite any existing files.
>=20
> -u tells unzip to only overwrite any existing files if the version from t=
he
> zip is newer.
>=20
> It doesn't make sense to me to use both of these switches. You should
> choose which behaviour you want and only specify one of them. Perhaps
> "unzip -uq FILE.zip" will suffice?
>=20
> Info-zip unzip(1) manpage:
> http://linux.die.net/man/1/unzip
>=20
> FreeBSD unzip(1) manpage:
> https://www.freebsd.org/cgi/man.cgi?unzip
>=20
> Regards=2C
> Ben
>=20
>=20
> --=20
>=20
> --
> From: Benjamin Woods
> woodsb02@gmail.com
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe=2C send any mail to "freebsd-questions-unsubscribe@freebsd=
.org"
 		 	   		  =



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BAY169-W71CF3A8E16B1C9CD623C54A7E60>