Hello community,
here is the log from the commit of package yast2-add-on-creator
checked in at Fri Aug 3 21:12:43 CEST 2007.
--------
--- yast2-add-on-creator/yast2-add-on-creator.changes 2007-08-02 16:58:53.000000000 +0200
+++ /mounts/work_src_done/NOARCH/yast2-add-on-creator/yast2-add-on-creator.changes 2007-08-03 21:12:00.806075000 +0200
@@ -1,0 +2,11 @@
+Fri Aug 3 15:24:36 CEST 2007 - jsuchome@suse.cz
+
+- do not require rpms for creating AddOn (#297165)
+- password verification entry (#297168)
+- new PackagesDescr.pm module instead of ag_packages_descr
+ (Perl agent cannot handle large amount of data on input)
+- during copying packages, copy whole directories to prevent too
+ long line with bash command
+- 2.15.15
+
+-------------------------------------------------------------------
Old:
----
yast2-add-on-creator-2.15.14.tar.bz2
New:
----
yast2-add-on-creator-2.15.15.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-add-on-creator.spec ++++++
--- /var/tmp/diff_new_pack.Nd5457/_old 2007-08-03 21:12:10.000000000 +0200
+++ /var/tmp/diff_new_pack.Nd5457/_new 2007-08-03 21:12:10.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-add-on-creator (Version 2.15.14)
+# spec file for package yast2-add-on-creator (Version 2.15.15)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,17 +11,17 @@
# norootforbuild
Name: yast2-add-on-creator
-Version: 2.15.14
+Version: 2.15.15
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-add-on-creator-2.15.14.tar.bz2
+Source0: yast2-add-on-creator-2.15.15.tar.bz2
prefix: /usr
Requires: yast2
BuildRequires: perl-XML-Writer update-desktop-files yast2 yast2-devtools yast2-testsuite
BuildArchitectures: noarch
-Summary: YaST module for creating Add-On product
+Summary: YaST2- module for creating Add-On product
%description
A wizard for creating your own Add-On product
@@ -33,7 +33,7 @@
Jiř� Suchomel
%prep
-%setup -n yast2-add-on-creator-2.15.14
+%setup -n yast2-add-on-creator-2.15.15
%build
%{prefix}/bin/y2tool y2autoconf
@@ -62,6 +62,7 @@
/usr/share/YaST2/include/add-on-creator/*
/usr/share/YaST2/clients/add-on-creator*.ycp
/usr/share/YaST2/modules/AddOnCreator.*
+/usr/share/YaST2/modules/PackagesDescr.pm
%{prefix}/share/applications/YaST2/add-on-creator.desktop
#agents:
/usr/share/YaST2/scrconf/*.scr
@@ -69,6 +70,14 @@
%doc %{prefix}/share/doc/packages/yast2-add-on-creator
%changelog
+* Fri Aug 03 2007 - jsuchome@suse.cz
+- do not require rpms for creating AddOn (#297165)
+- password verification entry (#297168)
+- new PackagesDescr.pm module instead of ag_packages_descr
+ (Perl agent cannot handle large amount of data on input)
+- during copying packages, copy whole directories to prevent too
+ long line with bash command
+- 2.15.15
* Thu Aug 02 2007 - jsuchome@suse.cz
- tag for suggested packages in pattern is Psg, not Prs
- licenses saved in /media.1/license directory and not compressed,
++++++ yast2-add-on-creator-2.15.14.tar.bz2 -> yast2-add-on-creator-2.15.15.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-add-on-creator-2.15.14/src/AddOnCreator.ycp new/yast2-add-on-creator-2.15.15/src/AddOnCreator.ycp
--- old/yast2-add-on-creator-2.15.14/src/AddOnCreator.ycp 2007-08-02 15:58:03.000000000 +0200
+++ new/yast2-add-on-creator-2.15.15/src/AddOnCreator.ycp 2007-08-03 14:56:20.000000000 +0200
@@ -24,7 +24,7 @@
* Summary: AddOnCreator settings, input and output functions
* Authors: Jiri Suchomel
*
- * $Id: AddOnCreator.ycp 39816 2007-07-30 19:20:09Z jsuchome $
+ * $Id: AddOnCreator.ycp 39906 2007-08-02 14:59:56Z jsuchome $
*
* Representation of the configuration of add-on-creator.
* Input and output routines.
@@ -40,6 +40,7 @@
import "Mode";
import "Package";
import "PackageSystem";
+import "PackagesDescr";
import "Popup";
import "Progress";
import "Report";
@@ -517,7 +518,7 @@
global map patterns = $[];
// path to directory with RPM's
-global string rpm_path = "";
+global string rpm_path = nil;
// path to directory with RPM's, used only for building patterns
// and not present on AddOn
@@ -840,8 +841,7 @@
y2milestone ("Importing package description '%1'", file_path);
- map ret = (map) SCR::Read (.packages_descr, file_path);
- return ret;
+ return PackagesDescr::Read (file_path);
}
/**
@@ -1040,7 +1040,9 @@
// 1. set the values for ARCH.*
string cmd = sformat ("cd %1; find -maxdepth 1 -type d", rpm_path);
- map out = (map) SCR::Execute (.target.bash_output, cmd);
+ map out = $[];
+ if (rpm_path != "")
+ out = (map) SCR::Execute (.target.bash_output, cmd);
arch_directories = [];
foreach(string d, splitstring(out["stdout"]:"", "\n"), {
@@ -1055,8 +1057,9 @@
if (!clone)
{
// 2. get the list of architectures from RPM's
- out = (map) SCR::Execute (.target.bash_output,
- sformat ("find %1 -name '*.rpm'", rpm_path));
+ if (rpm_path != "")
+ out = (map) SCR::Execute (.target.bash_output,
+ 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;
@@ -1118,6 +1121,7 @@
y2milestone ("... done");
}
}
+ if (rpm_path == "") return;
// generate tmp package descriptions...
// TODO move to other function?
@@ -1247,7 +1251,8 @@
if (arch_directories == [])
{
foreach (string arch_dir, list pa, available_packages, {
- SCR::Execute (.target.mkdir, full_data_path + "/" + arch_dir);
+ if (arch_dir != "ZZZ_imported" && arch_dir != "ZZZ_required")
+ SCR::Execute (.target.mkdir, full_data_path + "/" + arch_dir);
});
}
@@ -1274,9 +1279,10 @@
if (!FileUtils::Exists (descr_path)) return false;
boolean ret = true;
+ if (descr == $[]) return ret;
foreach (string lang, map data, (map)descr, {
string file_path = descr_path + "/packages." + lang;
- ret = ret && SCR::Write (.packages_descr, [file_path, data]);
+ ret = ret && PackagesDescr::Write (file_path,(map)data);
});
if (ret) // copy the rest of files, generated earlier
{
@@ -1474,6 +1480,9 @@
*/
global boolean CopyRPMs (string in_path, string base_path) {
+ if (in_path == "")
+ return true;
+
if (!FileUtils::Exists (base_path) || !FileUtils::Exists (in_path))
return false;
// packages in the directories with arch name
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-add-on-creator-2.15.14/src/complex.ycp new/yast2-add-on-creator-2.15.15/src/complex.ycp
--- old/yast2-add-on-creator-2.15.14/src/complex.ycp 2007-08-02 16:17:53.000000000 +0200
+++ new/yast2-add-on-creator-2.15.15/src/complex.ycp 2007-08-03 14:56:14.000000000 +0200
@@ -24,7 +24,7 @@
* Summary: Dialogs definitions
* Authors: Jiri Suchomel
*
- * $Id: complex.ycp 39831 2007-07-31 10:34:20Z jsuchome $
+ * $Id: complex.ycp 39906 2007-08-02 14:59:56Z jsuchome $
*/
{
@@ -199,6 +199,8 @@
if (requires == "")
requires = "sles-release-10";
string old_dir = AddOnCreator::rpm_path;
+ if (AddOnCreator::rpm_path == nil)
+ AddOnCreator::rpm_path = "";
string old_requires = requires;
// dialog caption
@@ -332,14 +334,7 @@
UI::ChangeWidget (`id(`other_val), `Enabled, true);
}
else if (ret == `next) {
- if (dir == "")
- {
- // error popup
- Popup::Error (_("Enter the path to the directory with packages."));
- UI::SetFocus (`id(`rpm_path));
- continue;
- }
- if (!FileUtils::Exists (dir))
+ if (dir != "" && !FileUtils::Exists (dir))
{
// error popup
Popup::Error(sformat(_("Directory %1 is not accessible."),dir));
@@ -354,7 +349,7 @@
UI::SetFocus (`id(`required_rpm_path));
continue;
}
- if (substring (dir, size (dir) - 1, 1) != "/")
+ if (dir != "" && substring (dir, size (dir) - 1, 1) != "/")
dir = dir + "/";
AddOnCreator::rpm_path = dir;
if (req_dir != "" && substring (req_dir, size (req_dir) - 1, 1) != "/")
@@ -1033,7 +1028,7 @@
)
)
);
- UI::ChangeWidget (`id(`add_lang),`Enabled,
+ UI::ChangeWidget (`id(`add_lang),`Enabled, size (descr) != 0 &&
size(descr) < size (allowed_langs));
}
@@ -1097,11 +1092,15 @@
// do not allow to add new description key when all are present
integer full_descr = size (description_descr);
- UI::ChangeWidget (`id(`add), `Enabled,
+ UI::ChangeWidget (`id(`add), `Enabled, descr[current_lang]:$[] != $[] &&
size (descr[current_lang, current_package]:$[]) < full_descr);
// do not delete default language file
- UI::ChangeWidget (`id(`delete_lang),`Enabled, current_lang != def_lang);
+ UI::ChangeWidget (`id(`delete_lang),`Enabled, current_lang != def_lang &&
+ descr[current_lang]:$[] != $[]);
+
+ UI::ChangeWidget (`id(`import_lang), `Enabled, descr[current_lang]:$[] != $[]);
+ UI::ChangeWidget (`id(`edit), `Enabled, descr[current_lang]:$[] != $[]);
replace_language_widgets (current_lang);
@@ -1351,6 +1350,9 @@
),
// password entry label
`Password (`id(`pw), _("&Passphrase"), AddOnCreator::passphrase),
+ // password entry label (verification)
+ `Password (`id(`pw2), _("&Passphrase Verification"),
+ AddOnCreator::passphrase),
// checkbox label
`Left (`CheckBox (`id (`resign),
_("Re&sign all packages with selected key"),
@@ -1382,6 +1384,15 @@
}
}
else if (ret == `next) {
+ string pw = (string)UI::QueryWidget(`id(`pw),`Value);
+ if (pw != (string)UI::QueryWidget(`id(`pw2), `Value))
+ {
+ // error message
+ Popup::Error (_("Passwords do not match. Try again."));
+ UI::SetFocus (`id (`pw));
+ continue;
+ }
+
boolean resign = (boolean) UI::QueryWidget(`id(`resign), `Value);
if (resign && !Package::Install ("expect"))
{
@@ -1389,7 +1400,7 @@
continue;
}
AddOnCreator::gpg_key = key;
- AddOnCreator::passphrase = (string)UI::QueryWidget(`id(`pw),`Value);
+ AddOnCreator::passphrase = pw;
AddOnCreator::resign_packages = resign;
break;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-add-on-creator-2.15.14/src/Makefile.am new/yast2-add-on-creator-2.15.15/src/Makefile.am
--- old/yast2-add-on-creator-2.15.14/src/Makefile.am 2007-04-04 16:06:32.000000000 +0200
+++ new/yast2-add-on-creator-2.15.15/src/Makefile.am 2007-08-03 09:14:52.000000000 +0200
@@ -17,7 +17,8 @@
add-on-creator.desktop
module_DATA = \
- AddOnCreator.ycp
+ AddOnCreator.ycp \
+ PackagesDescr.pm
# create a symlink for local build, #145327
add-on-creator:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-add-on-creator-2.15.14/src/Makefile.in new/yast2-add-on-creator-2.15.15/src/Makefile.in
--- old/yast2-add-on-creator-2.15.14/src/Makefile.in 2007-05-17 16:55:13.000000000 +0200
+++ new/yast2-add-on-creator-2.15.15/src/Makefile.in 2007-08-03 09:14:55.000000000 +0200
@@ -194,7 +194,8 @@
add-on-creator.desktop
module_DATA = \
- AddOnCreator.ycp
+ AddOnCreator.ycp \
+ PackagesDescr.pm
ycpchook = add-on-creator
EXTRA_DIST = $(client_DATA) $(ynclude_DATA) $(module_DATA) $(desktop_DATA)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-add-on-creator-2.15.14/src/PackagesDescr.pm new/yast2-add-on-creator-2.15.15/src/PackagesDescr.pm
--- old/yast2-add-on-creator-2.15.14/src/PackagesDescr.pm 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-add-on-creator-2.15.15/src/PackagesDescr.pm 2007-08-03 11:16:15.000000000 +0200
@@ -0,0 +1,162 @@
+#! /usr/bin/perl -w
+# File: modules/PackagesDescr.pm
+# Package: Add-On creator
+# Summary: Module for parsing package descriptions
+# Author: Jiri Suchomel
+
+package PackagesDescr;
+
+use strict;
+use YaST::YCP qw(:LOGGING);
+
+our %TYPEINFO;
+
+YaST::YCP::Import ("FileUtils");
+YaST::YCP::Import ("SCR");
+
+#---------------------------------------------------------------------
+#--------------------------------------------------------- definitions
+
+
+my %description = ();
+my $version = "";
+my $err_no = 0;
+
+# which keys have multiline values
+my %multiple = (
+ "Des" => 1,
+ "Ins" => 1,
+ "Del" => 1,
+ "Eul" => 1
+);
+
+# parse the input file (given as argument) and fill the %description hash
+sub parse_file {
+
+ my $file = shift;
+
+ if (! FileUtils->Exists ($file)) {
+ y2warning ("$file is not available!");
+ return 0;
+ }
+ my $in = SCR->Read (".target.string", $file);
+
+ if (! defined $in) {
+ y2warning ("$file cannot be opened for reading!");
+ $err_no = 1;
+ return 0;
+ }
+ my $pkg_name = "___global___"; # global values, before first Pkg
+ my $multiline_key = "";
+ my $multiline_val = "";
+ %description = ();
+ $version = "";
+
+ foreach my $line (split (/\n/,$in)) {
+ chomp $line;
+ if ($line =~ /^=([\w]+):[ \t]*(.*)/) {
+ my $key = $1;
+ my $val = $2;
+ if ($key eq "Pkg") {
+ $pkg_name = $val;
+# ($pkg_name) = ($val =~ /([^ \t]*).*/);
+ $description{$pkg_name} = {
+ "Pkg" => $val
+ };
+ }
+ else {
+ if ($key eq "Ver") {
+ $version = $val;
+ }
+ else {
+ $description{$pkg_name}{$key} = $val;
+ }
+ }
+ }
+ elsif ($line =~ /^\+([\w]+):.*/) {
+ $multiline_key = $1;
+ $multiline_val = "";
+ }
+ elsif ($line =~ /^\-([\w]+):.*/) {
+ if ($multiline_key eq $1) {
+ $description{$pkg_name}{$multiline_key} = $multiline_val;
+ }
+ else {
+ y2error ("ending key is $1, while starting was $multiline_key");
+ }
+ }
+ elsif ($multiline_key) {
+ $multiline_val = $multiline_val."\n" if ($multiline_val);
+ $multiline_val = $multiline_val.$line;
+ }
+ }
+ return 1;
+}
+
+sub write_file {
+
+}
+
+# --------------------------------------- main -----------------------------
+
+BEGIN { $TYPEINFO{Read} = ["function",
+ ["map", "string", "any"],
+ "string"]
+}
+sub Read {
+
+ my $self = shift;
+ my $file = shift;
+ my $ret = {};
+
+ if (parse_file ($file)) {
+ $ret = \%description;
+ }
+ return \%description;
+}
+
+# write the file with description; 1st argument is path, 2nd data hash
+BEGIN { $TYPEINFO{Write} = ["function",
+ "boolean",
+ "string", ["map", "string", "any"]]
+}
+sub Write {
+
+ my $self = shift;
+ my $file = shift;
+ my $descr = shift;
+
+ if (ref ($descr) ne "HASH" || !%{$descr}) {
+ y2error ("data not hash or empty");
+ $err_no = 10;
+ return 0;
+ }
+ my $cont = "";
+ $cont = "=Ver: $version\n" if $version;
+ # sort order: system items go before local ones
+ foreach my $pkg_name (sort keys %{$descr}) {
+ my $data = $descr->{$pkg_name};
+ next if (ref $data ne "HASH");
+ if ($pkg_name ne "___global___") {
+ $cont = $cont."##----------------------------------------\n";
+ # let the Pkg key is first
+ if (defined $data->{"Pkg"}) {
+ my $val = $data->{"Pkg"};
+ $cont = $cont."=Pkg: $val\n";
+ delete $data->{"Pkg"};
+ }
+ }
+ while (my ($key, $val) = each %{$data}) {
+ next if (!$val);
+ if (defined $multiple{$key}) {
+ $cont = $cont."+$key:\n$val\n-$key:\n";
+ }
+ else {
+ $cont = $cont."=$key: $val\n";
+ }
+ }
+ }
+ return SCR->Write (".target.string", $file, $cont);
+}
+42
+# end
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-add-on-creator-2.15.14/VERSION new/yast2-add-on-creator-2.15.15/VERSION
--- old/yast2-add-on-creator-2.15.14/VERSION 2007-08-02 16:40:55.000000000 +0200
+++ new/yast2-add-on-creator-2.15.15/VERSION 2007-08-03 15:40:17.000000000 +0200
@@ -1 +1 @@
-2.15.14
+2.15.15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org