1995-05-04 19:48:19 +00:00
|
|
|
/*
|
|
|
|
* The new sysinstall program.
|
|
|
|
*
|
|
|
|
* This is probably the last program in the `sysinstall' line - the next
|
|
|
|
* generation being essentially a complete rewrite.
|
|
|
|
*
|
1999-08-28 01:35:59 +00:00
|
|
|
* $FreeBSD$
|
1995-05-04 19:48:19 +00:00
|
|
|
*
|
|
|
|
* Copyright (c) 1995
|
|
|
|
* Jordan Hubbard. All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
1995-05-30 08:29:07 +00:00
|
|
|
* notice, this list of conditions and the following disclaimer,
|
|
|
|
* verbatim and that no modifications are made prior to this
|
1995-05-04 19:48:19 +00:00
|
|
|
* point in the file.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND
|
|
|
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE
|
|
|
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
* OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
* SUCH DAMAGE.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "sysinstall.h"
|
2002-01-14 19:42:11 +00:00
|
|
|
#include <sys/param.h>
|
|
|
|
#include <sys/mount.h>
|
1997-01-03 06:32:39 +00:00
|
|
|
#include <sys/time.h>
|
2002-11-05 22:56:44 +00:00
|
|
|
#include <sys/uio.h>
|
2007-03-23 19:57:27 +00:00
|
|
|
#include <ctype.h>
|
1997-01-17 15:58:58 +00:00
|
|
|
#include <signal.h>
|
1998-10-14 11:23:48 +00:00
|
|
|
#include <libutil.h>
|
1995-05-04 19:48:19 +00:00
|
|
|
|
|
|
|
unsigned int Dists;
|
|
|
|
unsigned int SrcDists;
|
2004-08-10 02:18:28 +00:00
|
|
|
unsigned int XOrgDists;
|
2006-03-08 18:02:32 +00:00
|
|
|
unsigned int KernelDists;
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
|
|
|
|
enum _disttype { DT_TARBALL, DT_SUBDIST, DT_PACKAGE };
|
1995-05-10 07:45:00 +00:00
|
|
|
|
1995-05-16 02:53:31 +00:00
|
|
|
typedef struct _dist {
|
1995-05-08 21:39:40 +00:00
|
|
|
char *my_name;
|
1995-05-16 02:53:31 +00:00
|
|
|
unsigned int *my_mask;
|
1995-05-08 21:39:40 +00:00
|
|
|
unsigned int my_bit;
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
enum _disttype my_type;
|
|
|
|
union {
|
|
|
|
char *my_string; /* DT_TARBALL & DT_PACKAGE */
|
|
|
|
struct _dist *my_dist; /* DT_SUBDIST */
|
|
|
|
} my_data;
|
1995-05-16 02:53:31 +00:00
|
|
|
} Distribution;
|
|
|
|
|
2006-03-08 18:02:32 +00:00
|
|
|
static Distribution KernelDistTable[];
|
2005-05-02 14:18:08 +00:00
|
|
|
static Distribution SrcDistTable[];
|
|
|
|
static Distribution XOrgDistTable[];
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
|
|
|
|
#define DTE_TARBALL(name, mask, flag, directory) \
|
|
|
|
{ name, mask, DIST_ ## flag, DT_TARBALL, { directory } }
|
|
|
|
#define DTE_PACKAGE(name, mask, flag, package) \
|
|
|
|
{ name, mask, DIST_ ## flag, DT_PACKAGE, { package } }
|
|
|
|
#define DTE_SUBDIST(name, mask, flag, subdist) \
|
2004-07-03 16:52:57 +00:00
|
|
|
{ name, mask, DIST_ ## flag, DT_SUBDIST, { .my_dist = subdist } }
|
2006-02-28 21:49:33 +00:00
|
|
|
#define DTE_END { NULL, NULL, 0, 0, { NULL } }
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
|
|
|
|
#define BASE_DIST (&DistTable[0])
|
1995-05-16 02:53:31 +00:00
|
|
|
|
|
|
|
/* The top-level distribution categories */
|
|
|
|
static Distribution DistTable[] = {
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
DTE_TARBALL("base", &Dists, BASE, "/"),
|
2006-03-08 18:02:32 +00:00
|
|
|
DTE_SUBDIST("kernels", &Dists, KERNEL, KernelDistTable),
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
DTE_TARBALL("doc", &Dists, DOC, "/"),
|
|
|
|
DTE_TARBALL("games", &Dists, GAMES, "/"),
|
|
|
|
DTE_TARBALL("manpages", &Dists, MANPAGES, "/"),
|
|
|
|
DTE_TARBALL("catpages", &Dists, CATPAGES, "/"),
|
|
|
|
DTE_TARBALL("proflibs", &Dists, PROFLIBS, "/"),
|
|
|
|
DTE_TARBALL("dict", &Dists, DICT, "/"),
|
|
|
|
DTE_TARBALL("info", &Dists, INFO, "/"),
|
2005-06-16 18:16:14 +00:00
|
|
|
#ifdef __amd64__
|
|
|
|
DTE_TARBALL("lib32", &Dists, LIB32, "/"),
|
|
|
|
#endif
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
DTE_SUBDIST("src", &Dists, SRC, SrcDistTable),
|
|
|
|
DTE_TARBALL("ports", &Dists, PORTS, "/usr"),
|
|
|
|
DTE_TARBALL("local", &Dists, LOCAL, "/"),
|
2008-01-01 03:59:17 +00:00
|
|
|
DTE_PACKAGE("X.Org", &Dists, XORG, "xorg"),
|
2006-02-28 21:49:33 +00:00
|
|
|
DTE_END,
|
1995-05-08 21:39:40 +00:00
|
|
|
};
|
|
|
|
|
2006-03-08 18:02:32 +00:00
|
|
|
/* The kernel distributions */
|
|
|
|
static Distribution KernelDistTable[] = {
|
|
|
|
DTE_TARBALL("GENERIC", &KernelDists, KERNEL_GENERIC, "/boot"),
|
|
|
|
#ifdef WITH_SMP
|
|
|
|
DTE_TARBALL("SMP", &KernelDists, KERNEL_SMP, "/boot"),
|
|
|
|
#endif
|
|
|
|
DTE_END,
|
|
|
|
};
|
|
|
|
|
1995-05-16 02:53:31 +00:00
|
|
|
/* The /usr/src distribution */
|
|
|
|
static Distribution SrcDistTable[] = {
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
DTE_TARBALL("sbase", &SrcDists, SRC_BASE, "/usr/src"),
|
2007-06-28 18:27:29 +00:00
|
|
|
DTE_TARBALL("scddl", &SrcDists, SRC_CDDL, "/usr/src"),
|
2007-11-09 08:50:02 +00:00
|
|
|
DTE_TARBALL("scompat", &SrcDists, SRC_COMPAT, "/usr/src"),
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
DTE_TARBALL("scontrib", &SrcDists, SRC_CONTRIB, "/usr/src"),
|
2004-08-06 07:27:08 +00:00
|
|
|
DTE_TARBALL("scrypto", &SrcDists, SRC_SCRYPTO, "/usr/src"),
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
DTE_TARBALL("sgnu", &SrcDists, SRC_GNU, "/usr/src"),
|
|
|
|
DTE_TARBALL("setc", &SrcDists, SRC_ETC, "/usr/src"),
|
|
|
|
DTE_TARBALL("sgames", &SrcDists, SRC_GAMES, "/usr/src"),
|
|
|
|
DTE_TARBALL("sinclude", &SrcDists, SRC_INCLUDE, "/usr/src"),
|
2004-08-06 07:27:08 +00:00
|
|
|
DTE_TARBALL("skrb5", &SrcDists, SRC_SKERBEROS5, "/usr/src"),
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
DTE_TARBALL("slib", &SrcDists, SRC_LIB, "/usr/src"),
|
|
|
|
DTE_TARBALL("slibexec", &SrcDists, SRC_LIBEXEC, "/usr/src"),
|
|
|
|
DTE_TARBALL("srelease", &SrcDists, SRC_RELEASE, "/usr/src"),
|
|
|
|
DTE_TARBALL("sbin", &SrcDists, SRC_BIN, "/usr/src"),
|
2004-08-06 07:27:08 +00:00
|
|
|
DTE_TARBALL("ssecure", &SrcDists, SRC_SSECURE, "/usr/src"),
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
DTE_TARBALL("ssbin", &SrcDists, SRC_SBIN, "/usr/src"),
|
|
|
|
DTE_TARBALL("sshare", &SrcDists, SRC_SHARE, "/usr/src"),
|
|
|
|
DTE_TARBALL("ssys", &SrcDists, SRC_SYS, "/usr/src"),
|
|
|
|
DTE_TARBALL("subin", &SrcDists, SRC_UBIN, "/usr/src"),
|
|
|
|
DTE_TARBALL("susbin", &SrcDists, SRC_USBIN, "/usr/src"),
|
|
|
|
DTE_TARBALL("stools", &SrcDists, SRC_TOOLS, "/usr/src"),
|
2004-08-10 18:18:42 +00:00
|
|
|
DTE_TARBALL("srescue", &SrcDists, SRC_RESCUE, "/usr/src"),
|
2006-02-28 21:49:33 +00:00
|
|
|
DTE_END,
|
1995-05-10 07:45:00 +00:00
|
|
|
};
|
|
|
|
|
1997-03-10 21:11:57 +00:00
|
|
|
static int distMaybeSetPorts(dialogMenuItem *self);
|
1996-06-12 14:02:13 +00:00
|
|
|
|
1997-10-13 12:12:14 +00:00
|
|
|
static void
|
|
|
|
distVerifyFlags(void)
|
|
|
|
{
|
|
|
|
if (SrcDists)
|
|
|
|
Dists |= DIST_SRC;
|
2004-08-10 02:18:28 +00:00
|
|
|
if (XOrgDists)
|
|
|
|
Dists |= DIST_XORG;
|
2006-03-08 18:02:32 +00:00
|
|
|
if (KernelDists)
|
|
|
|
Dists |= DIST_KERNEL;
|
2002-11-27 18:36:30 +00:00
|
|
|
if (isDebug()) {
|
2006-03-08 18:02:32 +00:00
|
|
|
msgDebug("Dist Masks: Dists: %0x, Srcs: %0x Kernels: %0x\n", Dists,
|
|
|
|
SrcDists, KernelDists);
|
2004-08-10 02:18:28 +00:00
|
|
|
msgDebug("XServer: %0x\n", XOrgDists);
|
1999-09-02 00:51:16 +00:00
|
|
|
}
|
1997-10-13 12:12:14 +00:00
|
|
|
}
|
|
|
|
|
1995-06-11 19:33:05 +00:00
|
|
|
int
|
1996-04-07 03:52:36 +00:00
|
|
|
distReset(dialogMenuItem *self)
|
1995-06-11 19:33:05 +00:00
|
|
|
{
|
|
|
|
Dists = 0;
|
|
|
|
SrcDists = 0;
|
2004-08-10 02:18:28 +00:00
|
|
|
XOrgDists = 0;
|
2006-03-08 18:02:32 +00:00
|
|
|
KernelDists = 0;
|
1996-04-23 01:29:35 +00:00
|
|
|
return DITEM_SUCCESS | DITEM_REDRAW;
|
|
|
|
}
|
|
|
|
|
1997-05-05 05:16:03 +00:00
|
|
|
int
|
|
|
|
distConfig(dialogMenuItem *self)
|
|
|
|
{
|
|
|
|
char *cp;
|
|
|
|
|
|
|
|
distReset(NULL);
|
|
|
|
|
|
|
|
if ((cp = variable_get(VAR_DIST_MAIN)) != NULL)
|
|
|
|
Dists = atoi(cp);
|
|
|
|
|
|
|
|
if ((cp = variable_get(VAR_DIST_SRC)) != NULL)
|
|
|
|
SrcDists = atoi(cp);
|
|
|
|
|
|
|
|
if ((cp = variable_get(VAR_DIST_X11)) != NULL)
|
2004-08-10 02:18:28 +00:00
|
|
|
XOrgDists = atoi(cp);
|
1997-05-05 05:16:03 +00:00
|
|
|
|
2006-03-08 18:02:32 +00:00
|
|
|
if ((cp = variable_get(VAR_DIST_KERNEL)) != NULL)
|
|
|
|
KernelDists = atoi(cp);
|
|
|
|
|
1997-10-13 12:12:14 +00:00
|
|
|
distVerifyFlags();
|
1997-05-05 05:16:03 +00:00
|
|
|
return DITEM_SUCCESS | DITEM_REDRAW;
|
|
|
|
}
|
|
|
|
|
1999-03-19 10:54:38 +00:00
|
|
|
static int
|
|
|
|
distSetX(void)
|
|
|
|
{
|
2004-08-10 02:18:28 +00:00
|
|
|
Dists |= DIST_XORG;
|
2008-01-01 03:59:17 +00:00
|
|
|
XOrgDists = DIST_XORG_ALL;
|
|
|
|
return DITEM_SUCCESS;
|
1999-03-19 10:54:38 +00:00
|
|
|
}
|
|
|
|
|
2006-10-23 20:49:49 +00:00
|
|
|
int
|
2006-03-08 18:02:32 +00:00
|
|
|
selectKernel(void)
|
|
|
|
{
|
|
|
|
#ifdef WITH_SMP
|
|
|
|
/* select default kernel based on deduced cpu count */
|
|
|
|
return NCpus > 1 ? DIST_KERNEL_SMP : DIST_KERNEL_GENERIC;
|
|
|
|
#else
|
|
|
|
return DIST_KERNEL_GENERIC;
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
1995-06-11 19:33:05 +00:00
|
|
|
int
|
1996-04-07 03:52:36 +00:00
|
|
|
distSetDeveloper(dialogMenuItem *self)
|
1995-06-11 19:33:05 +00:00
|
|
|
{
|
1997-10-13 12:12:14 +00:00
|
|
|
int i;
|
|
|
|
|
1995-06-11 19:33:05 +00:00
|
|
|
distReset(NULL);
|
|
|
|
Dists = _DIST_DEVELOPER;
|
|
|
|
SrcDists = DIST_SRC_ALL;
|
2006-03-08 18:02:32 +00:00
|
|
|
KernelDists = selectKernel();
|
2000-09-22 19:12:41 +00:00
|
|
|
i = distMaybeSetPorts(self);
|
1997-10-13 12:12:14 +00:00
|
|
|
distVerifyFlags();
|
|
|
|
return i;
|
1995-06-11 19:33:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int
|
1996-04-07 03:52:36 +00:00
|
|
|
distSetXDeveloper(dialogMenuItem *self)
|
1995-06-11 19:33:05 +00:00
|
|
|
{
|
1997-10-13 12:12:14 +00:00
|
|
|
int i;
|
|
|
|
|
1998-09-23 12:13:51 +00:00
|
|
|
i = distSetDeveloper(self);
|
1999-03-19 10:54:38 +00:00
|
|
|
i |= distSetX();
|
1997-10-13 12:12:14 +00:00
|
|
|
distVerifyFlags();
|
|
|
|
return i;
|
1995-06-11 19:33:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int
|
1996-04-07 03:52:36 +00:00
|
|
|
distSetKernDeveloper(dialogMenuItem *self)
|
1995-06-11 19:33:05 +00:00
|
|
|
{
|
1997-10-13 12:12:14 +00:00
|
|
|
int i;
|
|
|
|
|
1995-06-11 19:33:05 +00:00
|
|
|
distReset(NULL);
|
|
|
|
Dists = _DIST_DEVELOPER;
|
2006-05-24 03:34:57 +00:00
|
|
|
SrcDists = DIST_SRC_SYS | DIST_SRC_BASE;
|
2006-03-08 18:02:32 +00:00
|
|
|
KernelDists = selectKernel();
|
2000-09-22 19:12:41 +00:00
|
|
|
i = distMaybeSetPorts(self);
|
1997-10-13 12:12:14 +00:00
|
|
|
distVerifyFlags();
|
|
|
|
return i;
|
1995-06-11 19:33:05 +00:00
|
|
|
}
|
|
|
|
|
1999-03-19 10:54:38 +00:00
|
|
|
int
|
|
|
|
distSetXKernDeveloper(dialogMenuItem *self)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
|
|
|
i = distSetKernDeveloper(self);
|
|
|
|
i |= distSetX();
|
|
|
|
distVerifyFlags();
|
|
|
|
return i;
|
|
|
|
}
|
|
|
|
|
1995-06-11 19:33:05 +00:00
|
|
|
int
|
1996-04-07 03:52:36 +00:00
|
|
|
distSetUser(dialogMenuItem *self)
|
1995-06-11 19:33:05 +00:00
|
|
|
{
|
1997-10-13 12:12:14 +00:00
|
|
|
int i;
|
|
|
|
|
1995-06-11 19:33:05 +00:00
|
|
|
distReset(NULL);
|
|
|
|
Dists = _DIST_USER;
|
2006-03-08 18:02:32 +00:00
|
|
|
KernelDists = selectKernel();
|
2000-09-22 19:12:41 +00:00
|
|
|
i = distMaybeSetPorts(self);
|
1997-10-13 12:12:14 +00:00
|
|
|
distVerifyFlags();
|
|
|
|
return i;
|
1995-06-11 19:33:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int
|
1996-04-07 03:52:36 +00:00
|
|
|
distSetXUser(dialogMenuItem *self)
|
1995-06-11 19:33:05 +00:00
|
|
|
{
|
1997-10-13 12:12:14 +00:00
|
|
|
int i;
|
|
|
|
|
1998-09-23 12:13:51 +00:00
|
|
|
i = distSetUser(self);
|
1999-03-19 10:54:38 +00:00
|
|
|
i |= distSetX();
|
1997-10-13 12:12:14 +00:00
|
|
|
distVerifyFlags();
|
|
|
|
return i;
|
1995-06-11 19:33:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int
|
1996-04-07 03:52:36 +00:00
|
|
|
distSetMinimum(dialogMenuItem *self)
|
1995-06-11 19:33:05 +00:00
|
|
|
{
|
|
|
|
distReset(NULL);
|
2006-03-08 18:02:32 +00:00
|
|
|
Dists = DIST_BASE | DIST_KERNEL;
|
|
|
|
KernelDists = selectKernel();
|
2000-11-11 02:09:18 +00:00
|
|
|
distVerifyFlags();
|
1996-04-23 01:29:35 +00:00
|
|
|
return DITEM_SUCCESS | DITEM_REDRAW;
|
1995-06-11 19:33:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int
|
1996-04-07 03:52:36 +00:00
|
|
|
distSetEverything(dialogMenuItem *self)
|
1995-06-11 19:33:05 +00:00
|
|
|
{
|
1997-10-13 12:12:14 +00:00
|
|
|
int i;
|
|
|
|
|
2004-08-10 02:18:28 +00:00
|
|
|
Dists = DIST_ALL;
|
1995-06-11 19:33:05 +00:00
|
|
|
SrcDists = DIST_SRC_ALL;
|
2004-08-10 02:18:28 +00:00
|
|
|
XOrgDists = DIST_XORG_ALL;
|
2006-03-08 18:02:32 +00:00
|
|
|
KernelDists = DIST_KERNEL_ALL;
|
2000-09-22 19:12:41 +00:00
|
|
|
i = distMaybeSetPorts(self);
|
1997-10-13 12:12:14 +00:00
|
|
|
distVerifyFlags();
|
2004-09-20 19:24:15 +00:00
|
|
|
return i | DITEM_REDRAW;
|
1995-12-07 10:34:59 +00:00
|
|
|
}
|
|
|
|
|
1997-03-10 21:11:57 +00:00
|
|
|
static int
|
|
|
|
distMaybeSetPorts(dialogMenuItem *self)
|
|
|
|
{
|
1999-12-17 02:46:04 +00:00
|
|
|
dialog_clear_norefresh();
|
1997-03-10 21:11:57 +00:00
|
|
|
if (!msgYesNo("Would you like to install the FreeBSD ports collection?\n\n"
|
2007-06-25 16:37:17 +00:00
|
|
|
"This will give you ready access to over 17,000 ported software packages,\n"
|
|
|
|
"at a cost of around 400MB of disk space when \"clean\" and possibly\n"
|
2000-02-17 06:15:11 +00:00
|
|
|
"much more than that when a lot of the distribution tarballs are loaded\n"
|
2001-06-27 17:48:43 +00:00
|
|
|
"(unless you have the extra discs available from a FreeBSD CD/DVD distribution\n"
|
1999-02-14 18:53:17 +00:00
|
|
|
"and can mount them on /cdrom, in which case this is far less of a problem).\n\n"
|
2000-02-18 03:02:32 +00:00
|
|
|
"The ports collection is a very valuable resource and well worth having\n"
|
2000-02-17 06:15:11 +00:00
|
|
|
"on your /usr partition, so it is advisable to say Yes to this option.\n\n"
|
1997-03-11 17:51:01 +00:00
|
|
|
"For more information on the ports collection & the latest ports, visit:\n"
|
|
|
|
" http://www.freebsd.org/ports\n"))
|
1997-03-10 21:11:57 +00:00
|
|
|
Dists |= DIST_PORTS;
|
|
|
|
else
|
|
|
|
Dists &= ~DIST_PORTS;
|
1999-12-17 02:46:04 +00:00
|
|
|
return DITEM_SUCCESS | DITEM_RESTORE;
|
1997-03-10 21:11:57 +00:00
|
|
|
}
|
|
|
|
|
1997-06-05 09:48:03 +00:00
|
|
|
static Boolean
|
|
|
|
distSetByName(Distribution *dist, char *name)
|
|
|
|
{
|
|
|
|
int i, status = FALSE;
|
|
|
|
|
|
|
|
/* Loop through current set */
|
|
|
|
for (i = 0; dist[i].my_name; i++) {
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
switch (dist[i].my_type) {
|
|
|
|
case DT_TARBALL:
|
|
|
|
case DT_PACKAGE:
|
|
|
|
if (!strcmp(dist[i].my_name, name)) {
|
|
|
|
*(dist[i].my_mask) |= dist[i].my_bit;
|
|
|
|
status = TRUE;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case DT_SUBDIST:
|
|
|
|
if (distSetByName(dist[i].my_data.my_dist, name)) {
|
1997-06-05 09:48:03 +00:00
|
|
|
status = TRUE;
|
1997-09-16 10:14:23 +00:00
|
|
|
}
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
break;
|
1997-06-05 09:48:03 +00:00
|
|
|
}
|
|
|
|
}
|
1997-10-13 12:12:14 +00:00
|
|
|
distVerifyFlags();
|
1997-06-05 09:48:03 +00:00
|
|
|
return status;
|
|
|
|
}
|
|
|
|
|
1999-11-08 11:51:57 +00:00
|
|
|
static Boolean
|
|
|
|
distUnsetByName(Distribution *dist, char *name)
|
|
|
|
{
|
|
|
|
int i, status = FALSE;
|
|
|
|
|
|
|
|
/* Loop through current set */
|
|
|
|
for (i = 0; dist[i].my_name; i++) {
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
switch (dist[i].my_type) {
|
|
|
|
case DT_TARBALL:
|
|
|
|
case DT_PACKAGE:
|
|
|
|
if (!strcmp(dist[i].my_name, name)) {
|
|
|
|
*(dist[i].my_mask) &= ~(dist[i].my_bit);
|
|
|
|
status = TRUE;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case DT_SUBDIST:
|
|
|
|
if (distUnsetByName(dist[i].my_data.my_dist, name)) {
|
1999-11-08 11:51:57 +00:00
|
|
|
status = TRUE;
|
|
|
|
}
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
break;
|
1999-11-08 11:51:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return status;
|
|
|
|
}
|
|
|
|
|
1997-06-05 09:48:03 +00:00
|
|
|
/* Just for the dispatch stuff */
|
|
|
|
int
|
|
|
|
distSetCustom(dialogMenuItem *self)
|
|
|
|
{
|
|
|
|
char *cp, *cp2, *tmp;
|
|
|
|
|
|
|
|
if (!(tmp = variable_get(VAR_DISTS))) {
|
|
|
|
msgDebug("distSetCustom() called without %s variable set.\n", VAR_DISTS);
|
|
|
|
return DITEM_FAILURE;
|
|
|
|
}
|
|
|
|
|
|
|
|
cp = alloca(strlen(tmp) + 1);
|
|
|
|
if (!cp)
|
2001-09-22 23:17:37 +00:00
|
|
|
msgFatal("Couldn't alloca() %d bytes!\n", (int)(strlen(tmp) + 1));
|
1997-06-05 09:48:03 +00:00
|
|
|
strcpy(cp, tmp);
|
|
|
|
while (cp) {
|
|
|
|
if ((cp2 = index(cp, ' ')) != NULL)
|
|
|
|
*(cp2++) = '\0';
|
|
|
|
if (!distSetByName(DistTable, cp))
|
|
|
|
msgDebug("distSetCustom: Warning, no such release \"%s\"\n", cp);
|
|
|
|
cp = cp2;
|
|
|
|
}
|
1997-10-13 12:12:14 +00:00
|
|
|
distVerifyFlags();
|
1997-06-05 09:48:03 +00:00
|
|
|
return DITEM_SUCCESS;
|
|
|
|
}
|
|
|
|
|
1999-11-08 11:51:57 +00:00
|
|
|
/* Just for the dispatch stuff */
|
|
|
|
int
|
|
|
|
distUnsetCustom(dialogMenuItem *self)
|
|
|
|
{
|
|
|
|
char *cp, *cp2, *tmp;
|
|
|
|
|
|
|
|
if (!(tmp = variable_get(VAR_DISTS))) {
|
|
|
|
msgDebug("distUnsetCustom() called without %s variable set.\n", VAR_DISTS);
|
|
|
|
return DITEM_FAILURE;
|
|
|
|
}
|
|
|
|
|
|
|
|
cp = alloca(strlen(tmp) + 1);
|
|
|
|
if (!cp)
|
2001-09-22 23:17:37 +00:00
|
|
|
msgFatal("Couldn't alloca() %d bytes!\n", (int)(strlen(tmp) + 1));
|
1999-11-08 11:51:57 +00:00
|
|
|
strcpy(cp, tmp);
|
|
|
|
while (cp) {
|
|
|
|
if ((cp2 = index(cp, ' ')) != NULL)
|
|
|
|
*(cp2++) = '\0';
|
|
|
|
if (!distUnsetByName(DistTable, cp))
|
|
|
|
msgDebug("distUnsetCustom: Warning, no such release \"%s\"\n", cp);
|
|
|
|
cp = cp2;
|
|
|
|
}
|
|
|
|
return DITEM_SUCCESS;
|
|
|
|
}
|
|
|
|
|
1995-06-11 19:33:05 +00:00
|
|
|
int
|
1996-04-07 03:52:36 +00:00
|
|
|
distSetSrc(dialogMenuItem *self)
|
1995-06-11 19:33:05 +00:00
|
|
|
{
|
1997-10-13 12:12:14 +00:00
|
|
|
int i;
|
1996-04-13 13:32:15 +00:00
|
|
|
|
1999-12-14 04:25:29 +00:00
|
|
|
dialog_clear_norefresh();
|
1997-10-13 12:12:14 +00:00
|
|
|
if (!dmenuOpenSimple(&MenuSrcDistributions, FALSE))
|
1996-04-23 01:29:35 +00:00
|
|
|
i = DITEM_FAILURE;
|
1997-10-13 12:12:14 +00:00
|
|
|
else
|
|
|
|
i = DITEM_SUCCESS;
|
|
|
|
distVerifyFlags();
|
1997-10-12 12:11:14 +00:00
|
|
|
return i | DITEM_RESTORE;
|
1995-06-11 19:33:05 +00:00
|
|
|
}
|
|
|
|
|
2006-03-08 18:02:32 +00:00
|
|
|
int
|
|
|
|
distSetKernel(dialogMenuItem *self)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
|
|
|
dialog_clear_norefresh();
|
|
|
|
if (!dmenuOpenSimple(&MenuKernelDistributions, FALSE))
|
|
|
|
i = DITEM_FAILURE;
|
|
|
|
else
|
|
|
|
i = DITEM_SUCCESS;
|
|
|
|
distVerifyFlags();
|
|
|
|
return i | DITEM_RESTORE;
|
|
|
|
}
|
|
|
|
|
OK, I've got two ideas to file in the "really seemed like a good idea
at the time, but on further reflection..." bucket with these changes.
1. Checking the media before frobbing the disks was a fine idea, and
I wish it could have worked, but that leads to a rather difficult
situation when you need to mount the media someplace and you're about
to:
a) Chroot away from your present root.
b) Newfs the root to be.
You're basically screwed since there's no place to stick the mount
point where it will be found following the newfs/chroot (and eliminating
the chroot in favor of just using the "root bias" feature would work
great for the distributions but not the pkg_add calls done by the
package installer).
2. Automatic timeout handling. I don't know why, but alarm() frequently
returns no residual even when the alarm didn't go off, which defies
the man page but hey, since when was that so unusual? Take out timeouts
but retain the code which temporarily replaces the SIGINT handler in
favor of a more media-specific handler. This way, at least, if it's hanging
you can at least whap it. I think the timeout code would have been losing
over *really slow* links anyway, so it's probably best that it go.
This should fix NFS, tape & CDROM installs again (serves me right for getting
complacent and using just the FTP installs in my testing).
1997-01-24 19:24:51 +00:00
|
|
|
static Boolean got_intr = FALSE;
|
|
|
|
|
1997-01-17 15:58:58 +00:00
|
|
|
/* timeout handler */
|
|
|
|
static void
|
OK, I've got two ideas to file in the "really seemed like a good idea
at the time, but on further reflection..." bucket with these changes.
1. Checking the media before frobbing the disks was a fine idea, and
I wish it could have worked, but that leads to a rather difficult
situation when you need to mount the media someplace and you're about
to:
a) Chroot away from your present root.
b) Newfs the root to be.
You're basically screwed since there's no place to stick the mount
point where it will be found following the newfs/chroot (and eliminating
the chroot in favor of just using the "root bias" feature would work
great for the distributions but not the pkg_add calls done by the
package installer).
2. Automatic timeout handling. I don't know why, but alarm() frequently
returns no residual even when the alarm didn't go off, which defies
the man page but hey, since when was that so unusual? Take out timeouts
but retain the code which temporarily replaces the SIGINT handler in
favor of a more media-specific handler. This way, at least, if it's hanging
you can at least whap it. I think the timeout code would have been losing
over *really slow* links anyway, so it's probably best that it go.
This should fix NFS, tape & CDROM installs again (serves me right for getting
complacent and using just the FTP installs in my testing).
1997-01-24 19:24:51 +00:00
|
|
|
handle_intr(int sig)
|
1997-01-17 15:58:58 +00:00
|
|
|
{
|
OK, I've got two ideas to file in the "really seemed like a good idea
at the time, but on further reflection..." bucket with these changes.
1. Checking the media before frobbing the disks was a fine idea, and
I wish it could have worked, but that leads to a rather difficult
situation when you need to mount the media someplace and you're about
to:
a) Chroot away from your present root.
b) Newfs the root to be.
You're basically screwed since there's no place to stick the mount
point where it will be found following the newfs/chroot (and eliminating
the chroot in favor of just using the "root bias" feature would work
great for the distributions but not the pkg_add calls done by the
package installer).
2. Automatic timeout handling. I don't know why, but alarm() frequently
returns no residual even when the alarm didn't go off, which defies
the man page but hey, since when was that so unusual? Take out timeouts
but retain the code which temporarily replaces the SIGINT handler in
favor of a more media-specific handler. This way, at least, if it's hanging
you can at least whap it. I think the timeout code would have been losing
over *really slow* links anyway, so it's probably best that it go.
This should fix NFS, tape & CDROM installs again (serves me right for getting
complacent and using just the FTP installs in my testing).
1997-01-24 19:24:51 +00:00
|
|
|
msgDebug("User generated interrupt.\n");
|
|
|
|
got_intr = TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
|
|
check_for_interrupt(void)
|
|
|
|
{
|
|
|
|
if (got_intr) {
|
|
|
|
got_intr = FALSE;
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
return FALSE;
|
1997-01-17 15:58:58 +00:00
|
|
|
}
|
|
|
|
|
2006-03-08 18:02:32 +00:00
|
|
|
/*
|
|
|
|
* translate distribution filename to lower case
|
|
|
|
* as doTARBALL does in release/Makefile
|
|
|
|
*/
|
|
|
|
static void
|
|
|
|
translateDist(char trdist[PATH_MAX], const char *dist)
|
|
|
|
{
|
|
|
|
int j;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* translate distribution filename to lower case
|
|
|
|
* as doTARBALL does in release/Makefile
|
|
|
|
*/
|
|
|
|
for (j = 0; j < PATH_MAX-1 && dist[j] != '\0'; j++)
|
|
|
|
trdist[j] = tolower(dist[j]);
|
|
|
|
trdist[j] = '\0';
|
|
|
|
}
|
|
|
|
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
/*
|
|
|
|
* Try to get distribution as multiple pieces, locating and parsing an
|
|
|
|
* info file which tells us how many we need for this distribution.
|
|
|
|
*/
|
1995-05-28 03:05:06 +00:00
|
|
|
static Boolean
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
distExtractTarball(char *path, char *dist, char *my_dir, int is_base)
|
1995-05-08 21:39:40 +00:00
|
|
|
{
|
2006-03-08 18:02:32 +00:00
|
|
|
char *buf = NULL, trdist[PATH_MAX], fname[PATH_MAX];
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
struct timeval start, stop;
|
2004-03-11 18:50:05 +00:00
|
|
|
int j, status, total, intr;
|
1996-12-11 09:35:06 +00:00
|
|
|
int cpid, zpid, fd2, chunk, numchunks;
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
properties dist_attr = NULL;
|
1995-05-27 23:39:35 +00:00
|
|
|
const char *tmp;
|
1996-12-11 09:35:06 +00:00
|
|
|
FILE *fp;
|
1995-05-16 02:53:31 +00:00
|
|
|
|
2006-03-08 18:02:32 +00:00
|
|
|
translateDist(trdist, dist);
|
|
|
|
if (isDebug())
|
|
|
|
msgDebug("%s: path \"%s\" dist \"%s\" trdist \"%s\" "
|
|
|
|
"my_dir \"%s\" %sis_base\n",
|
|
|
|
__func__, path, dist, trdist, my_dir, is_base ? "" : "!");
|
|
|
|
|
1995-06-11 19:33:05 +00:00
|
|
|
status = TRUE;
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
numchunks = 0;
|
2006-03-08 18:02:32 +00:00
|
|
|
snprintf(fname, sizeof (fname), "%s/%s.inf", path, trdist);
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
|
|
|
|
getinfo:
|
|
|
|
fp = DEVICE_GET(mediaDevice, fname, TRUE);
|
|
|
|
intr = check_for_interrupt();
|
|
|
|
if (fp == (FILE *)IO_ERROR || intr || !mediaDevice) {
|
2006-03-08 18:02:32 +00:00
|
|
|
if (isDebug())
|
|
|
|
msgDebug("%s: fname %s fp: %p, intr: %d mediaDevice: %p\n",
|
|
|
|
__func__, fname, fp, intr, mediaDevice);
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
/* Hard error, can't continue */
|
|
|
|
if (!msgYesNo("Unable to open %s: %s.\nReinitialize media?",
|
|
|
|
fname, !intr ? "I/O error." : "User interrupt.")) {
|
|
|
|
DEVICE_SHUTDOWN(mediaDevice);
|
|
|
|
if (!DEVICE_INIT(mediaDevice))
|
|
|
|
return (FALSE);
|
|
|
|
goto getinfo;
|
|
|
|
} else
|
|
|
|
return (FALSE);
|
|
|
|
} else if (fp == NULL) {
|
|
|
|
/* No attributes file, so try as a single file. */
|
2006-03-08 18:02:32 +00:00
|
|
|
snprintf(fname, sizeof(fname), "%s/%s.%s", path, trdist,
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
USE_GZIP ? "tgz" : "tbz");
|
2006-03-08 18:02:32 +00:00
|
|
|
if (isDebug())
|
|
|
|
msgDebug("%s: fp is NULL (1) fname: %s\n", __func__, fname);
|
1996-05-23 16:34:30 +00:00
|
|
|
/*
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
* Passing TRUE as 3rd parm to get routine makes this a "probing"
|
|
|
|
* get, for which errors are not considered too significant.
|
1995-12-07 10:34:59 +00:00
|
|
|
*/
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
getsingle:
|
2003-01-09 17:44:29 +00:00
|
|
|
fp = DEVICE_GET(mediaDevice, fname, TRUE);
|
OK, I've got two ideas to file in the "really seemed like a good idea
at the time, but on further reflection..." bucket with these changes.
1. Checking the media before frobbing the disks was a fine idea, and
I wish it could have worked, but that leads to a rather difficult
situation when you need to mount the media someplace and you're about
to:
a) Chroot away from your present root.
b) Newfs the root to be.
You're basically screwed since there's no place to stick the mount
point where it will be found following the newfs/chroot (and eliminating
the chroot in favor of just using the "root bias" feature would work
great for the distributions but not the pkg_add calls done by the
package installer).
2. Automatic timeout handling. I don't know why, but alarm() frequently
returns no residual even when the alarm didn't go off, which defies
the man page but hey, since when was that so unusual? Take out timeouts
but retain the code which temporarily replaces the SIGINT handler in
favor of a more media-specific handler. This way, at least, if it's hanging
you can at least whap it. I think the timeout code would have been losing
over *really slow* links anyway, so it's probably best that it go.
This should fix NFS, tape & CDROM installs again (serves me right for getting
complacent and using just the FTP installs in my testing).
1997-01-24 19:24:51 +00:00
|
|
|
intr = check_for_interrupt();
|
2000-02-17 17:57:40 +00:00
|
|
|
if (fp == (FILE *)IO_ERROR || intr || !mediaDevice) {
|
2006-03-08 18:02:32 +00:00
|
|
|
if (isDebug())
|
|
|
|
msgDebug("%s: fname %s fp: %p, intr: %d mediaDevice: %p\n",
|
|
|
|
__func__, fname, fp, intr, mediaDevice);
|
2000-02-17 17:57:40 +00:00
|
|
|
/* Hard error, can't continue */
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
msgConfirm("Unable to open %s: %s", fname,
|
|
|
|
!intr ? "I/O error" : "User interrupt");
|
|
|
|
DEVICE_SHUTDOWN(mediaDevice);
|
|
|
|
if (!DEVICE_INIT(mediaDevice))
|
|
|
|
return (FALSE);
|
|
|
|
goto getsingle;
|
|
|
|
} else if (fp != NULL) {
|
|
|
|
char *dir = root_bias(my_dir);
|
1997-03-15 18:01:45 +00:00
|
|
|
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
dialog_clear_norefresh();
|
|
|
|
msgNotify("Extracting %s into %s directory...", dist, dir);
|
|
|
|
status = mediaExtractDist(dir, dist, fp);
|
|
|
|
fclose(fp);
|
|
|
|
return (status);
|
2006-03-08 18:02:32 +00:00
|
|
|
} else {
|
|
|
|
if (isDebug())
|
|
|
|
msgDebug("%s: fp is NULL (2) fname %s\n", __func__, fname);
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
return (FALSE);
|
2006-03-08 18:02:32 +00:00
|
|
|
}
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
}
|
1995-05-27 23:39:35 +00:00
|
|
|
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
if (isDebug())
|
|
|
|
msgDebug("Parsing attributes file for distribution %s\n", dist);
|
|
|
|
|
|
|
|
dist_attr = properties_read(fileno(fp));
|
|
|
|
intr = check_for_interrupt();
|
|
|
|
if (intr || !dist_attr) {
|
2006-03-08 18:02:32 +00:00
|
|
|
if (isDebug())
|
|
|
|
msgDebug("%s: intr %d dist_attr %p\n", __func__, intr, dist_attr);
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
msgConfirm("Cannot parse information file for the %s distribution: %s\n"
|
|
|
|
"Please verify that your media is valid and try again.",
|
|
|
|
dist, !intr ? "I/O error" : "User interrupt");
|
|
|
|
} else {
|
|
|
|
tmp = property_find(dist_attr, "Pieces");
|
|
|
|
if (tmp)
|
|
|
|
numchunks = strtol(tmp, 0, 0);
|
|
|
|
}
|
|
|
|
fclose(fp);
|
2006-03-08 18:02:32 +00:00
|
|
|
if (!numchunks) {
|
|
|
|
if (isDebug())
|
|
|
|
msgDebug("%s: numchunks is zero\n", __func__);
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
return (TRUE);
|
2006-03-08 18:02:32 +00:00
|
|
|
}
|
1996-10-06 14:45:57 +00:00
|
|
|
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
if (isDebug())
|
|
|
|
msgDebug("Attempting to extract distribution from %u chunks.\n",
|
|
|
|
numchunks);
|
1995-05-27 23:39:35 +00:00
|
|
|
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
total = 0;
|
|
|
|
(void)gettimeofday(&start, (struct timezone *)NULL);
|
1996-07-13 05:44:51 +00:00
|
|
|
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
/* We have one or more chunks, initialize unpackers... */
|
|
|
|
mediaExtractDistBegin(root_bias(my_dir), &fd2, &zpid, &cpid);
|
1997-01-19 09:55:37 +00:00
|
|
|
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
/* And go for all the chunks */
|
|
|
|
dialog_clear_norefresh();
|
|
|
|
for (chunk = 0; chunk < numchunks; chunk++) {
|
|
|
|
int n, retval, last_msg, chunksize, realsize;
|
|
|
|
char prompt[80];
|
|
|
|
|
|
|
|
last_msg = 0;
|
|
|
|
|
|
|
|
getchunk:
|
|
|
|
snprintf(fname, sizeof(fname), "cksum.%c%c", (chunk / 26) + 'a',
|
|
|
|
(chunk % 26) + 'a');
|
|
|
|
tmp = property_find(dist_attr, fname);
|
|
|
|
chunksize = 0;
|
|
|
|
if (tmp) {
|
|
|
|
tmp = index(tmp, ' ');
|
|
|
|
chunksize = strtol(tmp, 0, 0);
|
|
|
|
}
|
2006-03-08 18:02:32 +00:00
|
|
|
snprintf(fname, sizeof(fname), "%s/%s.%c%c", path, trdist, (chunk / 26) + 'a',
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
(chunk % 26) + 'a');
|
|
|
|
if (isDebug())
|
|
|
|
msgDebug("trying for piece %d of %d: %s\n", chunk + 1, numchunks,
|
|
|
|
fname);
|
|
|
|
fp = DEVICE_GET(mediaDevice, fname, FALSE);
|
|
|
|
intr = check_for_interrupt();
|
|
|
|
/* XXX: this can't work if we get an I/O error */
|
|
|
|
if (fp <= (FILE *)NULL || intr) {
|
|
|
|
if (fp == NULL)
|
|
|
|
msgConfirm("Failed to find %s on this media. Reinitializing media.", fname);
|
|
|
|
else
|
|
|
|
msgConfirm("Failed to retreive piece file %s.\n"
|
|
|
|
"%s: Reinitializing media.",
|
|
|
|
fname, !intr ? "I/O error" : "User interrupt");
|
|
|
|
DEVICE_SHUTDOWN(mediaDevice);
|
|
|
|
if (!DEVICE_INIT(mediaDevice))
|
|
|
|
goto punt;
|
|
|
|
else
|
|
|
|
goto getchunk;
|
|
|
|
}
|
1997-01-20 19:26:44 +00:00
|
|
|
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
snprintf(prompt, sizeof(prompt), "Extracting %s into %s directory...",
|
|
|
|
dist, root_bias(my_dir));
|
|
|
|
dialog_gauge("Progress", prompt, 8, 15, 6, 50,
|
|
|
|
(chunk + 1) * 100 / numchunks);
|
1997-01-17 15:58:58 +00:00
|
|
|
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
buf = safe_realloc(buf, chunksize);
|
|
|
|
realsize = 0;
|
|
|
|
while (1) {
|
|
|
|
int seconds;
|
1996-05-23 16:34:30 +00:00
|
|
|
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
n = fread(buf + realsize, 1, BUFSIZ, fp);
|
|
|
|
if (check_for_interrupt()) {
|
|
|
|
msgConfirm("Media read error: User interrupt.");
|
|
|
|
fclose(fp);
|
|
|
|
goto punt;
|
|
|
|
} else if (n <= 0)
|
|
|
|
break;
|
|
|
|
total += n;
|
|
|
|
realsize += n;
|
|
|
|
|
|
|
|
/* Print statistics about how we're doing */
|
|
|
|
(void) gettimeofday(&stop, (struct timezone *)0);
|
|
|
|
stop.tv_sec = stop.tv_sec - start.tv_sec;
|
|
|
|
stop.tv_usec = stop.tv_usec - start.tv_usec;
|
|
|
|
if (stop.tv_usec < 0)
|
|
|
|
stop.tv_sec--, stop.tv_usec += 1000000;
|
|
|
|
seconds = stop.tv_sec + (stop.tv_usec / 1000000.0);
|
|
|
|
if (!seconds)
|
|
|
|
seconds = 1;
|
|
|
|
|
|
|
|
if (seconds != last_msg) {
|
|
|
|
last_msg = seconds;
|
|
|
|
msgInfo("%10d bytes read from %s dist, chunk %2d of %2d @ %.1f KBytes/sec.",
|
|
|
|
total, dist, chunk + 1, numchunks,
|
|
|
|
(total / seconds) / 1000.0);
|
2000-01-25 05:56:49 +00:00
|
|
|
}
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
}
|
|
|
|
fclose(fp);
|
|
|
|
|
|
|
|
if (!chunksize || (realsize == chunksize)) {
|
|
|
|
/* No substitution necessary */
|
|
|
|
retval = write(fd2, buf, realsize);
|
|
|
|
if (retval != realsize) {
|
|
|
|
fclose(fp);
|
|
|
|
dialog_clear_norefresh();
|
|
|
|
msgConfirm("Write failure on transfer! (wrote %d bytes of %d bytes)", retval, realsize);
|
1995-05-27 23:39:35 +00:00
|
|
|
goto punt;
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
for (j = 0; j < realsize; j++) {
|
|
|
|
/* On finding CRLF, skip the CR; don't exceed end of buffer. */
|
|
|
|
if ((buf[j] != 0x0d) || (j == total - 1) || (buf[j + 1] != 0x0a)) {
|
|
|
|
retval = write(fd2, buf + j, 1);
|
|
|
|
if (retval != 1) {
|
|
|
|
fclose(fp);
|
|
|
|
dialog_clear_norefresh();
|
|
|
|
msgConfirm("Write failure on transfer! (wrote %d bytes of %d bytes)", j, chunksize);
|
|
|
|
goto punt;
|
2000-01-25 05:56:49 +00:00
|
|
|
}
|
|
|
|
}
|
1995-05-27 23:39:35 +00:00
|
|
|
}
|
1995-05-16 02:53:31 +00:00
|
|
|
}
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
}
|
|
|
|
goto done;
|
|
|
|
|
|
|
|
punt:
|
|
|
|
status = FALSE;
|
|
|
|
done:
|
|
|
|
properties_free(dist_attr);
|
|
|
|
close(fd2);
|
|
|
|
if (status != FALSE)
|
1995-05-28 03:05:06 +00:00
|
|
|
status = mediaExtractDistEnd(zpid, cpid);
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
else
|
|
|
|
(void)mediaExtractDistEnd(zpid, cpid);
|
|
|
|
|
|
|
|
safe_free(buf);
|
2003-06-02 17:59:29 +00:00
|
|
|
return (status);
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
}
|
1995-05-28 03:05:06 +00:00
|
|
|
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
static Boolean
|
|
|
|
distExtract(char *parent, Distribution *me)
|
|
|
|
{
|
|
|
|
int i, status;
|
|
|
|
char *path, *dist;
|
|
|
|
WINDOW *w = savescr();
|
|
|
|
struct sigaction old, new;
|
|
|
|
|
|
|
|
status = TRUE;
|
|
|
|
if (isDebug())
|
|
|
|
msgDebug("distExtract: parent: %s, me: %s\n", parent ? parent : "(none)", me->my_name);
|
|
|
|
|
|
|
|
/* Make ^C fake a sudden timeout */
|
|
|
|
new.sa_handler = handle_intr;
|
|
|
|
new.sa_flags = 0;
|
|
|
|
(void)sigemptyset(&new.sa_mask);
|
|
|
|
dialog_clear_norefresh();
|
|
|
|
dialog_msgbox("Please Wait", "Extracting all requested distributions...", -1, -1, 0);
|
|
|
|
sigaction(SIGINT, &new, &old);
|
|
|
|
|
|
|
|
/* Loop through to see if we're in our parent's plans */
|
|
|
|
for (i = 0; me[i].my_name; i++) {
|
|
|
|
dist = me[i].my_name;
|
|
|
|
path = parent ? parent : dist;
|
|
|
|
|
|
|
|
/* If our bit isn't set, go to the next */
|
|
|
|
if (!(me[i].my_bit & *(me[i].my_mask)))
|
|
|
|
continue;
|
|
|
|
|
|
|
|
switch (me[i].my_type) {
|
|
|
|
case DT_SUBDIST:
|
|
|
|
/* Recurse if we actually have a sub-distribution */
|
|
|
|
status = distExtract(dist, me[i].my_data.my_dist);
|
|
|
|
if (!status) {
|
|
|
|
dialog_clear_norefresh();
|
1997-03-15 18:01:45 +00:00
|
|
|
msgConfirm("Unable to transfer all components of the %s distribution.\n"
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
"You may wish to switch media types and try again.\n",
|
|
|
|
me[i].my_name);
|
1997-03-15 18:01:45 +00:00
|
|
|
}
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
break;
|
|
|
|
case DT_PACKAGE:
|
|
|
|
dialog_clear_norefresh();
|
|
|
|
msgNotify("Installing %s distribution...", dist);
|
|
|
|
status = (package_add(me[i].my_data.my_string) == DITEM_SUCCESS);
|
|
|
|
if (!status)
|
|
|
|
dialog_clear_norefresh();
|
|
|
|
break;
|
|
|
|
case DT_TARBALL:
|
|
|
|
status = distExtractTarball(path, dist, me[i].my_data.my_string,
|
|
|
|
&me[i] == BASE_DIST);
|
|
|
|
if (!status) {
|
|
|
|
dialog_clear_norefresh();
|
|
|
|
if (me[i].my_bit != DIST_LOCAL) {
|
|
|
|
status = msgYesNo("Unable to transfer the %s distribution from\n%s.\n\n"
|
|
|
|
"Do you want to try to retrieve it again?",
|
|
|
|
me[i].my_name, mediaDevice->name);
|
|
|
|
if (!status)
|
|
|
|
--i;
|
|
|
|
status = FALSE;
|
|
|
|
}
|
1995-06-11 19:33:05 +00:00
|
|
|
}
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
break;
|
1995-05-27 23:39:35 +00:00
|
|
|
}
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* If extract was successful, remove ourselves from further
|
|
|
|
* consideration.
|
|
|
|
*/
|
1995-06-11 19:33:05 +00:00
|
|
|
if (status)
|
1995-05-27 23:39:35 +00:00
|
|
|
*(me[i].my_mask) &= ~(me[i].my_bit);
|
1995-05-27 10:47:44 +00:00
|
|
|
}
|
1997-01-20 19:26:44 +00:00
|
|
|
sigaction(SIGINT, &old, NULL); /* Restore signal handler */
|
1996-04-29 17:59:07 +00:00
|
|
|
restorescr(w);
|
1995-05-16 02:53:31 +00:00
|
|
|
return status;
|
1995-05-08 21:39:40 +00:00
|
|
|
}
|
1995-05-16 02:53:31 +00:00
|
|
|
|
1995-12-07 10:34:59 +00:00
|
|
|
static void
|
1996-05-29 03:27:31 +00:00
|
|
|
printSelected(char *buf, int selected, Distribution *me, int *col)
|
1995-12-07 10:34:59 +00:00
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
|
|
|
/* Loop through to see if we're in our parent's plans */
|
|
|
|
for (i = 0; me[i].my_name; i++) {
|
|
|
|
|
|
|
|
/* If our bit isn't set, go to the next */
|
|
|
|
if (!(me[i].my_bit & selected))
|
|
|
|
continue;
|
|
|
|
|
1996-05-29 03:27:31 +00:00
|
|
|
*col += strlen(me[i].my_name);
|
|
|
|
if (*col > 50) {
|
|
|
|
*col = 0;
|
1995-12-07 10:34:59 +00:00
|
|
|
strcat(buf, "\n");
|
|
|
|
}
|
|
|
|
sprintf(&buf[strlen(buf)], " %s", me[i].my_name);
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
|
1995-12-07 10:34:59 +00:00
|
|
|
/* Recurse if have a sub-distribution */
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
if (me[i].my_type == DT_SUBDIST)
|
|
|
|
printSelected(buf, *(me[i].my_mask), me[i].my_data.my_dist, col);
|
1995-12-07 10:34:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
1995-09-18 16:53:06 +00:00
|
|
|
int
|
1996-04-07 03:52:36 +00:00
|
|
|
distExtractAll(dialogMenuItem *self)
|
1995-05-08 21:39:40 +00:00
|
|
|
{
|
2006-03-08 18:02:32 +00:00
|
|
|
int old_dists, old_kernel, retries = 0, status = DITEM_SUCCESS;
|
1995-12-07 10:34:59 +00:00
|
|
|
char buf[512];
|
1999-12-14 04:25:29 +00:00
|
|
|
WINDOW *w;
|
1995-05-29 14:38:31 +00:00
|
|
|
|
1997-01-15 06:30:50 +00:00
|
|
|
/* paranoia */
|
1997-03-08 12:58:29 +00:00
|
|
|
if (!Dists) {
|
1998-01-23 07:53:44 +00:00
|
|
|
if (!dmenuOpenSimple(&MenuSubDistributions, FALSE) || !Dists)
|
1999-12-14 04:25:29 +00:00
|
|
|
return DITEM_FAILURE;
|
1997-03-08 12:58:29 +00:00
|
|
|
}
|
|
|
|
|
2001-07-02 00:18:04 +00:00
|
|
|
if (!mediaVerify() || !DEVICE_INIT(mediaDevice))
|
1996-04-28 03:27:26 +00:00
|
|
|
return DITEM_FAILURE;
|
|
|
|
|
1998-11-15 09:06:20 +00:00
|
|
|
old_dists = Dists;
|
2006-03-08 18:02:32 +00:00
|
|
|
old_kernel = KernelDists;
|
1998-09-23 12:13:51 +00:00
|
|
|
distVerifyFlags();
|
1998-11-15 09:06:20 +00:00
|
|
|
|
1996-08-03 10:11:56 +00:00
|
|
|
dialog_clear_norefresh();
|
1999-12-14 04:25:29 +00:00
|
|
|
w = savescr();
|
1999-12-17 02:46:04 +00:00
|
|
|
msgNotify("Attempting to install all selected distributions..");
|
2000-01-18 15:50:23 +00:00
|
|
|
|
1995-05-29 14:38:31 +00:00
|
|
|
/* Try for 3 times around the loop, then give up. */
|
|
|
|
while (Dists && ++retries < 3)
|
1995-05-29 11:01:42 +00:00
|
|
|
distExtract(NULL, DistTable);
|
1995-06-11 19:33:05 +00:00
|
|
|
|
1999-12-18 02:29:24 +00:00
|
|
|
dialog_clear_norefresh();
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
/* Only do base fixup if base dist was successfully extracted */
|
2002-04-23 22:16:41 +00:00
|
|
|
if ((old_dists & DIST_BASE) && !(Dists & DIST_BASE))
|
- Rename installFixupBin to installFixupBase to finish up the 'bin' to
'base' dist rename.
- Rework struct dist to allow for different types of dists. There are
currently three types of dists: DT_TARBALL, the traditonal gzipped and
split tar file; DT_PACKAGE, a package; and DT_SUBDIST, a meta-dist in
the tree that has its own array of dists as its contents. For example,
the 'base' dist is a DT_TARBALL dist, the 'perl' dist is a DT_PACKAGE
dist, and the 'src' dist is a DT_SUBDIST dist with its own dist table
that contains 'sbase', 'ssys', etc.
- Add helper macros for defining array entries for the different types of
dists to try and make the statically defined dist table in dist.c more
readable.
- Split the logic to deal with a DT_TARBALL dist out of distExtract()
and into its own distExtractTarball() function. distExtract() now
calls other functions to extract each dist.
- Tweak the percentage complete calculation in distExtractTarball() to
do the multiply prior to the divide so it doesn't have to use floating
point.
- Axe the installPackage() function along with the special handling for
the perl and XFree86 dists in distExtractAll() since distExtract()
handles package dists directly now.
- Add back in subdists for the X packages based on the split up packages
that XFree86-4 uses that as closely map to the X dists we used with
X 3.3.x.
- Lots of things like distSetX() and the X dist masks are no longer
#ifndef X_AS_PKG since we use them in both cases now.
- Make the entire installFixupXFree() function #ifndef X_AS_PKG, we only
call it in that case anyways, and it's not suitable for the X_AS_PKG
case.
- Add in X dist menus for the X_AS_PKG case.
Approved by: re
2003-01-17 19:05:32 +00:00
|
|
|
status |= installFixupBase(self);
|
2006-04-14 18:34:57 +00:00
|
|
|
/* Only do kernel fixup if kernel dist was successfully extracted */
|
2006-03-08 18:02:32 +00:00
|
|
|
if ((old_dists & DIST_KERNEL) && !(Dists & DIST_KERNEL))
|
|
|
|
status |= installFixupKernel(self, old_kernel);
|
1998-11-15 09:06:20 +00:00
|
|
|
|
1999-12-01 01:34:33 +00:00
|
|
|
/* Clear any local dist flags now */
|
|
|
|
Dists &= ~DIST_LOCAL;
|
|
|
|
|
1995-12-07 10:34:59 +00:00
|
|
|
if (Dists) {
|
1996-05-29 03:27:31 +00:00
|
|
|
int col = 0;
|
|
|
|
|
1996-05-29 01:35:33 +00:00
|
|
|
buf[0] = '\0';
|
1999-12-18 02:29:24 +00:00
|
|
|
dialog_clear_norefresh();
|
1996-05-29 03:27:31 +00:00
|
|
|
printSelected(buf, Dists, DistTable, &col);
|
1996-08-03 10:11:56 +00:00
|
|
|
dialog_clear_norefresh();
|
1999-12-29 01:49:11 +00:00
|
|
|
if (col) {
|
|
|
|
msgConfirm("Couldn't extract the following distributions. This may\n"
|
|
|
|
"be because they were not available on the installation\n"
|
|
|
|
"media you've chosen:\n\n\t%s", buf);
|
|
|
|
}
|
1995-12-07 10:34:59 +00:00
|
|
|
}
|
1999-12-14 04:25:29 +00:00
|
|
|
restorescr(w);
|
1998-11-15 09:06:20 +00:00
|
|
|
return status;
|
1995-05-08 21:39:40 +00:00
|
|
|
}
|