[yast-commit] r39906 - in /trunk/add-on-creator: VERSION package/yast2-add-on-creator.changes src/AddOnCreator.ycp src/complex.ycp
Author: jsuchome Date: Thu Aug 2 16:59:56 2007 New Revision: 39906 URL: http://svn.opensuse.org/viewcvs/yast?rev=39906&view=rev Log: - tag for suggested packages in pattern is Psg, not Prs - licenses saved in /media.1/license directory and not compressed, license.txt duplicated as EULA.txt (F302018) - added button for importing package license text - offered SLE10SP1 products as a base for new AddOn - enable resigning of the packages (#287447) - 2.15.14 Modified: trunk/add-on-creator/VERSION trunk/add-on-creator/package/yast2-add-on-creator.changes trunk/add-on-creator/src/AddOnCreator.ycp trunk/add-on-creator/src/complex.ycp Modified: trunk/add-on-creator/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/add-on-creator/VERSION?rev=39906&r1=39905&r2=39906&view=diff ============================================================================== --- trunk/add-on-creator/VERSION (original) +++ trunk/add-on-creator/VERSION Thu Aug 2 16:59:56 2007 @@ -1 +1 @@ -2.15.13 +2.15.14 Modified: trunk/add-on-creator/package/yast2-add-on-creator.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/add-on-creator/package/yast2-add-on-creator.changes?rev=39906&r1=39905&r2=39906&view=diff ============================================================================== --- trunk/add-on-creator/package/yast2-add-on-creator.changes (original) +++ trunk/add-on-creator/package/yast2-add-on-creator.changes Thu Aug 2 16:59:56 2007 @@ -1,4 +1,18 @@ ------------------------------------------------------------------- +Thu Aug 2 14:42:45 CEST 2007 - jsuchome@suse.cz + +- tag for suggested packages in pattern is Psg, not Prs +- licenses saved in /media.1/license directory and not compressed, + license.txt duplicated as EULA.txt (F302018) +- added button for importing package license text +- 2.15.14 + +------------------------------------------------------------------- +Tue Jul 31 11:37:23 CEST 2007 - jsuchome@suse.cz + +- offered SLE10SP1 products as a base for new AddOn + +------------------------------------------------------------------- Thu Jun 14 14:15:55 CEST 2007 - jsuchome@suse.cz - enable resigning of the packages (#287447) Modified: trunk/add-on-creator/src/AddOnCreator.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/add-on-creator/src/AddOnCreator.ycp?rev=39906&r1=39905&r2=39906&view=diff ============================================================================== --- trunk/add-on-creator/src/AddOnCreator.ycp (original) +++ trunk/add-on-creator/src/AddOnCreator.ycp Thu Aug 2 16:59:56 2007 @@ -340,7 +340,7 @@ "type" : "package-list", "defval" : [], ], - "Prs" : $[ + "Psg" : $[ // label for 'Prs' pattern key "label" : _("Suggested packages"), // help text for 'Prs' pattern key @@ -898,12 +898,30 @@ // read the license files string license_path = dir_path + "/media.1/license.zip"; + out = $[]; if (FileUtils::Exists (license_path)) { SCR::Execute (.target.bash_output, sformat ("/usr/bin/unzip -o %1 -d %2", license_path, tmpdir)); - map out = (map) SCR::Execute (.target.bash_output, + out = (map) SCR::Execute (.target.bash_output, sformat ("ls -A1 %1/license*.txt 2>/dev/null", tmpdir)); + } + else if (FileUtils::IsDirectory (dir_path + "/media.1/license") == true) + { + license_path = dir_path + "/media.1/license"; + out = (map) SCR::Execute (.target.bash_output, + sformat ("ls -A1 %1/media.1/license/license*.txt 2>/dev/null", + dir_path)); + } + else if (FileUtils::Exists (dir_path + "/EULA.txt")) + { + SCR::Execute (.target.bash, + sformat ("/bin/cp %1/EULA.txt %2/license.txt", dir_path, tmpdir)); + out = (map) SCR::Execute (.target.bash_output, + sformat ("ls -A1 %1/license*.txt 2>/dev/null", tmpdir)); + } + if (out != $[]) + { foreach (string f, splitstring(out["stdout"]:"", "\n"), { if (f == "") return; string name = substring (f, findlastof (f, "/") + 1); @@ -1377,11 +1395,13 @@ // write license.txt files in media.1 dir global boolean WriteLicensesFiles (string media_path, map<string,string> files){ - if (!Package::Install ("zip") || !FileUtils::Exists (media_path)) + if (!FileUtils::Exists (media_path)) return false; boolean ret = true; string cmd = ""; + if (size (files) > 0) + SCR::Execute (.target.mkdir, media_path +"/license"); foreach (string file, string cont, files, { if (cont != "") { @@ -1389,14 +1409,12 @@ if (pos == nil || substring (file, pos) != ".txt") file = file + ".txt"; cmd = cmd + " " + file; - ret = ret && SCR::Write(.target.string, media_path +"/"+ file,cont); + ret = ret && + SCR::Write (.target.string, media_path +"/license/"+ file,cont); + if (file == "license.txt") + SCR::Write (.target.string, base_output_path+"/EULA.txt", cont); } }); - if (ret && cmd != "") - { - cmd = sformat ("cd %1; zip license.zip -m%2", media_path, cmd); - ret = SCR::Execute (.target.bash, cmd) == 0; - } return ret; } @@ -1465,11 +1483,9 @@ string dir = in_path + "/" + arch; if (FileUtils::Exists (dir)) { - string target = full_data_path + "/" + arch; - SCR::Execute (.target.mkdir, target); - y2milestone ("copying from %1 to %2...", dir, target); + y2milestone ("copying from %1 to %2...", dir, full_data_path); SCR::Execute (.target.bash_output, - sformat ("/bin/cp -r %1/*.rpm '%2/'", dir, target)); + sformat ("/bin/cp -r %1 '%2/'", dir, full_data_path)); } }); } Modified: trunk/add-on-creator/src/complex.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/add-on-creator/src/complex.ycp?rev=39906&r1=39905&r2=39906&view=diff ============================================================================== --- trunk/add-on-creator/src/complex.ycp (original) +++ trunk/add-on-creator/src/complex.ycp Thu Aug 2 16:59:56 2007 @@ -922,6 +922,8 @@ `HBox( `PushButton(`id(`ok),`opt(`default,`key_F10),Label::OKButton()), `PushButton(`id(`cancel),`opt (`key_F9), Label::CancelButton()), + // push button label + `PushButton(`id(`import),`opt (`key_F3), _("I&mport")), `PushButton(`id(`help),`opt (`key_F2), Label::HelpButton()) ) ), @@ -941,6 +943,20 @@ { Wizard::ShowHelp (help); } + if (result == `import) + { + string file = UI::AskForExistingFile ( + AddOnCreator::base_output_path, "", + // popup for file selection dialog + _("Choose the file with the text to be imported") + ); + if (file != nil) + { + string text = (string) SCR::Read (.target.string, file); + if (text != nil) + UI::ChangeWidget (`id(`val), `Value, text); + } + } if (result == `ok) { ret = $[ -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
jsuchome@svn.opensuse.org