Hello community,
here is the log from the commit of package yast2-vm
checked in at Tue Jun 27 19:09:05 CEST 2006.
--------
--- arch/i386/yast2-vm/yast2-vm.changes 2006-06-17 00:10:52.000000000 +0200
+++ yast2-vm/yast2-vm.changes 2006-06-27 10:03:57.000000000 +0200
@@ -1,0 +2,7 @@
+Tue Jun 27 09:06:17 CEST 2006 - lslezak@suse.cz
+
+- Initialize new installation sources, use the new source ID when
+ the installation source is modified (#179410)
+- 2.13.58
+
+-------------------------------------------------------------------
Old:
----
yast2-vm-2.13.57.tar.bz2
New:
----
yast2-vm-2.13.58.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-vm.spec ++++++
--- /var/tmp/diff_new_pack.C1Ne6z/_old 2006-06-27 19:06:03.000000000 +0200
+++ /var/tmp/diff_new_pack.C1Ne6z/_new 2006-06-27 19:06:03.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-vm (Version 2.13.57)
+# spec file for package yast2-vm (Version 2.13.58)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,12 +11,12 @@
# norootforbuild
Name: yast2-vm
-Version: 2.13.57
+Version: 2.13.58
Release: 1
License: GPL
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-vm-2.13.57.tar.bz2
+Source0: yast2-vm-2.13.58.tar.bz2
prefix: /usr
BuildRequires: perl-XML-Writer update-desktop-files yast2 yast2-devtools yast2-testsuite
Requires: yast2 yast2-installation
@@ -32,7 +32,7 @@
Ladislav Slezak
%prep
-%setup -n yast2-vm-2.13.57
+%setup -n yast2-vm-2.13.58
%build
%{prefix}/bin/y2tool y2autoconf
@@ -73,6 +73,10 @@
%doc %{prefix}/share/doc/packages/yast2-vm
%changelog -n yast2-vm
+* Tue Jun 27 2006 - lslezak@suse.cz
+- Initialize new installation sources, use the new source ID when
+ the installation source is modified (#179410)
+- 2.13.58
* Fri Jun 16 2006 - mgfritch@novell.com
- Replace the 'extra' option 'vnc=1' with 'vnc=0 textmode=1'
(#185944)
++++++ yast2-vm-2.13.57.tar.bz2 -> yast2-vm-2.13.58.tar.bz2 ++++++
++++ 2662 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-vm-2.13.57/Makefile.am new/yast2-vm-2.13.58/Makefile.am
--- old/yast2-vm-2.13.57/Makefile.am 2006-06-16 23:48:16.000000000 +0200
+++ new/yast2-vm-2.13.58/Makefile.am 2006-06-27 09:57:31.000000000 +0200
@@ -6,7 +6,9 @@
# (Edit ./SUBDIRS instead)
#
-PREFIX = /usr
+#where devtools are
+PREFIX := $(shell pkg-config --print-errors --variable=prefix yast2-devtools)
+Y2TOOL = $(PREFIX)/bin/y2tool
VERSION = $(shell cat $(srcdir)/VERSION)
RPMNAME = $(shell cat $(srcdir)/RPMNAME)
@@ -30,6 +32,10 @@
extra_COPYRIGHT_files = $(if $(HAS_YAST_LICENSE), $(COPYRIGHT_files_yast), $(COPYRIGHT_files_gpl))
AUTOMAKE_OPTIONS = foreign dist-bzip2
+# where devtools instal m4 snippets
+# argh, executed literally
+#ACLOCAL_AMFLAGS = -I $(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
Makefile.am.common: $(DEVTOOLS_DIR)/admin/Makefile.am.common
cmp -s $< $@ || cp -f $< $@
@@ -57,12 +63,8 @@
# info '(automake)Conditionals'
if CREATE_PKGCONFIG
-# pkg-config
-# if a package does not have its own pc, copy the generic one
-$(RPMNAME).pc.in: $(DEVTOOLS_DIR)/admin/generic.pc.in
- test -f $@ || cp -p $< $@
# create the file here instead of by configure
-# because the prerequisite is made here
+# because the prerequisite is made here (not anymore!)
# and we don't want any paths in y2autoconf
# info '(autoconf)config.status Invocation'
$(RPMNAME).pc: $(RPMNAME).pc.in
@@ -94,7 +96,7 @@
done
pot:
- y2tool y2makepot -s $(srcdir)
+ $(Y2TOOL) y2makepot -s $(srcdir)
install-pot: pot
@POT_DST=`find -type d -name testsuite -prune , \
@@ -115,7 +117,7 @@
fi
spellcheck: pot
- y2tool pot-spellcheck
+ $(Y2TOOL) pot-spellcheck
# all-local: $(if $(IS_DEVTOOLS),,$(POT_DST))
@@ -142,20 +144,20 @@
rm -f package/*.bak
rm -f package/*.auto
mv $(RPMNAME)-$(VERSION).tar.bz2 package/
- if ! test -x $(PREFIX)/bin/y2tool; then \
- echo "$(PREFIX)/bin/y2tool: not found."; \
+ if ! test -x $(Y2TOOL); then \
+ echo "$(Y2TOOL): not found."; \
echo "You have to install yast2-devtools to making a package"; \
false; \
fi
here=`pwd`; \
cd $(srcdir) && for i in $(RPMNAME)*.spec.in; do \
newname="`echo "$$i" | sed "s/\.in$$//g"`"; \
- $(PREFIX)/bin/y2tool create-spec < $$i > $$here/package/$${newname} ; \
+ $(Y2TOOL) create-spec < $$i > $$here/package/$${newname} ; \
done
-package: check-up-to-date check-tagversion check-all-packages package-local
+package: check-up-to-date check-tagversion check-all-packages check-textdomain package-local
-TAGVERSION = $(PREFIX)/bin/y2tool tagversion
+TAGVERSION = $(Y2TOOL) tagversion
check-up-to-date check-cvs-up-to-date check-svn-up-to-date:
if [ -d $(srcdir)/CVS ]; then \
@@ -198,10 +200,13 @@
false; \
fi
+check-textdomain:
+ $(Y2TOOL) check-textdomain $(srcdir)
+
stable: checkin-stable
checkin-stable: package
- $(PREFIX)/bin/y2tool checkin-stable
+ $(Y2TOOL) checkin-stable
# For po/ modules
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-vm-2.13.57/Makefile.am.common new/yast2-vm-2.13.58/Makefile.am.common
--- old/yast2-vm-2.13.57/Makefile.am.common 2006-06-16 23:48:16.000000000 +0200
+++ new/yast2-vm-2.13.58/Makefile.am.common 2006-06-27 09:57:30.000000000 +0200
@@ -9,7 +9,7 @@
# suffix mapping: info '(make)Static Usage'
# apply only to our modules, not external ones
${ybcfiles}: %.ybc: %.ycp $(ycpchook)
- Y2DIR=$(YCPC_Y2DIR) LD_LIBRARY_PATH=$(YCPC_LD_LIBRARY_PATH) $(bindir)/ycpc -c -M. -I. -q $(YCPCFLAGS) $<
+ Y2DIR=$(YCPC_Y2DIR) LD_LIBRARY_PATH=$(YCPC_LD_LIBRARY_PATH) ${YCPC} -c -M. -I. -q $(YCPCFLAGS) $<
# files to clean
CLEANFILES = ${ybcfiles}
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-vm-2.13.57/VERSION new/yast2-vm-2.13.58/VERSION
--- old/yast2-vm-2.13.57/VERSION 2006-06-16 23:47:50.000000000 +0200
+++ new/yast2-vm-2.13.58/VERSION 2006-06-27 09:49:14.000000000 +0200
@@ -1 +1 @@
-2.13.57
+2.13.58
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-vm-2.13.57/configure.in new/yast2-vm-2.13.58/configure.in
--- old/yast2-vm-2.13.57/configure.in 2006-06-16 23:48:16.000000000 +0200
+++ new/yast2-vm-2.13.58/configure.in 2006-06-27 09:57:30.000000000 +0200
@@ -1,9 +1,9 @@
dnl configure.in for yast2-vm
dnl
-dnl -- This file is generated by y2autoconf - DO NOT EDIT! --
+dnl -- This file is generated by y2autoconf 2.13.16 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-vm, 2.13.57, http://www.suse.de/feedback, yast2-vm)
+AC_INIT(yast2-vm, 2.13.58, http://bugs.opensuse.org/, yast2-vm)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -17,7 +17,7 @@
AM_INIT_AUTOMAKE(tar-ustar) dnl searches for some needed programs
dnl Important YaST2 variables
-VERSION="2.13.57"
+VERSION="2.13.58"
RPMNAME="yast2-vm"
MAINTAINER="Ladislav Slezak "
@@ -110,8 +110,8 @@
AC_MSG_ERROR(xgettext is missing; please install gettext-devel.)
fi
-devtools_ybindir=`pkg-config --variable=ybindir yast2-devtools`
-devtools_yast2dir=`pkg-config --variable=yast2dir yast2-devtools`
+devtools_ybindir=`pkg-config --print-errors --variable=ybindir yast2-devtools`
+devtools_yast2dir=`pkg-config --print-errors --variable=yast2dir yast2-devtools`
dnl producing pkg-config for others?
AM_CONDITIONAL(CREATE_PKGCONFIG, test "x${CREATE_PKGCONFIG}" != x)
@@ -138,6 +138,10 @@
if test "$YCPMAKEDEP" = "false"; then
AC_MSG_ERROR([ycpmakedep is not installed])
fi
+AC_PATH_PROG(YCPC, ycpc, false, $PATH:$bindir)
+if test "$YCPC" = "false"; then
+ AC_MSG_ERROR([ycpc is not installed])
+fi
( cd control;
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-vm-2.13.57/src/inst_vm_source.ycp new/yast2-vm-2.13.58/src/inst_vm_source.ycp
--- old/yast2-vm-2.13.57/src/inst_vm_source.ycp 2006-05-18 23:59:30.000000000 +0200
+++ new/yast2-vm-2.13.58/src/inst_vm_source.ycp 2006-06-27 09:58:11.000000000 +0200
@@ -6,7 +6,7 @@
*
* Purpose: Ask the user for installation source for the virtual machine.
*
- * $Id: inst_vm_source.ycp 31030 2006-05-18 21:59:22Z mgfritch $
+ * $Id: inst_vm_source.ycp 31682 2006-06-27 07:59:44Z lslezak $
*
*/
{
@@ -627,13 +627,15 @@
// check if selected installation source is valid
integer current = (integer) UI::QueryWidget (`id(`sources), `CurrentItem);
- y2milestone("sources: %1, current: %2", sources, current);
+ y2milestone("sources: %1", sources);
integer current_srcid = -1;
if (size(sources) > 0)
{
current_srcid = sources[current]:0;
}
+ y2milestone("current_srcid: %1", current_srcid);
+
symbol selected_type = (symbol)UI::QueryWidget(`id(`source), `CurrentButton);
string selected_custom_source = (string)UI::QueryWidget(`id(`custom_source), `Value);
string srcurl = "";
@@ -689,10 +691,97 @@
}*/
}
else if (ret == `inst_src) {
+ integer current = (integer) UI::QueryWidget (`id(`sources), `CurrentItem);
+
+ integer current_srcid = -1;
+ if (size(sources) > 0)
+ {
+ current_srcid = sources[current]:-1;
+ }
+
+ y2milestone("Selected source: %1", current_srcid);
+
+ // remember the sources
+ list<integer> sources_old = sources;
+
+
// start installation source configuration module
WFM::CallFunction("inst_source", []);
+
+
// refresh table content
sources = Pkg::SourceGetCurrent(false);
+ y2milestone("Configured sources: %1", sources);
+
+
+ // recreate the new sources to load the resolvables
+ list<map> new_sources = [];
+
+ foreach(integer src, sources,
+ {
+ if (!contains(sources_old, src))
+ {
+ map general_data = Pkg::SourceGeneralData(src);
+ string srcurl = general_data["url"]:"";
+ string product_dir = general_data["product_dir"]:"/";
+
+ new_sources = add(new_sources, $[ "id" : src, "url" : srcurl, "product_dir" : product_dir ]);
+ }
+ }
+ );
+
+ y2milestone("New sources: %1", new_sources);
+
+ // the recreated sources, inst_source doesn't call Pkg::SourceCreate(),
+ // the new sources are not fully initialized
+ list<integer> new_ids = [];
+
+ if (size(new_sources) > 0)
+ {
+ // initialize the new sources
+ foreach(map s, new_sources,
+ {
+ Pkg::SourceDelete(s["id"]:-1);
+
+ integer new_id = Pkg::SourceCreate(s["url"]:"", s["product_dir"]:"/");
+
+ if (new_id != nil && new_id > 0)
+ {
+ y2milestone("Created new source %1: %2", new_id, s["url"]:"");
+ new_ids = add(new_ids, new_id);
+ }
+ }
+
+ );
+
+ sources = Pkg::SourceGetCurrent(false);
+ }
+
+ // the current selected source is missing
+ if (!contains(sources, current_srcid))
+ {
+ y2milestone("Previously selected source %1 is not available (%2)", current_srcid, sources);
+
+ // exactly one new source, suppose the ID has changed
+ if (size(new_ids) == 1)
+ {
+ integer src = new_ids[0]:0;
+ y2milestone("Using new source ID %1 instead of %2", src , current_srcid);
+
+ // select the source
+ sconfig["source_id"] = src;
+ // refresh list
+ sources = Pkg::SourceGetCurrent(false);
+ }
+ else
+ {
+ // reset config, the current source is not valid
+ // TODO: display a warning popup - "The installation source is not available."
+ VM::ResetSource();
+ sconfig = VM::GetSourceConfig();
+ }
+ }
+
fill_table();
}
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit-unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit-help@opensuse.org