The maketag and maketag.ez files are identical with all packages selected by default. And menu and expert mode are actually the same thing (as the installer tells you).
I propose a simple way to make use of these options.
A short (manageable) ADD list and a short (manageable) OPT list.
The packages in the ADD list are tagged ADD and selected by default in expert and menu mode. They are hidden in menu mode (always installed).
The packages in OPT are tagged OPT and are not selected by default in menu and expert mode, they are installed in full mode only (or if selected from the menu).
The rest of the packages are tagged REC. They are selected by default in menu mode, but not in expert mode.
Here is a script to create tagfile maketag and maketag.ez using simple ADD and OPT files:
Code:
#!/bin/bash
LANG=C
LC_ALL=C
CWD=$(pwd)
SLACK_DIR="$CWD/slackware64-current"
SLACK_PKGS="slackware64"
SERIES="a ap d e f k kde kdei l n t tcl x xap xfce y"
PRI_ADD=$CWD/ADD
PRI_OPT=$CWD/OPT
TMP_DIR=/var/log/setup/tmp
# For testing
#TMP_DIR=/tmp
_pbase(){
echo $(basename $1) | rev | cut -f4- -d '-' | rev
}
_tagfiles(){
echo "Generating tagfile files:"
cd $SLACK_DIR/$SLACK_PKGS || exit 1
for d in $SERIES ; do
echo " $d"
(
for p in ./$d/*.t?z ; do
PBASE=$(_pbase $p)
if grep -q "^$PBASE$" $PRI_ADD 2>/dev/null ; then
echo $PBASE:ADD
elif grep -q "^$PBASE$" $PRI_OPT 2>/dev/null ; then
echo $PBASE:OPT
else
echo $PBASE:REC
fi
done
) > $d/tagfile
done
cd - >/dev/null
}
_maketag(){
MTMODE="$1"
if [ "$MTMODE" == "normal" ] ; then
echo "Generating maketag.ez files:"
MAKETAG="maketag.ez"
elif [ "$MTMODE" == "expert" ] ; then
echo "Generating maketag files:"
MAKETAG="maketag"
else
echo "Invalid maketag mode."
exit 1
fi
cd $SLACK_DIR/$SLACK_PKGS || exit 1
for d in $SERIES ; do
echo " $d"
(
case $d in
a) DESC="BASE LINUX SYSTEM" ;;
ap) DESC="APPLICATIONS" ;;
d) DESC="PROGRAM DEVELOPMENT" ;;
e) DESC="GNU EMACS" ;;
f) DESC="FAQS/DOCS" ;;
k) DESC="KERNEL SOURCE" ;;
kde) DESC="PLASMA DESKTOP" ;;
kdei) DESC="KDE LANG SUPPORT" ;;
l) DESC="LIBRARIES" ;;
n) DESC="NETWORK" ;;
t) DESC="TeX" ;;
tcl) DESC="Tcl/Tk" ;;
x) DESC="X WINDOW SYSTEM" ;;
xap) DESC="X APPLICATIONS" ;;
xfce) DESC="XFCE DESKTOP" ;;
y) DESC="GAMES" ;;
*) DESC="UNKNOWN" ;;
esac
echo "#!/bin/sh"
echo ""
echo "TMP=$TMP_DIR"
echo "if [ ! -d \$TMP ]; then"
echo " mkdir -p \$TMP"
echo "fi"
echo "cat /dev/null > \$TMP/SeTnewtag"
echo "dialog --title \"SELECTING PACKAGES FROM SERIES $(echo $d | tr a-z A-Z) ($DESC)\" \\"
echo " --checklist \"Please confirm the packages you wish to install \\"
echo "from series $(echo $d | tr a-z A-Z). Use the UP/DOWN keys to scroll through the list, and \\"
echo "the SPACE key to deselect any items you don't want to install. \\"
echo "Press ENTER when you are \\"
echo "done.\" 22 72 12 \\"
PKGS=""
for p in ./$d/*.t?z ; do
PBASE=$(_pbase $p)
PKGS="$PKGS $PBASE"
if [ "$MTMODE" == "normal" ] ; then
grep "^$PBASE:" ./$d/tagfile | cut -f2 -d ':' | grep -qw ADD && continue
fi
echo -n "\"$PBASE\" "
echo -n "\"$( head -1 ${p%.t[xg]z}.txt | cut -f2- -d ':' | sed 's/^ *//' | cut -b1-60 )\" "
if [ "$MTMODE" == "expert" ] ; then
if grep "^$PBASE:" ./$d/tagfile | cut -f2 -d ':' | grep -qw ADD ; then
echo "\"on\" \\"
else
echo "\"off\" \\"
fi
else
if grep "^$PBASE:" ./$d/tagfile | cut -f2 -d ':' | grep -qw OPT ; then
echo "\"off\" \\"
else
echo "\"on\" \\"
fi
fi
done
echo "2> \$TMP/SeTpkgs"
echo "if [ $? = 1 -o $? = 255 ]; then"
echo " rm -f \$TMP/SeTpkgs"
echo " > \$TMP/SeTnewtag"
echo " for pkg in \\"
echo "$PKGS \\"
echo " ; do"
echo " echo "\$pkg:SKP" >> \$TMP/SeTnewtag"
echo " done"
echo " exit"
echo "fi"
echo "cat /dev/null > \$TMP/SeTnewtag"
echo "for PACKAGE in \\"
echo "$PKGS \\"
echo " ; do"
echo " if grep \"\(^\| \)\$PACKAGE\( \|$\)\" \$TMP/SeTpkgs 1> /dev/null 2> /dev/null ; then"
echo " echo \"\$PACKAGE:ADD\" >> \$TMP/SeTnewtag"
echo " else"
echo " echo \"\$PACKAGE:SKP\" >> \$TMP/SeTnewtag"
echo " fi"
echo "done"
echo "rm -f \$TMP/SeTpkgs"
) > $d/$MAKETAG
done
cd - >/dev/null
}
_tagfiles
_maketag normal
_maketag expert
# Test
#find $SLACK_DIR/$SLACK_PKGS -name maketag | sort | xargs -n1 sh
#find $SLACK_DIR/$SLACK_PKGS -name maketag.ez | sort | xargs -n1 sh
ADD:
Code:
# A
aaa_base
aaa_elflibs
aaa_terminfo
acl
acpid
attr
bash
bin
btrfs-progs
bzip2
coreutils
cpio
cpufrequtils
cryptsetup
dbus
dcron
devs
dialog
dosfstools
e2fsprogs
ed
efibootmgr
elilo
elvis
etc
eudev
file
findutils
gawk
gettext
glibc-solibs
glibc-zoneinfo
gpm
gptfdisk
grep
grub
gzip
hdparm
hostname
hwdata
inotify-tools
jfsutils
kbd
kernel-firmware
kernel-generic
kernel-huge
kernel-modules
kmod
less
libcgroup
libgudev
lilo
logrotate
lvm2
mdadm
mkinitrd
mlocate
ncompress
ntfs-3g
openssl-solibs
os-prober
patch
pciutils
pkgtools
procps-ng
quota
reiserfsprogs
sdparm
sed
shadow
sharutils
smartmontools
sysfsutils
sysklogd
syslinux
sysvinit
sysvinit-scripts
tar
tcsh
time
tree
usbutils
utempter
util-linux
which
xfsprogs
xz
OPT:
Code:
# A
lha
unarj
zoo
# AP
jed
joe
jove
ksh
sc
workbone
zsh
# D
ccache
clisp
cvs
distcc
gcc-gfortran
gcc-gnat
gcc-go
gcc-objc
gnucobol
mercurial
p2c
pmake
rcs
rust
# E
emacs
# F
linux-faqs
linux-howtos
# K
kernel-source
# T
texlive
transfig
xfig
# Y
bsd-games
Cheers