Mailinglist Archive: yast-commit (590 mails)

< Previous Next >
[yast-commit] r61595 - in /trunk/installation: package/yast2-installation.changes src/inst_finish/copy_files_finish.ycp
  • From: locilka@xxxxxxxxxxxxxxxx
  • Date: Wed, 07 Apr 2010 08:22:43 -0000
  • Message-id: <E1NzQX5-0001To-KU@xxxxxxxxxxxxxxxx>
Author: locilka
Date: Wed Apr 7 10:22:43 2010
New Revision: 61595

URL: http://svn.opensuse.org/viewcvs/yast?rev=61595&view=rev
Log:
- Searching for LiveCD license in /usr/share/doc/licenses and /
directories (BNC #594042).


Modified:
trunk/installation/package/yast2-installation.changes
trunk/installation/src/inst_finish/copy_files_finish.ycp

Modified: trunk/installation/package/yast2-installation.changes
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/installation/package/yast2-installation.changes?rev=61595&r1=61594&r2=61595&view=diff
==============================================================================
--- trunk/installation/package/yast2-installation.changes (original)
+++ trunk/installation/package/yast2-installation.changes Wed Apr 7 10:22:43
2010
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Tue Apr 6 17:44:25 CEST 2010 - locilka@xxxxxxx
+
+- Searching for LiveCD license in /usr/share/doc/licenses and /
+ directories (BNC #594042).
+
+-------------------------------------------------------------------
Fri Mar 26 11:26:04 CET 2010 - ug@xxxxxxx

- fixed a broken yast2-installation.spec.in

Modified: trunk/installation/src/inst_finish/copy_files_finish.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/inst_finish/copy_files_finish.ycp?rev=61595&r1=61594&r2=61595&view=diff
==============================================================================
--- trunk/installation/src/inst_finish/copy_files_finish.ycp (original)
+++ trunk/installation/src/inst_finish/copy_files_finish.ycp Wed Apr 7
10:22:43 2010
@@ -191,21 +191,31 @@
y2milestone ("Using license dir: %1", license_dir);
}

- string license_file = "/license.tar.gz";
- // Copy licenses so it can be used in firstboot later
- // bnc #396976
- map cmd = (map) WFM::Execute (.local.bash_output,
- sformat (
- "mkdir -p '%1' && cd '%1' && rm -rf license*.txt; tar -xf '%2'",
- String::Quote (license_dir),
- String::Quote (license_file)
- )
- );
- if (cmd["exit"]:-1 == 0) {
- y2milestone ("Copying %1 to %2 was successful", license_file,
license_dir);
- } else {
- y2error ("Copying %1 to %2 has failed: %3", license_file, license_dir,
cmd);
- }
+ // BNC #594042: Multiple license locations
+ list <string> license_locations = ["/usr/share/doc/licenses/", "/"];
+
+ foreach (string license_location, license_locations, {
+ license_location = sformat ("%1/license.tar.gz", license_location);
+
+ if (! FileUtils::Exists (license_location)) return;
+
+ // Copy licenses so it can be used in firstboot later
+ // bnc #396976
+ map cmd = (map) WFM::Execute (.local.bash_output,
+ sformat (
+ "mkdir -p '%1' && cd '%1' && rm -rf license*.*; cd '%1' && tar
-xf '%2'",
+ String::Quote (license_dir),
+ String::Quote (license_location)
+ )
+ );
+ if (cmd["exit"]:-1 == 0) {
+ y2milestone ("Copying %1 to %2 was successful", license_location,
license_dir);
+ } else {
+ y2error ("Copying %1 to %2 has failed: %3", license_location,
license_dir, cmd);
+ }
+
+ break;
+ });

// bugzila #328126
// Copy 70-persistent-cd.rules ... if not updating

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages