From 3c971734fdb289510080d27042bc8df349b886e3 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Thu, 22 Sep 2011 21:32:51 -0700 Subject: [PATCH] https://sourceforge.net/tracker/index.php?func=detail&aid=3411977&group_id=17457&atid=117457 Update package categories, deal with missing category case. --- software/slackware-lib.pl | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/software/slackware-lib.pl b/software/slackware-lib.pl index a7b13209a..5195ce8c9 100755 --- a/software/slackware-lib.pl +++ b/software/slackware-lib.pl @@ -2,22 +2,25 @@ # Functions for slackware package management $package_dir = "/var/log/packages"; -%class_map = ( 'a', 'Base Linux system', - 'ap', 'Applications', - 'd', 'Program development', - 'des', 'Crypt library', - 'e', 'GNU Emacs', - 'f', 'FAQs and documentation', - 'gtk', 'GTK+ and GNOME programs', - 'k', 'Linux kernel source', - 'kde', 'KDE desktop and programs', - 'n', 'Networking', - 't', 'TeX', - 'tcl', 'TcL/Tk', - 'xap', 'X applications', - 'xd', 'X server development', - 'xv', 'XView programs', - 'y', 'Games' ); +%class_map = ( 'a', 'Base Slackware system', + 'ap', 'Linux applications', + 'd', 'Program development', + 'e', 'GNU Emacs', + 'extra', 'Extra Slackware packages', + 'f', 'FAQs, howtos, and documentation', + 'gnome', 'GNOME desktop and programs', + 'k', 'Linux kernel source', + 'kde', 'KDE desktop and programs', + 'kdei', 'Language support of KDE', + 'l', 'Libraries', + 'n', 'Networking', + 'pasture', 'Software put to pasture', + 't', 'TeX', + 'testing', 'Software in testing', + 'tcl', 'TcL/Tk', + 'x', 'X Windows', + 'xap', 'X applications', + 'y', 'Classic BSD console games' ); use POSIX; chop($system_arch = `uname -m`); @@ -43,7 +46,8 @@ foreach $f (@list) { while() { if (/^PACKAGE LOCATION:\s+disk([a-z]+)\d+/i || /^PACKAGE LOCATION:\s+\S+\/([a-z]+)\/[^\/]+$/i) { - $packages{$i,'class'} = $class_map{$1}; + $packages{$i,'class'} = $class_map{$1} || + $text{'slack_unclass'}; } elsif (/^PACKAGE DESCRIPTION:/i) { local $desc = ;