Subject: Re: pkg_add bugs
To: Simon J. Gerraty <sjg@quick.com.au>
From: Hubert Feyrer <feyrer@rfhs8012.fh-regensburg.de>
List: tech-pkg
Date: 06/16/2000 17:11:30
On Sat, 17 Jun 2000, Simon J. Gerraty wrote:
> -void
> +int
>  extract_plist(char *home, package_t *pkg)

Please document the return protocol: 0 = bad, 1 = ok
by adding a comment. 


> --- main.c	2000/01/19 23:28:28	1.14
> +++ main.c	2000/06/16 14:30:40
> @@ -197,7 +197,7 @@ main(int argc, char **argv)
>  	if ((error = pkg_perform(&pkgs)) != 0) {
>  		if (Verbose)
>  			warnx("%d package addition(s) failed", error);
> -		return error;
> -	} else
> -		return 0;
> +		exit(1);
> +	}
> +	exit(0);

don't do this. 
It makes a "pkg_add *" (which i happened to do today) stop, instead of
continue with the next pkg. 

Otherwise, this looks fine - thanks!


 - Hubert

-- 
NetBSD - because Unix isn't just #include <linux.h>, i386, ILP32, ELF, ...!