Date: Thu, 28 Jan 2010 22:00:21 GMT From: Efstratios Karatzas <gpf.kira@gmail.com> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/133979: pkg_create(1): pkg_create -n gives an error Message-ID: <201001282200.o0SM0LAM092683@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/133979; it has been noted by GNATS. From: Efstratios Karatzas <gpf.kira@gmail.com> To: bug-followup@freebsd.org, randy.belk@gmail.com Cc: Subject: Re: bin/133979: pkg_create(1): pkg_create -n gives an error Date: Thu, 28 Jan 2010 23:59:16 +0200 Helloo! I've done some digging and I think I can provide some feedback. The PR originator states that the option "-n" is not coded. This does not apply to modern versions of pkg_create. First of all, take a look at this file: src/usr.sbin/pkg_install/create/main.c http://www.freebsd.org/cgi/cvsweb.cgi/src/usr.sbin/pkg_install/create/main.c?rev=1.36.2.7 You can see that if the "-n" option is supplied, we change the value of a global variable case 'n': Regenerate = FALSE; break; Now take a look at this file: src/usr.sbin/pkg_install/create/perform.c http://www.freebsd.org/cgi/cvsweb.cgi/src/usr.sbin/pkg_install/create/perform.c?rev=1.80.2.5 goto function make_dist() and take a look at this: /* * If the package tarball exists already, and we are running in `no * clobber' mode, skip this package. */ if (stat(tball, &sb) == 0 && Regenerate == FALSE) { if (Verbose) printf("Skipping package '%s'. It already exists.\n", tball); return; } Which does just what the man page says it does. Since this behavior cannot be recreated in recent versions, I believe the state of the PR should change to closed or at least to feedback. Cheers -- Efstratios "GPF" Karatzas
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001282200.o0SM0LAM092683>