Author: jsuchome
Date: Tue Aug 14 15:49:57 2007
New Revision: 40257
URL: http://svn.opensuse.org/viewcvs/yast?rev=40257&view=rev
Log:
- show ID for GPG key (#275885)
- offered SLE10SP1 products as a base for new AddOn
- tag for suggested packages in pattern is Psg, not Prs
- do not require rpms for creating AddOn (#297165)
- enable adding EXTRA_PROV file (#299233)
- 2.13.23
Modified:
branches/SuSE-SLE-10-SP1-Branch/add-on-creator/VERSION
branches/SuSE-SLE-10-SP1-Branch/add-on-creator/package/yast2-add-on-creator.changes
branches/SuSE-SLE-10-SP1-Branch/add-on-creator/src/AddOnCreator.ycp
branches/SuSE-SLE-10-SP1-Branch/add-on-creator/src/add-on-creator.ycp
branches/SuSE-SLE-10-SP1-Branch/add-on-creator/src/complex.ycp
Modified: branches/SuSE-SLE-10-SP1-Branch/add-on-creator/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP1-Branch/add-on-creator/VERSION?rev=40257&r1=40256&r2=40257&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP1-Branch/add-on-creator/VERSION (original)
+++ branches/SuSE-SLE-10-SP1-Branch/add-on-creator/VERSION Tue Aug 14 15:49:57 2007
@@ -1 +1 @@
-2.13.22
+2.13.23
Modified: branches/SuSE-SLE-10-SP1-Branch/add-on-creator/package/yast2-add-on-creator.changes
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP1-Branch/add-on-creator/package/yast2-add-on-creator.changes?rev=40257&r1=40256&r2=40257&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP1-Branch/add-on-creator/package/yast2-add-on-creator.changes (original)
+++ branches/SuSE-SLE-10-SP1-Branch/add-on-creator/package/yast2-add-on-creator.changes Tue Aug 14 15:49:57 2007
@@ -1,4 +1,14 @@
-------------------------------------------------------------------
+Mon Aug 6 10:14:05 CEST 2007 - jsuchome@suse.cz
+
+- show ID for GPG key (#275885)
+- offered SLE10SP1 products as a base for new AddOn
+- tag for suggested packages in pattern is Psg, not Prs
+- do not require rpms for creating AddOn (#297165)
+- enable adding EXTRA_PROV file (#299233)
+- 2.13.23
+
+-------------------------------------------------------------------
Wed Jun 13 14:21:13 CEST 2007 - jsuchome@suse.cz
- fix installation of inst-source-utils in CLI mode (#281792)
Modified: branches/SuSE-SLE-10-SP1-Branch/add-on-creator/src/AddOnCreator.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP1-Branch/add-on-creator/src/AddOnCreator.ycp?rev=40257&r1=40256&r2=40257&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP1-Branch/add-on-creator/src/AddOnCreator.ycp (original)
+++ branches/SuSE-SLE-10-SP1-Branch/add-on-creator/src/AddOnCreator.ycp Tue Aug 14 15:49:57 2007
@@ -35,6 +35,7 @@
module "AddOnCreator";
textdomain "add-on-creator";
+import "Arch";
import "Directory";
import "FileUtils";
import "Mode";
@@ -67,6 +68,7 @@
"label" : _("Product version and release"),
// help text for content file 'VERSION' key
"help" : _("Product version and release as in RPM <tt>major.minor-release</tt>."),
+ "value" : "1",
"mandatory" : true,
],
"DISTPRODUCT" : $[
@@ -83,6 +85,7 @@
"label" : _("Distribution version"),
// help text for content file 'DISTVERSION' key
"help" : _("Distribution version (vendor specific)."),
+ "value" : "1",
"mandatory" : true,
],
"VENDOR" : $[
@@ -338,7 +341,7 @@
"type" : "package-list",
"defval" : [],
],
- "Prs" : $[
+ "Psg" : $[
// label for 'Prs' pattern key
"label" : _("Suggested packages"),
// help text for 'Prs' pattern key
@@ -489,7 +492,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
@@ -513,6 +516,12 @@
// the contents of info.txt file
global string info = "";
+// the contents of EXTRA_PROV file
+global string extra_prov = "";
+
+// path to the file with EXTRA_PROV data
+global string extra_prov_file = "";
+
// the contents of nextmedia file
global string nextmedia = "";
@@ -711,6 +720,8 @@
else
content_descr[key,"allowed_values"] = [];
}
+ if (key == "DEFAULTBASE")
+ content_descr[key,"value"] = Arch::architecture ();
i = i + 1;
});
@@ -991,7 +1002,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"), {
@@ -1006,8 +1019,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;
@@ -1069,6 +1083,7 @@
y2milestone ("... done");
}
}
+ if (rpm_path == "") return;
// generate tmp package descriptions...
// TODO move to other function?
@@ -1198,7 +1213,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);
});
}
@@ -1225,6 +1241,7 @@
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]);
@@ -1238,6 +1255,13 @@
cmd = sformat ("/bin/cp %1/packages.DU '%2'", tmpdir, descr_path);
SCR::Execute (.target.bash, cmd, $["LANG":"C"]);
}
+
+ if (extra_prov_file != "" && FileUtils::Exists (extra_prov_file))
+ extra_prov = (string) SCR::Read (.target.string, extra_prov_file);
+
+ if (extra_prov != "" && extra_prov != nil)
+ SCR::Write (.target.string, descr_path + "/EXTRA_PROV",extra_prov);
+
return ret;
}
@@ -1425,6 +1449,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
@@ -1846,7 +1873,7 @@
WriteLicensesFiles (full_media_paths[0]:"", license_files);
- if (info != "")
+ if (info != "" && info != nil)
SCR::Write (.target.string, full_media_paths[0]:"" + "/info.txt", info);
Progress::NextStage();
Modified: branches/SuSE-SLE-10-SP1-Branch/add-on-creator/src/add-on-creator.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP1-Branch/add-on-creator/src/add-on-creator.ycp?rev=40257&r1=40256&r2=40257&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP1-Branch/add-on-creator/src/add-on-creator.ycp (original)
+++ branches/SuSE-SLE-10-SP1-Branch/add-on-creator/src/add-on-creator.ycp Tue Aug 14 15:49:57 2007
@@ -187,6 +187,30 @@
}
ParseISOData (options);
+ if (haskey (options, "info"))
+ {
+ string file = options["info"]:"";
+ if (FileUtils::Exists (file))
+ {
+ string info = (string) SCR::Read (.target.string, file);
+ if (info != nil)
+ AddOnCreator::info = info;
+ }
+ else
+ ReportMissingFile (file);
+ }
+ if (haskey (options, "extra_prov"))
+ {
+ string file = options["extra_prov"]:"";
+ if (FileUtils::Exists (file))
+ {
+ string extra = (string) SCR::Read (.target.string, file);
+ if (extra != nil)
+ AddOnCreator::extra_prov = extra;
+ }
+ else
+ ReportMissingFile (file);
+ }
if (haskey (options, "license"))
{
string file = options["license"]:"";
@@ -447,6 +471,16 @@
"help" : _("Path to file with license texts (license.zip)"),
"type" : "string",
],
+ "info" : $[
+ // command line help text for 'info' option
+ "help" : _("Path to file with 'info' text (media.1/info.txt)"),
+ "type" : "string",
+ ],
+ "extra_prov" : $[
+ // command line help text for 'extra_prov' option
+ "help" : _("Path to file with additional dependencies (EXTRA_PROV)"),
+ "type" : "string",
+ ],
"addon_dir" : $[
// command line help text for 'addon-dir' option
"help" : _("Path to directory with Add-On Product"),
Modified: branches/SuSE-SLE-10-SP1-Branch/add-on-creator/src/complex.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP1-Branch/add-on-creator/src/complex.ycp?rev=40257&r1=40256&r2=40257&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP1-Branch/add-on-creator/src/complex.ycp (original)
+++ branches/SuSE-SLE-10-SP1-Branch/add-on-creator/src/complex.ycp Tue Aug 14 15:49:57 2007
@@ -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
@@ -213,10 +215,22 @@
// radio button label
_("SUSE Linux &Enterprise Server 10"),
requires == "sles-release-10")),
+ `Left (`RadioButton(`id(`sles10sp1), `opt (`notify),
+ // radio button label
+ _("SUSE &Linux Enterprise Server 10 SP1"),
+ requires == "product:SUSE_SLES = 10.1")),
`Left (`RadioButton(`id(`sled10), `opt (`notify),
// radio button label
_("SUSE Linux Enterprise &Desktop 10"),
requires == "sled-release-10")),
+ `Left (`RadioButton(`id(`sled10sp1), `opt (`notify),
+ // radio button label
+ _("SUSE L&inux Enterprise &Desktop 10 SP1"),
+ requires == "product:SUSE_SLED = 10.1")),
+ `Left (`RadioButton(`id(`sle10sp1), `opt (`notify),
+ // radio button label
+ _("S&USE Linux Enterprise 10 SP1"),
+ requires == "product:SUSE_SLE = 10.1")),
`HBox (
`Left(`RadioButton(`id(`other), `opt (`notify),
// radio button label
@@ -295,10 +309,22 @@
requires = "sles-release-10";
UI::ChangeWidget (`id(`other_val), `Enabled, false);
}
+ else if (ret == `sles10sp1) {
+ requires = "product:SUSE_SLES = 10.1";
+ UI::ChangeWidget (`id(`other_val), `Enabled, false);
+ }
else if (ret == `sled10) {
requires = "sled-release-10";
UI::ChangeWidget (`id(`other_val), `Enabled, false);
}
+ else if (ret == `sled10sp1) {
+ requires = "product:SUSE_SLED = 10.1";
+ UI::ChangeWidget (`id(`other_val), `Enabled, false);
+ }
+ else if (ret == `sle10sp1) {
+ requires = "product:SUSE_SLE = 10.1";
+ UI::ChangeWidget (`id(`other_val), `Enabled, false);
+ }
else if (ret == `suse101) {
requires = "suse-release-10.1";
UI::ChangeWidget (`id(`other_val), `Enabled, false);
@@ -308,6 +334,7 @@
UI::ChangeWidget (`id(`other_val), `Enabled, true);
}
else if (ret == `next) {
+ /*
if (dir == "")
{
// error popup
@@ -315,7 +342,8 @@
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));
@@ -330,7 +358,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) != "/")
@@ -993,7 +1021,7 @@
)
)
);
- UI::ChangeWidget (`id(`add_lang),`Enabled,
+ UI::ChangeWidget (`id(`add_lang),`Enabled, size (descr) != 0 &&
size(descr) < size (allowed_langs));
}
@@ -1023,7 +1051,7 @@
// table header
_("Package")), []
),
- `VSpacing (0.5),
+ `VSpacing (0.4),
`Table (`id(`description), `opt(`notify), `header(
// table header 1/2
_("Attribute"),
@@ -1036,7 +1064,15 @@
`PushButton (`id(`edit), `opt(`key_F7), Label::EditButton ()),
`HStretch ()
),
- `VSpacing (0.5)
+ `VSpacing (0.4),
+ `HBox (
+ // textentry label
+ `TextEntry (`id (`extra_prov), _("Location of the File with Additional &Dependencies"), AddOnCreator::extra_prov_file),
+ `VBox (
+ `Label (""),
+ `PushButton (`id (`browse), Label::BrowseButton ())
+ )
+ )
), `HSpacing ());
Wizard::SetContentsButtons(caption, contents, HELPS["packages"]:"",
@@ -1057,11 +1093,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);
@@ -1178,8 +1218,29 @@
}
UI::SetFocus (`id(`description));
}
+ else if (ret == `browse)
+ {
+ string file = UI::AskForExistingFile (
+ AddOnCreator::rpm_path, "",
+ // popup for file selection dialog
+ _("Choose the Path to EXTRA_PROV File")
+ );
+ if (file != nil)
+ UI::ChangeWidget (`id (`extra_prov), `Value, file);
+ }
else if(ret == `next) {
AddOnCreator::packages_descr = descr;
+ string extra = (string) UI::QueryWidget (`id (`extra_prov), `Value);
+ if (extra != "" && !FileUtils::Exists (extra))
+ {
+ // error popup
+ Report::Error (sformat(_("The file '%1' does not exist.
+Choose another one."), extra));
+ UI::SetFocus (`id (`extra_prov));
+ continue;
+ }
+ else
+ AddOnCreator::extra_prov_file = extra;
break;
}
else if (ret == `back) {
@@ -1289,7 +1350,12 @@
// dialog caption
string caption = _("Signing the Add-On Product");
- list gpg_keys = AddOnCreator::gpg_keys;
+ list gpg_keys = maplist (string key, AddOnCreator::gpg_keys, {
+ map out = (map) SCR::Execute (.target.bash_output,
+ sformat ("gpg --list-secret-keys %1 | grep uid | sed -e 's/^uid[ ]*//'", key));
+ string name = deletechars (out["stdout"]:"", "\n");
+ return `item (`id (key), name != "" ? sformat ("%1 (%2)", key, name) : key);
+ });
term contents = `HBox (`HSpacing (), `VBox (
`HBox (
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org