Author: jsrain
Date: Mon Aug 25 10:29:55 2008
New Revision: 50349
URL: http://svn.opensuse.org/viewcvs/yast?rev=50349&view=rev
Log:
initial commit for a hackweek project
Added:
branches/tmp/jsrain/config-history/
branches/tmp/jsrain/config-history/.cvsignore
branches/tmp/jsrain/config-history/MAINTAINER
branches/tmp/jsrain/config-history/Makefile.cvs
branches/tmp/jsrain/config-history/RPMNAME
branches/tmp/jsrain/config-history/VERSION
branches/tmp/jsrain/config-history/agents/
branches/tmp/jsrain/config-history/agents/.cvsignore
branches/tmp/jsrain/config-history/agents/Makefile.am
branches/tmp/jsrain/config-history/configure.in.in
branches/tmp/jsrain/config-history/doc/
branches/tmp/jsrain/config-history/doc/.cvsignore
branches/tmp/jsrain/config-history/doc/Makefile.am
branches/tmp/jsrain/config-history/doc/autodocs/
branches/tmp/jsrain/config-history/doc/autodocs/.cvsignore
branches/tmp/jsrain/config-history/doc/autodocs/Makefile.am
branches/tmp/jsrain/config-history/package/
branches/tmp/jsrain/config-history/package/.cvsignore
branches/tmp/jsrain/config-history/package/yast2-config-history.changes
branches/tmp/jsrain/config-history/src/
branches/tmp/jsrain/config-history/src/.cvsignore
branches/tmp/jsrain/config-history/src/ConfigHistory.ycp
branches/tmp/jsrain/config-history/src/Makefile.am
branches/tmp/jsrain/config-history/yast2-config-history.spec.in
Added: branches/tmp/jsrain/config-history/.cvsignore
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/jsrain/config-history/.cvsignore?rev=50349&view=auto
==============================================================================
--- branches/tmp/jsrain/config-history/.cvsignore (added)
+++ branches/tmp/jsrain/config-history/.cvsignore Mon Aug 25 10:29:55 2008
@@ -0,0 +1,20 @@
+Makefile
+Makefile.am
+Makefile.am.common
+Makefile.in
+aclocal.m4
+config.cache
+config.guess
+config.h.in
+config.log
+config.status
+config.sub
+configure
+configure.in
+depcomp
+install-sh
+missing
+mkinstalldirs
+stamp-h
+config-history.pot
+autom4te.cache
Added: branches/tmp/jsrain/config-history/MAINTAINER
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/jsrain/config-history/MAINTAINER?rev=50349&view=auto
==============================================================================
--- branches/tmp/jsrain/config-history/MAINTAINER (added)
+++ branches/tmp/jsrain/config-history/MAINTAINER Mon Aug 25 10:29:55 2008
@@ -0,0 +1 @@
+Jiri Srain
Added: branches/tmp/jsrain/config-history/Makefile.cvs
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/jsrain/config-history/Makefile.cvs?rev=50349&view=auto
==============================================================================
--- branches/tmp/jsrain/config-history/Makefile.cvs (added)
+++ branches/tmp/jsrain/config-history/Makefile.cvs Mon Aug 25 10:29:55 2008
@@ -0,0 +1,22 @@
+#
+# Makefile.cvs
+#
+PREFIX = /usr
+
+LIB = $(shell y2tool get-lib)
+
+configure: all
+ ./configure --prefix=$(PREFIX) --libdir=$(PREFIX)/$(LIB)
+
+all:
+ y2tool y2autoconf
+ y2tool y2automake
+ autoreconf --force --install
+
+install: configure
+ make
+ make install
+
+reconf: all
+ ./config.status --recheck
+ ./config.status
Added: branches/tmp/jsrain/config-history/RPMNAME
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/jsrain/config-history/RPMNAME?rev=50349&view=auto
==============================================================================
--- branches/tmp/jsrain/config-history/RPMNAME (added)
+++ branches/tmp/jsrain/config-history/RPMNAME Mon Aug 25 10:29:55 2008
@@ -0,0 +1 @@
+yast2-config-history
Added: branches/tmp/jsrain/config-history/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/jsrain/config-history/VERSION?rev=50349&view=auto
==============================================================================
--- branches/tmp/jsrain/config-history/VERSION (added)
+++ branches/tmp/jsrain/config-history/VERSION Mon Aug 25 10:29:55 2008
@@ -0,0 +1 @@
+2.15.0
Added: branches/tmp/jsrain/config-history/agents/.cvsignore
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/jsrain/config-history/agents/.cvsignore?rev=50349&view=auto
==============================================================================
--- branches/tmp/jsrain/config-history/agents/.cvsignore (added)
+++ branches/tmp/jsrain/config-history/agents/.cvsignore Mon Aug 25 10:29:55 2008
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
Added: branches/tmp/jsrain/config-history/agents/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/jsrain/config-history/agents/Makefile.am?rev=50349&view=auto
==============================================================================
--- branches/tmp/jsrain/config-history/agents/Makefile.am (added)
+++ branches/tmp/jsrain/config-history/agents/Makefile.am Mon Aug 25 10:29:55 2008
@@ -0,0 +1,7 @@
+# Makefile.am for config-history/agents
+
+agent_SCRIPTS =
+
+scrconf_DATA =
+
+EXTRA_DIST = $(agent_SCRIPTS) $(scrconf_DATA)
Added: branches/tmp/jsrain/config-history/configure.in.in
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/jsrain/config-history/configure.in.in?rev=50349&view=auto
==============================================================================
--- branches/tmp/jsrain/config-history/configure.in.in (added)
+++ branches/tmp/jsrain/config-history/configure.in.in Mon Aug 25 10:29:55 2008
@@ -0,0 +1,12 @@
+## YCP module configure.in.in
+
+## Initialize
+@YAST2-INIT-COMMON@
+@YAST2-INIT-YCP@
+
+## some common checks
+@YAST2-CHECKS-COMMON@
+@YAST2-CHECKS-YCP@
+
+## and generate the output...
+@YAST2-OUTPUT@
Added: branches/tmp/jsrain/config-history/doc/.cvsignore
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/jsrain/config-history/doc/.cvsignore?rev=50349&view=auto
==============================================================================
--- branches/tmp/jsrain/config-history/doc/.cvsignore (added)
+++ branches/tmp/jsrain/config-history/doc/.cvsignore Mon Aug 25 10:29:55 2008
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
Added: branches/tmp/jsrain/config-history/doc/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/jsrain/config-history/doc/Makefile.am?rev=50349&view=auto
==============================================================================
--- branches/tmp/jsrain/config-history/doc/Makefile.am (added)
+++ branches/tmp/jsrain/config-history/doc/Makefile.am Mon Aug 25 10:29:55 2008
@@ -0,0 +1,10 @@
+# Makefile.am for config-history/doc
+
+SUBDIRS = autodocs
+
+htmldir = $(docdir)
+
+doc_DATA =
+html_DATA =
+
+EXTRA_DIST = $(doc_DATA) $(html_DATA)
Added: branches/tmp/jsrain/config-history/doc/autodocs/.cvsignore
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/jsrain/config-history/doc/autodocs/.cvsignore?rev=50349&view=auto
==============================================================================
--- branches/tmp/jsrain/config-history/doc/autodocs/.cvsignore (added)
+++ branches/tmp/jsrain/config-history/doc/autodocs/.cvsignore Mon Aug 25 10:29:55 2008
@@ -0,0 +1,3 @@
+Makefile
+Makefile.in
+*.html
Added: branches/tmp/jsrain/config-history/doc/autodocs/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/jsrain/config-history/doc/autodocs/Makefile.am?rev=50349&view=auto
==============================================================================
--- branches/tmp/jsrain/config-history/doc/autodocs/Makefile.am (added)
+++ branches/tmp/jsrain/config-history/doc/autodocs/Makefile.am Mon Aug 25 10:29:55 2008
@@ -0,0 +1,3 @@
+# Makefile.am for config-history/doc/autodocs
+
+include $(top_srcdir)/autodocs-ycp.ami
Added: branches/tmp/jsrain/config-history/package/.cvsignore
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/jsrain/config-history/package/.cvsignore?rev=50349&view=auto
==============================================================================
--- branches/tmp/jsrain/config-history/package/.cvsignore (added)
+++ branches/tmp/jsrain/config-history/package/.cvsignore Mon Aug 25 10:29:55 2008
@@ -0,0 +1,2 @@
+*.spec
+*.bz2
Added: branches/tmp/jsrain/config-history/package/yast2-config-history.changes
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/jsrain/config-history/package/yast2-config-history.changes?rev=50349&view=auto
==============================================================================
--- branches/tmp/jsrain/config-history/package/yast2-config-history.changes (added)
+++ branches/tmp/jsrain/config-history/package/yast2-config-history.changes Mon Aug 25 10:29:55 2008
@@ -0,0 +1,4 @@
+-------------------------------------------------------------------
+Mon Aug 25 10:27:06 2008 - jsrain@suse.cz
+
+- initial version
Added: branches/tmp/jsrain/config-history/src/.cvsignore
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/jsrain/config-history/src/.cvsignore?rev=50349&view=auto
==============================================================================
--- branches/tmp/jsrain/config-history/src/.cvsignore (added)
+++ branches/tmp/jsrain/config-history/src/.cvsignore Mon Aug 25 10:29:55 2008
@@ -0,0 +1,4 @@
+Makefile
+Makefile.in
+*.ybc
+.dep
Added: branches/tmp/jsrain/config-history/src/ConfigHistory.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/jsrain/config-history/src/ConfigHistory.ycp?rev=50349&view=auto
==============================================================================
--- branches/tmp/jsrain/config-history/src/ConfigHistory.ycp (added)
+++ branches/tmp/jsrain/config-history/src/ConfigHistory.ycp Mon Aug 25 10:29:55 2008
@@ -0,0 +1,323 @@
+/* ------------------------------------------------------------------------------
+ * Copyright (c) 2006 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: modules/ConfigHistory.ycp
+ * Package: Configuration of config-history
+ * Summary: ConfigHistory settings, input and output functions
+ * Authors: Jiri Srain
+ *
+ * $Id: ConfigHistory.ycp 41350 2007-10-10 16:59:00Z dfiser $
+ *
+ * Representation of the configuration of config-history.
+ * Input and output routines.
+ */
+
+{
+
+module "ConfigHistory";
+textdomain "config-history";
+
+import "Progress";
+import "Report";
+import "Summary";
+import "Message";
+
+/**
+ * Prototypes
+ */
+global boolean Modified();
+
+/**
+ * Data was modified?
+ */
+boolean modified = false;
+
+/**
+ */
+boolean proposal_valid = false;
+
+/**
+ * Write only, used during autoinstallation.
+ * Don't run services and SuSEconfig, it's all done at one place.
+ */
+boolean write_only = false;
+
+/**
+ * Abort function
+ * return boolean return true if abort
+ */
+boolean() AbortFunction = Modified;
+
+/**
+ * Abort function
+ * @return boolean return true if abort
+ */
+global define boolean Abort() ``{
+ if(AbortFunction != nil)
+ {
+ return AbortFunction () == true;
+ }
+ return false;
+}
+
+/**
+ * Data was modified?
+ * @return true if modified
+ */
+global boolean Modified() {
+ y2debug("modified=%1",modified);
+ return modified;
+}
+
+/**
+ * Mark as modified, for Autoyast.
+ */
+global void SetModified(boolean value) {
+ modified = true;
+ }
+
+global boolean ProposalValid() {
+ return proposal_valid;
+}
+
+global void SetProposalValid(boolean value) {
+ proposal_valid = value;
+}
+
+/**
+ * @return true if module is marked as "write only" (don't start services etc...)
+ */
+global boolean WriteOnly() {
+ return write_only;
+}
+
+/**
+ * Set write_only flag (for autoinstalation).
+ */
+global void SetWriteOnly(boolean value) {
+ write_only = value;
+}
+
+
+global void SetAbortFunction(boolean() function) {
+ AbortFunction = function;
+}
+
+
+// Settings: Define all variables needed for configuration of config-history
+// TODO FIXME: Define all the variables necessary to hold
+// TODO FIXME: the configuration here (with the appropriate
+// TODO FIXME: description)
+// TODO FIXME: For example:
+// /**
+// * List of the configured cards.
+// */
+// list cards = [];
+//
+// /**
+// * Some additional parameter needed for the configuration.
+// */
+// boolean additional_parameter = true;
+
+/**
+ * Read all config-history settings
+ * @return true on success
+ */
+global boolean Read() {
+
+ /* ConfigHistory read dialog caption */
+ string caption = _("Initializing config-history Configuration");
+
+ // TODO FIXME Set the right number of stages
+ integer steps = 4;
+
+ integer sl = 500;
+ sleep(sl);
+
+ // TODO FIXME Names of real stages
+ // We do not set help text here, because it was set outside
+ Progress::New( caption, " ", steps, [
+ /* Progress stage 1/3 */
+ _("Read the database"),
+ /* Progress stage 2/3 */
+ _("Read the previous settings"),
+ /* Progress stage 3/3 */
+ _("Detect the devices")
+ ], [
+ /* Progress step 1/3 */
+ _("Reading the database..."),
+ /* Progress step 2/3 */
+ _("Reading the previous settings..."),
+ /* Progress step 3/3 */
+ _("Detecting the devices..."),
+ /* Progress finished */
+ _("Finished")
+ ],
+ ""
+ );
+
+ // read database
+ if(Abort()) return false;
+ Progress::NextStage();
+ /* Error message */
+ if(false) Report::Error(_("Cannot read database1."));
+ sleep(sl);
+
+ // read another database
+ if(Abort()) return false;
+ Progress::NextStep();
+ /* Error message */
+ if(false) Report::Error(_("Cannot read database2."));
+ sleep(sl);
+
+ // read current settings
+ if(Abort()) return false;
+ Progress::NextStage();
+ /* Error message */
+ if(false) Report::Error(Message::CannotReadCurrentSettings());
+ sleep(sl);
+
+ // detect devices
+ if(Abort()) return false;
+ Progress::NextStage();
+ /* Error message */
+ if(false) Report::Warning(_("Cannot detect devices."));
+ sleep(sl);
+
+ if(Abort()) return false;
+ /* Progress finished */
+ Progress::NextStage();
+ sleep(sl);
+
+ if(Abort()) return false;
+ modified = false;
+ return true;
+}
+
+/**
+ * Write all config-history settings
+ * @return true on success
+ */
+global boolean Write() {
+
+ /* ConfigHistory read dialog caption */
+ string caption = _("Saving config-history Configuration");
+
+ // TODO FIXME And set the right number of stages
+ integer steps = 2;
+
+ integer sl = 500;
+ sleep(sl);
+
+ // TODO FIXME Names of real stages
+ // We do not set help text here, because it was set outside
+ Progress::New(caption, " ", steps, [
+ /* Progress stage 1/2 */
+ _("Write the settings"),
+ /* Progress stage 2/2 */
+ _("Run SuSEconfig")
+ ], [
+ /* Progress step 1/2 */
+ _("Writing the settings..."),
+ /* Progress step 2/2 */
+ _("Running SuSEconfig..."),
+ /* Progress finished */
+ _("Finished")
+ ],
+ ""
+ );
+
+ // write settings
+ if(Abort()) return false;
+ Progress::NextStage();
+ /* Error message */
+ if(false) Report::Error (_("Cannot write settings."));
+ sleep(sl);
+
+ // run SuSEconfig
+ if(Abort()) return false;
+ Progress::NextStage ();
+ /* Error message */
+ if(false) Report::Error (Message::SuSEConfigFailed());
+ sleep(sl);
+
+ if(Abort()) return false;
+ /* Progress finished */
+ Progress::NextStage();
+ sleep(sl);
+
+ if(Abort()) return false;
+ return true;
+}
+
+/**
+ * Get all config-history settings from the first parameter
+ * (For use by autoinstallation.)
+ * @param settings The YCP structure to be imported.
+ * @return boolean True on success
+ */
+global boolean Import (map settings) {
+ // TODO FIXME: your code here (fill the above mentioned variables)...
+ return true;
+}
+
+/**
+ * Dump the config-history settings to a single map
+ * (For use by autoinstallation.)
+ * @return map Dumped settings (later acceptable by Import ())
+ */
+global map Export () {
+ // TODO FIXME: your code here (return the above mentioned variables)...
+ return $[];
+}
+
+/**
+ * Create a textual summary and a list of unconfigured cards
+ * @return summary of the current configuration
+ */
+global list Summary() {
+ // TODO FIXME: your code here...
+ /* Configuration summary text for autoyast */
+ return [ _("Configuration summary..."), [] ];
+}
+
+/**
+ * Create an overview table with all configured cards
+ * @return table items
+ */
+global list Overview() {
+ // TODO FIXME: your code here...
+ return [];
+}
+
+/**
+ * Return packages needed to be installed and removed during
+ * Autoinstallation to insure module has all needed software
+ * installed.
+ * @return map with 2 lists.
+ */
+global map AutoPackages() {
+ // TODO FIXME: your code here...
+ return $[ "install":[], "remove":[] ];
+}
+
+/* EOF */
+}
Added: branches/tmp/jsrain/config-history/src/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/jsrain/config-history/src/Makefile.am?rev=50349&view=auto
==============================================================================
--- branches/tmp/jsrain/config-history/src/Makefile.am (added)
+++ branches/tmp/jsrain/config-history/src/Makefile.am Mon Aug 25 10:29:55 2008
@@ -0,0 +1,15 @@
+# Makefile.am for config-history/src
+
+yncludedir = @yncludedir@/config-history
+
+module_DATA = \
+ ConfigHistory.ycp
+
+# create a symlink for local build, #145327
+config-history:
+ ln -sf . $@
+ycpchook = config-history
+
+EXTRA_DIST = $(module_DATA)
+
+include $(top_srcdir)/Makefile.am.common
Added: branches/tmp/jsrain/config-history/yast2-config-history.spec.in
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/jsrain/config-history/yast2-config-history.spec.in?rev=50349&view=auto
==============================================================================
--- branches/tmp/jsrain/config-history/yast2-config-history.spec.in (added)
+++ branches/tmp/jsrain/config-history/yast2-config-history.spec.in Mon Aug 25 10:29:55 2008
@@ -0,0 +1,31 @@
+@HEADER-COMMENT@
+
+@HEADER@
+Requires: yast2
+BuildRequires: perl-XML-Writer update-desktop-files yast2 yast2-devtools yast2-testsuite
+
+BuildArchitectures: noarch
+
+Summary: Configuration of config-history
+
+%description
+-
+
+@PREP@
+
+@BUILD@
+
+@INSTALL@
+
+@CLEAN@
+
+%files
+%defattr(-,root,root)
+%dir @yncludedir@/config-history
+@yncludedir@/config-history/*
+@clientdir@/config-history.ycp
+@clientdir@/config-history_*.ycp
+@moduledir@/ConfigHistory.*
+@moduledir@/ConfigHistory2.*
+@desktopdir@/config-history.desktop
+%doc @docdir@
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org