Hello community,
here is the log from the commit of package yast2-add-on-creator
checked in at Fri Apr 6 00:14:11 CEST 2007.
--------
--- yast2-add-on-creator/yast2-add-on-creator.changes 2007-03-06 13:44:30.000000000 +0100
+++ /mounts/work_src_done/NOARCH/yast2-add-on-creator/yast2-add-on-creator.changes 2007-04-05 10:42:16.147547000 +0200
@@ -1,0 +2,9 @@
+Thu Apr 5 10:27:32 CEST 2007 - jsuchome@suse.cz
+
+- added basic Export functionality to support calls from other
+ modules (F301945)
+- added command line interface (F302049)
+- report error if gpg fails (#260588)
+- 2.15.3
+
+-------------------------------------------------------------------
Old:
----
yast2-add-on-creator-2.15.2.tar.bz2
New:
----
yast2-add-on-creator-2.15.3.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-add-on-creator.spec ++++++
--- /var/tmp/diff_new_pack.a27760/_old 2007-04-06 00:13:55.000000000 +0200
+++ /var/tmp/diff_new_pack.a27760/_new 2007-04-06 00:13:55.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-add-on-creator (Version 2.15.2)
+# spec file for package yast2-add-on-creator (Version 2.15.3)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,12 +11,12 @@
# norootforbuild
Name: yast2-add-on-creator
-Version: 2.15.2
+Version: 2.15.3
Release: 1
License: GNU General Public License (GPL)
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-add-on-creator-2.15.2.tar.bz2
+Source0: yast2-add-on-creator-2.15.3.tar.bz2
prefix: /usr
Requires: yast2
BuildRequires: perl-XML-Writer update-desktop-files yast2 yast2-devtools yast2-testsuite
@@ -33,7 +33,7 @@
Jiř� Suchomel
%prep
-%setup -n yast2-add-on-creator-2.15.2
+%setup -n yast2-add-on-creator-2.15.3
%build
%{prefix}/bin/y2tool y2autoconf
@@ -60,7 +60,7 @@
%defattr(-,root,root)
%dir /usr/share/YaST2/include/add-on-creator
/usr/share/YaST2/include/add-on-creator/*
-/usr/share/YaST2/clients/add-on-creator.ycp
+/usr/share/YaST2/clients/add-on-creator*.ycp
/usr/share/YaST2/modules/AddOnCreator.*
%{prefix}/share/applications/YaST2/add-on-creator.desktop
#agents:
@@ -69,6 +69,12 @@
%doc %{prefix}/share/doc/packages/yast2-add-on-creator
%changelog
+* Thu Apr 05 2007 - jsuchome@suse.cz
+- added basic Export functionality to support calls from other
+ modules (F301945)
+- added command line interface (F302049)
+- report error if gpg fails (#260588)
+- 2.15.3
* Tue Mar 06 2007 - jsuchome@suse.cz
- do not allow special characters in pattern names (#251317)
- 2.15.2
++++++ yast2-add-on-creator-2.15.2.tar.bz2 -> yast2-add-on-creator-2.15.3.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-add-on-creator-2.15.2/src/add-on-creator_auto.ycp new/yast2-add-on-creator-2.15.3/src/add-on-creator_auto.ycp
--- old/yast2-add-on-creator-2.15.2/src/add-on-creator_auto.ycp 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-add-on-creator-2.15.3/src/add-on-creator_auto.ycp 2007-04-05 10:28:36.000000000 +0200
@@ -0,0 +1,107 @@
+/* ------------------------------------------------------------------------------
+ * 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: clients/add-on-creator_auto.ycp
+ * Package: Configuration of add-on-creator
+ * Summary: Client for autoinstallation
+ * Authors: Jiri Suchomel
+ *
+ * $Id: add-on-creator_auto.ycp 37317 2007-04-05 07:28:16Z jsuchome $
+ *
+ * This is a client for autoinstallation. It takes its arguments,
+ * goes through the configuration and return the setting.
+ * Does not do any changes to the configuration.
+ */
+
+/**
+ * @param function to execute
+ * @param map/list of add-on-creator settings
+ * @return map edited settings, Summary or boolean on success depending on called function
+ * @example map mm = $[ "FAIL_DELAY" : "77" ];
+ * @example map ret = WFM::CallFunction ("add-on-creator_auto", [ "Summary", mm ]);
+ */
+
+{
+
+textdomain "add-on-creator";
+
+y2milestone("----------------------------------------");
+y2milestone("AddOnCreator auto started");
+
+import "AddOnCreator";
+include "add-on-creator/wizards.ycp";
+
+any ret = nil;
+string func = "";
+map param = $[];
+
+/* Check arguments */
+if(size(WFM::Args()) > 0 && is(WFM::Args(0), string)) {
+ func = (string)WFM::Args(0);
+ if(size(WFM::Args()) > 1 && is(WFM::Args(1), map))
+ param = (map) WFM::Args(1);
+}
+y2debug("func=%1", func);
+y2debug("param=%1", param);
+
+/* Reset configuration */
+if (func == "Reset") {
+ AddOnCreator::Import($[]);
+ ret = $[];
+}
+/* Import configuration */
+else if (func == "Import") {
+ ret = AddOnCreator::Import(param);
+}
+/* Return actual state */
+else if (func == "Export") {
+ ret = AddOnCreator::Export();
+}
+
+/* Read current state */
+else if (func == "Read") {
+ import "Progress";
+ boolean progress_orig = Progress::set (false);
+ ret = AddOnCreator::Read();
+ Progress::set (progress_orig);
+}
+/* Write givven settings */
+else if (func == "Write") {
+ import "Progress";
+ boolean progress_orig = Progress::set (false);
+// AddOnCreator::write_only = true;
+ ret = AddOnCreator::Write();
+ Progress::set (progress_orig);
+}
+/* Unknown function */
+else {
+ y2error("Unknown function: %1", func);
+ ret = false;
+}
+
+y2debug("ret=%1", ret);
+y2milestone("AddOnCreator auto finished");
+y2milestone("----------------------------------------");
+
+return ret;
+
+/* EOF */
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-add-on-creator-2.15.2/src/add-on-creator.ycp new/yast2-add-on-creator-2.15.3/src/add-on-creator.ycp
--- old/yast2-add-on-creator-2.15.2/src/add-on-creator.ycp 2007-01-31 09:02:52.000000000 +0100
+++ new/yast2-add-on-creator-2.15.3/src/add-on-creator.ycp 2007-04-05 10:26:57.000000000 +0200
@@ -41,11 +41,255 @@
y2milestone ("----------------------------------------");
y2milestone ("AddOnCreator module started");
+import "AddOnCreator";
import "CommandLine";
+import "Directory";
+import "FileUtils";
import "PackageSystem";
include "add-on-creator/wizards.ycp";
+void ReportMissingFile (string file) {
+ // error message, %1 is path
+ Report::Error (sformat (_("File %1 does not exists"), file));
+}
+
+void ReportMissingDir (string dir) {
+ // error message, %1 is path
+ Report::Error (sformat (_("Directory %1 does not exists"), dir));
+}
+
+/**
+ * General function for creating new add-on
+ */
+boolean Create (map options ) {
+
+y2internal ("options: %1", options);
+
+ if (!haskey (options, "output_dir"))
+ {
+ // error message
+ Report::Error (_("Path to output directory is missing."));
+ return false;
+ }
+ else
+ AddOnCreator::base_output_path = options["output_dir"]:"";
+
+ // now we can import different content file if it was provided
+ if (haskey (options, "content"))
+ {
+ string file = options["content"]:"";
+ if (FileUtils::Exists (file))
+ {
+ list<map> content = AddOnCreator::ReadContentFile (file);
+ if (content != nil)
+ {
+ AddOnCreator::content = content;
+ AddOnCreator::UpdateContentMap ();
+ }
+ }
+ else
+ {
+ ReportMissingFile (file);
+ if (!AddOnCreator::clone)
+ return false;
+ }
+ }
+ if (haskey (options, "package_descriptions_dir"))
+ {
+ string dir = options["package_descriptions_dir"]:"";
+ if (FileUtils::Exists (dir))
+ {
+ // find all packages.langcode in dir and import them
+ map out = (map) SCR::Execute (.target.bash_output,
+ sformat ("ls -A1 %1/packages.* 2>/dev/null", dir));
+ foreach (string file, splitstring (out["stdout"]:"", "\n"), {
+ list f = splitstring (file, ".");
+ string lang = f[size(f)-1]:"en";
+ if (file == "" || lang == "DU") return;
+ AddOnCreator::packages_descr[lang] = AddOnCreator::ReadPackagesFile (file);
+ });
+ }
+ else
+ {
+ ReportMissingDir (dir);
+ }
+ }
+ if (haskey (options, "patterns_dir"))
+ {
+ string dir = options["patterns_dir"]:"";
+ if (FileUtils::Exists (dir))
+ {
+ // find all packages.langcode in dir and import them
+ map out = (map) SCR::Execute (.target.bash_output,
+ sformat ("ls -A1 %1/*.pat 2>/dev/null", dir));
+ foreach (string f, splitstring(out["stdout"]:"", "\n"), {
+ if (f == "") return;
+ map pat = AddOnCreator::ReadPatternFile (f);
+ if (pat != $[])
+ {
+ list<string> pt = splitstring (pat["Pat"]:"", " ");
+ string name = pt[0]:"";
+ if (name != "")
+ {
+ pat["name"] = name;
+ pat["version"] = pt[1]:"";
+ pat["release"] = pt[2]:"";
+ pat["arch"] = pt[3]:"";
+ AddOnCreator::patterns[name] = pat;
+ }
+ }
+ });
+ }
+ else
+ {
+ ReportMissingDir (dir);
+ }
+ }
+ AddOnCreator::iso = haskey (options, "create_iso");
+ if (haskey (options, "iso_name"))
+ {
+ AddOnCreator::iso = true;
+ AddOnCreator::iso_name = options["iso_name"]:"";
+ }
+
+ if (haskey (options, "license"))
+ {
+ string file = options["license"]:"";
+ if (!FileUtils::Exists ("/usr/bin/unzip"))
+ {
+ // error message, missing tool
+ Report::Error (_("/usr/bin/unzip does not exists"));
+ }
+ else if (FileUtils::Exists (file))
+ {
+ string tmpdir = Directory::tmpdir;
+ SCR::Execute (.target.bash_output,
+ sformat ("/usr/bin/unzip -o %1 -d %2", file, tmpdir));
+ map out = (map) SCR::Execute (.target.bash_output,
+ sformat ("ls -A1 %1/license*.txt 2>/dev/null", tmpdir));
+ foreach (string f, splitstring(out["stdout"]:"", "\n"), {
+ if (f == "") return;
+ string name = substring (f, findlastof (f, "/") + 1);
+ if (issubstring (name, ".txt"))
+ name = regexpsub (name, "^(.*)\.txt$", "\\1");
+ y2milestone ("Importing license file '%1'", f);
+ AddOnCreator::license_files[name] = (string) SCR::Read (.target.string, f);
+ });
+ }
+ else
+ {
+ ReportMissingFile (file);
+ }
+ }
+
+ if (haskey (options, "workflow"))
+ {
+ string file = options["workflow"]:"";
+ if (FileUtils::Exists (file))
+ {
+ AddOnCreator::workflow_path = file;
+ }
+ else
+ {
+ ReportMissingFile (file);
+ }
+ }
+
+ if (haskey (options, "y2update"))
+ {
+ string file = options["y2update"]:"";
+ if (FileUtils::Exists (file))
+ {
+ AddOnCreator::y2update_path = file;
+ }
+ else
+ {
+ ReportMissingFile (file);
+ }
+ }
+ else if (haskey (options, "y2update_packages_dir"))
+ {
+ string dir = options["y2update"]:"";
+ if (FileUtils::Exists (dir))
+ {
+ map out = (map) SCR::Execute (.target.bash_output,
+ sformat ("ls -A1 %1/*.rpm 2>/dev/null", dir));
+ AddOnCreator::y2update_packages = filter (string f, splitstring(out["stdout"]:"", "\n"),
+ ``(f != ""));
+ }
+ else
+ {
+ ReportMissingDir (dir);
+ }
+ }
+
+ if (haskey (options, "gpg_key"))
+ AddOnCreator::gpg_key = options["gpg_key"]:AddOnCreator::gpg_key;
+ if (haskey (options, "passphrase"))
+ AddOnCreator::passphrase = options["passphrase"]:"";
+ else if (haskey (options, "passphrase_file"))
+ {
+ string file = options["passphrase_file"]:"";
+ if (FileUtils::Exists (file))
+ {
+ string passphrase = (string) SCR::Read (.target.string, file);
+ if (passphrase != nil) AddOnCreator::passphrase = passphrase;
+ }
+ else
+ {
+ ReportMissingFile (file);
+ }
+ }
+ else
+ AddOnCreator::passphrase =
+ // question on command line
+ CommandLine::PasswordInput(sformat (_("Passphrase for key %1:"),AddOnCreator::gpg_key));
+ return true;
+}
+
+/**
+ * Command line handler for creating new add-on from scratch
+ */
+boolean CreateAddOn (map options) {
+
+ AddOnCreator::clone = false;
+ AddOnCreator::rpm_path = options["rpm_dir"]:"";
+ if (AddOnCreator::rpm_path == "")
+ {
+ // error message
+ Report::Error (_("Path to directory with packages is missing."));
+ return false;
+ }
+ if (!haskey (options, "content"))
+ {
+ // error message
+ Report::Error (_("Path to content file is missing."));
+ return false;
+ }
+ AddOnCreator::FillContentDefaults ();
+ return Create (options);
+}
+
+/**
+ * Command line handler for clonig existing add-on
+ */
+boolean CloneAddOn (map options) {
+
+ AddOnCreator::clone = true;
+ AddOnCreator::import_path = options["existing"]:"";
+ if (AddOnCreator::import_path == "")
+ {
+ // error message
+ Report::Error (_("Path to existing Add-On is missing."));
+ return false;
+ }
+ AddOnCreator::generate_descriptions = options["generate_descriptions"]:false;
+ AddOnCreator::ImportExistingProduct (AddOnCreator::import_path);
+ AddOnCreator::FillContentDefaults (); // TODO not necessary when content is provided?
+ return Create (options);
+}
+
map cmdline_description = $[
"id" : "add-on-creator",
// Command line help text for the add-on-creator module
@@ -54,10 +298,107 @@
"initialize" : AddOnCreator::Read,
"finish" : AddOnCreator::Write,
"actions" : $[
+ "create" : $[
+ "handler" : CreateAddOn,
+ // command line help text for 'create' action
+ "help" : _("Create new Add-On Product"),
+ ],
+ "clone" : $[
+ "handler" : CloneAddOn,
+ // command line help text for 'create' action
+ "help" : _("Create an Add-On Product based on an existing one"),
+ ],
],
"options" : $[
+ "rpm_dir" : $[
+ // command line help text for 'rpm_dir' option
+ "help" : _("Path to directory with packages"),
+ "type" : "string"
+ ],
+ "content" : $[
+ // command line help text for 'content' option (do not translate 'content', it's a name)
+ "help" : _("Path to content file"),
+ "type" : "string"
+ ],
+ "existing" : $[
+ // command line help text for 'existing' option
+ "help" : _("Path to directory with existing Add-On Product"),
+ "type" : "string"
+ ],
+ "generate_descriptions" : $[
+ // command line help text for 'generate_descriptions' option
+ "help" : _("Generate new package descriptions (do not copy)"),
+ ],
+ "package_descriptions_dir" : $[
+ // command line help text for 'package_descriptions_dir' option
+ "help" : _("Path to directory with package descriptions"),
+ "type" : "string"
+ ],
+ "patterns_dir" : $[
+ // command line help text for 'patterns_dir' option
+ "help" : _("Path to directory with patterns definitions"),
+ "type" : "string"
+ ],
+ "output_dir" : $[
+ // command line help text for 'output_dir' option
+ "help" : _("Path to the output directory"),
+ "type" : "string"
+ ],
+ "create_iso" : $[
+ // command line help text for 'create_iso' option
+ "help" : _("Create the ISO image"),
+ ],
+ "iso_name" : $[
+ // command line help text for 'iso_name' option
+ "help" : _("Name of the output ISO image"),
+ "type" : "string",
+ ],
+ "gpg_key" : $[
+ // command line help text for 'gpg_key' option
+ "help" : _("GPG key ID used to sign a product"),
+ "type" : "string",
+ ],
+ "passphrase" : $[
+ // command line help text for 'passphrase' option
+ "help" : _("Passphrase to unlock GPG key"),
+ "type" : "string",
+ ],
+ "passphrase_file" : $[
+ // command line help text for 'passphrase_file' option
+ "help" : _("Path to file with the passphrase for GPG key"),
+ "type" : "string",
+ ],
+ "workflow" : $[
+ // command line help text for 'workflow' option
+ "help" : _("Path to workflow definition file (installation.xml)"),
+ "type" : "string",
+ ],
+ "y2update" : $[
+ // command line help text for 'y2update' option
+ "help" : _("Path to workflow dialogs archive (y2update.tgz)"),
+ "type" : "string",
+ ],
+ "y2update_packages_dir" : $[
+ // command line help text for 'y2update_packages_dir' option
+ "help" : _("Path to directory with YaST packages to form the workflow"),
+ "type" : "string",
+ ],
+ "license" : $[
+ // command line help text for 'license' option
+ "help" : _("Path to file with license texts (license.zip)"),
+ "type" : "string",
+ ]
],
"mappings" : $[
+ "create" : [ "content", "rpm_dir", "package_descriptions_dir",
+ "patterns_dir", "output_dir", "create_iso", "iso_name", "gpg_key", "passphrase",
+ "passphrase_file", "workflow", "y2update", "y2update_packages_dir", "license"
+ ],
+ "clone" : [ "existing", "generate_descriptions", "content",
+ "package_descriptions_dir", "patterns_dir", "output_dir", "create_iso", "iso_name",
+ "gpg_key", "passphrase", "passphrase_file", "workflow", "y2update",
+ "y2update_packages_dir", "license"
+ ]
]
];
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-add-on-creator-2.15.2/src/AddOnCreator.ycp new/yast2-add-on-creator-2.15.3/src/AddOnCreator.ycp
--- old/yast2-add-on-creator-2.15.2/src/AddOnCreator.ycp 2007-03-06 12:52:23.000000000 +0100
+++ new/yast2-add-on-creator-2.15.3/src/AddOnCreator.ycp 2007-04-04 16:17:34.000000000 +0200
@@ -24,7 +24,7 @@
* Summary: AddOnCreator settings, input and output functions
* Authors: Jiri Suchomel
*
- * $Id: AddOnCreator.ycp 35715 2007-01-31 08:02:45Z jsuchome $
+ * $Id: AddOnCreator.ycp 36738 2007-03-06 12:44:51Z jsuchome $
*
* Representation of the configuration of add-on-creator.
* Input and output routines.
@@ -1106,8 +1106,7 @@
*/
global boolean WriteContentFile (string base_path, list<map> content_data) {
- if (!FileUtils::Exists (base_path))
- return false;
+ if (!FileUtils::Exists (base_path)) return false;
string file = "";
foreach (map entry, content_data, {
@@ -1127,6 +1126,8 @@
*/
global boolean WriteStringFiles (string base_path, map files) {
+ if (!FileUtils::Exists (base_path)) return false;
+
boolean ret = true;
foreach (string file, string cont, files, {
if (cont != "")
@@ -1142,8 +1143,7 @@
*/
global boolean CreateAddOnStructure (string base_path) {
- if (!FileUtils::Exists (base_path))
- return false;
+ if (!FileUtils::Exists (base_path)) return false;
// create the media's directories
integer i = 1;
@@ -1163,7 +1163,7 @@
return false;
}
- full_data_path =sformat("%1/%2",base_output_path,content_map["DATADIR"]:"");
+ full_data_path =sformat("%1/%2", base_path,content_map["DATADIR"]:"");
SCR::Execute (.target.mkdir, full_data_path);
// create the dirs for packages
@@ -1183,8 +1183,8 @@
// generate the package descriptions using create_package_descr
global boolean GeneratePackageDescriptions () {
- if (!FileUtils::Exists ("/usr/bin/create_package_descr"))
- return false;
+ if (!FileUtils::Exists ("/usr/bin/create_package_descr")) return false;
+
string command = sformat ("/usr/bin/create_package_descr -d %1 -C -o %2",
full_data_path, full_descr_path);
SCR::Execute (.target.bash_output, command, $["LANG":"C"]);
@@ -1195,6 +1195,8 @@
// write the package descriptions edited by user
global boolean WritePackageDescriptions (string descr_path, map descr) {
+ if (!FileUtils::Exists (descr_path)) return false;
+
boolean ret = true;
foreach (string lang, map data, (map)descr, {
string file_path = descr_path + "/packages." + lang;
@@ -1217,13 +1219,14 @@
*/
global boolean GenerateArchiveFiles (string base_path)
{
-
if (!Package::Installed ("inst-source-utils") &&
!FileUtils::Exists ("/usr/bin/mk_listings"))
{
y2error ("inst-source-utils not installed and mk_listings not present");
return false;
}
+ if (!FileUtils::Exists (base_path)) return false;
+
map out = (map) SCR::Execute (.target.bash_output,
"mk_listings " + base_path);
if (out["stderr"]:"" != "")
@@ -1242,6 +1245,8 @@
*/
global boolean WritePatchesFiles (string base_path, list<string> p_files)
{
+ if (!FileUtils::Exists (base_path)) return false;
+
integer i = 1;
foreach (string cont, p_files, {
string file_path = base_path + sformat ("/media.%1/patches", i);
@@ -1260,6 +1265,8 @@
*/
global boolean WriteProductsFiles (string base_path, list<string> p_files)
{
+ if (!FileUtils::Exists (base_path)) return false;
+
integer i = 1;
if (p_files == []) p_files = [ "" ];
foreach (string cont, p_files, {
@@ -1283,9 +1290,10 @@
* @param next content of nextmedia file
* @return success
*/
-global boolean WriteMediaFiles (string base_path, list<string> m_files,
- string next)
+global boolean WriteMediaFiles (string base_path, list<string> m_files, string next)
{
+ if (!FileUtils::Exists (base_path)) return false;
+
integer i = 1;
if (m_files == []) m_files = [ "" ];
foreach (string cont, m_files, {
@@ -1312,8 +1320,9 @@
// write license.txt files in media.1 dir
global boolean WriteLicensesFiles (string media_path, map files){
- if (!Package::Install ("zip"))
+ if (!Package::Install ("zip") || !FileUtils::Exists (media_path))
return false;
+
boolean ret = true;
string cmd = "";
foreach (string file, string cont, files, {
@@ -1340,6 +1349,8 @@
*/
global boolean WritePatterns (string base_path) {
+ if (!FileUtils::Exists (base_path)) return false;
+
boolean ret = true;
list<string> names = [];
foreach (string name, map pattern, patterns, {
@@ -1444,6 +1455,8 @@
boolean WriteWorkflow (string base_path,string desc_path, list<string> packages,
string y2update_p)
{
+ if (!FileUtils::Exists (base_path)) return false;
+
boolean ret = true;
if (desc_path != "" && FileUtils::Exists (desc_path))
{
@@ -1490,6 +1503,8 @@
*/
boolean WriteServicepackArchive (string base_path)
{
+ if (!FileUtils::Exists (base_path)) return false;
+
boolean ret = true;
if (!bootable) return ret;
@@ -1534,8 +1549,8 @@
// helper to check if directory contains any files (-type f)
boolean dir_has_files (string dir) {
- if (!FileUtils::Exists (dir))
- return false;
+ if (!FileUtils::Exists (dir)) return false;
+
map out = (map) SCR::Execute (.target.bash_output,
sformat ("cd %1; find -maxdepth 1 -type f | wc -l", dir));
integer count = tointeger(deletechars(out["stdout"]:"0","\n"));
@@ -1548,6 +1563,8 @@
*/
global boolean CreateMD5SUMS (string base_path) {
+ if (!FileUtils::Exists (base_path)) return false;
+
// after CopyRPMs, arch_directories contains list of directories with RPM's
list<string> dirs_for_md5 = maplist (string arch_dir, arch_directories, {
return full_data_path + "/" + arch_dir;
@@ -1656,6 +1673,8 @@
*/
global boolean CreateDirectoryYaSTFiles (string base_path) {
+ if (!FileUtils::Exists (base_path)) return false;
+
foreach (string dir, (list<string>) merge (
[base_path, full_descr_path], full_media_paths),
{
@@ -1671,6 +1690,8 @@
if (!iso) return true;
+ if (!FileUtils::Exists (dir_path) || !FileUtils::Exists (iso_p)) return false;
+
if (name == "")
name = sformat ("%1-%2-%3",
tolower (content_map["DISTPRODUCT"]:content_map["PRODUCT"]:"addon"),
@@ -1678,6 +1699,7 @@
if (!issubstring (name, ".iso"))
name = name + ".iso";
+ iso_name = name;
// possible options -allow-leading-dots
string cmd = sformat("mkisofs -r -J -l -o %1/%2 %3",iso_p, name, dir_path);
@@ -1810,5 +1832,25 @@
return true;
}
+/**
+ * Export the settings about current Add-On product
+ */
+global map Export () {
+
+ return $[
+ "base_output_path" : base_output_path,
+ "iso" : iso,
+ "iso_name" : iso_name,
+ "iso_path" : iso_path,
+ "product_path" : iso ? (iso_path + "/" + iso_name) : base_output_path,
+ ];
+}
+
+global boolean Import (map settings) {
+
+ y2warning ("not implemented");
+ return false;
+}
+
/* EOF */
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-add-on-creator-2.15.2/src/Makefile.am new/yast2-add-on-creator-2.15.3/src/Makefile.am
--- old/yast2-add-on-creator-2.15.2/src/Makefile.am 2007-01-31 08:57:52.000000000 +0100
+++ new/yast2-add-on-creator-2.15.3/src/Makefile.am 2007-04-04 16:06:32.000000000 +0200
@@ -3,7 +3,8 @@
yncludedir = @yncludedir@/add-on-creator
client_DATA = \
- add-on-creator.ycp
+ add-on-creator.ycp \
+ add-on-creator_auto.ycp
ynclude_DATA = \
helps.ycp \
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-add-on-creator-2.15.2/src/Makefile.in new/yast2-add-on-creator-2.15.3/src/Makefile.in
--- old/yast2-add-on-creator-2.15.2/src/Makefile.in 2007-01-31 09:03:30.000000000 +0100
+++ new/yast2-add-on-creator-2.15.3/src/Makefile.in 2007-04-04 16:18:20.000000000 +0200
@@ -180,7 +180,8 @@
yncludedir = @yncludedir@/add-on-creator
ystartupdir = @ystartupdir@
client_DATA = \
- add-on-creator.ycp
+ add-on-creator.ycp \
+ add-on-creator_auto.ycp
ynclude_DATA = \
helps.ycp \
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-add-on-creator-2.15.2/src/patterns.ycp new/yast2-add-on-creator-2.15.3/src/patterns.ycp
--- old/yast2-add-on-creator-2.15.2/src/patterns.ycp 2007-03-06 12:53:37.000000000 +0100
+++ new/yast2-add-on-creator-2.15.3/src/patterns.ycp 2007-03-06 13:44:55.000000000 +0100
@@ -4,7 +4,7 @@
* Summary: Dialogs for patterns and selections
* Authors: Jiri Suchomel
*
- * $Id: patterns.ycp 35715 2007-01-31 08:02:45Z jsuchome $
+ * $Id: patterns.ycp 36738 2007-03-06 12:44:51Z jsuchome $
*/
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-add-on-creator-2.15.2/VERSION new/yast2-add-on-creator-2.15.3/VERSION
--- old/yast2-add-on-creator-2.15.2/VERSION 2007-03-06 13:24:50.000000000 +0100
+++ new/yast2-add-on-creator-2.15.3/VERSION 2007-04-03 16:31:06.000000000 +0200
@@ -1 +1 @@
-2.15.2
+2.15.3
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org