/[packages]/cauldron/meta-task/current/SOURCES/compssUsers.pl
ViewVC logotype

Diff of /cauldron/meta-task/current/SOURCES/compssUsers.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 338771 by tmb, Fri Jan 4 21:47:17 2013 UTC revision 388363 by tv, Tue Jan 15 17:39:20 2013 UTC
# Line 1  Line 1 
1  package tmp::compssUsers;  package tmp::compssUsers;
2    
3  use common;  use common;
4    use install::pkgs;
5    
6  my $low_resources = detect_devices::has_low_resources();  my $low_resources = detect_devices::has_low_resources();
7  my $netbook_desktop = detect_devices::is_netbook_nettop();  my $netbook_desktop = detect_devices::is_netbook_nettop();
# Line 17  N_("Workstation") => Line 18  N_("Workstation") =>
18        N_("Office programs: wordprocessors (LibreOffice Writer, Kword), spreadsheets (LibreOffice Calc, Kspread), PDF viewers, etc"),        N_("Office programs: wordprocessors (LibreOffice Writer, Kword), spreadsheets (LibreOffice Calc, Kspread), PDF viewers, etc"),
19      flags => [ qw(OFFICE SPELLCHECK PIM ARCHIVING ), if_(!$light_desktop, qw(PUBLISHING)) ],      flags => [ qw(OFFICE SPELLCHECK PIM ARCHIVING ), if_(!$light_desktop, qw(PUBLISHING)) ],
20      default_selected => 1,      default_selected => 1,
21        required => [ qw(libreoffice-writer abiword) ],
22    },    },
23    if_(!$server,    if_(!$server,
24    { label => N_("Game station"),    { label => N_("Game station"),
# Line 39  N_("Workstation") => Line 41  N_("Workstation") =>
41      descr => N_("Clients for different protocols including ssh"),      descr => N_("Clients for different protocols including ssh"),
42      flags => [ qw(NETWORKING_REMOTE_ACCESS NETWORKING_FILE) ],      flags => [ qw(NETWORKING_REMOTE_ACCESS NETWORKING_FILE) ],
43      default_selected => $powerpack,      default_selected => $powerpack,
44        required => [ qw(openssh-clients samba-client) ],
45    },    },
46    { label => N_("Configuration"),    { label => N_("Configuration"),
47      descr => N_("Tools to ease the configuration of your computer"),      descr => N_("Tools to ease the configuration of your computer"),
# Line 53  N_("Workstation") => Line 56  N_("Workstation") =>
56    { label => N_("Development"),    { label => N_("Development"),
57      descr => N_("C and C++ development libraries, programs and include files"),      descr => N_("C and C++ development libraries, programs and include files"),
58      flags => [ qw(DEVELOPMENT EDITORS) ],      flags => [ qw(DEVELOPMENT EDITORS) ],
59        required => [ 'make' ],
60    },    },
61    { label => N_("Documentation"),    { label => N_("Documentation"),
62      descr => N_("Books and Howto's on Linux and Free Software"),      descr => N_("Books and Howto's on Linux and Free Software"),
# Line 62  N_("Workstation") => Line 66  N_("Workstation") =>
66    { label => N_("LSB"),    { label => N_("LSB"),
67      descr => N_("Linux Standard Base. Third party applications support"),      descr => N_("Linux Standard Base. Third party applications support"),
68      flags => [ qw(LSB) ],      flags => [ qw(LSB) ],
69        required => [ 'lsb-core' ],
70    },    },
71    ),    ),
72  ],  ],
# Line 72  N_("Server") => Line 77  N_("Server") =>
77    { label => N_("Web Server"),    { label => N_("Web Server"),
78      descr => N_("Apache"),      descr => N_("Apache"),
79      flags => [ qw(NETWORKING_WWW_SERVER) ],      flags => [ qw(NETWORKING_WWW_SERVER) ],
80        required => [ qw(apache lftp mirrordir rsync) ],
81    },    },
82    { label => N_("Groupware"),    { label => N_("Groupware"),
83      descr => N_("Kolab Server"),      descr => N_("Kolab Server"),
# Line 84  N_("Server") => Line 90  N_("Server") =>
90    { label => N_("Mail/News"),    { label => N_("Mail/News"),
91      descr => N_("Postfix mail server, Inn news server"),      descr => N_("Postfix mail server, Inn news server"),
92      flags => [ qw(NETWORKING_MAIL_SERVER NETWORKING_NEWS_SERVER) ],      flags => [ qw(NETWORKING_MAIL_SERVER NETWORKING_NEWS_SERVER) ],
93        required => [ 'postfix' ],
94    },    },
95    { label => N_("Directory Server"),    { label => N_("Directory Server"),
96      descr => N_("LDAP Server"),      descr => N_("LDAP Server"),
97      flags => [ qw(NETWORKING_LDAP_SERVER) ],      flags => [ qw(NETWORKING_LDAP_SERVER) ],
98        required => [ 'openldap-servers' ],
99    },    },
100    { label => N_("FTP Server"),    { label => N_("FTP Server"),
101      descr => N_("ProFTPd"),      descr => N_("ProFTPd"),
102      flags => [ qw(NETWORKING_FILE_TRANSFER_SERVER) ],      flags => [ qw(NETWORKING_FILE_TRANSFER_SERVER) ],
103        required => [ 'proftpd' ],
104    },    },
105    { label => N_("DNS/NIS"),    { label => N_("DNS/NIS"),
106      descr => N_("Domain Name and Network Information Server"),      descr => N_("Domain Name and Network Information Server"),
107      flags => [ qw(NIS_SERVER NETWORKING_DNS_SERVER) ],      flags => [ qw(NIS_SERVER NETWORKING_DNS_SERVER) ],
108        required => [ 'bind' ],
109    },    },
110    { label => N_("File and Printer Sharing Server"),    { label => N_("File and Printer Sharing Server"),
111      descr => N_("NFS Server, Samba server"),      descr => N_("NFS Server, Samba server"),
112      flags => [ qw(NETWORKING_FILE_SERVER PRINTER) ],      flags => [ qw(NETWORKING_FILE_SERVER PRINTER) ],
113        required => [ qw(nfs-utils cups samba-server) ],
114    },    },
115    { label => N_("Database"),    { label => N_("Database"),
116      descr => N_("PostgreSQL and MariaDB Database Server"),      descr => N_("PostgreSQL and MariaDB Database Server"),
117      flags => [ qw(DATABASES DATABASES_SERVER) ],      flags => [ qw(DATABASES DATABASES_SERVER) ],
118        required => [ qw(postgresql9.1 postgresql9.2 mariadb) ],
119    },    },
120    ) : (    ) : (
121    { label => N_("Web/FTP"),    { label => N_("Web/FTP"),
122      descr => N_("Apache, Pro-ftpd"),      descr => N_("Apache, Pro-ftpd"),
123      flags => [ qw(NETWORKING_WWW_SERVER NETWORKING_FILE_TRANSFER_SERVER) ],      flags => [ qw(NETWORKING_WWW_SERVER NETWORKING_FILE_TRANSFER_SERVER) ],
124        required => [ qw(apache proftpd rsync) ],
125    },    },
126    { label => N_("Mail"),    { label => N_("Mail"),
127      descr => N_("Postfix mail server"),      descr => N_("Postfix mail server"),
128      flags => [ qw(NETWORKING_MAIL_SERVER) ],      flags => [ qw(NETWORKING_MAIL_SERVER) ],
129        required => [ 'postfix' ],
130    },    },
131    { label => N_("Database"),    { label => N_("Database"),
132      descr => N_("PostgreSQL or MariaDB database server"),      descr => N_("PostgreSQL or MariaDB database server"),
133      flags => [ qw(DATABASES DATABASES_SERVER) ],      flags => [ qw(DATABASES DATABASES_SERVER) ],
134        required => [ qw(postgresql9.1 postgresql9.2 mariadb) ],
135    },    },
136    { label => N_("Firewall/Router"),    { label => N_("Firewall/Router"),
137      descr => N_("Internet gateway"),      descr => N_("Internet gateway"),
# Line 125  N_("Server") => Line 140  N_("Server") =>
140    { label => N_("Network Computer server"),    { label => N_("Network Computer server"),
141      descr => N_("NFS server, SMB server, Proxy server, ssh server"),      descr => N_("NFS server, SMB server, Proxy server, ssh server"),
142      flags => [ qw(NETWORKING_FILE_SERVER NETWORKING_REMOTE_ACCESS_SERVER) ],      flags => [ qw(NETWORKING_FILE_SERVER NETWORKING_REMOTE_ACCESS_SERVER) ],
143        required => [ qw(nfs-utils cups samba-server openssh-server) ],
144    },    },
145    ),    ),
146  ],  ],
# Line 135  N_("Graphical Environment") => Line 151  N_("Graphical Environment") =>
151      descr => N_("The K Desktop Environment, the basic graphical environment with a collection of accompanying tools"),      descr => N_("The K Desktop Environment, the basic graphical environment with a collection of accompanying tools"),
152      flags => [ qw(KDE X ACCESSIBILITY THEMES) ],      flags => [ qw(KDE X ACCESSIBILITY THEMES) ],
153      default_selected => !$light_desktop,      default_selected => !$light_desktop,
154        required => [ 'task-kde4-minimal' ],
155    },    },
156    { label => N_("GNOME Workstation"),    { label => N_("GNOME Workstation"),
157      descr => N_("A graphical environment with user-friendly set of applications and desktop tools"),      descr => N_("A graphical environment with user-friendly set of applications and desktop tools"),
158      flags => [ qw(GNOME X THEMES), if_(!$light_desktop, qw(ACCESSIBILITY)) ],      flags => [ qw(GNOME X THEMES), if_(!$light_desktop, qw(ACCESSIBILITY)) ],
159      default_selected => $netbook_desktop,      default_selected => $netbook_desktop,
160        required => [ 'task-gnome-minimal' ],
161    },    },
162    { label => N_("LXDE Desktop"),    { label => N_("LXDE Desktop"),
163      flags => [ qw(LXDE X ACCESSIBILITY) ],      flags => [ qw(LXDE X ACCESSIBILITY) ],
# Line 203  foreach my $path (keys %$h) { Line 221  foreach my $path (keys %$h) {
221      }      }
222  }  }
223    
224  my $compssUsers = [ map { @$_ } values %$h ];  sub _filter {
225        grep { $_->{required} ? install::pkgs::packageByName($::o->{packages}, $_->{required}) : 1 } map { @$_ } @_;
226    }
227    
228    my $compssUsers = [ _filter(values %$h) ];
229    
230  my $gtk_display_compssUsers = sub {  my $gtk_display_compssUsers = sub {
231      my ($entry) = @_;      my ($entry) = @_;
# Line 215  my $gtk_display_compssUsers = sub { Line 237  my $gtk_display_compssUsers = sub {
237    
238      my $entries_in_path = sub {      my $entries_in_path = sub {
239          my ($path) = @_;          my ($path) = @_;
240          my @items = map { $entry->($_) } @{$h->{$path}};          my @items = map { $entry->($_) } @{ [ _filter($h->{$path}) ] };
241    
242          # ensure we have an even number of items:          # ensure we have an even number of items:
243          if (@items % 2) {          if (@items % 2) {

Legend:
Removed from v.338771  
changed lines
  Added in v.388363

  ViewVC Help
Powered by ViewVC 1.1.30