pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkg_install/files Add FILE_NAME, the name of ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/1980ed6ef9cf
branches: trunk
changeset: 532688:1980ed6ef9cf
user: dillo <dillo%pkgsrc.org@localhost>
date: Wed Aug 29 14:15:50 2007 +0000
description:
Add FILE_NAME, the name of the binary package file.
Prompted by Jeremy, okayed by Joerg.
diffstat:
pkgtools/pkg_install/files/info/show.c | 12 ++++++++++--
pkgtools/pkg_install/files/lib/pkg_summary.5 | 7 +++++--
pkgtools/pkg_install/files/lib/pkg_summary.cat5 | 6 +++++-
3 files changed, 20 insertions(+), 5 deletions(-)
diffs (81 lines):
diff -r a65b08a3adbe -r 1980ed6ef9cf pkgtools/pkg_install/files/info/show.c
--- a/pkgtools/pkg_install/files/info/show.c Wed Aug 29 13:52:43 2007 +0000
+++ b/pkgtools/pkg_install/files/info/show.c Wed Aug 29 14:15:50 2007 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: show.c,v 1.17 2007/08/15 02:08:40 joerg Exp $ */
+/* $NetBSD: show.c,v 1.18 2007/08/29 14:15:50 dillo Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -11,7 +11,7 @@
#if 0
static const char *rcsid = "from FreeBSD Id: show.c,v 1.11 1997/10/08 07:47:38 charnier Exp";
#else
-__RCSID("$NetBSD: show.c,v 1.17 2007/08/15 02:08:40 joerg Exp $");
+__RCSID("$NetBSD: show.c,v 1.18 2007/08/29 14:15:50 dillo Exp $");
#endif
#endif
@@ -397,6 +397,14 @@
var_copy_list(BUILD_INFO_FNAME, bi_vars);
if (binpkgfile != NULL && stat(binpkgfile, &st) == 0) {
+ const char *base;
+
+ base = strrchr(binpkgfile, '/');
+ if (base == NULL)
+ base = binpkgfile;
+ else
+ base++;
+ printf("FILE_NAME=%s\n", base);
printf("FILE_SIZE=%" MY_PRIu64 "\n", (uint64_t)st.st_size);
/* XXX: DIGETS */
}
diff -r a65b08a3adbe -r 1980ed6ef9cf pkgtools/pkg_install/files/lib/pkg_summary.5
--- a/pkgtools/pkg_install/files/lib/pkg_summary.5 Wed Aug 29 13:52:43 2007 +0000
+++ b/pkgtools/pkg_install/files/lib/pkg_summary.5 Wed Aug 29 14:15:50 2007 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: pkg_summary.5,v 1.6 2007/04/16 12:55:35 joerg Exp $
+.\" $NetBSD: pkg_summary.5,v 1.7 2007/08/29 14:15:50 dillo Exp $
.\"
.\" Copyright (c) 2006 The NetBSD Foundation
.\"
@@ -27,7 +27,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd February 5, 2007
+.Dd August 29, 2007
.Dt PKG_SUMMARY 5
.Os
.Sh NAME
@@ -66,6 +66,9 @@
.It Ev DESCRIPTION
(required) A more detailed description of the package.
.\" DIGEST
+.It Ev FILE_NAME
+(optional) The name of the binary package file. If not given,
+PKGNAME.tgz can be assumed.
.It Ev FILE_SIZE
(optional) The size of the binary package file, in bytes.
.It Ev HOMEPAGE
diff -r a65b08a3adbe -r 1980ed6ef9cf pkgtools/pkg_install/files/lib/pkg_summary.cat5
--- a/pkgtools/pkg_install/files/lib/pkg_summary.cat5 Wed Aug 29 13:52:43 2007 +0000
+++ b/pkgtools/pkg_install/files/lib/pkg_summary.cat5 Wed Aug 29 14:15:50 2007 +0000
@@ -36,6 +36,10 @@
DESCRIPTION
(required) A more detailed description of the package.
+ FILE_NAME
+ (optional) The name of the binary package file. If not given,
+ PKGNAME.tgz can be assumed.
+
FILE_SIZE
(optional) The size of the binary package file, in bytes.
@@ -96,4 +100,4 @@
HHIISSTTOORRYY
The ppkkgg__ssuummmmaarryy format was first officially documented in April 2006.
-NetBSD 4.0 February 5, 2007 NetBSD 4.0
+NetBSD 4.0 August 29, 2007 NetBSD 4.0
Home |
Main Index |
Thread Index |
Old Index