summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/guide/files/submit.xml43
-rw-r--r--mk/flavor/pkg/metadata.mk8
-rw-r--r--pkgtools/pkg_install/files/info/show.c6
-rw-r--r--pkgtools/pkg_install/files/lib/pkg_summary.514
-rw-r--r--pkgtools/pkg_install/files/lib/version.h4
5 files changed, 67 insertions, 8 deletions
diff --git a/doc/guide/files/submit.xml b/doc/guide/files/submit.xml
index f7649cd0aa1..eb662c75910 100644
--- a/doc/guide/files/submit.xml
+++ b/doc/guide/files/submit.xml
@@ -1,4 +1,4 @@
-<!-- $NetBSD: submit.xml,v 1.19 2007/08/15 06:33:46 rillig Exp $ -->
+<!-- $NetBSD: submit.xml,v 1.20 2009/05/02 16:14:37 reed Exp $ -->
<chapter id="submit"> <?dbhtml filename="submit.html"?>
<title>Submitting and Committing</title>
@@ -149,9 +149,37 @@
stability is to be preferred above new and possibly untested features.</para>
</sect1>
+<sect1 id="renaming-package">
+<title>Renaming a package in pkgsrc</title>
+
+<para>Renaming packages is not recommended.</para>
+
+
+<para>When renaming packages, be sure to fix any references to old name
+ in other Makefiles, options, buildlink files, etc.</para>
+
+<para>Also When renaming a package, please define
+ <varname>SUPERSEDES</varname> to the package name and dewey version
+ pattern(s) of the previous package name.
+ This may be repeated for multiple renames.
+ The new package would be an exact replacement.
+</para>
+
+<para>Note that <quote>successor</quote> in the
+ CHANGES-<replaceable>YYYY</replaceable> file doesn't necessarily
+ mean that it <emphasis>supersedes</emphasis>, as that successor may
+ not be an exact replacement but is a suggestion for the replaced
+ functionality.</para>
+
+</sect1>
+
<sect1 id="moving-package">
<title>Moving a package in pkgsrc</title>
+<para>It is preferred that packages are not renamed or moved, but if needed
+ please follow these steps.
+</para>
+
<orderedlist>
<listitem><para>Make a copy of the directory somewhere else.</para></listitem>
@@ -166,6 +194,19 @@
instead of <quote>../../category/package</quote>.</para>
</listitem>
+<listitem><para>In the modified package's Makefile, consider setting
+<varname>PREV_PKGPATH</varname> to the previous category/package
+pathname. The <varname>PREV_PKGPATH</varname> can be used by tools
+for doing an update using pkgsrc building; for example, it can
+search the &man.pkg.summary.5; database for <varname>PREV_PKGPATH</varname>
+(if no <varname>SUPERSEDES</varname>) and then use the corresponding
+new <varname>PKGPATH</varname> for that moved package. Note that
+it may have multiple matches, so the tool should also check on the
+<varname>PKGBASE</varname> too. The <varname>PREV_PKGPATH</varname>
+probably has no value unless <varname>SUPERSEDES</varname> is not
+set, i.e. <varname>PKGBASE</varname> stays the same. </para>
+</listitem>
+
<listitem><para><command>cvs import</command> the modified package in the new
place.</para></listitem>
diff --git a/mk/flavor/pkg/metadata.mk b/mk/flavor/pkg/metadata.mk
index fb3ecc27c68..e295cde6677 100644
--- a/mk/flavor/pkg/metadata.mk
+++ b/mk/flavor/pkg/metadata.mk
@@ -1,4 +1,4 @@
-# $NetBSD: metadata.mk,v 1.30 2008/05/21 20:39:52 abs Exp $
+# $NetBSD: metadata.mk,v 1.31 2009/05/02 16:14:37 reed Exp $
######################################################################
### The targets below are all PRIVATE.
@@ -47,6 +47,12 @@ ${_BUILD_INFO_FILE}: plist
.if defined(OWNER)
${RUN}${ECHO} "OWNER=${OWNER}" >> ${.TARGET}.tmp
.endif
+.if defined(PREV_PKGPATH)
+ ${RUN}${ECHO} "PREV_PKGPATH=${PREV_PKGPATH}" >> ${.TARGET}.tmp
+.endif
+.if defined(SUPERSEDES)
+ ${RUN}${ECHO} "SUPERSEDES=${SUPERSEDES}" >> ${.TARGET}.tmp
+.endif
${RUN}${ECHO} "BUILD_DATE=${_BUILD_DATE_cmd:sh}" >> ${.TARGET}.tmp
${RUN}${ECHO} "BUILD_HOST=${_BUILD_HOST_cmd:sh}" >> ${.TARGET}.tmp
.if !empty(CHECK_SHLIBS_SUPPORTED:M[yY][eE][sS])
diff --git a/pkgtools/pkg_install/files/info/show.c b/pkgtools/pkg_install/files/info/show.c
index a7a621e3fc4..57a9167c901 100644
--- a/pkgtools/pkg_install/files/info/show.c
+++ b/pkgtools/pkg_install/files/info/show.c
@@ -1,4 +1,4 @@
-/* $NetBSD: show.c,v 1.28 2009/04/24 14:00:25 joerg Exp $ */
+/* $NetBSD: show.c,v 1.29 2009/05/02 16:14:37 reed Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,7 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-__RCSID("$NetBSD: show.c,v 1.28 2009/04/24 14:00:25 joerg Exp $");
+__RCSID("$NetBSD: show.c,v 1.29 2009/05/02 16:14:37 reed Exp $");
/*
* FreeBSD install - a package for the installation and maintainance
@@ -334,6 +334,8 @@ show_summary(struct pkg_meta *meta, package_t *plist, const char *binpkgfile)
"HOMEPAGE",
"PKGTOOLS_VERSION",
"BUILD_DATE",
+ "PREV_PKGPATH",
+ "SUPERSEDES",
NULL
};
diff --git a/pkgtools/pkg_install/files/lib/pkg_summary.5 b/pkgtools/pkg_install/files/lib/pkg_summary.5
index 5b858729be1..08aece1c29b 100644
--- a/pkgtools/pkg_install/files/lib/pkg_summary.5
+++ b/pkgtools/pkg_install/files/lib/pkg_summary.5
@@ -1,4 +1,4 @@
-.\" $NetBSD: pkg_summary.5,v 1.8 2009/02/08 23:12:05 wiz Exp $
+.\" $NetBSD: pkg_summary.5,v 1.9 2009/05/02 16:14:37 reed 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 August 29, 2007
+.Dd April 11, 2009
.Dt PKG_SUMMARY 5
.Os
.Sh NAME
@@ -94,6 +94,12 @@ If missing, the package does not support options.
(required) The path of the package directory within pkgsrc.
.It Ev PKGTOOLS_VERSION
(required) The version of the package tools used to create the package.
+.It Ev PREV_PKGPATH
+(optional) The previous path of the package directory within pkgsrc when
+a package was moved.
+(See
+.Ev SUPERSEDES
+below for a renamed package.)
.It Ev PROVIDES
(optional) A list of shared libraries provided by the package,
including major version number, one per line.
@@ -104,6 +110,10 @@ major version number, one per line.
If missing, this package does not require shared libraries.
.It Ev SIZE_PKG
(required) The size of the package when installed, in bytes.
+.It Ev SUPERSEDES
+(optional) A list of dewey patterns of previous packages this
+package replaces, one per line.
+This is used for package renaming.
.El
.Pp
The
diff --git a/pkgtools/pkg_install/files/lib/version.h b/pkgtools/pkg_install/files/lib/version.h
index 38511738ee5..6e5fe0b9f87 100644
--- a/pkgtools/pkg_install/files/lib/version.h
+++ b/pkgtools/pkg_install/files/lib/version.h
@@ -1,4 +1,4 @@
-/* $NetBSD: version.h,v 1.125 2009/04/25 21:31:14 joerg Exp $ */
+/* $NetBSD: version.h,v 1.126 2009/05/02 16:14:37 reed Exp $ */
/*
* Copyright (c) 2001 Thomas Klausner. All rights reserved.
@@ -27,6 +27,6 @@
#ifndef _INST_LIB_VERSION_H_
#define _INST_LIB_VERSION_H_
-#define PKGTOOLS_VERSION "20090425"
+#define PKGTOOLS_VERSION "20090502"
#endif /* _INST_LIB_VERSION_H_ */