Hello community,
here is the log from the commit of package yast2 for openSUSE:Factory checked in at 2013-05-27 10:13:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2 (Old)
and /work/SRC/openSUSE:Factory/.yast2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2"
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2/yast2.changes 2013-05-14 16:53:38.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2.new/yast2.changes 2013-05-27 10:13:49.000000000 +0200
@@ -1,0 +2,14 @@
+Tue May 21 15:24:25 CEST 2013 - jsuchome@suse.cz
+
+- do not propose desktop kernel for minimal installation
+ (bnc#819335)
+- 2.24.0
+
+-------------------------------------------------------------------
+Thu May 16 12:41:09 UTC 2013 - jsrain@suse.cz
+
+- handle GPG keys in AutoUpgrade the same as in AutoYaST
+ (bnc#820166)
+- 2.23.29
+
+-------------------------------------------------------------------
Old:
----
yast2-2.23.28.tar.bz2
New:
----
yast2-2.24.0.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2.spec ++++++
--- /var/tmp/diff_new_pack.7RDYHm/_old 2013-05-27 10:13:50.000000000 +0200
+++ /var/tmp/diff_new_pack.7RDYHm/_new 2013-05-27 10:13:50.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2
-Version: 2.23.28
+Version: 2.24.0
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ yast2-2.23.28.tar.bz2 -> yast2-2.24.0.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.23.28/VERSION new/yast2-2.24.0/VERSION
--- old/yast2-2.23.28/VERSION 2013-05-14 13:56:37.000000000 +0200
+++ new/yast2-2.24.0/VERSION 2013-05-22 12:46:37.000000000 +0200
@@ -1 +1 @@
-2.23.28
+2.24.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.23.28/configure new/yast2-2.24.0/configure
--- old/yast2-2.23.28/configure 2013-05-14 14:50:38.000000000 +0200
+++ new/yast2-2.24.0/configure 2013-05-22 12:46:48.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for yast2 2.23.28.
+# Generated by GNU Autoconf 2.69 for yast2 2.24.0.
#
# Report bugs to http://bugs.opensuse.org/.
#
@@ -579,8 +579,8 @@
# Identity of this package.
PACKAGE_NAME='yast2'
PACKAGE_TARNAME='yast2'
-PACKAGE_VERSION='2.23.28'
-PACKAGE_STRING='yast2 2.23.28'
+PACKAGE_VERSION='2.24.0'
+PACKAGE_STRING='yast2 2.24.0'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
PACKAGE_URL=''
@@ -1250,7 +1250,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 2.23.28 to adapt to many kinds of systems.
+\`configure' configures yast2 2.24.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1321,7 +1321,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2 2.23.28:";;
+ short | recursive ) echo "Configuration of yast2 2.24.0:";;
esac
cat <<\_ACEOF
@@ -1401,7 +1401,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2 configure 2.23.28
+yast2 configure 2.24.0
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1418,7 +1418,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 $as_me 2.23.28, which was
+It was created by yast2 $as_me 2.24.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2357,7 +2357,7 @@
# Define the identity of the package.
PACKAGE='yast2'
- VERSION='2.23.28'
+ VERSION='2.24.0'
cat >>confdefs.h <<_ACEOF
@@ -2480,7 +2480,7 @@
-VERSION="2.23.28"
+VERSION="2.24.0"
RPMNAME="yast2"
MAINTAINER="YaST2 Maintainers "
@@ -3522,7 +3522,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by yast2 $as_me 2.23.28, which was
+This file was extended by yast2 $as_me 2.24.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -3575,7 +3575,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-yast2 config.status 2.23.28
+yast2 config.status 2.24.0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.23.28/configure.in new/yast2-2.24.0/configure.in
--- old/yast2-2.23.28/configure.in 2013-05-14 14:50:33.000000000 +0200
+++ new/yast2-2.24.0/configure.in 2013-05-22 12:46:45.000000000 +0200
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf 2.24.0 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2, 2.23.28, http://bugs.opensuse.org/, yast2)
+AC_INIT(yast2, 2.24.0, http://bugs.opensuse.org/, yast2)
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.23.28"
+VERSION="2.24.0"
RPMNAME="yast2"
MAINTAINER="YaST2 Maintainers "
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.23.28/library/modules/PackagesProposal.ycp new/yast2-2.24.0/library/modules/PackagesProposal.ycp
--- old/yast2-2.23.28/library/modules/PackagesProposal.ycp 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-2.24.0/library/modules/PackagesProposal.ycp 2013-05-22 12:46:37.000000000 +0200
@@ -0,0 +1,355 @@
+/****************************************************************************
+
+Copyright (c) 2002 - 2012 Novell, Inc.
+All Rights Reserved.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of version 2 of the GNU General Public License as
+published by the Free Software Foundation.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+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, contact Novell, Inc.
+
+To contact Novell about this file by physical or electronic mail,
+you may find current contact information at www.novell.com
+
+****************************************************************************/
+/**
+ * File: PackagesProposal.ycp
+ * Package: Packages installation
+ * Summary: API for selecting or de-selecting packages for installation
+ * Authors: Lukas Ocilka
+ *
+ * $Id$
+ */
+
+{
+ /***
+ *
+ * This module provides API for packages that want software
+ * proposal to select some resolvables for installation.
+ * Clients of this module identify themselves by their own
+ * unique ID, thus one client doesn't change other clients
+ * requirements.
+ *
+ * @example
+ * // No packages selected initially
+ * y2internal ("Packages to install: %1", PackagesProposal::GetAllResolvables (`package));
+ *
+ * // Adding packages for ID_1
+ * PackagesProposal::AddResolvables ("ID_1", `package, ["aa", "bb", "cc"]);
+ * y2internal ("Packages to install: %1", PackagesProposal::GetAllResolvables (`package));
+ *
+ * // Adding packages for ID_2
+ * // 'cc' is shared with ID_1
+ * PackagesProposal::AddResolvables ("ID_2", `package, ["cc", "dd", "ee"]);
+ * y2internal ("Packages to install: %1", PackagesProposal::GetAllResolvables (`package));
+ *
+ * // Get all packages required by ID_1
+ * list <string> required_packages = PackagesProposal::GetResolvables ("ID_1", `package);
+ * y2internal ("Packages required by ID_1: %1", required_packages);
+ *
+ * // Removing all packages required by ID_1
+ * PackagesProposal::RemoveResolvables ("ID_1", `package, required_packages);
+ * y2internal ("Packages to install: %1", PackagesProposal::GetAllResolvables (`package));
+ *
+ * // Removing some packages required by ID_2
+ * PackagesProposal::RemoveResolvables ("ID_2", `package, ["cc", "dd"]);
+ * y2internal ("Packages to install: %1", PackagesProposal::GetAllResolvables (`package));
+ *
+ */
+
+ module "PackagesProposal";
+
+ textdomain "base";
+
+ /**
+ * @struct $[
+ * "unique_ID" : $[
+ * `package : [ "list", "of", "packages", "to", "install" ],
+ * `pattern : [ "list", "of", "patterns", "to", "install" ],
+ * ]
+ * ]
+ */
+ map > resolvables_to_install = $[];
+
+ /**
+ * Resets all resolvables to install. Use carefully.
+ */
+ global void ResetAll () {
+ if (resolvables_to_install != $[]) {
+ y2warning ("Reseting all PackagesProposal items");
+ } else {
+ y2milestone ("Reseting all PackagesProposal items");
+ }
+
+ resolvables_to_install = $[];
+ }
+
+ /**
+ * List of currently supported types of resolvables
+ */
+ list <symbol> supported_resolvables = [`package, `pattern];
+
+ /**
+ * Returns list of resolvables currently supported by this module.
+ *
+ * @example GetSupportedResolvables() -> [`package, `pattern, ... ]
+ *
+ * @return list <symbol> of resolvables
+ */
+ global list <symbol> GetSupportedResolvables () {
+ return supported_resolvables;
+ }
+
+ boolean IsSupportedResolvableType (symbol type) {
+ if (type == nil) {
+ y2error ("Wrong type: %1", type);
+ return false;
+ }
+
+ return contains (supported_resolvables, type);
+ }
+
+ /**
+ * Checks the currently created data structure and creates
+ * missing keys if needed.
+ *
+ * @param string unique_ID
+ * @param symbol type
+ */
+ void CreateEmptyStructureIfMissing (string unique_ID, symbol type) {
+ if (! haskey (resolvables_to_install, unique_ID)) {
+ y2debug ("Creating '%1' key in resolvables_to_install", unique_ID);
+ resolvables_to_install[unique_ID] = $[];
+ }
+
+ if (! haskey (resolvables_to_install[unique_ID]:$[], type)) {
+ y2debug ("Creating '%1' key in resolvables_to_install[%2]", type, unique_ID);
+ resolvables_to_install[unique_ID, type] = [];
+ }
+ }
+
+ /**
+ * Checks parameters for global functions
+ *
+ * @param string unique_ID
+ * @param symbol type
+ * @return boolean if parameters are correct
+ */
+ boolean CheckParams (string unique_ID, symbol type) {
+ if (unique_ID == nil || unique_ID == "") {
+ y2error ("Unique ID cannot be: %1", unique_ID);
+ return false;
+ }
+
+ if (! IsSupportedResolvableType (type)) {
+ y2error ("Not a supported type: %1, supported are only: %2", type, supported_resolvables);
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Adds list of resolvables to pool that is then used by software proposal
+ * to propose a selection of resolvables to install.
+ *
+ * @param string unique_ID
+ * @param symbol resolvable type
+ * @param list <string> of resolvables to add for installation
+ * @return boolean whether successful
+ *
+ * @example
+ * AddResolvables ("y2_kdump", `package, ["yast2-kdump", "kdump"]) -> true
+ * // `not_supported is definitely not a supported resolvable
+ * AddResolvables ("test", `not_supported, ["bash"]) -> false
+ *
+ * @see supported_resolvables
+ * @see RemoveResolvables()
+ */
+ global boolean AddResolvables (string unique_ID, symbol type, list <string> resolvables) {
+ if (! CheckParams (unique_ID, type))
+ return false;
+
+ CreateEmptyStructureIfMissing (unique_ID, type);
+
+ if (resolvables == nil) {
+ y2warning ("Changing resolvables %1 to empty list", resolvables);
+ resolvables = [];
+ }
+
+ y2milestone ("Adding resolvables %1 type %2 for %3", resolvables, type, unique_ID);
+ resolvables_to_install[unique_ID, type] =
+ (list <string>) union (resolvables_to_install[unique_ID, type]:[], resolvables);
+
+ return true;
+ }
+
+ /**
+ * Replaces the current resolvables with new ones. Similar to AddResolvables()
+ * but it replaces the list of resolvables instead of adding them to the pool.
+ * It always replaces only the part that is identified by the unique_ID.
+ *
+ * @param string unique_ID
+ * @param symbol resolvable type
+ * @param list <string> of resolvables to add for installation
+ * @return boolean whether successful
+ */
+ global boolean SetResolvables (string unique_ID, symbol type, list <string> resolvables) {
+ if (! CheckParams (unique_ID, type))
+ return false;
+
+ CreateEmptyStructureIfMissing (unique_ID, type);
+
+ if (resolvables == nil) {
+ y2warning ("Changing resolvables %1 to empty list", resolvables);
+ resolvables = [];
+ }
+
+ y2milestone ("Adjusting resolvables %1 type %2 for %3", resolvables, type, unique_ID);
+ resolvables_to_install[unique_ID, type] = resolvables;
+
+ return true;
+ }
+
+ /**
+ * Removes list of packages from pool that is then used by software proposal
+ * to propose a selection of resolvables to install.
+ *
+ * @param string unique_ID
+ * @param symbol resolvable type
+ * @param list <string> of resolvables to remove from list selected for installation
+ * @return boolean whether successful
+ *
+ * @example
+ * RemoveResolvables ("y2_kdump", `package, ["kdump"]) -> true
+ *
+ * @see supported_resolvables
+ * @see AddResolvables()
+ */
+ global boolean RemoveResolvables (string unique_ID, symbol type, list <string> resolvables) {
+ if (! CheckParams (unique_ID, type))
+ return false;
+
+ CreateEmptyStructureIfMissing (unique_ID, type);
+
+ if (resolvables == nil) {
+ y2warning ("Changing resolvables %1 to empty list", resolvables);
+ resolvables = [];
+ }
+
+ y2milestone ("Removing resolvables %1 type %2 for %3", resolvables, type, unique_ID);
+ resolvables_to_install[unique_ID, type] = filter (string one_resolvable, resolvables_to_install[unique_ID, type]:[], {
+ return ! contains (resolvables, one_resolvable);
+ });
+ y2milestone ("Resolvables left: %1", resolvables_to_install[unique_ID, type]:[]);
+
+ return true;
+ }
+
+ /**
+ * Returns all resolvables selected for installation.
+ *
+ * @param string unique_ID
+ * @param symbol resolvable type
+ * @return list <string> of resolvables
+ *
+ * @example
+ * GetResolvables ("y2_kdump", `package) -> ["yast2-kdump", "kdump"]
+ */
+ global list <string> GetResolvables (string unique_ID, symbol type) {
+ if (! CheckParams (unique_ID, type))
+ return nil;
+
+ return resolvables_to_install[unique_ID, type]:[];
+ }
+
+ /**
+ * Returns list of selected resolvables of a given type
+ *
+ * @param symbol resolvable type
+ * @return list <string> list of resolvables
+ *
+ * @example
+ * GetAllResolvables (`package) -> ["list", "of", "packages"]
+ * GetAllResolvables (`pattern) -> ["list", "of", "patterns"]
+ * // not a supported resolvable type
+ * GetAllResolvables (`unknown) -> nil
+ *
+ * @see supported_resolvables
+ */
+ global list <string> GetAllResolvables (symbol type) {
+ if (! IsSupportedResolvableType (type)) {
+ y2error ("Not a supported type: %1, supported are only: %2", type, supported_resolvables);
+ return nil;
+ }
+
+ list <string> ret = [];
+
+ foreach (string unique_ID, map resolvables, resolvables_to_install, {
+ if (haskey (resolvables, type)) {
+ ret = sort ((list <string>) union (ret, resolvables[type]:[]));
+ }
+ });
+
+ return ret;
+ }
+
+ /**
+ * Returns all selected resolvables for all supported types
+ *
+ * @return map map of resolvables
+ * @struct $[
+ * `resolvable_type : [ "list", "of", "resolvables" ],
+ * `another_type : [ "list", "of", "resolvables" ],
+ * ]
+ *
+ * @example
+ * // No resolvables selected
+ * GetAllResolvablesForAllTypes() -> $[]
+ * // Only patterns selected
+ * GetAllResolvablesForAllTypes() -> $[`pattern : ["some", "patterns"]]
+ * // Also packages selected
+ * GetAllResolvablesForAllTypes() -> $[
+ * `pattern : ["some", "patterns"],
+ * `package : ["some", "packages"],
+ * ]
+ */
+ global map GetAllResolvablesForAllTypes () {
+ map ret = $[];
+ list <string> resolvables = [];
+
+ foreach (symbol one_type, GetSupportedResolvables(), {
+ resolvables = GetAllResolvables (one_type);
+
+ if (resolvables != nil && resolvables != []) {
+ ret[one_type] = resolvables;
+ }
+ });
+
+ return ret;
+ }
+
+ /**
+ * Return whether a unique ID is already in use.
+ *
+ * @param string unique_ID to check
+ * @return boolean whether the ID is not in use yet
+ */
+ global boolean IsUniqueID (string unique_ID) {
+ if (unique_ID == nil || unique_ID == "") {
+ y2error ("Unique ID cannot be: %1", unique_ID);
+ return nil;
+ }
+
+ return ! haskey (resolvables_to_install, unique_ID);
+ }
+
+/* EOF */
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.23.28/library/modules/Version.ycp new/yast2-2.24.0/library/modules/Version.ycp
--- old/yast2-2.23.28/library/modules/Version.ycp 2013-05-14 14:50:45.000000000 +0200
+++ new/yast2-2.24.0/library/modules/Version.ycp 2013-05-22 12:46:55.000000000 +0200
@@ -20,7 +20,7 @@
/**
* Version of the yast2 package
*/
-global string yast2 = "2.23.28";
+global string yast2 = "2.24.0";
/* EOF */
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.23.28/library/packages/src/PackageCallbacks.ycp new/yast2-2.24.0/library/packages/src/PackageCallbacks.ycp
--- old/yast2-2.23.28/library/packages/src/PackageCallbacks.ycp 2013-05-02 12:21:35.000000000 +0200
+++ new/yast2-2.24.0/library/packages/src/PackageCallbacks.ycp 2013-05-17 11:06:37.000000000 +0200
@@ -2930,7 +2930,8 @@
// @see bugzilla #183821
// Do not register these callbacks in case of AutoInstallation
- if (Mode::autoinst() != true) {
+ // And for AutoUpgrade neither (bnc#820166)
+ if (!(Mode::autoinst() || Mode::autoupgrade())) {
// Signature-related callbacks
Pkg::CallbackAcceptUnsignedFile (SignatureCheckCallbacks::AcceptUnsignedFile);
Pkg::CallbackAcceptUnknownGpgKey (SignatureCheckCallbacks::AcceptUnknownGpgKey);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.23.28/library/packages/src/PackagesProposal.ycp new/yast2-2.24.0/library/packages/src/PackagesProposal.ycp
--- old/yast2-2.23.28/library/packages/src/PackagesProposal.ycp 2013-01-22 12:22:06.000000000 +0100
+++ new/yast2-2.24.0/library/packages/src/PackagesProposal.ycp 1970-01-01 01:00:00.000000000 +0100
@@ -1,355 +0,0 @@
-/****************************************************************************
-
-Copyright (c) 2002 - 2012 Novell, Inc.
-All Rights Reserved.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of version 2 of the GNU General Public License as
-published by the Free Software Foundation.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-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, contact Novell, Inc.
-
-To contact Novell about this file by physical or electronic mail,
-you may find current contact information at www.novell.com
-
-****************************************************************************/
-/**
- * File: PackagesProposal.ycp
- * Package: Packages installation
- * Summary: API for selecting or de-selecting packages for installation
- * Authors: Lukas Ocilka
- *
- * $Id$
- */
-
-{
- /***
- *
- * This module provides API for packages that want software
- * proposal to select some resolvables for installation.
- * Clients of this module identify themselves by their own
- * unique ID, thus one client doesn't change other clients
- * requirements.
- *
- * @example
- * // No packages selected initially
- * y2internal ("Packages to install: %1", PackagesProposal::GetAllResolvables (`package));
- *
- * // Adding packages for ID_1
- * PackagesProposal::AddResolvables ("ID_1", `package, ["aa", "bb", "cc"]);
- * y2internal ("Packages to install: %1", PackagesProposal::GetAllResolvables (`package));
- *
- * // Adding packages for ID_2
- * // 'cc' is shared with ID_1
- * PackagesProposal::AddResolvables ("ID_2", `package, ["cc", "dd", "ee"]);
- * y2internal ("Packages to install: %1", PackagesProposal::GetAllResolvables (`package));
- *
- * // Get all packages required by ID_1
- * list <string> required_packages = PackagesProposal::GetResolvables ("ID_1", `package);
- * y2internal ("Packages required by ID_1: %1", required_packages);
- *
- * // Removing all packages required by ID_1
- * PackagesProposal::RemoveResolvables ("ID_1", `package, required_packages);
- * y2internal ("Packages to install: %1", PackagesProposal::GetAllResolvables (`package));
- *
- * // Removing some packages required by ID_2
- * PackagesProposal::RemoveResolvables ("ID_2", `package, ["cc", "dd"]);
- * y2internal ("Packages to install: %1", PackagesProposal::GetAllResolvables (`package));
- *
- */
-
- module "PackagesProposal";
-
- textdomain "base";
-
- /**
- * @struct $[
- * "unique_ID" : $[
- * `package : [ "list", "of", "packages", "to", "install" ],
- * `pattern : [ "list", "of", "patterns", "to", "install" ],
- * ]
- * ]
- */
- map > resolvables_to_install = $[];
-
- /**
- * Resets all resolvables to install. Use carefully.
- */
- global void ResetAll () {
- if (resolvables_to_install != $[]) {
- y2warning ("Reseting all PackagesProposal items");
- } else {
- y2milestone ("Reseting all PackagesProposal items");
- }
-
- resolvables_to_install = $[];
- }
-
- /**
- * List of currently supported types of resolvables
- */
- list <symbol> supported_resolvables = [`package, `pattern];
-
- /**
- * Returns list of resolvables currently supported by this module.
- *
- * @example GetSupportedResolvables() -> [`package, `pattern, ... ]
- *
- * @return list <symbol> of resolvables
- */
- global list <symbol> GetSupportedResolvables () {
- return supported_resolvables;
- }
-
- boolean IsSupportedResolvableType (symbol type) {
- if (type == nil) {
- y2error ("Wrong type: %1", type);
- return false;
- }
-
- return contains (supported_resolvables, type);
- }
-
- /**
- * Checks the currently created data structure and creates
- * missing keys if needed.
- *
- * @param string unique_ID
- * @param symbol type
- */
- void CreateEmptyStructureIfMissing (string unique_ID, symbol type) {
- if (! haskey (resolvables_to_install, unique_ID)) {
- y2debug ("Creating '%1' key in resolvables_to_install", unique_ID);
- resolvables_to_install[unique_ID] = $[];
- }
-
- if (! haskey (resolvables_to_install[unique_ID]:$[], type)) {
- y2debug ("Creating '%1' key in resolvables_to_install[%2]", type, unique_ID);
- resolvables_to_install[unique_ID, type] = [];
- }
- }
-
- /**
- * Checks parameters for global functions
- *
- * @param string unique_ID
- * @param symbol type
- * @return boolean if parameters are correct
- */
- boolean CheckParams (string unique_ID, symbol type) {
- if (unique_ID == nil || unique_ID == "") {
- y2error ("Unique ID cannot be: %1", unique_ID);
- return false;
- }
-
- if (! IsSupportedResolvableType (type)) {
- y2error ("Not a supported type: %1, supported are only: %2", type, supported_resolvables);
- return false;
- }
-
- return true;
- }
-
- /**
- * Adds list of resolvables to pool that is then used by software proposal
- * to propose a selection of resolvables to install.
- *
- * @param string unique_ID
- * @param symbol resolvable type
- * @param list <string> of resolvables to add for installation
- * @return boolean whether successful
- *
- * @example
- * AddResolvables ("y2_kdump", `package, ["yast2-kdump", "kdump"]) -> true
- * // `not_supported is definitely not a supported resolvable
- * AddResolvables ("test", `not_supported, ["bash"]) -> false
- *
- * @see supported_resolvables
- * @see RemoveResolvables()
- */
- global boolean AddResolvables (string unique_ID, symbol type, list <string> resolvables) {
- if (! CheckParams (unique_ID, type))
- return false;
-
- CreateEmptyStructureIfMissing (unique_ID, type);
-
- if (resolvables == nil) {
- y2warning ("Changing resolvables %1 to empty list", resolvables);
- resolvables = [];
- }
-
- y2milestone ("Adding resolvables %1 type %2 for %3", resolvables, type, unique_ID);
- resolvables_to_install[unique_ID, type] =
- (list <string>) union (resolvables_to_install[unique_ID, type]:[], resolvables);
-
- return true;
- }
-
- /**
- * Replaces the current resolvables with new ones. Similar to AddResolvables()
- * but it replaces the list of resolvables instead of adding them to the pool.
- * It always replaces only the part that is identified by the unique_ID.
- *
- * @param string unique_ID
- * @param symbol resolvable type
- * @param list <string> of resolvables to add for installation
- * @return boolean whether successful
- */
- global boolean SetResolvables (string unique_ID, symbol type, list <string> resolvables) {
- if (! CheckParams (unique_ID, type))
- return false;
-
- CreateEmptyStructureIfMissing (unique_ID, type);
-
- if (resolvables == nil) {
- y2warning ("Changing resolvables %1 to empty list", resolvables);
- resolvables = [];
- }
-
- y2milestone ("Adjusting resolvables %1 type %2 for %3", resolvables, type, unique_ID);
- resolvables_to_install[unique_ID, type] = resolvables;
-
- return true;
- }
-
- /**
- * Removes list of packages from pool that is then used by software proposal
- * to propose a selection of resolvables to install.
- *
- * @param string unique_ID
- * @param symbol resolvable type
- * @param list <string> of resolvables to remove from list selected for installation
- * @return boolean whether successful
- *
- * @example
- * RemoveResolvables ("y2_kdump", `package, ["kdump"]) -> true
- *
- * @see supported_resolvables
- * @see AddResolvables()
- */
- global boolean RemoveResolvables (string unique_ID, symbol type, list <string> resolvables) {
- if (! CheckParams (unique_ID, type))
- return false;
-
- CreateEmptyStructureIfMissing (unique_ID, type);
-
- if (resolvables == nil) {
- y2warning ("Changing resolvables %1 to empty list", resolvables);
- resolvables = [];
- }
-
- y2milestone ("Removing resolvables %1 type %2 for %3", resolvables, type, unique_ID);
- resolvables_to_install[unique_ID, type] = filter (string one_resolvable, resolvables_to_install[unique_ID, type]:[], {
- return ! contains (resolvables, one_resolvable);
- });
- y2milestone ("Resolvables left: %1", resolvables_to_install[unique_ID, type]:[]);
-
- return true;
- }
-
- /**
- * Returns all resolvables selected for installation.
- *
- * @param string unique_ID
- * @param symbol resolvable type
- * @return list <string> of resolvables
- *
- * @example
- * GetResolvables ("y2_kdump", `package) -> ["yast2-kdump", "kdump"]
- */
- global list <string> GetResolvables (string unique_ID, symbol type) {
- if (! CheckParams (unique_ID, type))
- return nil;
-
- return resolvables_to_install[unique_ID, type]:[];
- }
-
- /**
- * Returns list of selected resolvables of a given type
- *
- * @param symbol resolvable type
- * @return list <string> list of resolvables
- *
- * @example
- * GetAllResolvables (`package) -> ["list", "of", "packages"]
- * GetAllResolvables (`pattern) -> ["list", "of", "patterns"]
- * // not a supported resolvable type
- * GetAllResolvables (`unknown) -> nil
- *
- * @see supported_resolvables
- */
- global list <string> GetAllResolvables (symbol type) {
- if (! IsSupportedResolvableType (type)) {
- y2error ("Not a supported type: %1, supported are only: %2", type, supported_resolvables);
- return nil;
- }
-
- list <string> ret = [];
-
- foreach (string unique_ID, map resolvables, resolvables_to_install, {
- if (haskey (resolvables, type)) {
- ret = sort ((list <string>) union (ret, resolvables[type]:[]));
- }
- });
-
- return ret;
- }
-
- /**
- * Returns all selected resolvables for all supported types
- *
- * @return map map of resolvables
- * @struct $[
- * `resolvable_type : [ "list", "of", "resolvables" ],
- * `another_type : [ "list", "of", "resolvables" ],
- * ]
- *
- * @example
- * // No resolvables selected
- * GetAllResolvablesForAllTypes() -> $[]
- * // Only patterns selected
- * GetAllResolvablesForAllTypes() -> $[`pattern : ["some", "patterns"]]
- * // Also packages selected
- * GetAllResolvablesForAllTypes() -> $[
- * `pattern : ["some", "patterns"],
- * `package : ["some", "packages"],
- * ]
- */
- global map GetAllResolvablesForAllTypes () {
- map ret = $[];
- list <string> resolvables = [];
-
- foreach (symbol one_type, GetSupportedResolvables(), {
- resolvables = GetAllResolvables (one_type);
-
- if (resolvables != nil && resolvables != []) {
- ret[one_type] = resolvables;
- }
- });
-
- return ret;
- }
-
- /**
- * Return whether a unique ID is already in use.
- *
- * @param string unique_ID to check
- * @return boolean whether the ID is not in use yet
- */
- global boolean IsUniqueID (string unique_ID) {
- if (unique_ID == nil || unique_ID == "") {
- y2error ("Unique ID cannot be: %1", unique_ID);
- return nil;
- }
-
- return ! haskey (resolvables_to_install, unique_ID);
- }
-
-/* EOF */
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.23.28/library/system/src/Kernel.ycp new/yast2-2.24.0/library/system/src/Kernel.ycp
--- old/yast2-2.23.28/library/system/src/Kernel.ycp 2013-01-22 12:22:06.000000000 +0100
+++ new/yast2-2.24.0/library/system/src/Kernel.ycp 2013-05-22 12:46:37.000000000 +0200
@@ -41,6 +41,7 @@
import "Arch";
import "Mode";
import "Linuxrc";
+ import "PackagesProposal";
import "Popup";
import "Stage";
@@ -363,7 +364,16 @@
cmdLine = new_cmd_line;
}
+/**
+ * Simple check any graphical desktop was selected
+ */
+boolean IsGraphicalDesktop () {
+ // Get patterns set for installation during desktop selection
+ // (see DefaultDesktop::packages_proposal_ID_patterns for the first argument)
+ list<string> pt = PackagesProposal::GetResolvables ("DefaultDesktopPatterns", `pattern);
+ return contains (pt, "x11");
+}
//---------------------------------------------------------------
@@ -427,7 +437,7 @@
if ((memsize >= fourGB || contains (cpuflags, "nx")) && contains (cpuflags, "pae"))
{
y2milestone ("Kernel switch: PAE detected");
- if (kernel_desktop_exists && true) { // FIXME: check whether it is really desktop
+ if (kernel_desktop_exists && IsGraphicalDesktop ()) {
kernel_packages = ["kernel-desktop"];
// add PV drivers
@@ -461,7 +471,7 @@
}
else if (Arch::x86_64())
{
- if (kernel_desktop_exists && true) { // FIXME: detect desktop
+ if (kernel_desktop_exists && IsGraphicalDesktop ()) {
kernel_packages = ["kernel-desktop"];
if (xen)
{
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org