bin/133979: pkg_create(1): pkg_create -n gives an error
Efstratios Karatzas
gpf.kira at gmail.com
Thu Jan 28 22:00:22 UTC 2010
The following reply was made to PR bin/133979; it has been noted by GNATS.
From: Efstratios Karatzas <gpf.kira at gmail.com>
To: bug-followup at freebsd.org, randy.belk at 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
More information about the freebsd-bugs
mailing list