[HEADSUP][CFT] pkgng beta1 is out

Baptiste Daroussin bapt at FreeBSD.org
Tue Jan 31 20:18:57 UTC 2012


On Tue, Jan 31, 2012 at 09:09:47PM +0100, Marco Steinbach wrote:
> On Mon, 30 Jan 2012, Baptiste Daroussin wrote:
> 
> > Hi,
> >
> > pkgng has just reached the beta phase, and has now found its way to the
> > ports tree (disabled by default).
> 
> [...]
> 
> > cd /usr/ports/
> > touch abc
> touch: abc: Permission denied
> > pkg create net/ifstat
> Creating package for ifstat-1.1_5
> Segmentation fault
> 
> 
> The attached patch tries to enable pkg(1) to stay on top of things by adding
> error handling around archive_write_open_filename.
> 
> > pkg create net/ifstat
> Creating package for ifstat-1.1_5
> pkg: archive_write_open_filename(.//ifstat-1.1_5.txz): Permission denied
> pkg: unable to create archive
> 
> MfG CoCo

> diff --git a/libpkg/packing.c b/libpkg/packing.c
> index e536eb8..9543c32 100644
> --- a/libpkg/packing.c
> +++ b/libpkg/packing.c
> @@ -49,7 +49,15 @@ packing_init(struct packing **pack, const char *path, pkg_formats format)
>  		}
>  		snprintf(archive_path, sizeof(archive_path), "%s.%s", path, ext);
>  
> -		archive_write_open_filename((*pack)->awrite, archive_path);
> +		if (archive_write_open_filename(
> +		    (*pack)->awrite, archive_path) != ARCHIVE_OK ) {
> +			pkg_emit_errno("archive_write_open_filename",
> +			    archive_path);
> +			archive_read_finish((*pack)->aread);
> +			archive_write_finish((*pack)->awrite);
> +			*pack = NULL;
> +			return EPKG_FATAL;
> +		}
>  	} else { /* pass mode directly write to the disk */
>  		(*pack)->awrite = archive_write_disk_new();
>  		archive_write_disk_set_options((*pack)->awrite, EXTRACT_ARCHIVE_FLAGS);


Thanks for spotting this, can you:
send a git format-patch diff
or send a pull-request on github?

if not I'll integrate the patch as-is

regards,
Bapt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20120131/7bbfc22f/attachment.pgp


More information about the freebsd-ports mailing list