Hello community,
here is the log from the commit of package yast2-add-on-creator
checked in at Fri Feb 2 13:08:42 CET 2007.
--------
--- yast2-add-on-creator/yast2-add-on-creator.changes 2006-10-23 14:04:23.000000000 +0200
+++ /mounts/work_src_done/NOARCH/yast2-add-on-creator/yast2-add-on-creator.changes 2007-01-31 09:22:07.707906000 +0100
@@ -1,0 +2,27 @@
+Wed Jan 31 08:58:24 CET 2007 - jsuchome@suse.cz
+
+- initial version for STABLE
+- 2.15.0
+
+-------------------------------------------------------------------
+Tue Jan 30 10:52:26 CET 2007 - jsuchome@suse.cz
+
+- fixed pattern aggent to read language specific keys (#239828)
+- do not sign theproduct when key was not provided (#238282)
+- 2.13.11
+
+-------------------------------------------------------------------
+Thu Dec 14 11:31:53 CET 2006 - jsuchome@suse.cz
+
+- optimize the speed of reading package names (#220535)
+- 2.13.10
+
+-------------------------------------------------------------------
+Wed Nov 15 12:31:02 CET 2006 - jsuchome@suse.cz
+
+- configure iso image file name (#220534)
+- always generate ARCHIVES.gz, INDEX.gz and ls-lR.gz (#221220)
+- offer additional path to packages for editing patterns (#220535)
+- 2.13.9
+
+-------------------------------------------------------------------
Old:
----
yast2-add-on-creator-2.13.8.tar.bz2
New:
----
yast2-add-on-creator-2.15.0.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-add-on-creator.spec ++++++
--- /var/tmp/diff_new_pack.kA2277/_old 2007-02-02 13:06:36.000000000 +0100
+++ /var/tmp/diff_new_pack.kA2277/_new 2007-02-02 13:06:36.000000000 +0100
@@ -1,7 +1,7 @@
#
-# spec file for package yast2-add-on-creator (Version 2.13.8)
+# spec file for package yast2-add-on-creator (Version 2.15.0)
#
-# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@@ -11,12 +11,12 @@
# norootforbuild
Name: yast2-add-on-creator
-Version: 2.13.8
+Version: 2.15.0
Release: 1
-License: GNU General Public License (GPL) - all versions
+License: GNU General Public License (GPL)
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-add-on-creator-2.13.8.tar.bz2
+Source0: yast2-add-on-creator-2.15.0.tar.bz2
prefix: /usr
Requires: yast2 autoyast2-utils
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.13.8
+%setup -n yast2-add-on-creator-2.15.0
%build
%{prefix}/bin/y2tool y2autoconf
@@ -69,6 +69,21 @@
%doc %{prefix}/share/doc/packages/yast2-add-on-creator
%changelog -n yast2-add-on-creator
+* Wed Jan 31 2007 - jsuchome@suse.cz
+- initial version for STABLE
+- 2.15.0
+* Tue Jan 30 2007 - jsuchome@suse.cz
+- fixed pattern aggent to read language specific keys (#239828)
+- do not sign theproduct when key was not provided (#238282)
+- 2.13.11
+* Thu Dec 14 2006 - jsuchome@suse.cz
+- optimize the speed of reading package names (#220535)
+- 2.13.10
+* Wed Nov 15 2006 - jsuchome@suse.cz
+- configure iso image file name (#220534)
+- always generate ARCHIVES.gz, INDEX.gz and ls-lR.gz (#221220)
+- offer additional path to packages for editing patterns (#220535)
+- 2.13.9
* Mon Oct 23 2006 - jsuchome@suse.cz
- used existing yast-addon.png icon (#213875)
- 2.13.8
++++++ yast2-add-on-creator-2.13.8.tar.bz2 -> yast2-add-on-creator-2.15.0.tar.bz2 ++++++
++++ 7209 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-creator-2.13.8/agents/ag_pattern new/yast2-add-on-creator-2.15.0/agents/ag_pattern
--- old/yast2-add-on-creator-2.13.8/agents/ag_pattern 2006-08-11 08:11:49.000000000 +0200
+++ new/yast2-add-on-creator-2.15.0/agents/ag_pattern 2007-01-31 08:57:52.000000000 +0100
@@ -29,14 +29,14 @@
my $multiline_val = "";
foreach my $line (<PATTERN>) {
chomp $line;
- if ($line =~ /^=([\w]+):[ \t]*(.*)/) {
+ if ($line =~ /^=([\w\.]+):[ \t]*(.*)/) {
$pattern{$1} = $2;
}
- elsif ($line =~ /^\+([\w]+):.*/) {
+ elsif ($line =~ /^\+([\w\.]+):.*/) {
$multiline_key = $1;
$multiline_val = "";
}
- elsif ($line =~ /^\-([\w]+):.*/) {
+ elsif ($line =~ /^\-([\w\.]+):.*/) {
if ($multiline_key eq $1) {
$pattern{$multiline_key} = $multiline_val;
}
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-creator-2.13.8/autodocs-ycp.ami new/yast2-add-on-creator-2.15.0/autodocs-ycp.ami
--- old/yast2-add-on-creator-2.13.8/autodocs-ycp.ami 2006-09-07 10:03:45.000000000 +0200
+++ new/yast2-add-on-creator-2.15.0/autodocs-ycp.ami 2007-01-31 09:03:22.000000000 +0100
@@ -1,18 +1,27 @@
# -*- makefile -*- Automake include file
-# $Id: autodocs-ycp.ami 23438 2005-05-17 16:31:21Z mvidner $
+# $Id: autodocs-ycp.ami 33394 2006-10-13 11:51:40Z mvidner $
# Builds source documentation for YCP sources
# Uses ycpdoc
# PARAMETERS:
# AUTODOCS_YCP: Files that the ycp autodocs is built from
# Optional - the default is $(srcdir)/../../src/*.ycp
+# AUTODOCS_PM: Files that the perl autodocs is built from
+# Optional - the default is $(srcdir)/../../src/*.pm
htmldir = $(docdir)/autodocs
html_DATA = index.html $(wildcard *.html)
-CLEANFILES = $(html_DATA)
+CLEANFILES = $(html_DATA) pod2htm*.tmp
-AUTODOCS_YCP ?= $(srcdir)/../../src/*.ycp
-index.html: $(AUTODOCS_YCP)
- ${YCPDOC} -d. $^
+AUTODOCS_YCP ?= $(wildcard $(srcdir)/../../src/*.ycp)
+AUTODOCS_PM ?= $(wildcard $(srcdir)/../../src/*.pm)
+index.html: $(AUTODOCS_YCP) $(AUTODOCS_PM)
+#including *.pm, for the index
+ ${YCPDOC} -d. $^
+ for i in $(AUTODOCS_PM); do \
+ b=`basename $$i`; b=$${b%.pm}; \
+ pod2html --title=$$b --infile=$$i --outfile=$$b.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-creator-2.13.8/configure.in new/yast2-add-on-creator-2.15.0/configure.in
--- old/yast2-add-on-creator-2.13.8/configure.in 2006-09-07 10:03:45.000000000 +0200
+++ new/yast2-add-on-creator-2.15.0/configure.in 2007-01-31 09:03:22.000000000 +0100
@@ -1,9 +1,9 @@
dnl configure.in for yast2-add-on-creator
dnl
-dnl -- This file is generated by y2autoconf 2.13.21 - DO NOT EDIT! --
+dnl -- This file is generated by y2autoconf 2.14.0 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-add-on-creator, 2.13.3, http://bugs.opensuse.org/, yast2-add-on-creator)
+AC_INIT(yast2-add-on-creator, 2.15.0, http://bugs.opensuse.org/, yast2-add-on-creator)
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.3"
+VERSION="2.15.0"
RPMNAME="yast2-add-on-creator"
MAINTAINER="Jiri Suchomel "
@@ -110,6 +110,8 @@
AC_MSG_ERROR(xgettext is missing; please install gettext-devel.)
fi
+Y2DEVTOOLS_PREFIX=`pkg-config --print-errors --variable=prefix yast2-devtools`
+AC_SUBST(Y2DEVTOOLS_PREFIX)
devtools_ybindir=`pkg-config --print-errors --variable=ybindir yast2-devtools`
devtools_yast2dir=`pkg-config --print-errors --variable=yast2dir yast2-devtools`
@@ -142,6 +144,9 @@
if test "$YCPC" = "false"; then
AC_MSG_ERROR([ycpc is not installed])
fi
+AC_CHECK_FILE($devtools_yast2dir/data/testsuite/Makefile.testsuite, [], [
+ AC_MSG_WARN([yast2-testsuite.rpm is not installed])
+])
AC_CONFIG_FILES(Makefile agents/Makefile
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-creator-2.13.8/Makefile.am new/yast2-add-on-creator-2.15.0/Makefile.am
--- old/yast2-add-on-creator-2.13.8/Makefile.am 2006-09-07 10:03:45.000000000 +0200
+++ new/yast2-add-on-creator-2.15.0/Makefile.am 2007-01-31 09:03:22.000000000 +0100
@@ -7,8 +7,7 @@
#
#where devtools are
-PREFIX := $(shell pkg-config --print-errors --variable=prefix yast2-devtools)
-Y2TOOL = $(PREFIX)/bin/y2tool
+Y2TOOL = $(Y2DEVTOOLS_PREFIX)/bin/y2tool
VERSION = $(shell cat $(srcdir)/VERSION)
RPMNAME = $(shell cat $(srcdir)/RPMNAME)
@@ -20,7 +19,7 @@
# do we do Makefile.am for devtools? It is a little special...
IS_DEVTOOLS = $(findstring yast2-devtools,$(RPMNAME))
-DEVTOOLS_DIR = $(if $(IS_DEVTOOLS),$(srcdir)/devtools,$(PREFIX)/share/YaST2/data/devtools)
+DEVTOOLS_DIR = $(if $(IS_DEVTOOLS),$(srcdir)/devtools,$(Y2DEVTOOLS_PREFIX)/share/YaST2/data/devtools)
ALL_PACKAGES = $(DEVTOOLS_DIR)/admin/all-packages
LEGALESE_DIR = $(if $(HAS_YAST_LICENSE),$(DEVTOOLS_DIR)/admin/copyright/yast,$(DEVTOOLS_DIR)/admin/copyright/gpl)
@@ -34,7 +33,7 @@
AUTOMAKE_OPTIONS = foreign dist-bzip2
# where devtools instal m4 snippets
# argh, executed literally
-#ACLOCAL_AMFLAGS = -I $(PREFIX)/share/aclocal
+#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
Makefile.am.common: $(DEVTOOLS_DIR)/admin/Makefile.am.common
@@ -67,7 +66,7 @@
# 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
+$(RPMNAME).pc: $(RPMNAME).pc.in config.status
./config.status --file=$@:$<
if CREATE_PKGCONFIG_NOARCH
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-creator-2.13.8/Makefile.am.common new/yast2-add-on-creator-2.15.0/Makefile.am.common
--- old/yast2-add-on-creator-2.13.8/Makefile.am.common 2006-09-07 10:03:45.000000000 +0200
+++ new/yast2-add-on-creator-2.15.0/Makefile.am.common 2007-01-31 09:03:22.000000000 +0100
@@ -29,7 +29,19 @@
dist-hook: check-syntax
+CHECK_SYNTAX = true
check-syntax: $(client_DATA) $(ycpchook)
- if test "$(client_DATA)"; then $(bindir)/ycpc -qE -M. -I. $(YCPCFLAGS) $(filter %.ycp,$^) || exit 1; fi
+ @if test "$(client_DATA)"; then \
+ if $(CHECK_SYNTAX); then \
+ TO_CHECK="$(filter %.ycp,$^)"; \
+ echo "Checking syntax of $${TO_CHECK}"; \
+ if ! $(YCPC) -qE -M. -I. $(YCPCFLAGS) $${TO_CHECK}; then \
+ echo "Failed. Disable by 'make ... CHECK_SYNTAX=false' at your own risk"; \
+ exit 1; \
+ fi; \
+ else \
+ echo "Syntax check disabled"; \
+ fi; \
+ fi
-include .dep
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-creator-2.13.8/src/add-on-creator.ycp new/yast2-add-on-creator-2.15.0/src/add-on-creator.ycp
--- old/yast2-add-on-creator-2.13.8/src/add-on-creator.ycp 2006-10-03 09:29:30.000000000 +0200
+++ new/yast2-add-on-creator-2.15.0/src/add-on-creator.ycp 2007-01-31 09:02:52.000000000 +0100
@@ -24,7 +24,7 @@
* Summary: Main file
* Authors: Jiri Suchomel
*
- * $Id: add-on-creator.ycp 33241 2006-10-03 07:29:25Z jsuchome $
+ * $Id: add-on-creator.ycp 35715 2007-01-31 08:02:45Z jsuchome $
*
* Main file for add-on-creator configuration. Uses all other files.
*/
@@ -42,6 +42,8 @@
y2milestone ("AddOnCreator module started");
import "CommandLine";
+import "PackageSystem";
+
include "add-on-creator/wizards.ycp";
map cmdline_description = $[
@@ -59,8 +61,12 @@
]
];
-/* main ui function */
-any ret = CommandLine::Run(cmdline_description);
+any ret = nil;
+
+if (!PackageSystem::CheckAndInstallPackagesInteractive (["inst-source-utils"]))
+ ret = `cancel;
+else
+ ret = CommandLine::Run(cmdline_description);
/* Finish */
y2milestone("AddOnCreator module finished with %1", ret);
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-creator-2.13.8/src/AddOnCreator.ycp new/yast2-add-on-creator-2.15.0/src/AddOnCreator.ycp
--- old/yast2-add-on-creator-2.13.8/src/AddOnCreator.ycp 2006-10-23 11:21:43.000000000 +0200
+++ new/yast2-add-on-creator-2.15.0/src/AddOnCreator.ycp 2007-01-31 09:02:52.000000000 +0100
@@ -24,7 +24,7 @@
* Summary: AddOnCreator settings, input and output functions
* Authors: Jiri Suchomel
*
- * $Id: AddOnCreator.ycp 33568 2006-10-23 09:21:40Z jsuchome $
+ * $Id: AddOnCreator.ycp 35715 2007-01-31 08:02:45Z jsuchome $
*
* Representation of the configuration of add-on-creator.
* Input and output routines.
@@ -488,6 +488,10 @@
// path to directory with RPM's
global string rpm_path = "";
+// path to directory with RPM's, used only for building patterns
+// and not present on AddOn
+global string required_rpm_path = "";
+
// path to directory with existing product
global string import_path = "";
@@ -569,6 +573,9 @@
// where the iso image should be put
global string iso_path = "";
+// name of the iso image file
+global string iso_name = "";
+
global string gpg_key = "";
// passphrase to unlock secret key
@@ -576,7 +583,7 @@
global list<string> gpg_keys = [];
-// packages available for the pattern
+// packages from current AddOn available for the pattern
global map available_packages = $[];
// mapping of package name to full file name
@@ -772,7 +779,12 @@
foreach (string key, any val, (map) pt, {
if (pattern_descr[key,"type"]:"" == "package-list")
+ {
ret[key] = splitstring (sformat ("%1", val), "\n");
+ // make the packages included in imported pattern available for UI
+ available_packages["ZZZ_imported"] = union (
+ available_packages["ZZZ_imported"]:[], ret[key]:[]);
+ }
else
ret[key] = val;
});
@@ -788,7 +800,10 @@
return ret;
}
-// import the data from existing add-on
+/**
+ * import the data from existing add-on
+ * @param path to existing addon directory
+ */
global boolean ImportExistingProduct (string dir_path) {
content = ReadContentFile (dir_path + "/content");
@@ -909,25 +924,6 @@
});
}
- string archives_path = dir_path + "/ARCHIVES.gz";
- if (FileUtils::Exists (archives_path))
- {
- SCR::Execute (.target.bash,
- sformat ("/bin/cp %1 %2", archives_path, tmpdir));
- }
- string index_path = dir_path + "/INDEX.gz";
- if (FileUtils::Exists (index_path))
- {
- SCR::Execute (.target.bash,
- sformat ("/bin/cp %1 %2", index_path, tmpdir));
- }
- string lslr_path = dir_path + "/ls-lR.gz";
- if (FileUtils::Exists (lslr_path))
- {
- SCR::Execute (.target.bash,
- sformat ("/bin/cp %1 %2", lslr_path, tmpdir));
- }
-
string desc_path = dir_path + "/installation.xml";
if (FileUtils::Exists (desc_path))
{
@@ -943,6 +939,37 @@
return true;
}
+/**
+ * converts the output of find command (=possibly big string with each file on one line),
+ * to the list of smaller strings (<128kB), each with space separated file names
+ * @param stdout output of find command
+ */
+list<string> create_argument_lists (string stdout) {
+
+ list<string> ret = [];
+ // approximately maximum size of parameters list passed to rpm
+ integer kbytes = 120;
+ // looks like pre-sorting helps to fasten rpm call
+ list<string> found = sort (splitstring (stdout, "\n"));
+ if (size (stdout)/1024 <= kbytes)
+ ret = [ mergestring (found, " ") ];
+ else
+ {
+ string line = "";
+ foreach (string file, found, {
+ line = line + file + " ";
+ if (size (line) / 1024 > kbytes)
+ {
+ ret = add (ret, line);
+ line = "";
+ }
+ });
+ if (size (line) / 1024 <= kbytes)
+ ret = add (ret, line);
+ }
+ return ret;
+}
+
// this is used during the workflow, not in the write!
// TODO change name...
global void FillContentDefaults () {
@@ -967,7 +994,7 @@
{
// 2. get the list of architectures from RPM's
out = (map) SCR::Execute (.target.bash_output,
- sformat ("find %1 -name *.rpm", rpm_path));
+ sformat ("find %1 -name '*.rpm'", rpm_path));
y2milestone ("asking the RPM's for ARCH and NAME...");
foreach (string f, splitstring (out["stdout"]:"", "\n"), {
if (f == "") return;
@@ -1002,6 +1029,26 @@
content = add (content, arch_skel);
});
}
+
+ // 4. read the list of packages, not present on AddOn
+ if (required_rpm_path != "" && required_rpm_path != rpm_path)
+ {
+ out = (map) SCR::Execute (.target.bash_output,
+ sformat ("cd %1; find -name '*.rpm'", required_rpm_path));
+ y2milestone ("asking the RPM's for NAME...");
+ list<string> inputs = create_argument_lists (out["stdout"]:"");
+ string output = "";
+ foreach (string input, inputs, {
+ string cmd = sformat ("cd %1; rpm --qf \"%%{NAME}\n\" -qp %2",
+ required_rpm_path, input);
+ out = (map) SCR::Execute (.target.bash_output, cmd);
+ output = output + out["stdout"]:"" + "\n";
+ });
+ // remove empty strings and duplicates
+ available_packages["ZZZ_required"] = toset (filter (
+ string name, splitstring (output, "\n"), ``(name != "")));
+ y2milestone ("... done");
+ }
}
// generate tmp package descriptions...
@@ -1041,6 +1088,18 @@
}
/**
+ * Update content_map with current value of 'content' list
+ */
+global map UpdateContentMap () {
+
+ foreach (map entry, content, {
+ if (entry["value"]:"" != "")
+ content_map[entry["key"]:""] = entry["value"]:"";
+ });
+ return content_map;
+}
+
+/**
* Write the content file
* @return success
*/
@@ -1152,42 +1211,28 @@
return ret;
}
-// Write ARCHIVES.gz FIXME generate if not present! mk_listings
-global boolean WriteARCHIVES (string base_path)
+/**
+ * Generate ARCHIVES.gz, INDEX.gz and ls-lR.gz
+ */
+global boolean GenerateArchiveFiles (string base_path)
{
- string archives_path = tmpdir + "/ARCHIVES.gz";
- if (FileUtils::Exists (archives_path))
- {
- SCR::Execute (.target.bash,
- sformat ("/bin/cp %1 %2", archives_path, base_path));
- }
- return true;
-}
-// TODO generate it!
-global boolean WriteINDEX (string base_path)
-{
- string index_path = tmpdir + "/INDEX.gz";
- if (FileUtils::Exists (index_path))
+ if (!Package::Installed ("inst-source-utils") &&
+ !FileUtils::Exists ("/usr/bin/mk_listings"))
{
- SCR::Execute (.target.bash,
- sformat ("/bin/cp %1 %2", index_path, base_path));
+ y2error ("inst-source-utils not installed and mk_listings not present");
+ return false;
}
- return true;
-}
-
-// TODO generate it!
-global boolean WriteLslR (string base_path)
-{
- string lslr_path = tmpdir + "/ls-lR.gz";
- if (FileUtils::Exists (lslr_path))
+ map out = (map) SCR::Execute (.target.bash_output,
+ "mk_listings " + base_path);
+ if (out["stderr"]:"" != "")
{
- SCR::Execute (.target.bash,
- sformat ("/bin/cp %1 %2", lslr_path, base_path));
+ y2warning ("mk_listings returns %1", out);
}
return true;
}
+
/**
* Create the patches files
* @param base_path path to base output directory
@@ -1364,7 +1409,8 @@
{
foreach (string arch, list pa, available_packages, {
string out_dir = full_data_path + "/" + arch;
- if (FileUtils::Exists (out_dir))
+ if (arch != "ZZZ_imported" && arch != "ZZZ_required" &&
+ FileUtils::Exists (out_dir))
{
if (size (package2filename) > 0)
{
@@ -1538,6 +1584,12 @@
*/
global boolean SignAddOn (string base_path, string key) {
+ if (key == "")
+ {
+ y2warning ("No GPG key provided - signing skipped");
+ return true;
+ }
+
string command = sformat ("gpg --list-secret-keys %1|grep '^sec'|sed -e 's/.*\\///;s/ .*//g;'|head -n 1", key);
map out = (map)SCR::Execute (.target.bash_output, command, $["LANG" : "C"]);
string local_key = deletechars (out["stdout"]:"0","\n");
@@ -1614,14 +1666,20 @@
/**
* Create an ISO image of the product
*/
-global boolean CreateISOImage (string dir_path, string iso_p) {
+global boolean CreateISOImage (string dir_path, string iso_p, string name) {
if (!iso) return true;
- string name =
- tolower (content_map["DISTPRODUCT"]:content_map["PRODUCT"]:"addon");
+
+ if (name == "")
+ name = sformat ("%1-%2-%3",
+ tolower (content_map["DISTPRODUCT"]:content_map["PRODUCT"]:"addon"),
+ content_map["DISTVERSION"]:"", content_map["DEFAULTBASE"]:"");
+
+ if (!issubstring (name, ".iso"))
+ name = name + ".iso";
+
// possible options -allow-leading-dots
- string cmd = sformat ("mkisofs -r -J -l -o %1/%2.iso %3",
- iso_p, name, dir_path);
+ string cmd = sformat("mkisofs -r -J -l -o %1/%2 %3",iso_p, name, dir_path);
map out = (map) SCR::Execute (.target.bash_output, cmd);
if (out["exit"]:0 != 0)
{
@@ -1712,10 +1770,6 @@
WriteLicensesFiles (full_media_paths[0]:"", license_files);
- WriteARCHIVES (base_output_path);
- WriteINDEX (base_output_path);
- WriteLslR (base_output_path);
-
if (info != "")
SCR::Write (.target.string, full_media_paths[0]:"" + "/info.txt", info);
@@ -1734,6 +1788,8 @@
Progress::NextStage();
+ GenerateArchiveFiles (base_output_path);
+
CreateMD5SUMS (base_output_path);
SignAddOn (base_output_path, gpg_key);
@@ -1745,7 +1801,7 @@
if (iso)
{
Progress::NextStage();
- CreateISOImage (base_output_path, iso_path);
+ CreateISOImage (base_output_path, iso_path, iso_name);
}
Progress::NextStage();
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-creator-2.13.8/src/complex.ycp new/yast2-add-on-creator-2.15.0/src/complex.ycp
--- old/yast2-add-on-creator-2.13.8/src/complex.ycp 2006-10-23 11:21:44.000000000 +0200
+++ new/yast2-add-on-creator-2.15.0/src/complex.ycp 2007-01-31 09:02:52.000000000 +0100
@@ -24,7 +24,7 @@
* Summary: Dialogs definitions
* Authors: Jiri Suchomel
*
- * $Id: complex.ycp 33568 2006-10-23 09:21:40Z jsuchome $
+ * $Id: complex.ycp 35715 2007-01-31 08:02:45Z jsuchome $
*/
{
@@ -205,16 +205,6 @@
string caption = _("Add-On Product Creator");
term contents = `HBox (`HSpacing (), `VBox (
- `HBox (
- // text entry label
- `TextEntry (`id(`rpm_path), _("&Path to Directory with Packages"),
- AddOnCreator::rpm_path),
- `VBox (
- `Label (""),
- `PushButton (`id(`browse_rpm), Label::BrowseButton ())
- )
- ),
- `VSpacing (0.7),
`Frame (_("Required Product"), `HBox (`HSpacing (0.5), `VBox (
`VSpacing (0.4),
`RadioButtonGroup (`id(`rd),
@@ -237,6 +227,27 @@
),
`VSpacing (0.4)
))),
+ `VSpacing (0.7),
+ `HBox (
+ `TextEntry (`id(`rpm_path),
+ // text entry label
+ _("&Path to Directory with Add-On Packages"),
+ AddOnCreator::rpm_path),
+ `VBox (
+ `Label (""),
+ `PushButton (`id(`browse_rpm), Label::BrowseButton ())
+ )
+ ),
+ `HBox (
+ `TextEntry (`id(`required_rpm_path),
+ // text entry label
+ _("Path to Directory with Re&quired Product Packages"),
+ AddOnCreator::required_rpm_path),
+ `VBox (
+ `Label (""),
+ `PushButton (`id(`browse_req_rpm), Label::BrowseButton ())
+ )
+ ),
`VSpacing (0.7)
), `HSpacing ());
@@ -259,6 +270,9 @@
ret = UI::UserInput();
string dir = (string) UI::QueryWidget (`id(`rpm_path), `Value);
+ string req_dir = (string)
+ UI::QueryWidget (`id(`required_rpm_path), `Value);
+
if (ret == `browse_rpm) {
dir = UI::AskForExistingDirectory (dir, "");
if (dir != nil)
@@ -268,6 +282,15 @@
UI::ChangeWidget (`id(`rpm_path), `Value, dir);
}
}
+ if (ret == `browse_req_rpm) {
+ req_dir = UI::AskForExistingDirectory (req_dir, "");
+ if (req_dir != nil)
+ {
+ if ((findlastof (req_dir, "/") + 1) == size(req_dir))
+ req_dir = substring (req_dir, 0, size(req_dir)-1);
+ UI::ChangeWidget (`id(`required_rpm_path), `Value, req_dir);
+ }
+ }
else if (ret == `sles10) {
requires = "sles-release-10";
UI::ChangeWidget (`id(`other_val), `Enabled, false);
@@ -284,17 +307,6 @@
requires = "";
UI::ChangeWidget (`id(`other_val), `Enabled, true);
}
- else if (ret == `create_key) {
- Popup::Message ("FIXME: not implemented yet");
- }
- else if (ret == `expert) {
- // save the data...
- if (requires == "")
- requires = (string) UI::QueryWidget (`id(`other_val), `Value);
- AddOnCreator::content_map["REQUIRES"] = requires;
- AddOnCreator::rpm_path = dir;
- break;
- }
else if (ret == `next) {
if (dir == "")
{
@@ -306,12 +318,20 @@
if (!FileUtils::Exists (dir))
{
// error popup
- Popup::Error (sformat(_("Directory %1 is not accessible."),dir));
+ Popup::Error(sformat(_("Directory %1 is not accessible."),dir));
UI::SetFocus (`id(`rpm_path));
continue;
}
- // FIXME check presence of rpms in dir
- AddOnCreator::rpm_path = dir;
+ if (req_dir != "" && !FileUtils::Exists (req_dir))
+ {
+ // error popup
+ Popup::Error (sformat (_("Directory %1 is not accessible."),
+ req_dir));
+ UI::SetFocus (`id(`required_rpm_path));
+ continue;
+ }
+ AddOnCreator::rpm_path = dir;
+ AddOnCreator::required_rpm_path = req_dir;
if (requires == "")
requires = (string) UI::QueryWidget (`id(`other_val), `Value);
AddOnCreator::content_map["REQUIRES"] = requires;
@@ -603,6 +623,7 @@
], AddOnCreator::content_specials["ARCH"]:$[]));
}
AddOnCreator::content = content;
+ AddOnCreator::UpdateContentMap ();
break;
}
else if(ret == `abort || ret == `cancel) {
@@ -671,11 +692,12 @@
entry["help"]:"")
: entry["help"]:"";
+ list all_items = [];
+
// generate items for MultiSelectionBox
// if all is boolean, apply to each item (=> all checked or all unchecked)
list get_package_items (boolean all) {
list ret = [];
-//FIXME too slow for many items!
foreach (string a, list pa, AddOnCreator::available_packages, {
ret = union (ret, maplist (string p, (list<string>) pa, {
height = height + 1;
@@ -739,12 +761,11 @@
}
else if (type == "package-list")
{
+ all_items = get_package_items (nil);
cont = `VBox (
`HSpacing (50),
// MultiSelectionBox label
- `MultiSelectionBox (`id(`main), _("&Packages"),
- get_package_items (nil)
- ),
+ `MultiSelectionBox (`id(`main), _("&Packages"), all_items),
`Left (
// check box label
`CheckBox (`id(`all),`opt(`notify),_("Select or Deselect &All"))
@@ -770,9 +791,7 @@
boolean all_checked = false;
if (type == "package-list")
{
- all_checked = (value != [] &&
- (size ((list)value) == size ((list)UI::QueryWidget (`id(w_id),`SelectedItems)))
- );
+ all_checked = (value != [] && (size ((list)value) == size (all_items)));
UI::ChangeWidget (`id(`all), `Value, all_checked);
}
while (true)
@@ -1321,8 +1340,15 @@
// dialog caption
string caption = _("Output Settings");
boolean iso = AddOnCreator::iso;
- boolean bootable = AddOnCreator::bootable; //FIXME
+ boolean bootable = AddOnCreator::bootable;
boolean autorun = false;
+ map content_map = AddOnCreator::content_map;
+
+ string iso_name = AddOnCreator::iso_name;
+ if (iso_name == "")
+ iso_name = sformat ("%1-%2-%3",
+ tolower (content_map["DISTPRODUCT"]:""),
+ content_map["DISTVERSION"]:"", content_map["DEFAULTBASE"]:"");
term contents = `HBox (`HSpacing (), `VBox (
`HBox (
@@ -1335,11 +1361,18 @@
)
),
// check box label
- `Left (`CheckBox (`id(`iso), _("Create &ISO Image"), iso)),
- // check box label
//FIXME `Left (`CheckBox (`id(`boot), _("Create B&ootable Add-On"), bootable)),
// check box label
//FIXME `Left (`CheckBox (`id(`autorun), _("&Autorun"), autorun)),
+
+
+ // check box label
+ `Left (`CheckBox (`id(`iso),`opt(`notify),_("Create &ISO Image"), iso)),
+ `HBox (
+ `HSpacing (2),
+ // text entry label
+ `TextEntry (`id(`iso_name), _("Image File Name"), iso_name)
+ ),
`VSpacing (4),
`HBox (
`HStretch (),
@@ -1353,6 +1386,7 @@
Wizard::SetContentsButtons(caption, contents, HELPS["output"]:"",
Label::BackButton(), Label::NextButton());
UI::SetFocus (`id(`output_path));
+ UI::ChangeWidget (`id(`iso_name), `Enabled, iso);
any ret = nil;
while(true) {
@@ -1360,6 +1394,8 @@
ret = UI::UserInput();
string dir = (string)UI::QueryWidget (`id(`output_path), `Value);
boolean iso = (boolean)UI::QueryWidget (`id(`iso), `Value);
+ iso_name = (string)UI::QueryWidget (`id(`iso_name), `Value);
+ UI::ChangeWidget (`id(`iso_name), `Enabled, iso);
// boolean bootable= (boolean)UI::QueryWidget (`id(`boot), `Value);
if (ret == `browse) {
dir = UI::AskForExistingDirectory (dir, "");
@@ -1373,6 +1409,7 @@
else if (ret == `expert || ret == `workflow) {
AddOnCreator::base_output_path = dir;
AddOnCreator::iso = iso;
+ AddOnCreator::iso_name = iso_name;
// AddOnCreator::bootable = bootable;
break;
}
@@ -1396,10 +1433,13 @@
}
AddOnCreator::base_output_path = dir;
AddOnCreator::iso = iso;
+ AddOnCreator::iso_name = iso_name;
// AddOnCreator::bootable = bootable;
if (iso && !Package::Install ("mkisofs"))
{
- AddOnCreator::iso = false;
+ UI::ChangeWidget (`id(`iso), `Value, false);
+ ret = `notnext;
+ continue;
}
break;
}
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-creator-2.13.8/src/dialogs.ycp new/yast2-add-on-creator-2.15.0/src/dialogs.ycp
--- old/yast2-add-on-creator-2.13.8/src/dialogs.ycp 2006-10-23 11:21:44.000000000 +0200
+++ new/yast2-add-on-creator-2.15.0/src/dialogs.ycp 2007-01-31 09:02:52.000000000 +0100
@@ -24,7 +24,7 @@
* Summary: Dialogs definitions
* Authors: Jiri Suchomel
*
- * $Id: dialogs.ycp 33568 2006-10-23 09:21:40Z jsuchome $
+ * $Id: dialogs.ycp 35715 2007-01-31 08:02:45Z jsuchome $
*/
{
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-creator-2.13.8/src/helps.ycp new/yast2-add-on-creator-2.15.0/src/helps.ycp
--- old/yast2-add-on-creator-2.13.8/src/helps.ycp 2006-10-23 10:50:39.000000000 +0200
+++ new/yast2-add-on-creator-2.15.0/src/helps.ycp 2007-01-31 09:02:52.000000000 +0100
@@ -24,7 +24,7 @@
* Summary: Help texts of all the dialogs
* Authors: Jiri Suchomel
*
- * $Id: helps.ycp 33241 2006-10-03 07:29:25Z jsuchome $
+ * $Id: helps.ycp 35715 2007-01-31 08:02:45Z jsuchome $
*/
{
@@ -57,11 +57,22 @@
// help text for start menu, cont.
_("<p>When basing the new product on an existing product, check <b>Generate Package Descriptions</b> to generate new descriptions of packages in the existing product.</p>"),
- // help text for initial data
- "sources" : _("<p>Choose the path to the directory containing the RPM packages that should form your add-on product.</p>") +
+ // help text for initial data (paragraph title)
+ "sources" : _("<p><b>Required Product</b></p>") +
// help text for initial data, cont.
- _("<p>Select the product to which the new add-on product can be applied. This selection forms the <b>REQUIRES</b> value of the <tt>content</tt> file.</p>"),
+ _("<p>Select the product to which the new add-on product can be applied. This selection forms the <b>REQUIRES</b> value of the <tt>content</tt> file.</p>") +
+ // help text for initial data (paragraph title), cont.
+ _("<p><b>Add-On Packages</b></p>") +
+
+ // help text for initial data, cont.
+ _("<p>Choose the path to the directory containing the RPM packages that should form your add-on product.</p>") +
+
+ // help text for initial data (paragraph title), cont.
+ _("<p><b>Required Product Packages</b></p>") +
+
+ // help text for initial data, cont.
+ _("<p>Optionally, choose the path to the directory containing the RPM packages from the product the add-on product should be based on. These packages will not be contained in the add-on product, but could be used for creating the patterns later in the workflow.</p>"),
// help text for content file editor (<tt>content</tt> is a name of file)
"content" : _("<p>Here, edit the values of the <tt>content</tt> file.</p>") +
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-creator-2.13.8/src/patterns.ycp new/yast2-add-on-creator-2.15.0/src/patterns.ycp
--- old/yast2-add-on-creator-2.13.8/src/patterns.ycp 2006-10-03 09:14:39.000000000 +0200
+++ new/yast2-add-on-creator-2.15.0/src/patterns.ycp 2007-01-31 09:02:52.000000000 +0100
@@ -4,7 +4,7 @@
* Summary: Dialogs for patterns and selections
* Authors: Jiri Suchomel
*
- * $Id: patterns.ycp 32774 2006-09-08 11:26:00Z jsuchome $
+ * $Id: patterns.ycp 35715 2007-01-31 08:02:45Z jsuchome $
*/
{
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-creator-2.13.8/src/wizards.ycp new/yast2-add-on-creator-2.15.0/src/wizards.ycp
--- old/yast2-add-on-creator-2.13.8/src/wizards.ycp 2006-10-23 10:50:51.000000000 +0200
+++ new/yast2-add-on-creator-2.15.0/src/wizards.ycp 2007-01-31 09:02:52.000000000 +0100
@@ -24,7 +24,7 @@
* Summary: Wizards definitions
* Authors: Jiri Suchomel
*
- * $Id: wizards.ycp 32551 2006-08-24 13:05:57Z jsuchome $
+ * $Id: wizards.ycp 35715 2007-01-31 08:02:45Z jsuchome $
*/
{
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-creator-2.13.8/VERSION new/yast2-add-on-creator-2.15.0/VERSION
--- old/yast2-add-on-creator-2.13.8/VERSION 2006-10-23 14:01:29.000000000 +0200
+++ new/yast2-add-on-creator-2.15.0/VERSION 2007-01-31 08:58:21.000000000 +0100
@@ -1 +1 @@
-2.13.8
+2.15.0
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org