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 Remove @option extract-in-p...
details: https://anonhg.NetBSD.org/pkgsrc/rev/866ce9c6959d
branches: trunk
changeset: 532012:866ce9c6959d
user: joerg <joerg%pkgsrc.org@localhost>
date: Thu Aug 09 23:32:59 2007 +0000
description:
Remove @option extract-in-place support for now (will be the default
later) and document @option preserve in pkg_add(1).
diffstat:
pkgtools/pkg_install/files/add/perform.c | 39 ++--------------------
pkgtools/pkg_install/files/add/pkg_add.1 | 22 ++++--------
pkgtools/pkg_install/files/add/pkg_add.cat1 | 35 ++++++++-----------
pkgtools/pkg_install/files/create/pkg_create.1 | 11 +----
pkgtools/pkg_install/files/create/pkg_create.cat1 | 14 ++-----
5 files changed, 34 insertions(+), 87 deletions(-)
diffs (290 lines):
diff -r a08015de0ad1 -r 866ce9c6959d pkgtools/pkg_install/files/add/perform.c
--- a/pkgtools/pkg_install/files/add/perform.c Thu Aug 09 23:18:30 2007 +0000
+++ b/pkgtools/pkg_install/files/add/perform.c Thu Aug 09 23:32:59 2007 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: perform.c,v 1.53 2007/08/09 23:18:30 joerg Exp $ */
+/* $NetBSD: perform.c,v 1.54 2007/08/09 23:32:59 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -14,7 +14,7 @@
#if 0
static const char *rcsid = "from FreeBSD Id: perform.c,v 1.44 1997/10/13 15:03:46 jkh Exp";
#else
-__RCSID("$NetBSD: perform.c,v 1.53 2007/08/09 23:18:30 joerg Exp $");
+__RCSID("$NetBSD: perform.c,v 1.54 2007/08/09 23:32:59 joerg Exp $");
#endif
#endif
@@ -224,7 +224,6 @@
plist_t *p;
struct stat sb;
struct utsname host_uname;
- int inPlace;
int rc;
uint64_t needed;
Boolean is_depoted_pkg = FALSE;
@@ -236,7 +235,6 @@
LogDir[0] = '\0';
strlcpy(playpen, FirstPen, sizeof(playpen));
memset(buildinfo, '\0', sizeof(buildinfo));
- inPlace = 0;
umask(DEF_UMASK);
@@ -322,31 +320,6 @@
fclose(cfile);
if (!IS_URL(pkg)) {
- /* Extract directly rather than moving? Oh goodie! */
- if (find_plist_option(&Plist, "extract-in-place")) {
- if (Verbose)
- printf("Doing in-place extraction for %s\n", pkg);
- p = find_plist(&Plist, PLIST_CWD);
- if (p) {
- if (!(isdir(p->name) || islinktodir(p->name)) && !Fake) {
- if (Verbose)
- printf("Desired prefix of %s does not exist, creating.\n", p->name);
- (void) fexec("mkdir", "-p", p->name, NULL);
- }
- if (chdir(p->name) == -1) {
- warn("unable to change directory to `%s'", p->name);
- goto bomb;
- }
- where_to = p->name;
- inPlace = 1;
- } else {
- warnx(
- "no prefix specified in `%s' - this is a bad package!",
- pkg);
- goto bomb;
- }
- }
-
/*
* Apply a crude heuristic to see how much space the package will
* take up once it's unpacked. I've noticed that most packages
@@ -354,7 +327,7 @@
*/
needed = 4 * (uint64_t) sb.st_size;
- if (!inPlace && min_free(playpen) < needed) {
+ if (min_free(playpen) < needed) {
warnx("projected size of %" MY_PRIu64 " bytes exceeds available free space\n"
"in %s. Please set your PKG_TMPDIR variable to point\n"
"to a location with more free space and try again.",
@@ -362,10 +335,6 @@
goto bomb;
}
- /* If this is a direct extract and we didn't want it, stop now */
- if (inPlace && Fake)
- goto success;
-
/* Finally unpack the whole mess */
if (unpack(pkg, NULL)) {
warnx("unable to extract `%s'!", pkg);
@@ -846,7 +815,7 @@
* We need to reset the package dbdir so that extract_plist()
* updates the correct pkgdb.byfile.db database.
*/
- if (!inPlace && !Fake) {
+ if (!Fake) {
_pkgdb_setPKGDB_DIR(dbdir);
if (!extract_plist(".", &Plist)) {
errc = 1;
diff -r a08015de0ad1 -r 866ce9c6959d pkgtools/pkg_install/files/add/pkg_add.1
--- a/pkgtools/pkg_install/files/add/pkg_add.1 Thu Aug 09 23:18:30 2007 +0000
+++ b/pkgtools/pkg_install/files/add/pkg_add.1 Thu Aug 09 23:32:59 2007 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: pkg_add.1,v 1.24 2007/08/02 23:34:00 wiz Exp $
+.\" $NetBSD: pkg_add.1,v 1.25 2007/08/09 23:32:59 joerg Exp $
.\"
.\" FreeBSD install - a package for the installation and maintenance
.\" of non-core utilities.
@@ -17,7 +17,7 @@
.\"
.\" @(#)pkg_add.1
.\"
-.Dd August 2, 2007
+.Dd August 10, 2007
.Dt PKG_ADD 1
.Os
.Sh NAME
@@ -330,15 +330,10 @@
.Cm @option
directives which control how the package is added to the system.
The only currently implemented option is
-.Cm @option extract-in-place ,
-which causes the package to be extracted directly into its
-prefix directory rather than moving it through a staging area in
-.Pa /var/tmp .
-.It
-If
-.Cm @option extract-in-place
-is enabled, the package is now extracted directly into its
-final location, otherwise it is extracted into the staging area.
+.Cm @option preserve ,
+which tells pkg_add to move any existing files out of the way,
+preserving the previous contents (which are also resurrected on
+pkg_delete, so caveat emptor).
.It
The package build information is extracted from the
.Pa +BUILD_INFO
@@ -374,10 +369,7 @@
.Ar install
script exits with a non-zero status code, the installation is terminated.
.It
-If
-.Cm @option extract-in-place
-is not present in the packing list,
-then it is used as a guide for moving (or copying, as necessary) files from
+It is used as a guide for moving (or copying, as necessary) files from
the staging area into their final locations.
.It
If an
diff -r a08015de0ad1 -r 866ce9c6959d pkgtools/pkg_install/files/add/pkg_add.cat1
--- a/pkgtools/pkg_install/files/add/pkg_add.cat1 Thu Aug 09 23:18:30 2007 +0000
+++ b/pkgtools/pkg_install/files/add/pkg_add.cat1 Thu Aug 09 23:32:59 2007 +0000
@@ -186,26 +186,23 @@
4. A search is made for any @@ooppttiioonn directives which control how
the package is added to the system. The only currently imple-
- mented option is @@ooppttiioonn eexxttrraacctt--iinn--ppllaaccee, which causes the
- package to be extracted directly into its prefix directory
- rather than moving it through a staging area in _/_v_a_r_/_t_m_p.
+ mented option is @@ooppttiioonn pprreesseerrvvee, which tells pkg_add to move
+ any existing files out of the way, preserving the previous
+ contents (which are also resurrected on pkg_delete, so caveat
+ emptor).
- 5. If @@ooppttiioonn eexxttrraacctt--iinn--ppllaaccee is enabled, the package is now
- extracted directly into its final location, otherwise it is
- extracted into the staging area.
-
- 6. The package build information is extracted from the
+ 5. The package build information is extracted from the
_+_B_U_I_L_D___I_N_F_O file and compared against the result of uname(3).
If the operating system or architecture of the package differ
from that of the host, installation is aborted. This behavior
is overridable with the --ff flag.
- 7. The package build information from _+_B_U_I_L_D___I_N_F_O is then checked
+ 6. The package build information from _+_B_U_I_L_D___I_N_F_O is then checked
for USE_ABI_DEPENDS=NO (or IGNORE_RECOMMENDED). If the pack-
age was built with ABI dependency recommendations ignored, a
warning will be issued.
- 8. If the package contains an _i_n_s_t_a_l_l script, it is executed with
+ 7. If the package contains an _i_n_s_t_a_l_l script, it is executed with
the following arguments:
_p_k_g_-_n_a_m_e The name of the package being installed.
@@ -217,12 +214,10 @@
If the _i_n_s_t_a_l_l script exits with a non-zero status code, the
installation is terminated.
- 9. If @@ooppttiioonn eexxttrraacctt--iinn--ppllaaccee is not present in the packing
- list, then it is used as a guide for moving (or copying, as
- necessary) files from the staging area into their final loca-
- tions.
+ 8. It is used as a guide for moving (or copying, as necessary)
+ files from the staging area into their final locations.
- 10. If an _i_n_s_t_a_l_l script exists for the package, it is executed
+ 9. If an _i_n_s_t_a_l_l script exists for the package, it is executed
with the following arguments:
_p_k_g___n_a_m_e The name of the package being installed.
@@ -231,7 +226,7 @@
any actions needed after the package has been
installed.
- 11. After installation is complete, a copy of the packing list,
+ 10. After installation is complete, a copy of the packing list,
_d_e_i_n_s_t_a_l_l script, description, and display files are copied
into _/_v_a_r_/_d_b_/_p_k_g_/_<_p_k_g_-_n_a_m_e_> for subsequent possible use by
pkg_delete(1). Any package dependencies are recorded in the
@@ -239,12 +234,12 @@
an alternate package database directory is specified, then it
overrides the _/_v_a_r_/_d_b_/_p_k_g path shown above).
- 12. If the package is a depoted package, then add it to the
+ 11. If the package is a depoted package, then add it to the
default view.
- 13. The staging area is deleted and the program terminates.
+ 12. The staging area is deleted and the program terminates.
- 14. Finally, if we were upgrading a package, any _+_R_E_Q_U_I_R_E_D___B_Y file
+ 13. Finally, if we were upgrading a package, any _+_R_E_Q_U_I_R_E_D___B_Y file
that was moved aside before upgrading was started is now moved
back into place.
@@ -346,4 +341,4 @@
Sure to be others.
-NetBSD 4.0 August 2, 2007 NetBSD 4.0
+NetBSD 4.0 August 10, 2007 NetBSD 4.0
diff -r a08015de0ad1 -r 866ce9c6959d pkgtools/pkg_install/files/create/pkg_create.1
--- a/pkgtools/pkg_install/files/create/pkg_create.1 Thu Aug 09 23:18:30 2007 +0000
+++ b/pkgtools/pkg_install/files/create/pkg_create.1 Thu Aug 09 23:32:59 2007 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: pkg_create.1,v 1.12 2007/08/03 13:55:29 joerg Exp $
+.\" $NetBSD: pkg_create.1,v 1.13 2007/08/09 23:33:00 joerg 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 August 2, 2007
+.Dd August 10, 2007
.Dt PKG_CREATE 1
.Os
.Sh NAME
@@ -400,13 +400,8 @@
no surprise).
Use without an arg to set back to default (extraction) permissions.
.It Cm @option Ar option
-Set internal package options, the only two currently supported ones
+Set internal package options, the only currently supported one
being
-.Ar extract-in-place ,
-which tells the pkg_add command not to extract the package's tarball
-into a staging area but rather directly into the target
-hierarchy (this is typically meant to be used only by distributions
-or other special package types), and
.Ar preserve ,
which tells pkg_add to move any existing files out of the way,
preserving the previous contents (which are also resurrected on
diff -r a08015de0ad1 -r 866ce9c6959d pkgtools/pkg_install/files/create/pkg_create.cat1
--- a/pkgtools/pkg_install/files/create/pkg_create.cat1 Thu Aug 09 23:18:30 2007 +0000
+++ b/pkgtools/pkg_install/files/create/pkg_create.cat1 Thu Aug 09 23:32:59 2007 +0000
@@ -215,14 +215,10 @@
surprise). Use without an arg to set back to default (extrac-
tion) permissions.
@@ooppttiioonn _o_p_t_i_o_n
- Set internal package options, the only two currently supported
- ones being _e_x_t_r_a_c_t_-_i_n_-_p_l_a_c_e, which tells the pkg_add command not
- to extract the package's tarball into a staging area but rather
- directly into the target hierarchy (this is typically meant to be
- used only by distributions or other special package types), and
- _p_r_e_s_e_r_v_e, which tells pkg_add to move any existing files out of
- the way, preserving the previous contents (which are also resur-
- rected on pkg_delete, so caveat emptor).
+ Set internal package options, the only currently supported one
+ being _p_r_e_s_e_r_v_e, which tells pkg_add to move any existing files
+ out of the way, preserving the previous contents (which are also
+ resurrected on pkg_delete, so caveat emptor).
@@oowwnneerr _u_s_e_r
Set default ownership for all subsequently extracted files to
_u_s_e_r. Use without an arg to set back to default (extraction)
@@ -300,4 +296,4 @@
invocations due to exec argument-space limitations (this depends on the
value returned by ssyyssccoonnff(___S_C___A_R_G___M_A_X)).
-NetBSD 4.0 August 2, 2007 NetBSD 4.0
+NetBSD 4.0 August 10, 2007 NetBSD 4.0
Home |
Main Index |
Thread Index |
Old Index