Hello community, here is the log from the commit of package yast2-packager checked in at Fri Sep 12 01:57:38 CEST 2008. -------- --- yast2-packager/yast2-packager.changes 2008-09-09 11:14:01.000000000 +0200 +++ /mounts/work_src_done/STABLE/yast2-packager/yast2-packager.changes 2008-09-10 16:00:00.000000000 +0200 @@ -1,0 +2,22 @@ +Wed Sep 10 15:52:47 CEST 2008 - locilka@suse.cz + +- Desktop selection dialog definitions have been moved to control + file (bnc #424678). +- 2.17.14 + +------------------------------------------------------------------- +Wed Sep 10 11:37:11 CEST 2008 - lslezak@suse.cz + +- repositories.ycp: change table headers when switching to + the service view +- merged proofread texts (2008-09-08) +- 2.17.13 + +------------------------------------------------------------------- +Tue Sep 9 15:32:11 CEST 2008 - locilka@suse.cz + +- xmlrepos SCR agent replaced with OneClickInstallStandard module + using XML::Simple (anyxml SCR agent) instead of perl-XML-Bare + (bnc #424263). + +------------------------------------------------------------------- Old: ---- yast2-packager-2.17.12.tar.bz2 New: ---- yast2-packager-2.17.14.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-packager.spec ++++++ --- /var/tmp/diff_new_pack.Z10667/_old 2008-09-12 01:57:33.000000000 +0200 +++ /var/tmp/diff_new_pack.Z10667/_new 2008-09-12 01:57:33.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package yast2-packager (Version 2.17.12) +# spec file for package yast2-packager (Version 2.17.14) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -19,12 +19,12 @@ Name: yast2-packager -Version: 2.17.12 +Version: 2.17.14 Release: 1 License: GPL v2 or later Group: System/YaST BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-packager-2.17.12.tar.bz2 +Source0: yast2-packager-2.17.14.tar.bz2 Prefix: /usr BuildRequires: gcc-c++ libxcrypt-devel perl-XML-Writer update-desktop-files yast2-country-data yast2-devtools yast2-slp yast2-testsuite yast2-xml # HTTP.ycp @@ -33,8 +33,6 @@ BuildRequires: yast2 >= 2.17.19 # "order" flag for pattern resolvables BuildRequires: yast2-pkg-bindings >= 2.16.31 -# Module: OneClickInstallStandard -Requires: perl-XML-Bare yast2-perl-bindings # Newly added RPM Requires: yast2-country-data >= 2.16.3 # "order" flag for pattern resolvables @@ -80,7 +78,7 @@ Arvin Schnell <arvin@suse.de> %prep -%setup -n yast2-packager-2.17.12 +%setup -n yast2-packager-2.17.14 %build %{prefix}/bin/y2tool y2autoconf @@ -115,7 +113,21 @@ /usr/share/YaST2/scrconf/* %{prefix}/lib/YaST2/servers_non_y2/ag_* %doc %{prefix}/share/doc/packages/yast2-packager + %changelog +* Wed Sep 10 2008 locilka@suse.cz +- Desktop selection dialog definitions have been moved to control + file (bnc #424678). +- 2.17.14 +* Wed Sep 10 2008 lslezak@suse.cz +- repositories.ycp: change table headers when switching to + the service view +- merged proofread texts (2008-09-08) +- 2.17.13 +* Tue Sep 09 2008 locilka@suse.cz +- xmlrepos SCR agent replaced with OneClickInstallStandard module + using XML::Simple (anyxml SCR agent) instead of perl-XML-Bare + (bnc #424263). * Tue Sep 09 2008 locilka@suse.cz - Packages 'Slides' and 'SlideShow' moved to yast2. - 2.17.12 ++++++ yast2-packager-2.17.12.tar.bz2 -> yast2-packager-2.17.14.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-packager-2.17.12/agents/ag_xmlrepos new/yast2-packager-2.17.14/agents/ag_xmlrepos --- old/yast2-packager-2.17.12/agents/ag_xmlrepos 2007-11-05 13:33:35.000000000 +0100 +++ new/yast2-packager-2.17.14/agents/ag_xmlrepos 1970-01-01 01:00:00.000000000 +0100 @@ -1,204 +0,0 @@ -#!/usr/bin/perl -w - -# -# Name: ag_xmlrepos -# Authors: Lukas Ocilka <locilka@suse.cz> -# Summary: Agent for parsing XML files in format One Click Install Standard -# http://en.opensuse.org/Standards/One_Click_Install -# - -use strict; -use lib "/usr/lib/YaST2/agents_non_y2"; -use ycp; -use XML::Bare; - -sub GetListFromVariable { - my $variable = shift || {}; - - if ($variable =~ /^ARRAY(/) { - return $variable; - } elsif ($variable =~ /^HASH(/) { - return [$variable]; - } else { - y2error ("Unknown: ".$variable); - return []; - } -} - -## -# Converts XML to a list of maps with all repositories described in the XML content. -# -# @param XML content as descibed at http://en.opensuse.org/Standards/One_Click_Install -# @return list <map, <string, any> > -# -# @struct [ -# $[ -# "distversion" : "openSUSE Factory", -# "url" : "full url of the repository (http://.../)", -# "format" : "yast", -# "recommended" : true, -# "description" : "repository description", -# "localized_description" : $[ -# "en_GB" : "repository description (localized to en_GB)", -# ... -# ], -# "summary" : "repository summary", -# "localized_summary" : $[ -# "en_GB" : "repository summary (localized to en_GB)", -# ... -# ], -# "name" : "repository name", -# "localized_name" : $[ -# "en_GB" : "repository name (localized to en_GB)", -# ... -# ], -# "mirrors" : [ -# $[ -# "url" : "full url of the mirror (http://.../)", -# "location" : "?", -# "score" : number, -# ] -# ... -# ] -# ], -# ... -# ] -sub GetRepositoriesFromXML { - my $xmlcontent = shift || do { - y2error ("First parameter needs to be an XML content"); - return undef; - }; - - # list of repositories - my @repos = (); - - # default language is used when no 'language' string is defined - my $default_lang = "en_US"; - - my $xml = new XML::Bare ('text' => $xmlcontent); - my $root = $xml->parse(); - undef $xml; - - # the first level we parse is <metapackage><group>...</group>[<group>...</group>]<metapackage> - $root = $root->{'metapackage'}->{'group'} || {}; - - my $groups = GetListFromVariable ($root); - - foreach my $group (@{$groups}) { - my $distribution = $group->{'distversion'}->{'value'}; - my $repos_for_dist = GetListFromVariable ($group->{'repositories'}->{'repository'}); - - foreach my $one_repo (@{$repos_for_dist}) { - my $this_repo = {}; - $this_repo->{'distversion'} = $distribution; - - if (defined $one_repo->{'format'}->{'value'}) { - $this_repo->{'format'} = $one_repo->{'format'}->{'value'}; - } - - if (defined $one_repo->{'recommended'}->{'value'}) { - # either 'true' or 'false' - $this_repo->{'recommended'} = ( - $one_repo->{'recommended'}->{'value'} =~ /^[\t \n]*true[\t \n]*$/ ? 'true':'false' - ); - } - - my @mirrors = (); - - my $urls = GetListFromVariable ($one_repo->{'url'} || {}); - - # URL and URL mirrors - foreach my $urlhash (@{$urls}) { - my $url = $urlhash->{'value'} || ""; - my $location = $urlhash->{'location'}->{'value'} || ""; - my $score = $urlhash->{'score'}->{'value'} || ""; - - # No additional parameters -> Main URL - if ($location eq "" && $score eq "") { - $this_repo->{'url'} = $url; - } else { - push @mirrors, { - 'url' => $url, - 'score' => $score, - 'location' => $location, - }; - } - } - - if (scalar(@mirrors) > 0) { - @{$this_repo->{'mirrors'}} = @mirrors; - - # Main url is not known but some mirrors were found - if (! defined $this_repo->{'url'} || $this_repo->{'url'} eq "") { - $this_repo->{'url'} = $mirrors[0]->{'url'}; - } - } - - # fills up: - # * name, description, summary (string) - # * localized_name, localized_description, localized_summary (map <string, string>) - foreach my $key ('name', 'description', 'summary') { - my $variable_list = GetListFromVariable ($one_repo->{$key} || {}); - - foreach my $repo_keys (@{$variable_list}) { - my $lang = ""; - - if (defined $repo_keys->{'lang'}->{'value'}) { - $lang = $repo_keys->{'lang'}->{'value'}; - } elsif (defined $repo_keys->{'xml:lang'}->{'value'}) { - $lang = $repo_keys->{'xml:lang'}->{'value'}; - } else { - $lang = $default_lang; - } - - $this_repo->{'localized_'.$key}->{$lang} = $repo_keys->{'value'} || ""; - } - - if (defined $this_repo->{'localized_'.$key}->{$default_lang}) { - $this_repo->{$key} = $this_repo->{'localized_'.$key}->{$default_lang}; - } - } - - # URL must be defined - # The XML content might be, for instance, 404 Error Page, etc. - if (defined $this_repo->{'url'} && $this_repo->{'url'} ne "") { - push @repos, $this_repo; - } else { - y2warning ("Ignoring repository, no URL defined"); - } - } - } - - return @repos; -} - -while (<STDIN>) { - my ($command, $path, $file) = ycp::ParseCommand ($_); - - if ($command eq "Read") { - if (! defined $file || $file eq "") { - y2error ("No file defined!"); - ycp::Return (undef); - next; - } elsif (! -e $file) { - y2error ("File ".$file." doesn't exist!"); - ycp::Return (undef); - next; - } - - y2milestone ("Reading: '".$file."'"); - open (FILE, $file) || do { - y2error ("Cannot open file ".$file.": ".$!); - next; - }; - my @lines = <FILE>; - close FILE; - - ycp::Return (GetRepositoriesFromXML(join ('', @lines))); - } elsif ($command eq "result") { - exit 0; - } else { - my $return_value = sprintf( "Unknown instruction %s", $command); - ycp::Return ($return_value); - } -} diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-packager-2.17.12/agents/Makefile.am new/yast2-packager-2.17.14/agents/Makefile.am --- old/yast2-packager-2.17.12/agents/Makefile.am 2007-11-16 11:01:37.000000000 +0100 +++ new/yast2-packager-2.17.14/agents/Makefile.am 2008-09-09 15:31:00.000000000 +0200 @@ -3,11 +3,9 @@ # agent_SCRIPTS = \ - ag_xmlrepos \ ag_zypp_repos scrconf_DATA = \ - xmlrepos.scr \ zypp_repos.scr EXTRA_DIST = $(agent_SCRIPTS) $(scrconf_DATA) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-packager-2.17.12/agents/Makefile.in new/yast2-packager-2.17.14/agents/Makefile.in --- old/yast2-packager-2.17.12/agents/Makefile.in 2008-09-09 11:06:21.000000000 +0200 +++ new/yast2-packager-2.17.14/agents/Makefile.in 2008-09-10 16:01:29.000000000 +0200 @@ -176,11 +176,9 @@ yncludedir = @yncludedir@ ystartupdir = @ystartupdir@ agent_SCRIPTS = \ - ag_xmlrepos \ ag_zypp_repos scrconf_DATA = \ - xmlrepos.scr \ zypp_repos.scr EXTRA_DIST = $(agent_SCRIPTS) $(scrconf_DATA) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-packager-2.17.12/agents/xmlrepos.scr new/yast2-packager-2.17.14/agents/xmlrepos.scr --- old/yast2-packager-2.17.12/agents/xmlrepos.scr 2007-11-05 13:33:35.000000000 +0100 +++ new/yast2-packager-2.17.14/agents/xmlrepos.scr 1970-01-01 01:00:00.000000000 +0100 @@ -1,18 +0,0 @@ -/** - * File: xmlrepos.scr - * - * Summary: Agent for reading files defined by One Clock Standard - * http://en.opensuse.org/Standards/One_Click_Install - * - * Authors: Lukas Ocilka <locilka@suse.cz> - * - * See: http://en.opensuse.org/Standards/One_Click_Install - * - * Example: SCR::Read (.xmlrepos, "/root/some_file") - * - * $Id:$ - */ - -.xmlrepos - -`ag_xmlrepos () diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-packager-2.17.12/configure new/yast2-packager-2.17.14/configure --- old/yast2-packager-2.17.12/configure 2008-09-09 11:06:21.000000000 +0200 +++ new/yast2-packager-2.17.14/configure 2008-09-10 16:01:29.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for yast2-packager 2.17.12. +# Generated by GNU Autoconf 2.61 for yast2-packager 2.17.14. # # Report bugs to http://bugs.opensuse.org/. # @@ -574,8 +574,8 @@ # Identity of this package. PACKAGE_NAME='yast2-packager' PACKAGE_TARNAME='yast2-packager' -PACKAGE_VERSION='2.17.12' -PACKAGE_STRING='yast2-packager 2.17.12' +PACKAGE_VERSION='2.17.14' +PACKAGE_STRING='yast2-packager 2.17.14' PACKAGE_BUGREPORT='http://bugs.opensuse.org/' ac_unique_file="RPMNAME" @@ -1197,7 +1197,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -`configure' configures yast2-packager 2.17.12 to adapt to many kinds of systems. +`configure' configures yast2-packager 2.17.14 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1268,7 +1268,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of yast2-packager 2.17.12:";; + short | recursive ) echo "Configuration of yast2-packager 2.17.14:";; esac cat <<_ACEOF @@ -1346,7 +1346,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<_ACEOF -yast2-packager configure 2.17.12 +yast2-packager configure 2.17.14 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1360,7 +1360,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by yast2-packager $as_me 2.17.12, which was +It was created by yast2-packager $as_me 2.17.14, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -2181,7 +2181,7 @@ # Define the identity of the package. PACKAGE='yast2-packager' - VERSION='2.17.12' + VERSION='2.17.14' cat >>confdefs.h <<_ACEOF @@ -2409,7 +2409,7 @@ -VERSION="2.17.12" +VERSION="2.17.14" RPMNAME="yast2-packager" MAINTAINER="Ladislav Slezak <lslezak@suse.cz>" @@ -3304,7 +3304,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by yast2-packager $as_me 2.17.12, which was +This file was extended by yast2-packager $as_me 2.17.14, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -3347,7 +3347,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\ -yast2-packager config.status 2.17.12 +yast2-packager config.status 2.17.14 configured by $0, generated by GNU Autoconf 2.61, with options \"`echo "$ac_configure_args" | sed 's/^ //; s/[\""`$]/\\&/g'`\" diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-packager-2.17.12/configure.in new/yast2-packager-2.17.14/configure.in --- old/yast2-packager-2.17.12/configure.in 2008-09-09 11:06:18.000000000 +0200 +++ new/yast2-packager-2.17.14/configure.in 2008-09-10 16:01:26.000000000 +0200 @@ -3,7 +3,7 @@ dnl -- This file is generated by y2autoconf 2.17.6 - DO NOT EDIT! -- dnl (edit configure.in.in instead) -AC_INIT(yast2-packager, 2.17.12, http://bugs.opensuse.org/, yast2-packager) +AC_INIT(yast2-packager, 2.17.14, http://bugs.opensuse.org/, yast2-packager) dnl Check for presence of file 'RPMNAME' AC_CONFIG_SRCDIR([RPMNAME]) @@ -18,7 +18,7 @@ AM_INIT_AUTOMAKE(tar-ustar -Wno-portability) dnl Important YaST2 variables -VERSION="2.17.12" +VERSION="2.17.14" RPMNAME="yast2-packager" MAINTAINER="Ladislav Slezak <lslezak@suse.cz>" diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-packager-2.17.12/src/clients/inst_productsources.ycp new/yast2-packager-2.17.14/src/clients/inst_productsources.ycp --- old/yast2-packager-2.17.12/src/clients/inst_productsources.ycp 2008-09-08 17:07:37.000000000 +0200 +++ new/yast2-packager-2.17.14/src/clients/inst_productsources.ycp 2008-09-10 11:54:38.000000000 +0200 @@ -604,7 +604,7 @@ actions_doing, // TRANSLATORS: dialog help _("<p>Please wait while the packager is being initialized -and the list of servers dowloaded from Web.</p> +and the list of servers downloaded from the Web.</p> "), [icons_for_progress] ); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-packager-2.17.12/src/clients/repositories.ycp new/yast2-packager-2.17.14/src/clients/repositories.ycp --- old/yast2-packager-2.17.12/src/clients/repositories.ycp 2008-09-08 16:57:11.000000000 +0200 +++ new/yast2-packager-2.17.14/src/clients/repositories.ycp 2008-09-10 15:52:37.000000000 +0200 @@ -7,7 +7,7 @@ * Purpose: * Adding, removing and prioritizing of repositories for packagemanager. * - * $Id: repositories.ycp 50812 2008-09-08 14:41:56Z lslezak $ + * $Id: repositories.ycp 50956 2008-09-10 13:33:29Z lslezak $ * */ @@ -55,7 +55,6 @@ return text_mode; } - integer numSources = 0; list<integer> sourcesToDelete = []; @@ -126,28 +125,42 @@ @param source The map describing the source as returned form the agent. @return An item suitable for addition to a Table. */ - define term createItem( integer index, map source ) ``{ + define term createItem( integer index, map source, boolean repository_mode ) ``{ integer id = source[ "SrcId" ]:0; map generalData = Pkg::SourceGeneralData( id ); y2milestone("generalData(%1): %2", id, generalData); - string alias = haskey(sourceStatesOut[index]:$[], "name") ? + y2internal("Item: %1", source); + + string name = repository_mode ? (haskey(sourceStatesOut[index]:$[], "name") ? sourceStatesOut[index,"name"]:"" : // unkown name (alias) of the source - generalData[ "alias" ]:generalData[ "type" ]: _("Unknown Name"); + generalData[ "alias" ]:generalData[ "type" ]: _("Unknown Name")) + : source["name"]:""; integer priority = source["priority"]:default_priority; - term item = `item( - `id( index ), - PriorityToString(priority), - // corresponds to the "Enable/Disable" button - source[ "enabled" ]:true ? UI::Glyph (`CheckMark) : "", - source[ "autorefresh" ]:true ? UI::Glyph (`CheckMark) : "", - // translators: unknown name for a given source - alias, - generalData[ "url" ]:"" - ); + term item = repository_mode ? + `item( + `id( index ), + PriorityToString(priority), + // corresponds to the "Enable/Disable" button + source[ "enabled" ]:true ? UI::Glyph (`CheckMark) : "", + source[ "autorefresh" ]:true ? UI::Glyph (`CheckMark) : "", + // translators: unknown name for a given source + name, + source[ "url" ]:"" + ) + : `item( + `id( index ), + // corresponds to the "Enable/Disable" button + source[ "enabled" ]:true ? UI::Glyph (`CheckMark) : "", + source[ "autorefresh" ]:true ? UI::Glyph (`CheckMark) : "", + // translators: unknown name for a given source + name, + source[ "url" ]:"" + ); + return item; } @@ -178,19 +191,25 @@ /** * Fill sources table with entries from the InstSrcManager agent. */ - define void fillTable() ``{ - y2milestone ("Filling repository table"); + define void fillTable(boolean repo_mode, string service_name) + { + y2milestone ("Filling repository table: repository mode: %1, service: %2", repo_mode, service_name); list items = []; - // because Online Repositories / Community Repositories don't use - // these internal data maps - RemoveDeletedAddNewRepos(); + if (repo_mode) + { + // because Online Repositories / Community Repositories don't use + // these internal data maps + RemoveDeletedAddNewRepos(); + } + + list<map> itemList = repo_mode ? sourceStatesOut : serviceStatesOut; - numSources = size( sourceStatesOut ); + integer numItems = size(itemList); integer i = 0; - while ( i < numSources ) { - items = add( items, createItem( i, sourceStatesOut[ i ]:$[] ) ); + while ( i < numItems ) { + items = add( items, createItem( i, itemList[ i ]:$[], repo_mode ) ); i = i + 1; } @@ -229,6 +248,7 @@ void fillRepoInfo(integer index, map source) { map<string,any> info = getSourceInfo (index, source); + y2internal("getSourceInfo(%1, %2): %3", index, source, info); // heading - in case repo name not found string name = info["name"]:_("Unknown repository name"); @@ -268,8 +288,16 @@ integer selected = (integer)UI::QueryWidget (`id (`table), `CurrentItem); if (selected == nil) return; - map data = sourceStatesOut[selected]:$[]; - fillRepoInfo (selected, data); + + if (repository_view) + { + map data = sourceStatesOut[selected]:$[]; + fillRepoInfo (selected, data); + } + else + { + y2internal("TODO display service info"); + } } /** @@ -390,6 +418,47 @@ ]; } +// return table widget definition +// layout of the table depends on the current mode (services do not have priorities) +term TableWidget(boolean repository_mode) +{ + term tabheader = repository_mode ? + `header( + // table header - priority of the repository - keep the translation as short as possible! + _("Priority"), + // table header - is the repo enabled? - keep the translation as short as possible! + `Center(_("Enabled")), + // table header - is autorefresh enabled for the repo? + // keep the translation as short as possible! + `Center(_("Autorefresh")), + // table header - name of the repo + _("Name"), + // table header - URL of the repo + _("URL") ) + : + `header( + // table header - is the repo enabled? - keep the translation as short as possible! + `Center(_("Enabled")), + // table header - is autorefresh enabled for the repo? + // keep the translation as short as possible! + `Center(_("Autorefresh")), + // table header - name of the repo + _("Name"), + // table header - URL of the repo + _("URL") ); + + + return `Table(`id(`table),`opt(`notify, `immediate), tabheader, []); +} + +void ReplaceWidgets(boolean repo_mode) +{ + y2milestone("Replacing the table widget"); + UI::ReplaceWidget(`id(`tabrp), TableWidget(repo_mode)); + + UI::ReplaceWidget(`id(`priorp), repo_mode ? `IntField(`id(`priority), `opt(`notify), _("&Priority"), 0, 200, default_priority) : `Empty()); +} + any SummaryDialog () { y2milestone ("Running Summary dialog"); @@ -417,20 +486,7 @@ `VBox( `HBox( `VSpacing(9), - `Table(`id(`table),`opt(`notify, `immediate), - `header( - // table header - priority of the repository - keep the translation as short as possible! - _("Priority"), - // table header - is the repo enabled? - keep the translation as short as possible! - `Center(_("Enabled")), - // table header - is autorefresh enabled for the repo? - // keep the translation as short as possible! - `Center(_("Autorefresh")), - // table header - name of the repo - _("Name"), - // table header - URL of the repo - _("URL") ), - [] ), + `ReplacePoint(`id(`tabrp), TableWidget(repository_view)), `HSpacing() ), `HBox ( @@ -451,7 +507,7 @@ `Left (`CheckBox (`id (`autorefresh), `opt(`notify), _("Automatically &Refresh"))) ) ), - `HSquash(`IntField(`id(`priority), `opt(`notify), _("&Priority"), 0, 200, default_priority)), + `HSquash(`ReplacePoint(`id(`priorp), `IntField(`id(`priority), `opt(`notify), _("&Priority"), 0, 200, default_priority))), `HStretch() ), `VSpacing (0.4), @@ -534,8 +590,8 @@ { // help, continued help_text = help_text + _("<p> -<b>Synchronize Changes with ZENworks</b> will call <tt>rug</tt> -to also perform the changes in that package management system.</p> +<b>Synchronize Changes with ZENworks</b> will also call <tt>rug</tt> +to perform the changes in that package management system.</p> "); } @@ -549,7 +605,7 @@ Wizard::SetContents(title, contents, help_text, false, true); Wizard::DisableBackButton(); - fillTable(); + fillTable(repository_view, displayed_service); fillCurrentRepoInfo(); symbol input = nil; @@ -562,7 +618,7 @@ repeat { - if ( current >= 0 ) { + if ( current != nil && current >= 0 ) { UI::ChangeWidget( `id( `table ), `CurrentItem, current ); fillCurrentRepoInfo (); } @@ -654,7 +710,7 @@ map<string, any> sourceState = sourceStatesOut[ current ]:$[]; integer id = sourceState[ "SrcId" ]:-1; - if ( id < 0) { + if ( id < 0 && repository_view) { y2internal("Unable to determine repository id, broken repository?"); continue; } @@ -680,7 +736,7 @@ createResult = createSource( url, SourceDialogs::IsPlainDir(), sourceState["do_refresh"]:false, SourceDialogs::GetRepoName ()); if ( createResult == `ok ) { deleteSource( current ); - fillTable(); + fillTable(repository_view, displayed_service); fillCurrentRepoInfo(); } } @@ -689,7 +745,7 @@ y2milestone ("URL is the same, not recreating the source"); sourceState["name"] = SourceDialogs::GetRepoName (); sourceStatesOut[ current ] = sourceState; - fillTable(); + fillTable(repository_view, displayed_service); fillCurrentRepoInfo(); createResult = `ok; } @@ -783,23 +839,46 @@ if ( Popup::YesNo( _("Delete the selected repository from the list?") ) ) { deleteSource( current ); - fillTable(); + fillTable(repository_view, displayed_service); fillCurrentRepoInfo(); } } else if (input == `enable) { - boolean state = sourceState[ "enabled" ]:true; - state = !state; - // corresponds to the "Enable/Disable" button - string newstate = ( state ? UI::Glyph (`CheckMark) : ""); - UI::ChangeWidget( `id( `table ), `Item( current, 1 ), newstate ); - sourceState[ "enabled" ] = state; - sourceStatesOut[ current ] = sourceState; + if (repository_view) + { + boolean state = sourceState[ "enabled" ]:true; + state = !state; + // corresponds to the "Enable/Disable" button + string newstate = ( state ? UI::Glyph (`CheckMark) : ""); + UI::ChangeWidget( `id( `table ), `Item( current, 1 ), newstate ); + sourceState[ "enabled" ] = state; + sourceStatesOut[ current ] = sourceState; - if (full_mode) + if (full_mode) + { + Pkg::SourceSetEnabled(sourceState["SrcId"]:-1, state); + } + } + else { - Pkg::SourceSetEnabled(sourceState["SrcId"]:-1, state); + if (displayed_service == "") + { + map<string,any> srv = serviceStatesOut[current]:$[]; + y2internal("Selected service: %1", srv); + + boolean state = srv["enabled"]:false; + state = !state; + + // update the table + string newstate = ( state ? UI::Glyph (`CheckMark) : ""); + UI::ChangeWidget( `id( `table ), `Item( current, 0 ), newstate ); + + // store the change + srv["enabled"] = state; + serviceStatesOut[current] = srv; + } + // TODO else... } } else if ( input == `autorefresh) @@ -844,8 +923,40 @@ } else if (input == `tree) { - // TODO FIXME handle tree events here... - // rebuild the dialog here + // handle tree events here... + any current_item = UI::QueryWidget(`id(`tree), `CurrentItem); + + // rebuild the dialog if needed + y2internal("Current tree item: %1", current_item); + boolean update_table_widget = false; + + if (current_item == `repositories) + { + update_table_widget = !repository_view; + y2milestone("Switching to repository view"); + repository_view = true; + } + else if (current_item == `services) + { + update_table_widget = repository_view; + y2milestone("Switching to service view"); + repository_view = false; + // display all services + displayed_service = ""; + } + + // update table widget + if (update_table_widget) + { + ReplaceWidgets(repository_view); + } + + // update table content + fillTable(repository_view, displayed_service); + fillCurrentRepoInfo(); + + // update the current item + current = (integer) UI::QueryWidget( `id( `table ), `CurrentItem ); } else { @@ -962,6 +1073,9 @@ boolean restore = (!full_mode) ? Pkg::SourceRestore() : true; // read services restore = restore && Pkg::ServicesLoad(); + + y2internal("Known services: %1", Pkg::ServiceAliases()); + if( ! restore ) { boolean cont = Popup::AnyQuestionRichText( diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-packager-2.17.12/src/clients/webpin_package_search.ycp new/yast2-packager-2.17.14/src/clients/webpin_package_search.ycp --- old/yast2-packager-2.17.12/src/clients/webpin_package_search.ycp 2008-07-18 12:28:23.000000000 +0200 +++ new/yast2-packager-2.17.14/src/clients/webpin_package_search.ycp 2008-09-10 11:54:38.000000000 +0200 @@ -222,8 +222,9 @@ _("<p><big><b>Security</b></big><br> The software found is often not part of the distribution itself and the level of trust -depends on yourself. We do not take any responsibilities for installing -such software.</p>"), +depends on yourself. We do not take any responsibility for installing +such software.</p> +"), //We don't need back button false, true diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-packager-2.17.12/src/include/checkmedia/ui.ycp new/yast2-packager-2.17.14/src/include/checkmedia/ui.ycp --- old/yast2-packager-2.17.12/src/include/checkmedia/ui.ycp 2008-04-01 10:34:46.000000000 +0200 +++ new/yast2-packager-2.17.14/src/include/checkmedia/ui.ycp 2008-09-10 11:54:38.000000000 +0200 @@ -8,7 +8,7 @@ * Authors: * Ladislav Slezak <lslezak@suse.cz> * - * $Id: ui.ycp 45758 2008-03-26 15:48:38Z lslezak $ + * $Id: ui.ycp 50938 2008-09-10 09:43:53Z lslezak $ * * All user interface functions. * @@ -277,7 +277,7 @@ string help = _("<P><B>Media Check</B></P>") + // help text - media check 2/8 _("<P>When you have a problem with -the installation and are using a CD or DVD installation medium, you should check +the installation and you are using a CD or DVD installation medium, you should check whether the medium is broken.</P> ") + @@ -429,10 +429,11 @@ { if (md5sumTagPresent(selecteddrive) == false) { - if (!Popup::ContinueCancel(_("The medium does not contain MD5 checksum. + if (!Popup::ContinueCancel(_("The medium does not contain a MD5 checksum. The content of the medium cannot be verified. -Only readability of the medium will be checked."))) +Only readability of the medium will be checked. +"))) { continue; } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-packager-2.17.12/src/modules/DefaultDesktop.ycp new/yast2-packager-2.17.14/src/modules/DefaultDesktop.ycp --- old/yast2-packager-2.17.12/src/modules/DefaultDesktop.ycp 2008-09-04 15:53:31.000000000 +0200 +++ new/yast2-packager-2.17.14/src/modules/DefaultDesktop.ycp 2008-09-10 15:52:30.000000000 +0200 @@ -4,7 +4,7 @@ * Authors: Jiri Srain <jsrain@suse.cz> * Lukas Ocilka <locilka@suse.cz> * - * $Id: Packages.ycp 31512 2006-06-19 11:14:09Z jsrain $ + * $Id:$ */ { @@ -14,87 +14,91 @@ textdomain "packager"; import "ProductFeatures"; +import "ProductControl"; import "Installation"; -// FIXME: Should be defined in control file +// All desktop definitions are taken from control file // @see GetAllDesktopsMap -map <string, map> all_desktops = $[ - "gnome" : $[ - "desktop" : "gnome", - "logon" : "gdm", - "cursor" : "DMZ", - "packages" : ["gdm"], - "order" : 1, - // TRANSLATORS: Dialog label - "label" : _("GNOME"), - "patterns" : ["gnome", "x11", "base"], - "icon" : "pattern-gnome", - "description" : _("GNOME 2.22 is the latest desktop from the GNOME Project. -It combines stability and maturity with incremental innovations."), - ], - "kde" : $[ - // bnc #381821 - "desktop" : "startkde4", - "logon" : "kdm4", - "cursor" : "DMZ", - "packages" : ["kde4-kdm"], - "order" : 1, - // TRANSLATORS: Dialog label - "label" : _("KDE 4.0"), - "patterns" : ["kde", "x11", "base"], - "icon" : "pattern-kde4", - "description" : _("KDE 4.0 is the most recent evolution of KDE. It comes with many -new KDE technologies, but it is less mature than the other desktops."), - ], - "kde3" : $[ - // bnc #381821 - "desktop" : "startkde3", - "logon" : "kdm3", - "cursor" : "DMZ", - "packages" : ["kdebase3-kdm"], - "order" : 1, - // TRANSLATORS: Dialog label - "label" : _("KDE 3.5"), - "patterns" : ["kde3", "x11", "base"], - "icon" : "pattern-kde", - "description" : _("KDE 3.5 is the previous generation of the K Desktop Environment. -It is mature and stable."), - ], - "xfce" : $[ - // bnc #298558 - "desktop" : "startxfce4", - "logon" : "xdm", - "cursor" : "DMZ", - "packages" : ["xfce4-desktop"], - "order" : 4, - // TRANSLATORS: Dialog label - "label" : _("XFCE Desktop"), - "patterns" : ["xfce", "x11", "base"], - "icon" : "pattern-xfce", - ], - "min_x" : $[ - "desktop" : "twm", - "logon" : "xdm", - "cursor" : "DMZ", - "packages" : ["xorg-x11"], - "order" : 6, - // TRANSLATORS: Dialog label - "label" : _("Minimal X Window"), - "patterns" : ["x11", "base"], - "icon" : "yast-x11", - ], - "textmode" : $[ - "desktop" : "twm", - "logon" : "xdm", - "cursor" : "DMZ", - "packages" : ["xorg-x11"], - "order" : 8, - // TRANSLATORS: Dialog label - "label" : _("Minimal Server Selection (Text Mode)"), - "patterns" : ["enhanced_base"], - "icon" : "yast-sshd", - ], -]; +map <string, map> all_desktops = nil; + +/** + * Desktop which was selected in the desktop selection dialog + * "kde", "kde3", "gnome", "xfce", "min_x", "textmode", nil + */ +string desktop = nil; + +any MissingKey (map & desktop_def, string key) { + any ret = nil; + + y2warning ("Wrong desktop def, missing '%1' key: %2", key, desktop_def); + + switch (key) { + case "order": + ret = 99; + break; + case "desktop": + ret = "unknown"; + break; + default: + ret = ""; + break; + }; + + return ret; +} + +/** + * Initialize default desktop from control file if specified there + */ +global void Init () { + string default_desktop = ProductFeatures::GetStringFeature + ("software", "default_desktop"); + if (default_desktop == "") + default_desktop = nil; + desktop = default_desktop; + + // See BNC #424678 + if (all_desktops == nil) { + y2milestone ("Getting desktop dialogs from control file..."); + + list <map> desktops_from_cf = (list <map>) ProductFeatures::GetFeature ("software", "supported_desktops"); + + all_desktops = $[]; + map <string, any> one_desktop = $[]; + string desktop_name = ""; + + foreach (map one_desktop_cf, desktops_from_cf, { + desktop_name = one_desktop_cf["name"]:""; + if (desktop_name == "") { + y2error ("Missing 'name' in %1", one_desktop_cf); + return; + } + + // required keys + one_desktop = $[ + "desktop" : one_desktop_cf["desktop"]:MissingKey (one_desktop_cf, "desktop"), + "logon" : one_desktop_cf["logon"]:MissingKey (one_desktop_cf, "logon"), + "cursor" : one_desktop_cf["cursor"]:MissingKey (one_desktop_cf, "logon"), + "packages" : splitstring (one_desktop_cf["packages"]:"", " \t\n"), + "patterns" : splitstring (one_desktop_cf["patterns"]:"", " \t\n"), + "order" : one_desktop_cf["order"]:MissingKey (one_desktop_cf, "order"), + "label" : ProductControl::GetTranslatedText ((string) one_desktop_cf["label_id"]:MissingKey (one_desktop_cf, "label_id")), + ]; + + // 'icon' in optional + if (haskey (one_desktop_cf, "icon")) { + one_desktop["icon"] = (string) one_desktop_cf["icon"]:""; + } + + // 'description' is optional + if (haskey (one_desktop_cf, "description_id")) { + one_desktop["description"] = ProductControl::GetTranslatedText ((string) one_desktop_cf["description_id"]:""); + } + + all_desktops[desktop_name] = one_desktop; + }); + } +} /** * Returns map of pre-defined default system tasks @@ -113,6 +117,8 @@ * ] */ global map <string, map> GetAllDesktopsMap () { + if (all_desktops == nil) Init(); + return all_desktops; } @@ -158,14 +164,6 @@ } /** - * Desktop which was selected in the desktop selection dialog - * "kde", "kde3", "gnome", "xfce", "min_x", "textmode", nil - */ -string desktop = nil; - - - -/** * Get the currently set default desktop, nil if none set * @return string "kde", "kde3", "gnome", "xfce", "min_x", "textmode", nil */ @@ -235,16 +233,7 @@ return all_desktops[desktop, "label"]:""; } -/** - * Initialize default desktop from control file if specified there - */ -global void Init () { - string default_desktop = ProductFeatures::GetStringFeature - ("software", "default_desktop"); - if (default_desktop == "") - default_desktop = nil; - desktop = default_desktop; -} + /* EOF */ } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-packager-2.17.12/src/modules/OneClickInstallStandard.ycp new/yast2-packager-2.17.14/src/modules/OneClickInstallStandard.ycp --- old/yast2-packager-2.17.12/src/modules/OneClickInstallStandard.ycp 2008-01-29 17:48:55.000000000 +0100 +++ new/yast2-packager-2.17.14/src/modules/OneClickInstallStandard.ycp 2008-09-09 15:29:55.000000000 +0200 @@ -37,28 +37,70 @@ * "en_GB" : "repository name (localized to en_GB)", * ... * ], - * "mirrors" : [ - * $[ - * "url" : "full url of the mirror (http://.../)", - * "location" : "?", - * "score" : number, - * ] - * ... - * ] * ] */ global list <map <string, any> > GetRepositoriesFromXML (string filename) { + list <map <string, any> > ret = []; + if (! FileUtils::Exists (filename)) { - y2error ("No such file: '%1'", filename); - return nil; + y2error ("File doesn't exist: %1", filename); + return ret; } - list <map <string, any> > ret = (list <map <string, any> >) SCR::Read (.xmlrepos, filename); + map read_result = (map) SCR::Read (.anyxml, filename); - if (ret == nil) { - y2error ("Wrong XML file: %1", filename); + if (read_result == nil) { + y2error ("Cannot read file: %1", filename); + return ret; + } else if (read_result == $[]) { + y2warning ("File %1 is empty", filename); + return ret; } + string distversion = ""; + + map <string, any> one_repo_out = $[]; + + // starting with <metapackage>-><group> + foreach (map one_group, read_result["metapackage",0,"group"]:[], { + distversion = one_group["distversion"]:""; + + foreach (map repository, one_group["repositories",0,"repository"]:[], { + // One repository (requierd keys) + one_repo_out = $[ + "distversion" : distversion, + "url" : repository["url",0,"content"]:"", + "format" : repository["format"]:"", + "recommended" : (repository["recommended"]:"false" == "true"), + ]; + + // Required + dynamic (localized) keys + foreach (string one_key, ["name", "description", "summary"], { + string loc_key = "localized_" + one_key; + one_repo_out[loc_key] = $[]; + + foreach (map one_item, repository[one_key]:[], { + if (one_item["content"]:"" != "") { + if (haskey (one_item, "xml:lang")) { + one_repo_out[loc_key, one_item["xml:lang"]:""] = one_item["content"]:""; + } else { + one_repo_out[one_key] = one_item["content"]:""; + } + } + }); + }); + + // Fallback + foreach (string one_key, ["name", "description", "summary"], { + if (is (repository[one_key]:nil, map) && repository[one_key, "content"]:"" != "") { + one_repo_out[one_key] = repository[one_key, "content"]:""; + } + }); + + ret = add (ret, one_repo_out); + }); + }); + return ret; } } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-packager-2.17.12/src/modules/Packages.ycp new/yast2-packager-2.17.14/src/modules/Packages.ycp --- old/yast2-packager-2.17.12/src/modules/Packages.ycp 2008-09-05 10:20:28.000000000 +0200 +++ new/yast2-packager-2.17.14/src/modules/Packages.ycp 2008-09-10 11:54:38.000000000 +0200 @@ -3,7 +3,7 @@ * Package: Package selections * Authors: Anas Nashif <nashif@suse.de> * - * $Id: Packages.ycp 50718 2008-09-05 08:20:28Z locilka $ + * $Id: Packages.ycp 50938 2008-09-10 09:43:53Z lslezak $ */ { @@ -301,9 +301,9 @@ ret = ret + // (see bnc#178357 why these numbers) // translators: help text for software proposal - _("<P>The propsal contains total size of files which will be installed to the system. However, the system will contain some other files (temporary and working files) so the used space will be slighltly larger than the proposed value. Therefore it is a good idea to have at least 25% (or 300MB) free space before starting the installation.</P>") + + _("<P>The propsal reports the total size of files which will be installed to the system. However, the system will contain some other files (temporary and working files) so the used space will be slighltly larger than the proposed value. Therefore it is a good idea to have at least 25% (or 300MB) free space before starting the installation.</P>") + // help text for software proposal - _("<P>The total size to download is size of packages which will be downloaded from remote (network) repositories. This value is important when the connection is slow or when there is a data limit for downloading.</P>"); + _("<P>The total 'size to download' is the size of the packages which will be downloaded from remote (network) repositories.\n This value is important when the connection is slow or when there is a data limit for downloading.</P>"); } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-packager-2.17.12/VERSION new/yast2-packager-2.17.14/VERSION --- old/yast2-packager-2.17.12/VERSION 2008-09-09 10:25:30.000000000 +0200 +++ new/yast2-packager-2.17.14/VERSION 2008-09-10 16:00:40.000000000 +0200 @@ -1 +1 @@ -2.17.12 +2.17.14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org