Hello community,
here is the log from the commit of package yast2-update
checked in at Wed Oct 31 16:48:47 CET 2007.
--------
--- yast2-update/yast2-update.changes 2007-08-28 12:37:16.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-update/yast2-update.changes 2007-10-31 13:22:22.000000000 +0100
@@ -1,0 +2,13 @@
+Wed Oct 31 13:21:55 CET 2007 - locilka@suse.cz
+
+- installedVersion and updateVersion moved from 'Update' to
+ 'Installation' YCP module to remove dependencies.
+- 2.16.0
+
+-------------------------------------------------------------------
+Thu Oct 25 14:00:51 CEST 2007 - locilka@suse.cz
+
+- Never list duplicate entries in "upgrade based on products" in
+ upgrade proposal (#331560).
+
+-------------------------------------------------------------------
Old:
----
yast2-update-2.15.23.tar.bz2
New:
----
yast2-update-2.16.0.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-update.spec ++++++
--- /var/tmp/diff_new_pack.lh5082/_old 2007-10-31 16:48:31.000000000 +0100
+++ /var/tmp/diff_new_pack.lh5082/_new 2007-10-31 16:48:31.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-update (Version 2.15.23)
+# spec file for package yast2-update (Version 2.16.0)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,17 +11,20 @@
# norootforbuild
Name: yast2-update
-Version: 2.15.23
+Version: 2.16.0
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-update-2.15.23.tar.bz2
-prefix: /usr
-BuildRequires: perl-XML-Writer update-desktop-files yast2 yast2-devtools yast2-packager yast2-storage yast2-testsuite
+Source0: yast2-update-2.16.0.tar.bz2
+Prefix: /usr
+BuildRequires: perl-XML-Writer update-desktop-files yast2-devtools yast2-packager yast2-storage yast2-testsuite
+BuildRequires: yast2 >= 2.16.4
# package not really needed to be installed but this breaks the building cycle
+# FIXME !!!
#!BuildIgnore: autoyast2-installation
-Requires: yast2
+# Installation::installedVersion && Installation::updateVersion
+Requires: yast2 >= 2.16.4
Requires: yast2-installation
Requires: yast2-packager
# moved into yast2-update from yast2-installation
@@ -34,14 +37,15 @@
# Storage::DeviceMatchFstab (#244117)
Conflicts: yast2-storage < 2.15.4
Summary: YaST2 - Update
+
%package FACTORY
-Version: 2.15.23
+Version: 2.16.0
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-update-2.15.23.tar.bz2
-prefix: /usr
+Source0: yast2-update-2.16.0.tar.bz2
+Prefix: /usr
BuildRequires: perl-XML-Writer update-desktop-files yast2-devtools
Requires: yast2-update yast2
# moved into yast2-update from yast2-installation
@@ -60,7 +64,6 @@
Arvin Schnell
Jiri Srain
-
%description FACTORY
Use this component if you wish to update your system.
@@ -73,7 +76,7 @@
Jiri Srain
%prep
-%setup -n yast2-update-2.15.23
+%setup -n yast2-update-2.16.0
%build
%{prefix}/bin/y2tool y2autoconf
@@ -117,8 +120,14 @@
%{prefix}/share/applications/YaST2/update.desktop
/usr/share/YaST2/control/update.xml
/usr/share/YaST2/clients/update.ycp
-
%changelog
+* Wed Oct 31 2007 - locilka@suse.cz
+- installedVersion and updateVersion moved from 'Update' to
+ 'Installation' YCP module to remove dependencies.
+- 2.16.0
+* Thu Oct 25 2007 - locilka@suse.cz
+- Never list duplicate entries in "upgrade based on products" in
+ upgrade proposal (#331560).
* Tue Aug 28 2007 - locilka@suse.cz
- Update proposal doesn't use recommended Kernel if the package is
not available (#304646).
++++++ yast2-update-2.15.23.tar.bz2 -> yast2-update-2.16.0.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-update-2.15.23/README new/yast2-update-2.16.0/README
--- old/yast2-update-2.15.23/README 2007-08-29 13:33:56.000000000 +0200
+++ new/yast2-update-2.16.0/README 2007-10-31 13:39:08.000000000 +0100
@@ -1,2 +1,2 @@
This program/library is part of YaST2
-See the file COPYRIGHT.english for license terms
+See the file COPYING for license terms
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-update-2.15.23/src/clients/inst_update.ycp new/yast2-update-2.16.0/src/clients/inst_update.ycp
--- old/yast2-update-2.15.23/src/clients/inst_update.ycp 2007-05-18 10:44:11.000000000 +0200
+++ new/yast2-update-2.16.0/src/clients/inst_update.ycp 2007-10-31 13:38:53.000000000 +0100
@@ -9,7 +9,7 @@
* Show checkboxes for software categories. Let the user select his software.
* if he want to UPGRADE his system.
*
- * $Id: inst_update.ycp 37403 2007-04-11 16:23:39Z locilka $
+ * $Id: inst_update.ycp 41677 2007-10-31 12:38:53Z locilka $
*/
{
@@ -20,7 +20,7 @@
import "RootPart";
import "Update";
import "Packages";
-
+ import "Installation";
// screen title for update options
string title = _("Update Options");
@@ -69,8 +69,8 @@
// Build and show dialog
- string from_version = Update::installedVersion["show"]:_("Unknown");
- string to_version = Update::updateVersion["show"]:_("Unknown");
+ string from_version = Installation::installedVersion["show"]:_("Unknown");
+ string to_version = Installation::updateVersion["show"]:_("Unknown");
string update_label = "";
if (from_version == to_version) {
@@ -131,7 +131,7 @@
updates the existing software and installs all new features and benefits of
the new <tt>%1</tt> version. The selection is based on the former predefined
software selection.</p>
-"), Update::updateVersion["show"]:"");
+"), Installation::updateVersion["show"]:"");
// help text for dialog "update options" 3/4
helptext = helptext + _("<p><b>Only Installed Packages:</b> This selection
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-update-2.15.23/src/clients/update_proposal.ycp new/yast2-update-2.16.0/src/clients/update_proposal.ycp
--- old/yast2-update-2.15.23/src/clients/update_proposal.ycp 2007-08-28 12:37:28.000000000 +0200
+++ new/yast2-update-2.16.0/src/clients/update_proposal.ycp 2007-10-31 13:27:31.000000000 +0100
@@ -5,7 +5,7 @@
*
* Purpose: Let user choose update settings.
*
- * $Id: update_proposal.ycp 40528 2007-08-28 10:37:27Z locilka $
+ * $Id: update_proposal.ycp 41673 2007-10-31 12:27:31Z locilka $
*/
{
textdomain "update";
@@ -448,22 +448,22 @@
// TRANSLATORS: unknown product (label)
string update_from = _("Unknown product");
- if (Update::installedVersion["show"]:"" != "" && Update::installedVersion["show"]:"?" != "?") {
- update_from = Update::installedVersion["show"]:"";
- } else if (Update::installedVersion["version"]:"" != "" && Update::installedVersion["version"]:"?" != "?") {
- update_from = Update::installedVersion["name"]:"";
+ if (Installation::installedVersion["show"]:"" != "" && Installation::installedVersion["show"]:"?" != "?") {
+ update_from = Installation::installedVersion["show"]:"";
+ } else if (Installation::installedVersion["version"]:"" != "" && Installation::installedVersion["version"]:"?" != "?") {
+ update_from = Installation::installedVersion["name"]:"";
}
// TRANSLATORS: unknown product (label)
string update_to = _("Unknown product");
- if (Update::updateVersion["show"]:"" != "") {
- update_to = Update::updateVersion["show"]:"";
- } else if (Update::updateVersion["version"]:"" != "") {
- update_to = Update::updateVersion["name"]:"";
+ if (Installation::updateVersion["show"]:"" != "") {
+ update_to = Installation::updateVersion["show"]:"";
+ } else if (Installation::updateVersion["version"]:"" != "") {
+ update_to = Installation::updateVersion["name"]:"";
}
// when versions don't match and upgrade is not allowed (running system)
- if ((Update::installedVersion["version"]:"A" != Update::updateVersion["version"]:"B") && Update::disallow_upgrade) {
+ if ((Installation::installedVersion["version"]:"A" != Installation::updateVersion["version"]:"B") && Update::disallow_upgrade) {
return $[ "warning" : sformat(
// TRANSLATORS: proposal error, %1 is the version of installed system
// %2 is the version being installed
@@ -479,14 +479,14 @@
string warning_message = nil;
// when labels don't match
- if (!Stage::initial() && (Update::installedVersion["show"]:"A" != Update::updateVersion["show"]:"B")) {
+ if (!Stage::initial() && (Installation::installedVersion["show"]:"A" != Installation::updateVersion["show"]:"B")) {
warning_message = sformat(
// TRANSLATORS: proposal warning, both %1 and %2 are replaced with product names
_("Warning: Updating from '%1' to '%2', products do not exactly match."),
// TRANSLATORS: unknown product name
- Update::installedVersion["show"]:_("Unknown product"),
+ Installation::installedVersion["show"]:_("Unknown product"),
// TRANSLATORS: unknown product name
- Update::updateVersion["show"]:_("Unknown product")
+ Installation::updateVersion["show"]:_("Unknown product")
);
}
@@ -494,10 +494,20 @@
string summary_text = "";
list <string> products = Update::SelectedProducts ();
+ list <string> already_printed = [];
+
if (products != nil) {
foreach (string one_product, products, {
+ // never print duplicates, bugzilla #331560
+ // 'toset' could be used but we want to keep sorting
+ if (contains (already_printed, one_product)) {
+ return;
+ } else {
+ already_printed = add (already_printed, one_product);
+ }
+
// TRANSLATORS: proposal summary item, %1 is a product name
- summary_text = summary_text + "<li>" + sformat (_("Update to %1"), one_product) + "</li>\n";
+ summary_text = summary_text + "<li><b>" + sformat (_("Update to %1"), one_product) + "</b></li>\n";
});
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-update-2.15.23/src/modules/RootPart.ycp new/yast2-update-2.16.0/src/modules/RootPart.ycp
--- old/yast2-update-2.15.23/src/modules/RootPart.ycp 2007-08-27 14:21:12.000000000 +0200
+++ new/yast2-update-2.16.0/src/modules/RootPart.ycp 2007-10-31 13:22:48.000000000 +0100
@@ -6,7 +6,7 @@
* Purpose: Responsible for searching of root partitions and
* mounting of target partitions.
*
- * $Id: RootPart.ycp 40499 2007-08-27 12:21:11Z locilka $
+ * $Id: RootPart.ycp 41669 2007-10-31 12:22:48Z locilka $
*/
{
module "RootPart";
@@ -571,7 +571,7 @@
* @param mountpoint string a mount point to find
* @return string the found partition
*/
-define string FindPartitionInFstab (list<map> fstab, string mountpoint) {
+define string FindPartitionInFstab (list <map> & fstab, string mountpoint) {
if (substring (mountpoint, size (mountpoint) - 1, 1) == "/")
mountpoint = substring (mountpoint, 0, size (mountpoint) - 1);
@@ -609,7 +609,7 @@
if (cmd["exit"]:nil != nil) {
list <string> files = splitstring (cmd["stdout"]:"", "\n");
integer files_count = size (files);
- if (files_count == nil || files_count <= 3) {
+ if (files_count == nil || files_count <= 2) {
y2error ("There are only %1 files in /var/lib/hardware/, translation needn't work!", files_count);
} else {
y2milestone ("There are %1 files in /var/lib/hardware/", files_count);
@@ -624,7 +624,7 @@
// translate them
list <string> new_names = Storage::GetTranslatedDevices (
- Update::installedVersion, Update::updateVersion, old_names
+ Installation::installedVersion, Installation::updateVersion, old_names
);
integer i = 0;
@@ -726,10 +726,19 @@
}
}
+ boolean FstabHasSeparateVar (list <map> & fstab) {
+ string var_device_fstab = FindPartitionInFstab (fstab, "/var");
+ y2milestone ("/var partition is %1", var_device_fstab);
+
+ return (var_device_fstab != nil);
+ }
+
+ define string MountVarIfRequired (list <map> fstab, string root_device_current);
+
/**
*
*/
- define boolean read_fstab_and_cryptotab (list <map>& fstab, list <map>& crtab)
+ define boolean read_fstab_and_cryptotab (list <map>& fstab, list <map>& crtab, string root_device_current)
{
integer default_scr = WFM::SCRGetDefault ();
integer new_scr = nil;
@@ -748,6 +757,15 @@
Update::GetProductName();
+ boolean fstab_has_separate_var = FstabHasSeparateVar (fstab);
+ // mount /var
+ if (fstab_has_separate_var) {
+ y2warning ("Separate /var partition!");
+ MountVarIfRequired (fstab, root_device_current);
+ } else {
+ y2milestone ("No separate /var partition found");
+ }
+
y2milestone ("fstab: %1", fstab);
fstab = TranslateFsOrCryptoTab (fstab, "spec", "spec_old");
y2milestone ("fstab: (translated) %1", fstab);
@@ -756,6 +774,11 @@
crtab = TranslateFsOrCryptoTab (crtab, "file", "file_old");
y2milestone ("crtab: (translated) %1", crtab);
+ // umount /var
+ if (fstab_has_separate_var) {
+ SCR::Execute (.target.umount, Installation::destdir + "/var");
+ }
+
return true;
}
@@ -1089,7 +1112,7 @@
string err_message = nil;
if (mount_err != nil)
{
- y2error ("failed to mount /var");
+ y2error (-1, "failed to mount /var");
err_message = sformat (
// error message
_("The /var partition %1 could not be mounted.\n"),
@@ -1107,8 +1130,12 @@
define string MountVarIfRequired (list <map> fstab, string root_device_current)
{
string var_device_fstab = FindPartitionInFstab (fstab, "/var");
- if (var_device_fstab == nil)
+
+ // No need to mount "/var", it's not separate == already mounted with "/"
+ if (var_device_fstab == nil) {
+ y2milestone ("Not a separate /var...");
return nil;
+ }
if (!Storage::DeviceRealDisk (var_device_fstab))
return MountVarPartition (var_device_fstab);
@@ -1185,7 +1212,7 @@
// typing passwords for encrypted partitions
Keyboard::CheckKeyboardDuringUpdate (Installation::destdir);
- read_fstab_and_cryptotab (fstab, crtab);
+ read_fstab_and_cryptotab (fstab, crtab, root_device_current);
if (size (fstab) == 0)
{
@@ -1365,7 +1392,7 @@
list <map> fstab = [];
list <map> crtab = [];
- read_fstab_and_cryptotab (fstab, crtab);
+ read_fstab_and_cryptotab (fstab, crtab, p_dev);
fstab = filter (map p, fstab, ``(p["file"]:""=="/"));
@@ -1508,7 +1535,7 @@
`Label(_("Mounting partitions. One moment please...")));
boolean tmp = RootPart::MountPartitions (RootPart::selectedRootPartition);
- sleep (500);
+ // sleep (500);
UI::CloseDialog ();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-update-2.15.23/src/modules/Update.ycp new/yast2-update-2.16.0/src/modules/Update.ycp
--- old/yast2-update-2.15.23/src/modules/Update.ycp 2007-07-18 09:36:29.000000000 +0200
+++ new/yast2-update-2.16.0/src/modules/Update.ycp 2007-10-31 13:22:48.000000000 +0100
@@ -6,7 +6,7 @@
*
* Purpose: Update module
*
- * $Id: Update.ycp 39486 2007-07-18 07:36:28Z locilka $
+ * $Id: Update.ycp 41669 2007-10-31 12:22:48Z locilka $
*/
{
module "Update";
@@ -68,25 +68,17 @@
global boolean products_incompatible = false;
-
- /*
- * Information about old and new product.
- *
- * They do contain:
- * name (string), e.g. "SuSE Linux"
- * version (string), e.g. "9.1"
- * nameandversion (string), e.g. "SuSE Linux 9.1"
- *
- * They may contain:
- * major (integer), e.g. "9"
- * minor (integer), e.g. "1"
- */
-
// Version of the targetsystem
- global map installedVersion = $[];
+ //
+ // !!! moved to Installation::installedVersion !!!
+ //
+ // global map installedVersion = $[];
// Version of the source medium
- global map updateVersion = $[];
+ //
+ // !!! moved to Installation::updateVersion !!!
+ //
+ // global map updateVersion = $[];
// Flag, if the basesystem have to be installed
@@ -472,13 +464,13 @@
/**
* Read product name and version for the old and new release.
- * Fill installedVersion and updateVersion.
+ * Fill Installation::installedVersion and Installation::updateVersion.
* @return success
*/
global define boolean GetProductName ()
{
- installedVersion = $[];
- updateVersion = $[];
+ Installation::installedVersion = $[];
+ Installation::updateVersion = $[];
// get old product name
@@ -501,32 +493,32 @@
if (p == nil)
{
y2error ("release info <%1> is screwed", old_name);
- installedVersion = $[];
+ Installation::installedVersion = $[];
}
else
{
- installedVersion["show"] = old_name;
- installedVersion["name"] = substring (old_name, 0, p);
- installedVersion["version"] = substring (old_name, p + 1);
- fill_version_map (installedVersion);
+ Installation::installedVersion["show"] = old_name;
+ Installation::installedVersion["name"] = substring (old_name, 0, p);
+ Installation::installedVersion["version"] = substring (old_name, p + 1);
+ fill_version_map (Installation::installedVersion);
}
// "minor" and "major" version keys
// bug #153576, "version" == "9" or "10.1" or ...
- string inst_ver = installedVersion["version"]:"";
+ string inst_ver = Installation::installedVersion["version"]:"";
if (inst_ver != "" && inst_ver != nil) {
// SLE, SLD, OES...
if (regexpmatch (inst_ver, "^[0123456789]+$")) {
- installedVersion["major"] = tointeger (inst_ver);
+ Installation::installedVersion["major"] = tointeger (inst_ver);
// openSUSE
} else if (regexpmatch (inst_ver, "^[0123456789]+\.[0123456789]+$")) {
- installedVersion["major"] = tointeger (regexpsub (inst_ver, "^([0123456789]+)\.[0123456789]+$", "\\1"));
- installedVersion["minor"] = tointeger (regexpsub (inst_ver, "^[0123456789]+\.([0123456789]+)$", "\\1"));
+ Installation::installedVersion["major"] = tointeger (regexpsub (inst_ver, "^([0123456789]+)\.[0123456789]+$", "\\1"));
+ Installation::installedVersion["minor"] = tointeger (regexpsub (inst_ver, "^[0123456789]+\.([0123456789]+)$", "\\1"));
} else {
y2error("Cannot find out major/minor from >%1<", inst_ver);
}
} else {
- y2error("Cannot find out version: %1", installedVersion);
+ y2error("Cannot find out version: %1", Installation::installedVersion);
}
if (Mode::test()) {
@@ -541,9 +533,9 @@
if (num <= 0)
{
y2error ("No source");
- updateVersion["name"] = "?";
- updateVersion["version"] = "?";
- fill_version_map (updateVersion);
+ Installation::updateVersion["name"] = "?";
+ Installation::updateVersion["version"] = "?";
+ fill_version_map (Installation::updateVersion);
return false;
}
@@ -556,7 +548,7 @@
// source need to be described
if (source_map != $[]) {
- if (source_map["productversion"]:"A" == installedVersion["version"]:"B") {
+ if (source_map["productversion"]:"A" == Installation::installedVersion["version"]:"B") {
y2milestone ("Found matching product: %1", source_map);
// first valid product is selected
if (update_to_source == nil)
@@ -578,45 +570,45 @@
if (new_product == nil)
{
- updateVersion["name"] = "?";
- updateVersion["version"] = "?";
- y2error("Cannot find out source details: %1", updateVersion);
- fill_version_map (updateVersion);
+ Installation::updateVersion["name"] = "?";
+ Installation::updateVersion["version"] = "?";
+ y2error("Cannot find out source details: %1", Installation::updateVersion);
+ fill_version_map (Installation::updateVersion);
return false;
}
// bugzilla #225256, use "label" first, then a "productname"
- updateVersion["show"] = new_product["label"]:nil;
- if (updateVersion["show"]:nil == nil) {
+ Installation::updateVersion["show"] = new_product["label"]:nil;
+ if (Installation::updateVersion["show"]:nil == nil) {
y2warning ("No \"label\" defined in product");
if (new_product["productname"]:"?" == "?" && new_product["productversion"]:"?" == "?") {
- updateVersion["show"] = "?";
+ Installation::updateVersion["show"] = "?";
} else {
- updateVersion["show"] = new_product["productname"]:"?" + " " + new_product["productversion"]:"?";
+ Installation::updateVersion["show"] = new_product["productname"]:"?" + " " + new_product["productversion"]:"?";
}
}
- updateVersion["name"] = new_product["label"]:new_product["productname"]:"?";
- updateVersion["version"] = new_product["productversion"]:"?";
- fill_version_map (updateVersion);
+ Installation::updateVersion["name"] = new_product["label"]:new_product["productname"]:"?";
+ Installation::updateVersion["version"] = new_product["productversion"]:"?";
+ fill_version_map (Installation::updateVersion);
- string new_ver = updateVersion["version"]:"";
+ string new_ver = Installation::updateVersion["version"]:"";
if (new_ver != "" && new_ver != nil) {
// SLE, SLD, OES...
if (regexpmatch (new_ver, "^[0123456789]+$")) {
- updateVersion["major"] = tointeger (new_ver);
+ Installation::updateVersion["major"] = tointeger (new_ver);
// openSUSE
} else if (regexpmatch (new_ver, "^[0123456789]+\.[0123456789]$")) {
- updateVersion["major"] = tointeger (regexpsub (new_ver, "^([0123456789]+)\.[0123456789]$", "\\1"));
- updateVersion["minor"] = tointeger (regexpsub (new_ver, "^[0123456789]+\.([0123456789])$", "\\1"));
+ Installation::updateVersion["major"] = tointeger (regexpsub (new_ver, "^([0123456789]+)\.[0123456789]$", "\\1"));
+ Installation::updateVersion["minor"] = tointeger (regexpsub (new_ver, "^[0123456789]+\.([0123456789])$", "\\1"));
} else {
y2error("Cannot find out major/minor from %1", new_ver);
}
} else {
- y2error("Cannot find out version: %1", updateVersion);
+ y2error("Cannot find out version: %1", Installation::updateVersion);
}
- y2milestone ("update from %1 to %2", installedVersion, updateVersion);
+ y2milestone ("update from %1 to %2", Installation::installedVersion, Installation::updateVersion);
return true;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-update-2.15.23/VERSION new/yast2-update-2.16.0/VERSION
--- old/yast2-update-2.15.23/VERSION 2007-08-28 12:37:21.000000000 +0200
+++ new/yast2-update-2.16.0/VERSION 2007-10-31 13:16:58.000000000 +0100
@@ -1 +1 @@
-2.15.23
+2.16.0
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org