From bf1021383eb491128040f447b85efba2052fbebd Mon Sep 17 00:00:00 2001 From: freesource Date: Thu, 18 Oct 2001 21:52:15 +0000 Subject: [PATCH] This makes the editing very clear. --- add-ons/yard/make-debian-X11/make_debian-X11 | 11 +-- yard/scripts/make_debian | 74 +++++++++++--------- 2 files changed, 47 insertions(+), 38 deletions(-) diff --git a/add-ons/yard/make-debian-X11/make_debian-X11 b/add-ons/yard/make-debian-X11/make_debian-X11 index cb4deb4..a202f00 100755 --- a/add-ons/yard/make-debian-X11/make_debian-X11 +++ b/add-ons/yard/make-debian-X11/make_debian-X11 @@ -29,8 +29,6 @@ my $nodename = `uname -n`; chomp $nodename; my $debian_yard = "Debian-X11.yard"; my $status = "/var/lib/dpkg/status"; my $info = "/var/lib/dpkg/info"; -my (%alternatives, @alternatives); # for checking for alternatives -my %inetd; # checks for inetd binaries. my $version = "1.0"; # You need file-rc, and you may add other extra stuff (@extra_packages). @@ -56,9 +54,6 @@ xserver-common xterm xutils zlib1g libgdbmg1 libxaw7 gbootroot flwm libfltk1 xnest make-debian-x11 ash); # NEXT EDIT TEMPLATE -# Before starting make sure dswim and file-rc are present. -start_up(); - ################################################################# ################################################################# # @@ -262,6 +257,12 @@ if ($sbin == 0) { $ENV{'PATH'} = "/usr/sbin:" . $ENV{'PATH'}; } +my (%alternatives, @alternatives); # for checking for alternatives +my %inetd; # checks for inetd binaries. + +# Before starting make sure dswim and file-rc are present. +start_up(); + print STDERR "Required packages:\n"; system "swim --search \"Priority: required\" --no"; my $swim_packages = "swim -qS|"; diff --git a/yard/scripts/make_debian b/yard/scripts/make_debian index a9f0058..8338d93 100755 --- a/yard/scripts/make_debian +++ b/yard/scripts/make_debian @@ -20,12 +20,6 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -use strict; -use File::Basename; -my $sbin = grep(/\/usr\/sbin/,$ENV{'PATH'}); -if ($sbin == 0) { - $ENV{'PATH'} = "/usr/sbin:" . $ENV{'PATH'}; -} # You will need to get dswim at http://www.sourceforge.net/projects/avd my $home = "$ENV{HOME}/.gbootroot"; @@ -58,33 +52,6 @@ klogd netbase tcpd net-tools portmap netkit-ping netkit-inetd ifupdown less perl perl-modules libwrap0 ipchains whiptail libnewt0 libpopt0 debconf-utils); # NEXT EDIT TEMPLATE -# Before starting make sure dswim and file-rc are present. -start_up(); - -print STDERR "Required packages:\n"; -system "swim --search \"Priority: required\" --no"; -my $swim_packages = "swim -qS|"; -my $swim_list = "swim -qSl|"; # Not using --df for empty directories. -$, = " "; -my $extra_files = "swim -ql @extra_packages|"; # Not using --df. -$, = ""; - -# All the packages -open(SWIM,$swim_packages) or die "Couldn't open swim_packages: $?\n"; -my @required_packages = ; chomp @required_packages; -close(SWIM); - -# All the files -open(SWIM,$swim_list) or die "Couldn't open swim_list: $!\n"; -my @required_files = ; chomp @required_files; -close(SWIM); - -open(SWIM,$extra_files) or die "Couldn't open extra_files: $!\n"; -my @extra_files = ; chomp @extra_files; -close(SWIM); - -push(@required_files,@extra_files); - ################################################################# ################################################################# # @@ -257,6 +224,47 @@ return $stuff; ################################################################# ################################################################# + +######################################### +## Collect Information from the System ## +######################################### + +use strict; +use File::Basename; +my $sbin = grep(/\/usr\/sbin/,$ENV{'PATH'}); +if ($sbin == 0) { + $ENV{'PATH'} = "/usr/sbin:" . $ENV{'PATH'}; +} + + +# Before starting make sure dswim and file-rc are present. +start_up(); + +print STDERR "Required packages:\n"; +system "swim --search \"Priority: required\" --no"; +my $swim_packages = "swim -qS|"; +my $swim_list = "swim -qSl|"; # Not using --df for empty directories. +$, = " "; +my $extra_files = "swim -ql @extra_packages|"; # Not using --df. +$, = ""; + +# All the packages +open(SWIM,$swim_packages) or die "Couldn't open swim_packages: $?\n"; +my @required_packages = ; chomp @required_packages; +close(SWIM); + +# All the files +open(SWIM,$swim_list) or die "Couldn't open swim_list: $!\n"; +my @required_files = ; chomp @required_files; +close(SWIM); + +open(SWIM,$extra_files) or die "Couldn't open extra_files: $!\n"; +my @extra_files = ; chomp @extra_files; +close(SWIM); + +push(@required_files,@extra_files); + + ################### ## Package Check ## ###################