On Tue, Jun 23, 2020 at 07:28:09PM -0400, sven falempin wrote:
> Dear readers,
> 
> It may not be very obvious that 'dry run' mode of pkg_add
> actually downloads packages.
> It is a good feature and maybe the pkg_add man could use an EXAMPLES
> section.
> 

hi.

it might not be obvious, but it is documented:

         -n       Don't actually install a package, just report the
                  steps that would be taken if it was.  Will still
                  copy packages to PKG_CACHE if applicable.

if you look through the page for how the PKG_CACHE stuff works, it
seems clear.

anyway, i'll defer to espie on whether the diff is wanted or not.
comments on your text inline:

> Index: pkg_add.1
> ===================================================================
> RCS file: /cvs/src/usr.sbin/pkg_add/pkg_add.1,v
> retrieving revision 1.163
> diff -u -p -r1.163 pkg_add.1
> --- pkg_add.1   24 Jan 2020 21:10:46 -0000      1.163
> +++ pkg_add.1   23 Jun 2020 23:25:12 -0000
> @@ -836,6 +836,18 @@ information about individual packages
>  database of installed
>  .Xr packages 7
>  .El
> +.Sh EXAMPLES
> +It is possible to download packages before installing them to separate
> download and installation process.

this would have to be sth like:

        ...before installing them,
        in order to separate the download and installation processes.

> +.Pp
> +.Dl PKG_CACHE=/tmp/pkgs pkg_add -I -u -n
> +.Pp
> +will download the package(s) to be updated into .Dq /tmp/pkgs

then you have a new paragraph started, mid-sentence. so it's better to
structure the text like this:

        ...installation processes.
        To download the packages to
        .Dq /tmp/pkgs :
        .Pp
        .Dl $ blah ...
        .Pp
        They can then be installed at a later date:
        .Pp
        .Dl $ blah ...

note also that the Dq stuff should be on a separate line.
plus we normally show commands with "$" or "#" prompts.

> +directory
> +and they can be installed later
> +.Pp
> +pkg_add -I /tmp/pkgs/*
> +.Pp
> +.El

and you didn;t start a list (Bl) so no need to end one (El).

jmc

>  .Sh SEE ALSO
>  .Xr ftp 1 ,
>  .Xr pkg_create 1 ,
> 
> Best,

Reply via email to