Hello community,
here is the log from the commit of package yast2-packager for openSUSE:Factory
checked in at Wed Dec 16 10:29:04 CET 2009.
--------
--- yast2-packager/yast2-packager.changes 2009-11-20 15:07:07.000000000 +0100
+++ /mounts/work_src_done/STABLE/yast2-packager/yast2-packager.changes 2009-12-14 15:28:44.000000000 +0100
@@ -1,0 +2,40 @@
+Fri Dec 11 16:48:58 CET 2009 - locilka@suse.cz
+
+- ProductLicense prepared for multi-license dialogs (FATE #306295).
+
+-------------------------------------------------------------------
+Tue Dec 8 13:54:49 CET 2009 - kmachalkova@suse.cz
+
+- 'Search' button is the one activated by pressing Enter in webpin
+ client (bnc#538774)
+- 2.19.1
+
+-------------------------------------------------------------------
+Tue Nov 24 15:32:33 CET 2009 - locilka@suse.cz
+
+- Creating backup of old repositories at the end of initial
+ installation/upgrade before any other SourceSaveAll call
+ (bnc #556469).
+
+-------------------------------------------------------------------
+Mon Nov 23 15:15:44 CET 2009 - kmachalkova@suse.cz
+
+- Webpin: Remaining string marked for translation (bnc#549945)
+
+-------------------------------------------------------------------
+Mon Nov 23 09:05:47 CET 2009 - lslezak@suse.cz
+
+- repositories - fixed the help text to match the current layout
+ (bnc#549866)
+- repositories - improved ISO image file detection (use plain text
+ instead of MIME type for 'file' output) (bnc#547683)
+- repositories - added NFSv4 support (fate#306451), don't loose
+ the current URL when switching between full and parsed view
+
+-------------------------------------------------------------------
+Fri Nov 20 15:57:12 CET 2009 - lslezak@suse.cz
+
+- repositories - changed "Refresh Now" -> "Refresh Selected"
+ (bnc#439067)
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
yast2-packager-2.19.0.tar.bz2
New:
----
yast2-packager-2.19.1.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-packager.spec ++++++
--- /var/tmp/diff_new_pack.LvVgTh/_old 2009-12-16 10:14:20.000000000 +0100
+++ /var/tmp/diff_new_pack.LvVgTh/_new 2009-12-16 10:14:20.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-packager (Version 2.19.0)
+# spec file for package yast2-packager (Version 2.19.1)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,13 +19,13 @@
Name: yast2-packager
-Version: 2.19.0
+Version: 2.19.1
Release: 1
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-packager-2.19.0.tar.bz2
+Source0: yast2-packager-2.19.1.tar.bz2
Prefix: /usr
Group: System/YaST
-License: GPL v2 or later
+License: GPLv2+
BuildRequires: gcc-c++ libxcrypt-devel perl-XML-Writer update-desktop-files yast2-country-data yast2-devtools yast2-slp yast2-testsuite yast2-xml
# HTTP.ycp
BuildRequires: yast2-transfer
@@ -66,7 +66,7 @@
Summary: YaST2 - Package Library
%package webpin
-License: GPL v2 or later
+License: GPLv2+
Group: System/YaST2
Summary: YaST2 - Webpin package search client
@@ -79,7 +79,7 @@
(webpin) and installing them via OneClickInstall
%prep
-%setup -n yast2-packager-2.19.0
+%setup -n yast2-packager-2.19.1
%build
%{prefix}/bin/y2tool y2autoconf
++++++ yast2-packager-2.19.0.tar.bz2 -> yast2-packager-2.19.1.tar.bz2 ++++++
++++ 5214 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-packager-2.19.0/configure.in new/yast2-packager-2.19.1/configure.in
--- old/yast2-packager-2.19.0/configure.in 2009-11-20 15:02:51.000000000 +0100
+++ new/yast2-packager-2.19.1/configure.in 2009-07-31 12:53:46.000000000 +0200
@@ -1,9 +1,9 @@
dnl configure.in for yast2-packager
dnl
-dnl -- This file is generated by y2autoconf 2.18.11 - DO NOT EDIT! --
+dnl -- This file is generated by y2autoconf 2.18.9 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-packager, 2.19.0, http://bugs.opensuse.org/, yast2-packager)
+AC_INIT(yast2-packager, 2.18.9, 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.19.0"
+VERSION="2.18.9"
RPMNAME="yast2-packager"
MAINTAINER="Ladislav Slezak "
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-packager-2.19.0/missing new/yast2-packager-2.19.1/missing
--- old/yast2-packager-2.19.0/missing 2009-11-20 15:02:57.000000000 +0100
+++ new/yast2-packager-2.19.1/missing 2009-07-31 12:53:51.000000000 +0200
@@ -1,10 +1,10 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2006-05-10.23
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
-# 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
+# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard , 1996.
# This program is free software; you can redistribute it and/or modify
@@ -18,7 +18,9 @@
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see http://www.gnu.org/licenses/.
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -87,9 +89,6 @@
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
-Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
-\`g' are ignored when checking the name.
-
Send bug reports to ."
exit $?
;;
@@ -107,22 +106,15 @@
esac
-# normalize program name to check for.
-program=`echo "$1" | sed '
- s/^gnu-//; t
- s/^gnu//; t
- s/^g//; t'`
-
# Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect
-# the program). This is about non-GNU programs, so use $1 not
-# $program.
+# the program).
case $1 in
- lex*|yacc*)
+ lex|yacc)
# Not GNU programs, they don't have --version.
;;
- tar*)
+ tar)
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
@@ -146,7 +138,7 @@
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
-case $program in
+case $1 in
aclocal*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
@@ -156,7 +148,7 @@
touch aclocal.m4
;;
- autoconf*)
+ autoconf)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`${configure_ac}'. You might want to install the
@@ -165,7 +157,7 @@
touch configure
;;
- autoheader*)
+ autoheader)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
@@ -195,7 +187,7 @@
while read f; do touch "$f"; done
;;
- autom4te*)
+ autom4te)
echo 1>&2 "\
WARNING: \`$1' is needed, but is $msg.
You might have modified some files without having the
@@ -218,7 +210,7 @@
fi
;;
- bison*|yacc*)
+ bison|yacc)
echo 1>&2 "\
WARNING: \`$1' $msg. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
@@ -248,7 +240,7 @@
fi
;;
- lex*|flex*)
+ lex|flex)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
@@ -271,7 +263,7 @@
fi
;;
- help2man*)
+ help2man)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the
@@ -285,11 +277,11 @@
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
- exit $?
+ exit 1
fi
;;
- makeinfo*)
+ makeinfo)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
@@ -318,7 +310,7 @@
touch $file
;;
- tar*)
+ tar)
shift
# We have already tried tar in the generic part.
@@ -371,6 +363,5 @@
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
+# time-stamp-end: "$"
# End:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-packager-2.19.0/src/clients/pkg_finish.ycp new/yast2-packager-2.19.1/src/clients/pkg_finish.ycp
--- old/yast2-packager-2.19.0/src/clients/pkg_finish.ycp 2008-08-15 11:03:30.000000000 +0200
+++ new/yast2-packager-2.19.1/src/clients/pkg_finish.ycp 2009-12-07 19:18:41.000000000 +0100
@@ -8,7 +8,7 @@
* Authors:
* Jiri Srain
*
- * $Id: pkg_finish.ycp 50077 2008-08-14 13:05:29Z locilka $
+ * $Id: pkg_finish.ycp 59737 2009-11-24 14:34:51Z locilka $
*
*/
@@ -127,6 +127,12 @@
}
*/
+ // Remove (backup) all sources not used during the update
+ // BNC #556469: Backup and remove all the old repositories before any Pkg::SourceSaveAll call
+ if (Stage::initial() && Mode::update()) {
+ BackUpAllTargetSources();
+ }
+
// See bnc #384827, #381360
if (Mode::update()) {
y2milestone ("Adding default repositories");
@@ -135,11 +141,6 @@
Pkg::SourceCacheCopyTo (Installation::destdir);
- // Remove (backup) all sources not used during the update
- if (Stage::initial() && Mode::update()) {
- BackUpAllTargetSources();
- }
-
// save all repositories and finish target
Pkg::SourceSaveAll ();
Pkg::TargetFinish();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-packager-2.19.0/src/clients/repositories.ycp new/yast2-packager-2.19.1/src/clients/repositories.ycp
--- old/yast2-packager-2.19.0/src/clients/repositories.ycp 2009-04-29 17:48:42.000000000 +0200
+++ new/yast2-packager-2.19.1/src/clients/repositories.ycp 2009-11-23 15:13:07.000000000 +0100
@@ -7,7 +7,7 @@
* Purpose:
* Adding, removing and prioritizing of repositories for packagemanager.
*
- * $Id: repositories.ycp 57037 2009-04-29 15:48:41Z lslezak $
+ * $Id: repositories.ycp 59689 2009-11-23 08:06:58Z lslezak $
*
*/
@@ -658,7 +658,7 @@
// push button - change URL of the selected repository
string replaceButtonLabel = _("&Replace...");
// push button - refresh the selected repository now
- string refreshButtonLabel = _("Re&fresh Now");
+ string refreshButtonLabel = _("Re&fresh Selected");
// push button - disable/enable the selected repository
string enableButtonLabel = _("Status &On or Off");
// push button - disable/enable automatic refresh of the selected repository
@@ -765,8 +765,7 @@
Priority of a repository is an integer value between 0 (the highest priority) and 200 (the lowest priority). Default priority is 99. If a package is available in more repositories the repository with the highest priority is used.</P>");
// help text, continued
- help_text = help_text + _("<P>Use the tree displayed on the left side for navigation in repositories and services.</P>");
-
+ help_text = help_text + _("<P>Select the appropriate option on top of the window for navigation in repositories and services.</P>");
// help text, continued
help_text = help_text + _("<P><B>Keep Downloaded Packages</B><BR>Check this option to keep downloaded packages in a local cache so they can be reused later when the packages are reinstalled. If unchecked the downloaded packages are deleted after installation.</P>") + _("<P>The default local cache is located in directory <B>/var/cache/zypp/packages</B>, the location can be changed in <B>/etc/zypp/zypp.conf</B> file.</P>");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-packager-2.19.0/src/clients/webpin_package_search.ycp new/yast2-packager-2.19.1/src/clients/webpin_package_search.ycp
--- old/yast2-packager-2.19.0/src/clients/webpin_package_search.ycp 2009-09-21 16:47:47.000000000 +0200
+++ new/yast2-packager-2.19.1/src/clients/webpin_package_search.ycp 2009-12-08 14:00:38.000000000 +0100
@@ -4,7 +4,7 @@
* Authors: Katarina Machalkova
* Lukas Ocilka
*
- * $Id: webpin_package_search.ycp 58486 2009-09-03 10:49:11Z kmachalkova $
+ * $Id: webpin_package_search.ycp 60001 2009-12-08 13:00:37Z kmachalkova $
*
* This client provides UI for searching for packages
* via Webpin XML.
@@ -226,11 +226,14 @@
_("Package Search"),
`VBox (
`HBox (
- `VBox(
- `MinWidth(20, `InputField (`id ("search_text"), `opt (`hstretch), "Search &Expression")),
- // TRANSLATORS: push button
- `Left(`PushButton (`id ("search"), _("&Search"))),
- `VStretch()
+ `VBox(
+ `HBox(
+ `Bottom(`InputField (`id ("search_text"), `opt (`hstretch), _("Search &Expression"))),
+ // TRANSLATORS: push button
+ `HSpacing(1),
+ `Bottom(`PushButton (`id ("search"), `opt(`default), _("&Search")))
+ ),
+ `VStretch()
),
`MultiSelectionBox(
`id("search_in"),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-packager-2.19.0/src/modules/ProductLicense.ycp new/yast2-packager-2.19.1/src/modules/ProductLicense.ycp
--- old/yast2-packager-2.19.0/src/modules/ProductLicense.ycp 2009-10-19 16:30:40.000000000 +0200
+++ new/yast2-packager-2.19.1/src/modules/ProductLicense.ycp 2009-12-14 15:27:57.000000000 +0100
@@ -41,6 +41,26 @@
];
// no more wildcard patterns here, UI can display only html and txt anyway
+// All licenses have their own unique ID
+list <string> license_ids = [];
+
+/**
+ * Checks the string that might contain ID of a license and
+ * eventually returns that id.
+ * See also GetIdPlease for a better ratio of successful stories.
+ */
+string GetId (string id_text) {
+ string id = nil;
+
+ if (regexpmatch (id_text, "^license_language_[[:digit:]]+")) {
+ id = regexpsub (id_text, "^license_language_([[:digit:]]+)", "\\1");
+ } else {
+ y2error ("Cannot get ID from %1", id_text);
+ }
+
+ return id;
+}
+
// Helper func. Cuts encoding suffix off the LANG
// env. variable i.e. foo_BAR.UTF-8 => foo_BAR
string EnvLangToLangCode ( string env_lang )
@@ -110,7 +130,11 @@
string WhichLicenceFile (string license_language, map & licenses) {
string license_file = licenses[license_language]:"";
- y2milestone ("Using license file: %1", license_file);
+ if (license_file == nil || license_file == "") {
+ y2error ("No license file defined for language '%1' in %2", license_language, licenses);
+ } else {
+ y2milestone ("Using license file: %1", license_file);
+ }
return license_file;
}
@@ -144,7 +168,8 @@
// filename printed in the license dialog
string license_file_print = nil;
-term GetLicenseDialogTerm (list<string> languages, string license_language, map & licenses) {
+
+term GetLicenseDialogTerm (list<string> languages, string license_language, map & licenses, string id) {
string license_text = "";
term rt = GetLicenseContent (license_language, licenses);
@@ -221,18 +246,19 @@
lang_selector_options = add (lang_selector_options, `disabled);
}
+ license_ids = toset (add (license_ids, id));
+
return `VBox (
// combo box
- `Left (`ComboBox (`id (`lang), lang_selector_options, _("&Language"),
- langs)),
- `ReplacePoint (`id (`license_rp), rt)
+ `Left (`ComboBox (`id (sformat("license_language_%1", id)), lang_selector_options, _("&Language"), langs)),
+ `ReplacePoint (`id (sformat("license_contents_rp_%1", id)), rt)
);
}
// BNC #448598
// no-acceptance-needed file in license.tar.gz means the license
// doesn't have to be accepted by user, just displayed
-boolean license_acceptance_needed = true;
+map license_acceptance_needed = $[];
/**
* Returns whether accepting the license manually is requied.
@@ -240,22 +266,22 @@
* @see BNC #448598
* @return boolean if required
*/
-global boolean AcceptanceNeeded () {
- return (license_acceptance_needed == true);
+global boolean AcceptanceNeeded (string id) {
+ return license_acceptance_needed[id]:true;
}
-void SetAcceptanceNeeded (boolean new_value) {
+void SetAcceptanceNeeded (string id, boolean new_value) {
if (new_value == nil) {
- y2error ("Undefined behavior, AcceptanceNeeded: %1", new_value);
+ y2error ("Undefined behavior (License ID %1), AcceptanceNeeded: %2", id, new_value);
return;
}
- license_acceptance_needed = new_value;
+ license_acceptance_needed[id] = new_value;
- if (license_acceptance_needed) {
- y2milestone ("License agreement WILL be required");
+ if (new_value == true) {
+ y2milestone ("License agreement (ID %1) WILL be required", id);
} else {
- y2milestone ("License agreement will NOT be required");
+ y2milestone ("License agreement (ID %1) will NOT be required", id);
}
}
@@ -263,7 +289,7 @@
* Displays License with Help and ( ) Yes / ( ) No radio buttons
* @param string file with the license
*/
-void DisplayLicenseDialog (list<string> languages, boolean back, string license_language, map & licenses) {
+void DisplayLicenseDialog (list<string> languages, boolean back, string license_language, map & licenses, string id) {
map display = UI::GetDisplayInfo();
integer space = display["TextMode"]:true ? 1 : 3;
@@ -296,13 +322,13 @@
`VSpacing (1),
`HBox (
`HSpacing (2*space),
- GetLicenseDialogTerm (languages, license_language, licenses),
+ GetLicenseDialogTerm (languages, license_language, licenses, id),
`HSpacing (2*space)
),
// BNC #448598
// yes/no buttons exist only if needed
// if they don't exist, user is not asked to accept the license later
- (AcceptanceNeeded() ?
+ (AcceptanceNeeded (id) ?
license_buttons
:
`Empty()
@@ -336,7 +362,7 @@
// If acceptance is not needed, there's no need to disable the button
// by default
- boolean default_next_button_state = (AcceptanceNeeded() ? false : true);
+ boolean default_next_button_state = (AcceptanceNeeded (id) ? false : true);
Wizard::SetContents(caption, contents, help,
back, default_next_button_state);
@@ -352,7 +378,7 @@
* @param string temporary directory path
*/
void CleanUpLicense (string tmpdir) {
- if (tmpdir != nil)
+ if (tmpdir != nil && tmpdir != "/")
SCR::Execute (.target.bash_output,
sformat ("rm -rf '%1'", String::Quote(tmpdir))
);
@@ -581,7 +607,9 @@
// Functions for handling different locations of licenses <--
void GetSourceLicenseDirectory (integer src_id, string fallback_dir) {
- y2milestone ("Searching for licenses...");
+ y2milestone ("Searching for licenses... (src_id: %1, fallback_dir: %2, mode: %3, stage: %4)",
+ src_id, fallback_dir, Mode::mode(), Stage::stage());
+
license_file_print = nil;
// Bugzilla #299732
@@ -603,7 +631,7 @@
// bugzilla #298342
} else if (Stage::initial() && src_id == nil) {
- SearchForLicense_FirstStageBaseProduct (src_id, fallback_dir);
+ SearchForLicense_FirstStageBaseProduct ((src_id == nil ? Pkg::SourceGetCurrent(true)[0]:0 : src_id), fallback_dir);
// Add-on-product license
// * Source ID is set
@@ -623,11 +651,16 @@
string lic_lang = "";
symbol InitLicenseData (integer src_id, string dir, map & licenses,
- list <string> & available_langs, boolean require_agreement, string & license_ident) {
+ list <string> & available_langs, boolean require_agreement, string & license_ident, string id) {
GetSourceLicenseDirectory (src_id, dir);
+ // License does not need to be accepted. Well, I mean, manually selected "Yes, of course, I agree..."
if (FileUtils::Exists (sformat ("%1/no-acceptance-needed", license_dir))) {
- SetAcceptanceNeeded (false);
+ if (id == nil) {
+ y2error ("Parameter id not set");
+ } else {
+ SetAcceptanceNeeded (id, false);
+ }
}
licenses = LicenseFiles (license_dir,
@@ -733,35 +766,85 @@
}
// Should have been named 'UpdateLicenseContentBasedOnSelectedLanguage' :->
-void UpdateLicenseContent (map & licenses) {
+void UpdateLicenseContent (map & licenses, string id) {
// read the selected language
- lic_lang = (string) UI::QueryWidget (`id (`lang), `Value);
- UI::ReplaceWidget (`id (`license_rp), GetLicenseContent (lic_lang, licenses));
+ lic_lang = (string) UI::QueryWidget (`id (sformat ("license_language_%1", id)), `Value);
+ term rp_id = `id (sformat ("license_contents_rp_%1", id));
+ if (UI::WidgetExists (rp_id)) {
+ UI::ReplaceWidget (rp_id, GetLicenseContent (lic_lang, licenses));
+ } else {
+ y2error ("No such widget: %1", rp_id);
+ }
+}
+
+boolean AllLicensesAccepted () {
+ // BNC #448598
+ // If buttons don't exist, eula is automatically accepted
+ boolean accepted = true;
+ string eula_id = nil;
+
+ foreach (string one_license_id, license_ids, {
+ if (AcceptanceNeeded (one_license_id))
+ return;
+
+ eula_id = sformat ("eula_%1", one_license_id);
+ if ((boolean) UI::WidgetExists (`id (eula_id)) != true) {
+ y2error ("Widget %1 does not exist", eula_id);
+ return;
+ }
+
+ // All licenses have to be accepted
+ if ((symbol) UI::QueryWidget(`id (eula_id), `CurrentButton) != `yes) {
+ accepted = false;
+ break;
+ }
+ });
+
+ return accepted;
+}
+
+boolean AllLicensesAcceptedOrDeclined () {
+ boolean ret = true;
+
+ string eula_id = nil;
+ foreach (string one_license_id, license_ids, {
+ if (AcceptanceNeeded (one_license_id))
+ return;
+
+ eula_id = sformat ("eula_%1", one_license_id);
+ if ((boolean) UI::WidgetExists (`id (eula_id)) != true) {
+ y2error ("Widget %1 does not exist", eula_id);
+ }
+
+ symbol current_button = (symbol) UI::QueryWidget(`id (eula_id), `CurrentButton);
+ // license have to be accepted or declined
+ if (current_button != `yes && current_button != `no) {
+ y2warning ("License %1 hasn't been accepted or declined", eula_id);
+ ret = false;
+ break;
+ }
+ });
+
+ return ret;
}
symbol HandleLicenseDialogRet (map & licenses, boolean base_product, string action) {
- symbol ret = nil;
+ any ret = nil;
while (true)
{
- ret = (symbol) UI::UserInput();
+ ret = UI::UserInput();
- if (ret == `lang) {
- UpdateLicenseContent (licenses);
+ if (is (ret, string) && regexpmatch (tostring (ret), "^license_language_[[:digit:]]+$")) {
+ UpdateLicenseContent (licenses, GetId (tostring (ret)));
+ ret = `language;
// bugzilla #303828
// disabled next button unless yes/no is selected
} else if (ret == `yes || ret == `no) {
- Wizard::EnableNextButton();
+ if (AllLicensesAcceptedOrDeclined())
+ Wizard::EnableNextButton();
}
- // BNC #448598
- // If buttons don't exist, eula is automatically accepted
- symbol accept = (AcceptanceNeeded() ?
- (symbol) UI::QueryWidget(`id(`eula), `CurrentButton)
- :
- `yes
- );
-
// Aborting the license dialog
if (ret == `abort) {
// bugzilla #218677
@@ -783,7 +866,7 @@
else if (ret == `next)
{
// License declined
- if (accept == `no)
+ if (AllLicensesAccepted() != true)
{
// message is void in case not accepting license doesn't stop the installation
if (action == "continue")
@@ -841,18 +924,12 @@
}
}
// License accepted
- else if (accept == `yes)
+ else
{
- y2milestone("License has been accepted.");
+ y2milestone("All licenses have been accepted.");
ret = `accepted;
break;
}
- else
- {
- // message popup
- Popup::Message(_("Accept or decline the license agreement."));
- continue;
- }
}
else if (ret == `back)
{
@@ -861,12 +938,13 @@
}
}
- return ret;
+ return (symbol) ret;
}
/**
* Ask user to confirm license agreement
- * @param src_id integer repository to get the license from
+ * @param src_id integer repository to get the license from.
+ * If set to 'nil', the license is considered to belong to a base product
* @param dir string directory to look for the license in if src_id is nil
* and not 1st stage installation
* @param patterns a list of patterns for the files, regular expressions
@@ -877,17 +955,19 @@
* @param require_agreement means that even if the license (or the very same license)
* has been already accepetd, ask user to accept it again (because of 'going back'
* in the installation proposal).
+ * @param string id, usually source id but it can be any unique id in UI. Well, of course
+ * it must be string.
*/
global symbol AskLicenseAgreement (integer src_id, string dir,
list<string> patterns, string action, boolean enable_back,
- boolean base_product, boolean require_agreement)
+ boolean base_product, boolean require_agreement, string id)
{
lic_lang = "";
map licenses = $[];
list <string> available_langs = [];
string license_ident = "";
- symbol init_ret = InitLicenseData (src_id, dir, licenses, available_langs, require_agreement, license_ident);
+ symbol init_ret = InitLicenseData (src_id, dir, licenses, available_langs, require_agreement, license_ident, id);
if (init_ret == `auto || init_ret == `accepted) {
y2milestone ("Returning %1", init_ret);
@@ -904,7 +984,7 @@
created_new_dialog = true;
}
- DisplayLicenseDialog (available_langs, enable_back, lic_lang, licenses);
+ DisplayLicenseDialog (available_langs, enable_back, lic_lang, licenses, id /* license id */);
// Display info as a popup if exists
if (info_file != nil)
@@ -942,10 +1022,11 @@
license_patterns,
"abort",
// back button is disabled
- false, false, false);
+ false, false, false,
+ tostring(src_id));
}
-global symbol AskFirstStageLicenseAgreement (string action) {
+global symbol AskFirstStageLicenseAgreement (integer src_id, string action) {
// bug #223258
// disabling back button when the select-language dialog is skipped
//
@@ -953,41 +1034,44 @@
if (Language::selection_skipped)
enable_back = false;
- return AskLicenseAgreement (nil, "",
+ return AskLicenseAgreement (nil /* base product */, "",
license_patterns,
action,
// back button is enabled
- enable_back, true, true);
+ enable_back, true, true,
+ // unique id
+ tostring (src_id));
}
-boolean info_file_already_seen = false;
+// FIXME: map ...
+map info_file_already_seen = $[];
/**
* Called from the first stage Welcome dialog by clicking on a button
*/
-global boolean ShowFullScreenLicenseInInstallation (any replace_point_ID) {
+global boolean ShowFullScreenLicenseInInstallation (any replace_point_ID, integer src_id) {
lic_lang = "";
map licenses = $[];
list <string> available_langs = [];
string license_ident = "";
- symbol init_ret = InitLicenseData (nil, "", licenses, available_langs, true, license_ident);
+ symbol init_ret = InitLicenseData (nil /* base product */, "", licenses, available_langs, true, license_ident, tostring (src_id));
// Replaces the dialog content with Languages combo-box
// and the current license text (richtext)
UI::ReplaceWidget (
`id (replace_point_ID),
- GetLicenseDialogTerm (available_langs, lic_lang, licenses)
+ GetLicenseDialogTerm (available_langs, lic_lang, licenses, tostring(src_id))
);
- symbol ret = nil;
+ any ret = nil;
while (true)
{
- ret = (symbol) UI::UserInput();
+ ret = UI::UserInput();
- if (ret == `lang) {
- UpdateLicenseContent (licenses);
+ if (is (ret, string) && regexpmatch (tostring (ret), "^license_language_[[:digit:]]+")) {
+ UpdateLicenseContent (licenses, GetId (tostring (ret)));
} else {
break;
}
@@ -999,24 +1083,26 @@
/**
* Used in the first-stage Welcome dialog
*/
-global boolean ShowLicenseInInstallation (any replace_point_ID) {
+global boolean ShowLicenseInInstallation (any replace_point_ID, integer src_id) {
lic_lang = "";
map licenses = $[];
list <string> available_langs = [];
string license_ident = "";
- symbol init_ret = InitLicenseData (nil, "", licenses, available_langs, true, license_ident);
+ symbol init_ret = InitLicenseData (nil /* base product */, "", licenses, available_langs, true, license_ident, tostring (src_id));
term rt = GetLicenseContent (lic_lang, licenses);
UI::ReplaceWidget (`id (replace_point_ID), rt);
+ string id = tostring (src_id);
+
// Display info as a popup if exists
- if (info_file != nil && ! info_file_already_seen) {
+ if (info_file != nil && info_file_already_seen[id]:false != true) {
if (Mode::autoinst()) {
y2milestone ("Autoinstallation: Skipping info file...");
} else {
InstShowInfo::show_info_txt (info_file);
- info_file_already_seen = true;
+ info_file_already_seen[id] = true;
}
}
@@ -1024,10 +1110,9 @@
}
global symbol AskInstalledLicenseAgreement (string directory,
- list<string> patterns, string action)
+ list<string> patterns, string action, string id)
{
- return AskLicenseAgreement (nil, directory, patterns, action, false, true, false);
-
+ return AskLicenseAgreement (nil, directory, patterns, action, false, true, false, id);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-packager-2.19.0/src/modules/SourceDialogs.ycp new/yast2-packager-2.19.1/src/modules/SourceDialogs.ycp
--- old/yast2-packager-2.19.0/src/modules/SourceDialogs.ycp 2009-10-19 16:30:34.000000000 +0200
+++ new/yast2-packager-2.19.1/src/modules/SourceDialogs.ycp 2009-12-07 19:18:41.000000000 +0100
@@ -419,7 +419,9 @@
)
),
// checkbox label
- `Left (`CheckBox ( `id (`ch_iso), _("&ISO Image")))
+ `Left (`CheckBox ( `id (`ch_iso), _("&ISO Image"))),
+ // checkbox label
+ `Left (`CheckBox ( `id (`ch_nfs4), _("N&FS v4 Protocol")))
);
term nfs_complete_content = `InputField(`id(`complete_url), `opt(`hstretch), _("URL of the Repository"));
@@ -449,6 +451,13 @@
UI::ChangeWidget (`id (`dir), `Value, parsed["path"]:"");
UI::ChangeWidget (`id (`ch_iso), `Value, iso);
UI::SetFocus (`server);
+
+ boolean nfs4 = tolower(parsed["scheme"]:"nfs") == "nfs4" ||
+ URL::MakeMapFromParams(parsed["query"]:"")["type"]:"" == "nfs4";
+
+ y2milestone("NFSv4: %1", nfs4);
+
+ UI::ChangeWidget (`id (`ch_nfs4), `Value, nfs4);
}
else
{
@@ -456,6 +465,48 @@
}
}
+void NFSStoreParts()
+{
+ map parsed = $[
+ "scheme" : "nfs",
+ "host" : NormalizeHost (
+ (string)UI::QueryWidget (`id (`server), `Value)),
+ "path" : (string)UI::QueryWidget (`id (`dir), `Value),
+ ];
+
+ boolean nfs4 = (boolean)UI::QueryWidget (`id (`ch_nfs4), `Value);
+ if (nfs4)
+ {
+ // keep nfs4:// if it is used in the original URL
+ if (tolower(URL::Parse(_url)["scheme"]:"") == "nfs4")
+ {
+ parsed["scheme"] = "nfs4";
+ }
+ else
+ {
+ parsed["query"] = "type=nfs4";
+ }
+ }
+
+ _url = URL::Build (parsed);
+ boolean iso = (boolean)UI::QueryWidget (`id (`ch_iso), `Value);
+
+ // workaround: URL::Build does not accept numbers in scheme,
+ // for nfs4 scheme it returns URL with no scheme (like "://foo/bar")
+ if(!regexpmatch(_url, "^nfs"))
+ {
+ _url = "nfs4" + _url;
+ }
+
+ if (iso)
+ _url = PosprocessISOURL (_url);
+}
+
+void NFSStoreComplete()
+{
+ _url = (string)UI::QueryWidget(`id(`complete_url), `Value);
+}
+
/**
* Store function of a widget
* @param key string widget key
@@ -467,20 +518,11 @@
if (current_type == `edit_url_parts)
{
- map parsed = $[
- "scheme" : "nfs",
- "host" : NormalizeHost (
- (string)UI::QueryWidget (`id (`server), `Value)),
- "path" : (string)UI::QueryWidget (`id (`dir), `Value),
- ];
- _url = URL::Build (parsed);
- boolean iso = (boolean)UI::QueryWidget (`id (`ch_iso), `Value);
- if (iso)
- _url = PosprocessISOURL (_url);
+ NFSStoreParts();
}
else
{
- _url = (string)UI::QueryWidget(`id(`complete_url), `Value);
+ NFSStoreComplete();
}
}
@@ -518,7 +560,17 @@
}
else if ((event["ID"]:nil == `edit_url_parts || event["ID"]:nil == `edit_complete_url) && event["EventReason"]:"" == "ValueChanged")
{
- y2milestone("Changing dialog type");
+ y2milestone("Changing dialog type: %1", event["ID"]:nil);
+
+ // store the current settings
+ if (event["ID"]:nil == `edit_url_parts)
+ {
+ NFSStoreComplete();
+ }
+ else
+ {
+ NFSStoreParts();
+ }
// reinitialize the dialog (set the current values)
NFSInit(nil);
@@ -765,13 +817,13 @@
// try to detect ISO image by file if it's present
if (SCR::Read(.target.size, file) > 0)
{
- string command = file + " -b -i " + s;
+ string command = file + " -b " + s;
map out = (map)SCR::Execute(.target.bash_output, command);
string stdout = out["stdout"]:"";
- if (issubstring(stdout, "application/x-iso9660"))
+ if (issubstring(stdout, "ISO 9660 CD-ROM filesystem"))
{
y2milestone("ISO 9660 image detected");
}
@@ -1195,7 +1247,8 @@
`ReplacePoint (`id (`server_rp), `Empty ())
);
-term complete_content = `InputField(`id(`complete_url), `opt(`hstretch), _("URL of the Repository"));
+// input field label
+term complete_content = `InputField(`id(`complete_url), `opt(`hstretch), _("&URL of the Repository"));
void ServerStoreParts()
{
@@ -1876,6 +1929,7 @@
else if ( _url == "https://" ) current = `https;
else if ( _url == "smb://" ) current = `samba;
else if ( _url == "nfs://" ) current = `nfs;
+ else if ( _url == "nfs4://" ) current = `nfs;
else if ( _url == "cd:///" ) current = `cd;
else if ( _url == "dvd:///" ) current = `dvd;
else if ( _url == "hd://" ) current = `hd;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-packager-2.19.0/VERSION new/yast2-packager-2.19.1/VERSION
--- old/yast2-packager-2.19.0/VERSION 2009-11-20 14:38:21.000000000 +0100
+++ new/yast2-packager-2.19.1/VERSION 2009-12-08 14:00:14.000000000 +0100
@@ -1 +1 @@
-2.19.0
+2.19.1
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org