Mageia Bugzilla – Attachment 3369 Details for
Bug 103
do not give choice (or disable) to install category, not present (on selected media)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
revised less ugly patch
compssUsers.patch (text/plain), 5.20 KB, created by
Derek Jennings
on 2013-01-15 16:01:31 CET
(
hide
)
Description:
revised less ugly patch
Filename:
MIME Type:
Creator:
Derek Jennings
Created:
2013-01-15 16:01:31 CET
Size:
5.20 KB
patch
obsolete
>--- /usr/share/meta-task/compssUsers.pl 2013-01-12 19:04:26.000000000 +0000 >+++ compssUsers.pl 2013-01-15 14:53:36.000000000 +0000 >@@ -1,6 +1,7 @@ > package tmp::compssUsers; > > use common; >+use install::pkgs; > > my $low_resources = detect_devices::has_low_resources(); > my $netbook_desktop = detect_devices::is_netbook_nettop(); >@@ -17,6 +18,7 @@ > N_("Office programs: wordprocessors (LibreOffice Writer, Kword), spreadsheets (LibreOffice Calc, Kspread), PDF viewers, etc"), > flags => [ qw(OFFICE SPELLCHECK PIM ARCHIVING ), if_(!$light_desktop, qw(PUBLISHING)) ], > default_selected => 1, >+ required => [ qw(libreoffice-writer abiword) ], > }, > if_(!$server, > { label => N_("Game station"), >@@ -39,6 +41,7 @@ > descr => N_("Clients for different protocols including ssh"), > flags => [ qw(NETWORKING_REMOTE_ACCESS NETWORKING_FILE) ], > default_selected => $powerpack, >+ required => [ qw(openssh-clients samba-client) ], > }, > { label => N_("Configuration"), > descr => N_("Tools to ease the configuration of your computer"), >@@ -53,6 +56,7 @@ > { label => N_("Development"), > descr => N_("C and C++ development libraries, programs and include files"), > flags => [ qw(DEVELOPMENT EDITORS) ], >+ required => [ 'make' ], > }, > { label => N_("Documentation"), > descr => N_("Books and Howto's on Linux and Free Software"), >@@ -62,6 +66,7 @@ > { label => N_("LSB"), > descr => N_("Linux Standard Base. Third party applications support"), > flags => [ qw(LSB) ], >+ required => [ 'lsb-core' ], > }, > ), > ], >@@ -72,6 +77,7 @@ > { label => N_("Web Server"), > descr => N_("Apache"), > flags => [ qw(NETWORKING_WWW_SERVER) ], >+ required => [ qw(apache lftp mirrordir rsync) ], > }, > { label => N_("Groupware"), > descr => N_("Kolab Server"), >@@ -84,39 +90,48 @@ > { label => N_("Mail/News"), > descr => N_("Postfix mail server, Inn news server"), > flags => [ qw(NETWORKING_MAIL_SERVER NETWORKING_NEWS_SERVER) ], >+ required => [ 'postfix' ], > }, > { label => N_("Directory Server"), > descr => N_("LDAP Server"), > flags => [ qw(NETWORKING_LDAP_SERVER) ], >+ required => [ 'openldap-servers' ], > }, > { label => N_("FTP Server"), > descr => N_("ProFTPd"), > flags => [ qw(NETWORKING_FILE_TRANSFER_SERVER) ], >+ required => [ 'proftpd' ], > }, > { label => N_("DNS/NIS"), > descr => N_("Domain Name and Network Information Server"), > flags => [ qw(NIS_SERVER NETWORKING_DNS_SERVER) ], >+ required => [ 'bind' ], > }, > { label => N_("File and Printer Sharing Server"), > descr => N_("NFS Server, Samba server"), > flags => [ qw(NETWORKING_FILE_SERVER PRINTER) ], >+ required => [ qw(nfs-utils cups samba-server) ], > }, > { label => N_("Database"), > descr => N_("PostgreSQL and MariaDB Database Server"), > flags => [ qw(DATABASES DATABASES_SERVER) ], >+ required => [ qw(postgresql9.1 postgresql9.2 mariadb) ], > }, > ) : ( > { label => N_("Web/FTP"), > descr => N_("Apache, Pro-ftpd"), > flags => [ qw(NETWORKING_WWW_SERVER NETWORKING_FILE_TRANSFER_SERVER) ], >+ required => [ qw(apache proftpd rsync) ], > }, > { label => N_("Mail"), > descr => N_("Postfix mail server"), > flags => [ qw(NETWORKING_MAIL_SERVER) ], >+ required => [ 'postfix' ], > }, > { label => N_("Database"), > descr => N_("PostgreSQL or MariaDB database server"), > flags => [ qw(DATABASES DATABASES_SERVER) ], >+ required => [ qw(postgresql9.1 postgresql9.2 mariadb) ], > }, > { label => N_("Firewall/Router"), > descr => N_("Internet gateway"), >@@ -125,6 +140,7 @@ > { label => N_("Network Computer server"), > descr => N_("NFS server, SMB server, Proxy server, ssh server"), > flags => [ qw(NETWORKING_FILE_SERVER NETWORKING_REMOTE_ACCESS_SERVER) ], >+ required => [ qw(nfs-utils cups samba-server openssh-server) ], > }, > ), > ], >@@ -134,12 +150,14 @@ > { label => N_("KDE Workstation"), > descr => N_("The K Desktop Environment, the basic graphical environment with a collection of accompanying tools"), > flags => [ qw(KDE X ACCESSIBILITY THEMES) ], >+ required => [ 'task-kde4-minimal' ], > default_selected => !$light_desktop, > }, > { label => N_("GNOME Workstation"), > descr => N_("A graphical environment with user-friendly set of applications and desktop tools"), > flags => [ qw(GNOME X THEMES), if_(!$light_desktop, qw(ACCESSIBILITY)) ], > default_selected => $netbook_desktop, >+ required => [ 'task-gnome-minimal' ], > }, > { label => N_("LXDE Desktop"), > flags => [ qw(LXDE X ACCESSIBILITY) ], >@@ -203,7 +221,7 @@ > } > } > >-my $compssUsers = [ map { @$_ } values %$h ]; >+my $compssUsers = [ grep { $_->{required} ? install::pkgs::packageByName($::o->{packages}, $_->{required}) : 1;} map { @$_ } values %$h ]; > > my $gtk_display_compssUsers = sub { > my ($entry) = @_; >@@ -215,8 +233,7 @@ > > my $entries_in_path = sub { > my ($path) = @_; >- my @items = map { $entry->($_) } @{$h->{$path}}; >- >+ my @items = map { $entry->($_) } @{ [ grep { $_->{required} ? install::pkgs::packageByName($::o->{packages}, $_->{required}) : 1;} map { @$_ } $h->{$path}]}; > # ensure we have an even number of items: > if (@items % 2) { > my @last_items = (pop @items, gtknew('Label'));
--- /usr/share/meta-task/compssUsers.pl 2013-01-12 19:04:26.000000000 +0000 +++ compssUsers.pl 2013-01-15 14:53:36.000000000 +0000 @@ -1,6 +1,7 @@ package tmp::compssUsers; use common; +use install::pkgs; my $low_resources = detect_devices::has_low_resources(); my $netbook_desktop = detect_devices::is_netbook_nettop(); @@ -17,6 +18,7 @@ N_("Office programs: wordprocessors (LibreOffice Writer, Kword), spreadsheets (LibreOffice Calc, Kspread), PDF viewers, etc"), flags => [ qw(OFFICE SPELLCHECK PIM ARCHIVING ), if_(!$light_desktop, qw(PUBLISHING)) ], default_selected => 1, + required => [ qw(libreoffice-writer abiword) ], }, if_(!$server, { label => N_("Game station"), @@ -39,6 +41,7 @@ descr => N_("Clients for different protocols including ssh"), flags => [ qw(NETWORKING_REMOTE_ACCESS NETWORKING_FILE) ], default_selected => $powerpack, + required => [ qw(openssh-clients samba-client) ], }, { label => N_("Configuration"), descr => N_("Tools to ease the configuration of your computer"), @@ -53,6 +56,7 @@ { label => N_("Development"), descr => N_("C and C++ development libraries, programs and include files"), flags => [ qw(DEVELOPMENT EDITORS) ], + required => [ 'make' ], }, { label => N_("Documentation"), descr => N_("Books and Howto's on Linux and Free Software"), @@ -62,6 +66,7 @@ { label => N_("LSB"), descr => N_("Linux Standard Base. Third party applications support"), flags => [ qw(LSB) ], + required => [ 'lsb-core' ], }, ), ], @@ -72,6 +77,7 @@ { label => N_("Web Server"), descr => N_("Apache"), flags => [ qw(NETWORKING_WWW_SERVER) ], + required => [ qw(apache lftp mirrordir rsync) ], }, { label => N_("Groupware"), descr => N_("Kolab Server"), @@ -84,39 +90,48 @@ { label => N_("Mail/News"), descr => N_("Postfix mail server, Inn news server"), flags => [ qw(NETWORKING_MAIL_SERVER NETWORKING_NEWS_SERVER) ], + required => [ 'postfix' ], }, { label => N_("Directory Server"), descr => N_("LDAP Server"), flags => [ qw(NETWORKING_LDAP_SERVER) ], + required => [ 'openldap-servers' ], }, { label => N_("FTP Server"), descr => N_("ProFTPd"), flags => [ qw(NETWORKING_FILE_TRANSFER_SERVER) ], + required => [ 'proftpd' ], }, { label => N_("DNS/NIS"), descr => N_("Domain Name and Network Information Server"), flags => [ qw(NIS_SERVER NETWORKING_DNS_SERVER) ], + required => [ 'bind' ], }, { label => N_("File and Printer Sharing Server"), descr => N_("NFS Server, Samba server"), flags => [ qw(NETWORKING_FILE_SERVER PRINTER) ], + required => [ qw(nfs-utils cups samba-server) ], }, { label => N_("Database"), descr => N_("PostgreSQL and MariaDB Database Server"), flags => [ qw(DATABASES DATABASES_SERVER) ], + required => [ qw(postgresql9.1 postgresql9.2 mariadb) ], }, ) : ( { label => N_("Web/FTP"), descr => N_("Apache, Pro-ftpd"), flags => [ qw(NETWORKING_WWW_SERVER NETWORKING_FILE_TRANSFER_SERVER) ], + required => [ qw(apache proftpd rsync) ], }, { label => N_("Mail"), descr => N_("Postfix mail server"), flags => [ qw(NETWORKING_MAIL_SERVER) ], + required => [ 'postfix' ], }, { label => N_("Database"), descr => N_("PostgreSQL or MariaDB database server"), flags => [ qw(DATABASES DATABASES_SERVER) ], + required => [ qw(postgresql9.1 postgresql9.2 mariadb) ], }, { label => N_("Firewall/Router"), descr => N_("Internet gateway"), @@ -125,6 +140,7 @@ { label => N_("Network Computer server"), descr => N_("NFS server, SMB server, Proxy server, ssh server"), flags => [ qw(NETWORKING_FILE_SERVER NETWORKING_REMOTE_ACCESS_SERVER) ], + required => [ qw(nfs-utils cups samba-server openssh-server) ], }, ), ], @@ -134,12 +150,14 @@ { label => N_("KDE Workstation"), descr => N_("The K Desktop Environment, the basic graphical environment with a collection of accompanying tools"), flags => [ qw(KDE X ACCESSIBILITY THEMES) ], + required => [ 'task-kde4-minimal' ], default_selected => !$light_desktop, }, { label => N_("GNOME Workstation"), descr => N_("A graphical environment with user-friendly set of applications and desktop tools"), flags => [ qw(GNOME X THEMES), if_(!$light_desktop, qw(ACCESSIBILITY)) ], default_selected => $netbook_desktop, + required => [ 'task-gnome-minimal' ], }, { label => N_("LXDE Desktop"), flags => [ qw(LXDE X ACCESSIBILITY) ], @@ -203,7 +221,7 @@ } } -my $compssUsers = [ map { @$_ } values %$h ]; +my $compssUsers = [ grep { $_->{required} ? install::pkgs::packageByName($::o->{packages}, $_->{required}) : 1;} map { @$_ } values %$h ]; my $gtk_display_compssUsers = sub { my ($entry) = @_; @@ -215,8 +233,7 @@ my $entries_in_path = sub { my ($path) = @_; - my @items = map { $entry->($_) } @{$h->{$path}}; - + my @items = map { $entry->($_) } @{ [ grep { $_->{required} ? install::pkgs::packageByName($::o->{packages}, $_->{required}) : 1;} map { @$_ } $h->{$path}]}; # ensure we have an even number of items: if (@items % 2) { my @last_items = (pop @items, gtknew('Label'));
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 103
:
2911
|
3360
| 3369 |
3370