Hello community, here is the log from the commit of package yast2-add-on for openSUSE:Factory checked in at Tue Jun 28 16:03:49 CEST 2011.
-------- --- yast2-add-on/yast2-add-on.changes 2009-02-18 15:18:52.000000000 +0100 +++ /mounts/work_src_done/STABLE/yast2-add-on/yast2-add-on.changes 2011-06-28 11:49:26.000000000 +0200 @@ -1,0 +2,51 @@ +Mon Jun 27 15:14:21 UTC 2011 - [email protected] + +- don't start package manager when license agreement is aborted + (bnc#701497) +- 2.21.2 + +------------------------------------------------------------------- +Fri Jun 24 08:19:41 UTC 2011 - [email protected] + +- properly handle abort in software selection (finish add-on + workflow instead of going on) (bnc#691133) + +------------------------------------------------------------------- +Fri Jun 3 15:41:23 CEST 2011 - [email protected] + +- Added support for clonning system configuration (used add-on + products) (FATE #311374). +- 2.21.1 + +------------------------------------------------------------------ +Fri Jan 7 10:35:45 CET 2011 - [email protected] + +- Fixed help text (BNC #363222) + +------------------------------------------------------------------ +Wed Jan 13 18:56:03 CET 2010 - [email protected] + +- Adjusted .desktop file(s) to wrap /sbin/yast2/ calls in xdg-su + where root privileges are needed, removed X-KDE-SubstituteUID key + (bnc#540627) + +------------------------------------------------------------------- +Fri Apr 3 14:34:11 CEST 2009 - [email protected] + +- Adjusting initial repository name according to LABEL in content + file (bnc #481828). +- 2.18.4 + +------------------------------------------------------------------- +Wed Mar 18 17:59:31 CET 2009 - [email protected] + +- Removing a work around that broke the possibility to use several + add-ons with the same URL (especially physical media-based ones) + (bnc #475352). + +------------------------------------------------------------------- +Fri Mar 13 12:30:23 CET 2009 - [email protected] + +- Solving MenuButton shortcut conflicts (bnc #50003 c#39). + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- yast2-add-on-2.18.3.tar.bz2 New: ---- yast2-add-on-2.21.2.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-add-on.spec ++++++ --- /var/tmp/diff_new_pack.NJ8t2b/_old 2011-06-28 16:02:44.000000000 +0200 +++ /var/tmp/diff_new_pack.NJ8t2b/_new 2011-06-28 16:02:44.000000000 +0200 @@ -1,7 +1,7 @@ # -# spec file for package yast2-add-on (Version 2.18.3) +# spec file for package yast2-add-on # -# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,56 +19,63 @@ Name: yast2-add-on -Version: 2.18.3 +Version: 2.21.2 Release: 1 -License: GPL v2 or later -Group: System/YaST + BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-add-on-2.18.3.tar.bz2 +Source0: yast2-add-on-2.21.2.tar.bz2 + Prefix: /usr + +Group: System/YaST +License: GPL v2 or later Requires: autoyast2-installation # PackagesUI module, BNC #469320 Requires: yast2 >= 2.15.58 Requires: yast2-installation Requires: yast2-country -# repositories_include.ycp -Requires: yast2-packager >= 2.16.47 + +# Packages::AdjustSourcePropertiesAccordingToProduct +Requires: yast2-packager >= 2.18.4 # bugzilla #335582, new API for StorageDevices Requires: yast2-storage >= 2.16.1 + BuildRequires: perl-XML-Writer update-desktop-files yast2-devtools yast2-installation yast2-packager yast2-storage yast2-testsuite BuildRequires: yast2 >= 2.15.22 + # splitted from yast2-installation Provides: yast2-installation:/usr/share/YaST2/clients/vendor.ycp Provides: yast2-installation:/usr/share/YaST2/clients/add-on.ycp + # SCR::RegisterNewAgents, bugzilla #245508 Conflicts: yast2-core < 2.15.4 + # Pkg::SourceProvideSignedFile Pkg::SourceProvideDigestedFile Conflicts: yast2-pkg-bindings < 2.17.25 + BuildArch: noarch + Summary: YaST2 - Add-On media installation code %description This package contains YaST Add-On media installation code. - - -Authors: --------- - Jiri Srain <[email protected]> - Lukas Ocilka <[email protected]> - %prep -%setup -n yast2-add-on-2.18.3 +%setup -n yast2-add-on-2.21.2 %build %{prefix}/bin/y2tool y2autoconf %{prefix}/bin/y2tool y2automake autoreconf --force --install + export CFLAGS="$RPM_OPT_FLAGS -DNDEBUG" export CXXFLAGS="$RPM_OPT_FLAGS -DNDEBUG" + %{?suse_update_config:%{suse_update_config -f}} ./configure --libdir=%{_libdir} --prefix=%{prefix} --mandir=%{_mandir} -make %{?jobs:-j%jobs} +# V=1: verbose build in case we used AM_SILENT_RULES(yes) +# so that RPM_OPT_FLAGS check works +make %{?jobs:-j%jobs} V=1 %install make install DESTDIR="$RPM_BUILD_ROOT" ++++++ yast2-add-on-2.18.3.tar.bz2 -> yast2-add-on-2.21.2.tar.bz2 ++++++ ++++ 7983 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-add-on-2.18.3/MAINTAINER new/yast2-add-on-2.21.2/MAINTAINER --- old/yast2-add-on-2.18.3/MAINTAINER 2007-05-18 10:44:13.000000000 +0200 +++ new/yast2-add-on-2.21.2/MAINTAINER 2011-03-23 12:33:43.000000000 +0100 @@ -1 +1 @@ -Lukas Ocilka <[email protected]> +Ladislav Slezak <[email protected]> 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-add-on-2.18.3/Makefile.am new/yast2-add-on-2.21.2/Makefile.am --- old/yast2-add-on-2.18.3/Makefile.am 2009-02-18 16:56:15.000000000 +0100 +++ new/yast2-add-on-2.21.2/Makefile.am 2011-06-28 11:46:47.000000000 +0200 @@ -32,10 +32,10 @@ # less strict; prefer bzip2 AUTOMAKE_OPTIONS = foreign dist-bzip2 no-dist-gzip -# where devtools instal m4 snippets +# where devtools install m4 snippets # argh, executed literally #ACLOCAL_AMFLAGS = -I $(Y2DEVTOOLS_PREFIX)/share/aclocal -ACLOCAL_AMFLAGS = -I `if test -d ./devtools/admin; then echo ./devtools/admin; else pkg-config --print-errors --variable=datadir yast2-devtools; fi`/aclocal +ACLOCAL_AMFLAGS = -I . -I `if test -d ./devtools/admin; then echo ./devtools/admin; else pkg-config --print-errors --variable=datadir yast2-devtools; fi`/aclocal Makefile.am.common: $(DEVTOOLS_DIR)/admin/Makefile.am.common cmp -s $< $@ || cp -f $< $@ 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-add-on-2.18.3/VERSION new/yast2-add-on-2.21.2/VERSION --- old/yast2-add-on-2.18.3/VERSION 2009-02-18 13:25:55.000000000 +0100 +++ new/yast2-add-on-2.21.2/VERSION 2011-06-28 11:34:19.000000000 +0200 @@ -1 +1 @@ -2.18.3 +2.21.2 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-add-on-2.18.3/autodocs-ycp.ami new/yast2-add-on-2.21.2/autodocs-ycp.ami --- old/yast2-add-on-2.18.3/autodocs-ycp.ami 2009-02-18 16:56:15.000000000 +0100 +++ new/yast2-add-on-2.21.2/autodocs-ycp.ami 2011-06-28 11:46:47.000000000 +0200 @@ -1,5 +1,5 @@ # -*- makefile -*- Automake include file -# $Id: autodocs-ycp.ami 33394 2006-10-13 11:51:40Z mvidner $ +# $Id: autodocs-ycp.ami 57644 2009-06-19 08:38:11Z mvidner $ # Builds source documentation for YCP sources # Uses ycpdoc @@ -8,20 +8,25 @@ # Optional - the default is $(srcdir)/../../src/*.ycp # AUTODOCS_PM: Files that the perl autodocs is built from # Optional - the default is $(srcdir)/../../src/*.pm +# AUTODOCS_SUBDIR: To install the result to $(docdir)/SUBDIR/autodocs +# Optional - the default is no subdir, $(docdir)/autodocs +# AUTODOCS_STRIP: Strip it from filenames. The remaining / are replaced by __ +# Optional - the default is $(srcdir)/../../src -htmldir = $(docdir)/autodocs +htmldir = $(docdir)/$(AUTODOCS_SUBDIR)/autodocs -html_DATA = index.html $(wildcard *.html) +html_DATA = index.html $(filter-out index.html, $(wildcard *.html)) CLEANFILES = $(html_DATA) pod2htm*.tmp AUTODOCS_YCP ?= $(wildcard $(srcdir)/../../src/*.ycp) AUTODOCS_PM ?= $(wildcard $(srcdir)/../../src/*.pm) +AUTODOCS_STRIP ?= $(srcdir)/../../src index.html: $(AUTODOCS_YCP) $(AUTODOCS_PM) #including *.pm, for the index - ${YCPDOC} -d. $^ + ${YCPDOC} -d. -s$(AUTODOCS_STRIP) $(AUTODOCS_YCP) for i in $(AUTODOCS_PM); do \ - b=`basename $$i`; b=$${b%.pm}; \ + b=$${i##$(AUTODOCS_STRIP)}; b=$${b#/}; b=$${b//\//__}; b=$${b%.pm}; \ pod2html --title=$$b --infile=$$i --outfile=$$b.html; \ - echo "<a href='$$b.html'>$$b</a>" > $$b.mod.html; \ + echo "<a href='$$b.html'>$${b/__/::}</a>" > $$b.mod.html; \ done 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-add-on-2.18.3/configure.in new/yast2-add-on-2.21.2/configure.in --- old/yast2-add-on-2.18.3/configure.in 2009-02-18 16:56:15.000000000 +0100 +++ new/yast2-add-on-2.21.2/configure.in 2011-06-28 11:46:47.000000000 +0200 @@ -1,9 +1,9 @@ dnl configure.in for yast2-add-on dnl -dnl -- This file is generated by y2autoconf 2.17.6 - DO NOT EDIT! -- +dnl -- This file is generated by y2autoconf 2.18.11 - DO NOT EDIT! -- dnl (edit configure.in.in instead) -AC_INIT(yast2-add-on, 2.18.3, http://bugs.opensuse.org/, yast2-add-on) +AC_INIT(yast2-add-on, 2.21.2, http://bugs.opensuse.org/, yast2-add-on) dnl Check for presence of file 'RPMNAME' AC_CONFIG_SRCDIR([RPMNAME]) @@ -18,9 +18,9 @@ AM_INIT_AUTOMAKE(tar-ustar -Wno-portability) dnl Important YaST2 variables -VERSION="2.18.3" +VERSION="2.21.2" RPMNAME="yast2-add-on" -MAINTAINER="Lukas Ocilka <[email protected]>" +MAINTAINER="Ladislav Slezak <[email protected]>" dnl pkgconfig honors lib64 pkgconfigdir=\${libdir}/pkgconfig 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-add-on-2.18.3/missing new/yast2-add-on-2.21.2/missing --- old/yast2-add-on-2.18.3/missing 2009-02-18 16:56:18.000000000 +0100 +++ new/yast2-add-on-2.21.2/missing 2011-06-28 11:46:51.000000000 +0200 @@ -1,10 +1,10 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -scriptversion=2006-05-10.23 +scriptversion=2009-04-28.21; # UTC -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, +# 2008, 2009 Free Software Foundation, Inc. # Originally by Fran,cois Pinard <[email protected]>, 1996. # This program is free software; you can redistribute it and/or modify @@ -18,9 +18,7 @@ # 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, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -89,6 +87,9 @@ 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 <[email protected]>." exit $? ;; @@ -106,15 +107,22 @@ 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). +# the program). This is about non-GNU programs, so use $1 not +# $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 @@ -138,7 +146,7 @@ # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. -case $1 in +case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if @@ -148,7 +156,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 @@ -157,7 +165,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 @@ -187,7 +195,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 @@ -210,7 +218,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 @@ -240,7 +248,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 @@ -263,7 +271,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 @@ -277,11 +285,11 @@ else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" - exit 1 + exit $? 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 @@ -310,7 +318,7 @@ touch $file ;; - tar) + tar*) shift # We have already tried tar in the generic part. @@ -363,5 +371,6 @@ # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" # 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-add-on-2.18.3/src/add-on-workflow.ycp new/yast2-add-on-2.21.2/src/add-on-workflow.ycp --- old/yast2-add-on-2.18.3/src/add-on-workflow.ycp 2009-02-18 13:19:03.000000000 +0100 +++ new/yast2-add-on-2.21.2/src/add-on-workflow.ycp 2011-06-28 11:35:32.000000000 +0200 @@ -10,6 +10,7 @@ * * Authors: * Jiri Srain <[email protected]> + * Lukas Ocilka <[email protected]> * * */ @@ -34,6 +35,7 @@ import "Installation"; import "PackageCallbacks"; import "PackagesUI"; +import "Packages"; include "packager/inst_source_dialogs.ycp"; include "packager/repositories_include.ycp"; @@ -178,42 +180,47 @@ y2milestone ("Starting repository sequence"); symbol ret = Sequencer::Run (aliases, sequence); - list <integer> sources_after = Pkg::SourceGetCurrent (false); - y2milestone ("Sources with new one added: %1", sources_after); + if (ret != `abort) + { + list <integer> sources_after = Pkg::SourceGetCurrent (false); + y2milestone ("Sources with new one added: %1", sources_after); - // bnc #393011 - // AddOnProduct::src_id must be set to the latest source ID - boolean src_id_found = false; - - foreach (integer one_source, sources_after, { - if (! contains (sources_before, one_source)) { - AddOnProduct::src_id = one_source; - y2milestone ("Added source ID is: %1", AddOnProduct::src_id); - src_id_found = true; - break; + // bnc #393011 + // AddOnProduct::src_id must be set to the latest source ID + boolean src_id_found = false; + + foreach (integer one_source, sources_after, { + if (! contains (sources_before, one_source)) { + AddOnProduct::src_id = one_source; + y2milestone ("Added source ID is: %1", AddOnProduct::src_id); + src_id_found = true; + break; + } + }); + + if (src_id_found) { + // BNC #481828: Using LABEL from content file as a repository name + Packages::AdjustSourcePropertiesAccordingToProduct (AddOnProduct::src_id); + // used add-ons are stored in a special list + AddAddOnToStore (AddOnProduct::src_id); + } else { + AddOnProduct::src_id = sources_after[size(sources_after) - 1]:0; + y2warning ("Fallback src_id: %1", AddOnProduct::src_id); } - }); - if (src_id_found) { - // used add-ons are stored in a special list - AddAddOnToStore (AddOnProduct::src_id); - } else { - AddOnProduct::src_id = sources_after[size(sources_after) - 1]:0; - y2warning ("Fallback src_id: %1", AddOnProduct::src_id); - } - - // BNC #441380 - // Refresh and load the added source, this is needed since the unified - // functions from packager are used. - Pkg::SourceRefreshNow (AddOnProduct::src_id); - Pkg::SourceLoad(); - - // BNC #468449 - // It may happen that the add-on control file contains some code that - // would drop the changes made, so it's better to save the soruces now - if (Mode::normal()) { - y2milestone ("Saving all sources"); - Pkg::SourceSaveAll(); + // BNC #441380 + // Refresh and load the added source, this is needed since the unified + // functions from packager are used. + Pkg::SourceRefreshNow (AddOnProduct::src_id); + Pkg::SourceLoad(); + + // BNC #468449 + // It may happen that the add-on control file contains some code that + // would drop the changes made, so it's better to save the soruces now + if (Mode::normal()) { + y2milestone ("Saving all sources"); + Pkg::SourceSaveAll(); + } } AddOnProduct::last_ret = ret; @@ -286,14 +293,9 @@ // busy message UI::OpenDialog(`Label(`id (`add_on_popup_id), _("Initializing new source..."))); integer src_id = SourceManager::newSources[0]:0; - map data = Pkg::SourceGeneralData (src_id); - y2milestone("Adding product: %1", data); - string url = data["url"]:""; - string product_dir = data["product_dir"]:""; - y2milestone ("Deleting source %1", src_id); - Pkg::SourceDelete (src_id); - src_id = Pkg::SourceCreate (url, product_dir); - SourceManager::newSources = [src_id]; + + // BNC #481828: Using LABEL from content file as a repository name + Packages::AdjustSourcePropertiesAccordingToProduct (src_id); // a little hack because of packager leaving // windows open... @@ -309,16 +311,6 @@ } } - if (src_id == -1) - { - // error report - Report::Error (_("Failed to initialize the software repository.")); - AddOnProduct::ClearRegistrationRequest (src_id); - - y2milestone ("CatalogSelect Dialog ret: %1", AddOnProduct::last_ret); - return `finish; - } - AddOnProduct::src_id = src_id; SourceManager::newSources = [src_id]; y2milestone ("Only one source available - skipping dialog"); @@ -326,6 +318,7 @@ y2milestone ("CatalogSelect Dialog ret: %1", AddOnProduct::last_ret); return AddOnProduct::last_ret; } + y2milestone ("Running catalog select dialog"); list catalogs = maplist (integer src, sources, { map data = Pkg::SourceGeneralData (src); @@ -360,17 +353,8 @@ if (ret == `abort || ret == `cancel) { ret = `abort; -// if (Stage::initial()) -// { -// if (Popup::ConfirmAbort (`painless)) -// break; -// } -// else -// { - // yes-no popup - if (Popup::YesNo (_("Really abort add-on product installation?"))) - break; -// } + if (Popup::YesNo (_("Really abort add-on product installation?"))) + break; continue; } else if (ret == `back) @@ -401,26 +385,13 @@ foreach (integer src, SourceManager::newSources, { if (src != selected) { - y2milestone ("Deleting source %1", src); + y2milestone ("Deleting unused source %1", src); Pkg::SourceDelete (src); } }); - map data = Pkg::SourceGeneralData (selected); - string url = data["url"]:""; - string product_dir = data["product_dir"]:""; - y2milestone ("Deleting source %1", selected); - Pkg::SourceDelete (selected); - selected = Pkg::SourceCreate (url, product_dir); - SourceManager::newSources = [selected]; - if (selected == -1) - { - // error report - Report::Error (_("Failed to initialize the software repository.")); - AddOnProduct::ClearRegistrationRequest (selected); - y2milestone ("CatalogSelect Dialog ret: %1", `finish); - return `finish; - } + // BNC #481828: Using LABEL from content file as a repository name + Packages::AdjustSourcePropertiesAccordingToProduct (selected); AddOnProduct::src_id = selected; SourceManager::newSources = [selected]; @@ -553,38 +524,6 @@ return `next; } -// disabling functionality (partly bugzilla #227605) -// we know whether this product is already installed -// but we can't know whether the source hasn't been already removed -// -// products = filter (map<string,any> prod, products, { -// boolean installed = false; -// find (map<string,any> p, installed_products, { -// if (p["name"]:"" == prod["name"]:"" && p["version"]:"" == prod["version"]:"") -// { -// installed = true; -// y2milestone ("Product %1 installed", p); -// return true; -// } -// return false; -// }); -// if (installed) -// { -// y2milestone ("Removing %1 from the list of available products", prod); -// return false; -// } -// return true; -// }); -// if (size (products) == 0) -// { -// // message popup -// Popup::Message (_("The product on the media is already installed -//or selected for installation.")); -// y2milestone ("Deleting installatino source %1", AddOnProduct::src_id); -// Pkg::SourceDelete (AddOnProduct::src_id); -// AddOnProduct::ClearRegistrationRequest (AddOnProduct::src_id); -// return `finish; -// } // Display /media.1/info.txt if such file exists // Display license and wait for agreement // FIXME the same code is above @@ -604,21 +543,6 @@ // this product with this url has been already installed or selected for installation map <string, any> src_general_data = Pkg::SourceGeneralData (AddOnProduct::src_id); string current_url = src_general_data["url"]:""; - if (current_url != "" && current_url != nil) { - y2milestone ("%1", already_used_urls); - if (already_used_urls[current_url]:"" == src_general_data["product_dir"]:"") { - // error pop-up - Popup::Message (_("The product on the media is already installed -or selected for installation.")); - y2milestone ("Deleting installation source %1 %2 (%3)", - AddOnProduct::src_id, current_url, src_general_data["product_dir"]:""); - Pkg::SourceDelete (AddOnProduct::src_id); - AddOnProduct::ClearRegistrationRequest (AddOnProduct::src_id); - - y2milestone ("ProductSelect Dialog ret: %1", `finish); - return `finish; - } - } y2milestone ("Only one product available - skipping dialog"); map<string,any> prod = products[0]:$[]; @@ -760,23 +684,6 @@ string url = data["url"]:""; string product_dir = data["product_dir"]:""; - // bugzilla #227605 - // this product with this url has been already installed or selected for installation - if (url != "" && url != nil) { - if (already_used_urls[url]:"" == product_dir) { - // error pop-up - Popup::Message (_("The product on the media is already installed -or selected for installation.")); - y2milestone ("Deleting installation source %1 %2 (%3)", - AddOnProduct::src_id, url, product_dir); - Pkg::SourceDelete (AddOnProduct::src_id); - AddOnProduct::ClearRegistrationRequest (AddOnProduct::src_id); - - y2milestone ("ProductSelect Dialog ret: %1", `finish); - return `finish; - } - } - foreach (string product, selected, { integer src_id = (AddOnProduct::src_id == -1 ? prod2src[product]:-1 : AddOnProduct::src_id); @@ -880,7 +787,7 @@ string title = _("Add-On Product Installation"); // Help for add-on products - string help = _("<p><big><b>Add-On Product Installation</b></big></br> + string help = _("<p><big><b>Add-On Product Installation</b></big><br/> Here see all add-on products that are selected for installation. To add a new product, click <b>Add</b>. To remove an already added one, select it and click <b>Delete</b>.</p>"); @@ -1323,7 +1230,7 @@ return ret; } -void RedrawAddOnsOverviewTable () { +list <map <string,any> > GetAllProductsInfo () { list <map <string,any> > all_products = Pkg::ResolvableProperties ("", `product, ""); all_products = maplist (map <string,any> one_product, all_products, { @@ -1337,14 +1244,11 @@ return one_product; }); - integer source_nr = nil; - map repository_info = nil; - integer counter = -1; - - list <term> products = []; - product_infos = $[]; + return all_products; +} - list <map <string,any> > installed_products = filter (map <string,any> one_product, all_products, { +list <map <string,any> > GetInstalledProducts () { + list <map <string,any> > installed_products = filter (map <string,any> one_product, GetAllProductsInfo(), { // Do not list the base product if (one_product["category"]:"addon" == "base") return false; @@ -1352,6 +1256,18 @@ return (one_product["status"]:`unknown == `installed || one_product["status"]:`unknown == `selected); }); + return installed_products; +} + +map GetProductInfos () { + list <map <string,any> > all_products = GetAllProductsInfo(); + list <map <string,any> > installed_products = GetInstalledProducts(); + + map repository_info = nil; + integer counter = -1; + + product_infos = $[]; + foreach (map <string,any> one_product, installed_products, { // only add-on products should be listed if (haskey (one_product, "type") && one_product["type"]:"addon" != "addon") { @@ -1372,11 +1288,74 @@ "product" : one_product, "info" : repository_info, ]; + }); + + return product_infos; +} + +/** + * List of all selected repositories + * + * @struct add_on_products = [ + * $[ + * "media" : 4, // ID of the source + * "product_dir" : "/", + * "product" : "openSUSE version XX.Y", + * "autoyast_product" : "'PRODUCT' tag for AutoYaST Export", + * "media_url" : "Zypp URL of the product", + * ], + * ... + * ] + */ +boolean ReadFromSystem () { + AddOnProduct::add_on_products = []; + + map <string, map> product_infos = (map <string, map>) GetProductInfos(); + if (product_infos == nil || product_infos == $[]) { + y2warning ("No add-on products have been found"); + return true; + } + + integer src_id = nil; + + foreach (string index, map product_desc, product_infos, { + src_id = product_desc["info","IDs",0]:-1; + if (src_id == nil || src_id == -1) { + y2error ("Cannot get source ID from %1", product_desc); + return; + } + + map repo_data = Pkg::SourceGeneralData (src_id); + + AddOnProduct::add_on_products = add (AddOnProduct::add_on_products, $[ + "media" : src_id, + "product_dir" : repo_data["product_dir"]:"/", + "product" : repo_data["name"]:repo_data["alias"]:_("No product found in the repository"), + "autoyast_product" : product_desc["product","name"]:repo_data["name"]:repo_data["alias"]:_("No product found in the repository"), + "media_url" : Pkg::SourceURL(src_id) + ]); + }); + + y2milestone ("Add-Ons read: %1", AddOnProduct::add_on_products); + + return true; +} + +void RedrawAddOnsOverviewTable () { + list <term> products = []; + + map <string, map> product_infos = (map <string, map>) GetProductInfos(); + + if (product_infos == nil) + product_infos = $[]; + + y2milestone ("Currently used add-ons: %1", product_infos); + foreach (string index, map product_desc, product_infos, { products = add (products, `item ( - `id (sformat ("product_%1", counter)), - one_product["display_name"]:one_product["name"]:_("Unknown product"), - repository_info["URLs", 0]:_("Unknown URL") + `id (sformat ("product_%1", index)), + product_desc["product", "display_name"]:product_desc["product", "name"]:_("Unknown product"), + product_desc["info", "URLs", 0]:_("Unknown URL") )); }); @@ -1384,7 +1363,7 @@ AdjustInfoWidget(); // Nothing to do delete when there are no product listed - UI::ChangeWidget (`id(`delete), `Enabled, (size (installed_products) > 0)); + UI::ChangeWidget (`id(`delete), `Enabled, (size (products) > 0)); } boolean RunPackageSelector () { 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-add-on-2.18.3/src/add-on.desktop new/yast2-add-on-2.21.2/src/add-on.desktop --- old/yast2-add-on-2.18.3/src/add-on.desktop 2008-10-01 10:55:43.000000000 +0200 +++ new/yast2-add-on-2.21.2/src/add-on.desktop 2011-06-14 12:35:42.000000000 +0200 @@ -17,11 +17,11 @@ X-SuSE-YaST-AutoInstResource= X-SuSE-YaST-AutoInstPath=install X-SuSE-YaST-AutoInstSchema=add-on.rnc +X-SuSE-YaST-AutoInstClonable=true Icon=yast-addon -Exec=/sbin/yast2 add-on +Exec=xdg-su -c "/sbin/yast2 add-on" Name=Add-On Products GenericName=Install or remove add-on products -X-KDE-SubstituteUID=true StartupNotify=true 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-add-on-2.18.3/src/add-on_auto.ycp new/yast2-add-on-2.21.2/src/add-on_auto.ycp --- old/yast2-add-on-2.18.3/src/add-on_auto.ycp 2008-12-12 15:21:01.000000000 +0100 +++ new/yast2-add-on-2.21.2/src/add-on_auto.ycp 2011-06-14 12:35:42.000000000 +0200 @@ -11,7 +11,7 @@ * Authors: * Jiri Srain <[email protected]> * - * $Id:$ + * $Id: add-on_auto.ycp 64211 2011-06-03 13:44:33Z locilka $ * */ { @@ -26,6 +26,8 @@ import "PackageCallbacksInit"; import "Label"; import "AutoinstGeneral"; +import "PackageLock"; +import "Installation"; include "add-on/add-on-workflow.ycp"; @@ -243,12 +245,26 @@ ret = true; } /** - * Read configuration data - * return boolean + * Reads configuration of add-ons from the current system + * to memory. To get that configuration, use Export() functionality. + * + * @returns boolean */ else if (func == "Read") { - y2milestone ("Read not supported"); - ret = true; + if (! PackageLock::Check()) { + y2error ("Cannot get package lock"); + return false; + } + y2milestone ("Reseting Pkg"); + Pkg::PkgApplReset(); + Pkg::PkgReset(); + + Pkg::TargetInitialize (Installation::destdir); + Pkg::TargetLoad(); + Pkg::SourceStartManager (true); + Pkg::PkgSolve (true); + + ret = ReadFromSystem(); } /* unknown function */ else { 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-add-on-2.18.3/src/add-on_proposal.ycp new/yast2-add-on-2.21.2/src/add-on_proposal.ycp --- old/yast2-add-on-2.18.3/src/add-on_proposal.ycp 2008-12-12 15:20:48.000000000 +0100 +++ new/yast2-add-on-2.21.2/src/add-on_proposal.ycp 2009-03-16 16:22:48.000000000 +0100 @@ -72,7 +72,7 @@ // this is a heading "rich_text_title" : _( "Add-On Products" ), // this is a menu entry - "menu_title" : _( "Add-On &Products" ), + "menu_title" : _( "Add-&On Products" ), "id" : "add_on" ]; } 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-add-on-2.18.3/src/inst_add-on_software.ycp new/yast2-add-on-2.21.2/src/inst_add-on_software.ycp --- old/yast2-add-on-2.18.3/src/inst_add-on_software.ycp 2009-01-26 16:43:42.000000000 +0100 +++ new/yast2-add-on-2.21.2/src/inst_add-on_software.ycp 2011-06-24 15:20:09.000000000 +0200 @@ -83,6 +83,10 @@ symbol dialog_ret = `next; + if (ret == `cancel) { + dialog_ret = `abort; + } + if (ret == `accept || ret == `ok) { // Add-on requires packages to be installed right now if (argmap["skip_installation"]:false != true) { 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-add-on-2.18.3/src/inst_language_add-on.ycp new/yast2-add-on-2.21.2/src/inst_language_add-on.ycp --- old/yast2-add-on-2.18.3/src/inst_language_add-on.ycp 2008-11-07 17:28:37.000000000 +0100 +++ new/yast2-add-on-2.21.2/src/inst_language_add-on.ycp 2009-04-29 12:58:11.000000000 +0200 @@ -8,7 +8,7 @@ * called from command-line for testing purposes: * `yast2 inst_language_add-on.ycp "$[]" url_to_add_on_source`. * - * $Id$ + * $Id: inst_language_add-on.ycp 57028 2009-04-29 10:58:09Z lslezak $ */ { import "Language"; 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-add-on-2.18.3/src/vendor.desktop new/yast2-add-on-2.21.2/src/vendor.desktop --- old/yast2-add-on-2.18.3/src/vendor.desktop 2008-05-19 15:28:08.000000000 +0200 +++ new/yast2-add-on-2.21.2/src/vendor.desktop 2010-01-14 15:51:49.000000000 +0100 @@ -17,9 +17,8 @@ X-SuSE-YaST-AutoInstResource= Icon=yast-vendor -Exec=/sbin/yast2 vendor +Exec=xdg-su -c "/sbin/yast2 vendor" Name=Vendor Driver CD GenericName=Install a driver from a vendor-specific CD-ROM -X-KDE-SubstituteUID=true StartupNotify=true ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
