Author: jsuchome
Date: Fri Dec 7 14:12:02 2007
New Revision: 42797
URL: http://svn.opensuse.org/viewcvs/yast?rev=42797&view=rev
Log:
updated to current SP1 version
Modified:
branches/SuSE-SLE-10-SP2-Branch/add-on-creator/VERSION
branches/SuSE-SLE-10-SP2-Branch/add-on-creator/package/yast2-add-on-creator.changes
branches/SuSE-SLE-10-SP2-Branch/add-on-creator/src/AddOnCreator.ycp
branches/SuSE-SLE-10-SP2-Branch/add-on-creator/src/add-on-creator.ycp
branches/SuSE-SLE-10-SP2-Branch/add-on-creator/src/complex.ycp
branches/SuSE-SLE-10-SP2-Branch/add-on-creator/src/patterns.ycp
Modified: branches/SuSE-SLE-10-SP2-Branch/add-on-creator/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP2-Branch/add-on-creator/VERSION?rev=42797&r1=42796&r2=42797&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP2-Branch/add-on-creator/VERSION (original)
+++ branches/SuSE-SLE-10-SP2-Branch/add-on-creator/VERSION Fri Dec 7 14:12:02 2007
@@ -1 +1 @@
-2.13.21
+2.13.26
Modified: branches/SuSE-SLE-10-SP2-Branch/add-on-creator/package/yast2-add-on-creator.changes
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP2-Branch/add-on-creator/package/yast2-add-on-creator.changes?rev=42797&r1=42796&r2=42797&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP2-Branch/add-on-creator/package/yast2-add-on-creator.changes (original)
+++ branches/SuSE-SLE-10-SP2-Branch/add-on-creator/package/yast2-add-on-creator.changes Fri Dec 7 14:12:02 2007
@@ -1,4 +1,40 @@
-------------------------------------------------------------------
+Tue Oct 30 22:16:18 CET 2007 - jsuchome@suse.cz
+
+- create patterns with correct key ordering (#328816)
+- after pattern import, show also keys without value (#329738)
+- 2.13.26
+
+-------------------------------------------------------------------
+Wed Sep 5 12:53:26 CEST 2007 - jsuchome@suse.cz
+
+- enable deleting of pattern keys (#297195)
+- 2.13.25
+
+-------------------------------------------------------------------
+Thu Aug 23 14:19:10 CEST 2007 - jsuchome@suse.cz
+
+- copy packages with different architectures to correct
+ directories (#302439)
+- 2.13.24
+
+-------------------------------------------------------------------
+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)
+- 2.13.22
+
+-------------------------------------------------------------------
Wed May 30 10:06:57 CEST 2007 - jsuchome@suse.cz
- added support for source rpm's (#279004)
Modified: branches/SuSE-SLE-10-SP2-Branch/add-on-creator/src/AddOnCreator.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP2-Branch/add-on-creator/src/AddOnCreator.ycp?rev=42797&r1=42796&r2=42797&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP2-Branch/add-on-creator/src/AddOnCreator.ycp (original)
+++ branches/SuSE-SLE-10-SP2-Branch/add-on-creator/src/AddOnCreator.ycp Fri Dec 7 14:12:02 2007
@@ -35,10 +35,12 @@
module "AddOnCreator";
textdomain "add-on-creator";
+import "Arch";
import "Directory";
import "FileUtils";
import "Mode";
import "Package";
+import "PackageSystem";
import "Popup";
import "Progress";
import "Report";
@@ -66,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" : $[
@@ -82,6 +85,7 @@
"label" : _("Distribution version"),
// help text for content file 'DISTVERSION' key
"help" : _("Distribution version (vendor specific)."),
+ "value" : "1",
"mandatory" : true,
],
"VENDOR" : $[
@@ -255,7 +259,7 @@
// desctiption of pattern keys
-global map pattern_descr = $[
+global map pattern_descr = $[
"name" : $[
"internal" : true,
],
@@ -337,7 +341,7 @@
"type" : "package-list",
"defval" : [],
],
- "Prs" : $[
+ "Psg" : $[
// label for 'Prs' pattern key
"label" : _("Suggested packages"),
// help text for 'Prs' pattern key
@@ -488,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
@@ -512,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 = "";
@@ -590,10 +600,10 @@
global map available_packages = $[];
// mapping of package name to full file name
-global map package2filename = $[];
+global map package2filename = $[];
// mapping of source package name to full file name
-global map srcpackage2filename = $[];
+global map srcpackage2filename = $[];
// if we want only to sign existing product (and possibly create iso of it)
global boolean only_sign_product = false;
@@ -692,6 +702,9 @@
*/
global boolean Read() {
+ if (!PackageSystem::CheckAndInstallPackagesInteractive (["inst-source-utils"]))
+ return false;
+
gpg_keys = read_secret_keys ();
gpg_key = gpg_keys[0]:"";
@@ -707,6 +720,8 @@
else
content_descr[key,"allowed_values"] = [];
}
+ if (key == "DEFAULTBASE")
+ content_descr[key,"value"] = Arch::architecture ();
i = i + 1;
});
@@ -797,6 +812,15 @@
else
ret[key] = val;
});
+ foreach (string key, map descr, pattern_descr, {
+ if (!haskey (ret, key) && !descr["internal"]:false)
+ {
+ y2debug ("adding empty key '%1'...", key);
+ // do not add default values - maybe imported pattern
+ // ignored them intentionally
+ ret[key] = "";
+ }
+ });
return ret;
}
@@ -987,7 +1011,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"), {
@@ -1002,8 +1028,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;
@@ -1020,10 +1047,14 @@
{
available_packages[arch] = add (
available_packages[arch]:[], name);
+ if (!haskey (package2filename, arch))
+ package2filename[arch] = $[];
+ if (!haskey (srcpackage2filename, arch))
+ srcpackage2filename[arch] = $[];
if (arch != "src")
- package2filename[name] = f;
+ package2filename[arch,name] = f;
else
- srcpackage2filename[name] = f;
+ srcpackage2filename[arch,name] = f;
}
});
y2milestone ("... done");
@@ -1065,6 +1096,7 @@
y2milestone ("... done");
}
}
+ if (rpm_path == "") return;
// generate tmp package descriptions...
// TODO move to other function?
@@ -1194,7 +1226,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);
});
}
@@ -1221,6 +1254,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]);
@@ -1234,6 +1268,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;
}
@@ -1380,7 +1421,10 @@
if (filename == "")
return;
names = add (names, filename);
- string file = "";
+ string file = sformat ("=Ver: %1\n\n=Pat: %2\n",
+ pattern["Ver"]:pattern_descr["Ver","defval"]:"",
+ pattern["Pat"]:"");
+ pattern = remove (remove (pattern, "Ver"), "Pat");
foreach (string key, any val, (map) pattern, {
map descr = pattern_descr[key]:$[];
// substring (key,0,3) is because of Des.lang, Sum.lang and Cat.lang
@@ -1421,6 +1465,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
@@ -1450,14 +1497,14 @@
{
foreach (string p, (list<string>) pa, {
SCR::Execute (.target.bash, sformat (
- "/bin/cp %1 '%2/'", package2filename[p]:"", out_dir));
+ "/bin/cp %1 '%2/'", package2filename[arch,p]:"", out_dir));
});
}
else if (size (srcpackage2filename) > 0 && arch == "src")
{
foreach (string p, (list<string>) pa, {
SCR::Execute (.target.bash, sformat (
- "/bin/cp %1 '%2/'", srcpackage2filename[p]:"", out_dir));
+ "/bin/cp %1 '%2/'", srcpackage2filename[arch,p]:"", out_dir));
});
}
else
@@ -1842,7 +1889,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-SP2-Branch/add-on-creator/src/add-on-creator.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP2-Branch/add-on-creator/src/add-on-creator.ycp?rev=42797&r1=42796&r2=42797&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP2-Branch/add-on-creator/src/add-on-creator.ycp (original)
+++ branches/SuSE-SLE-10-SP2-Branch/add-on-creator/src/add-on-creator.ycp Fri Dec 7 14:12:02 2007
@@ -45,7 +45,6 @@
import "CommandLine";
import "Directory";
import "FileUtils";
-import "PackageSystem";
include "add-on-creator/wizards.ycp";
@@ -188,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"]:"";
@@ -448,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"),
@@ -470,12 +503,7 @@
]
];
-any ret = nil;
-
-if (!PackageSystem::CheckAndInstallPackagesInteractive (["inst-source-utils"]))
- ret = `cancel;
-else
- ret = CommandLine::Run(cmdline_description);
+any ret = CommandLine::Run(cmdline_description);
/* Finish */
y2milestone("AddOnCreator module finished with %1", ret);
Modified: branches/SuSE-SLE-10-SP2-Branch/add-on-creator/src/complex.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP2-Branch/add-on-creator/src/complex.ycp?rev=42797&r1=42796&r2=42797&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP2-Branch/add-on-creator/src/complex.ycp (original)
+++ branches/SuSE-SLE-10-SP2-Branch/add-on-creator/src/complex.ycp Fri Dec 7 14:12:02 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 (
Modified: branches/SuSE-SLE-10-SP2-Branch/add-on-creator/src/patterns.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP2-Branch/add-on-creator/src/patterns.ycp?rev=42797&r1=42796&r2=42797&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP2-Branch/add-on-creator/src/patterns.ycp (original)
+++ branches/SuSE-SLE-10-SP2-Branch/add-on-creator/src/patterns.ycp Fri Dec 7 14:12:02 2007
@@ -238,6 +238,7 @@
`HBox (
`PushButton (`id(`add), `opt(`key_F6), Label::AddButton ()),
`PushButton (`id(`edit), `opt(`key_F7), Label::EditButton ()),
+ `PushButton (`id(`delete), `opt(`key_F8), Label::DeleteButton ()),
`HStretch ()
),
`VSpacing (0.5)
@@ -334,6 +335,13 @@
}
UI::SetFocus (`id(`pattern));
}
+ else if (ret == `delete) {
+ string key = (string)UI::QueryWidget (`id(`pattern),`CurrentItem);
+ patterns[sel] = remove (patterns[sel]:$[], key);
+ UI::ChangeWidget (`id(`pattern), `Items,
+ get_pattern_items (patterns[sel]:$[]));
+ UI::SetFocus (`id(`pattern));
+ }
else if (ret == `edit || ret == `pattern) {
string key = (string)UI::QueryWidget (`id(`pattern),`CurrentItem);
map pat = pattern_descr[key]:$[];
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org