Re: CVS commit: src/external/bsd/pkg_install/dist/create

2019-04-06 Thread Robert Elz
Date:Sat, 6 Apr 2019 08:29:02 +
From:"Robert Elz" 
Message-ID:  <20190406082902.1da38f...@cvs.netbsd.org>

  | Module Name:src
  | Committed By:   kre
  | Date:   Sat Apr  6 08:29:02 UTC 2019
  |
  | Modified Files:
  | src/external/bsd/pkg_install/dist/create: util.c
  |
  | Log Message:
  | Use __UNCONST() rather than a simple cast to free a const char *
  | while avoiding gcc noise.

Note that a better fix for this would probably be to remove the
const from the fields in the struct definition (in create.h)

As far as I can see, nothing needs (even conceptually) that they
be there - the data is always assigned as

ptr->owner = xstrdup(whatever);

where xstrdup() is just strdup() + error check, and strdup() is
the canonical way to correctly (if slowly) convert a const char *
into a char * ... making it be const char * again just seems wrong.

However, I will leave it for someone else to determine if that
really is a preferred solution.

kre



CVS commit: src/external/bsd/pkg_install/dist/create

2019-04-06 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Apr  6 08:29:02 UTC 2019

Modified Files:
src/external/bsd/pkg_install/dist/create: util.c

Log Message:
Use __UNCONST() rather than a simple cast to free a const char *
while avoiding gcc noise.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 src/external/bsd/pkg_install/dist/create/util.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/pkg_install/dist/create/util.c
diff -u src/external/bsd/pkg_install/dist/create/util.c:1.1.1.4 src/external/bsd/pkg_install/dist/create/util.c:1.2
--- src/external/bsd/pkg_install/dist/create/util.c:1.1.1.4	Fri Apr  5 23:41:58 2019
+++ src/external/bsd/pkg_install/dist/create/util.c	Sat Apr  6 08:29:01 2019
@@ -147,8 +147,8 @@ void
 free_memory_file(struct memory_file *file)
 {
 	if (file != NULL) {
-		free((char *)file->owner);
-		free((char *)file->group);
+		free(__UNCONST(file->owner));
+		free(__UNCONST(file->group));
 		free(file->data);
 		free(file);
 	}



CVS commit: src/external/bsd/pkg_install/dist/create

2019-04-06 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Apr  6 08:29:02 UTC 2019

Modified Files:
src/external/bsd/pkg_install/dist/create: util.c

Log Message:
Use __UNCONST() rather than a simple cast to free a const char *
while avoiding gcc noise.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 src/external/bsd/pkg_install/dist/create/util.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/pkg_install/dist/create

2015-10-10 Thread Marc Balmer
Module Name:src
Committed By:   mbalmer
Date:   Sat Oct 10 10:08:12 UTC 2015

Modified Files:
src/external/bsd/pkg_install/dist/create: pkg_create.1

Log Message:
use a verb in the authors section for all entries


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.8 -r1.2 \
src/external/bsd/pkg_install/dist/create/pkg_create.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/pkg_install/dist/create

2015-10-10 Thread Marc Balmer
Module Name:src
Committed By:   mbalmer
Date:   Sat Oct 10 10:08:12 UTC 2015

Modified Files:
src/external/bsd/pkg_install/dist/create: pkg_create.1

Log Message:
use a verb in the authors section for all entries


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.8 -r1.2 \
src/external/bsd/pkg_install/dist/create/pkg_create.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/pkg_install/dist/create/pkg_create.1
diff -u src/external/bsd/pkg_install/dist/create/pkg_create.1:1.1.1.8 src/external/bsd/pkg_install/dist/create/pkg_create.1:1.2
--- src/external/bsd/pkg_install/dist/create/pkg_create.1:1.1.1.8	Fri Apr 23 20:54:08 2010
+++ src/external/bsd/pkg_install/dist/create/pkg_create.1	Sat Oct 10 10:08:12 2015
@@ -1,4 +1,4 @@
-.\" $NetBSD: pkg_create.1,v 1.1.1.8 2010/04/23 20:54:08 joerg Exp $
+.\" $NetBSD: pkg_create.1,v 1.2 2015/10/10 10:08:12 mbalmer Exp $
 .\"
 .\" FreeBSD install - a package for the installation and maintenance
 .\" of non-core utilities.
@@ -24,7 +24,7 @@
 .\" [jkh] Took John's changes back and made some additional extensions for
 .\" better integration with FreeBSD's new ports collection.
 .\"
-.Dd January 20, 2010
+.Dd October 10, 2015
 .Dt PKG_CREATE 1
 .Os
 .Sh NAME
@@ -494,11 +494,12 @@ command first appeared in
 .Sh AUTHORS
 .Bl -tag -width indent -compact
 .It Jordan Hubbard
-most of the work
+did most of the work.
 .It John Kohl
 refined it for
-.Nx
+.Nx .
 .It Hubert Feyrer
+added
 .Nx
 wildcard dependency processing, pkgdb, pkg size recording etc.
 .El