Hello community,
here is the log from the commit of package yast2-packager
checked in at Thu Aug 9 23:17:02 CEST 2007.
--------
--- yast2-packager/yast2-packager.changes 2007-08-08 17:08:03.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-packager/yast2-packager.changes 2007-08-09 16:04:02.000000000 +0200
@@ -1,0 +2,9 @@
+Thu Aug 9 15:52:19 CEST 2007 - locilka@suse.cz
+
+- Adapted License handling to search for /license.tar.gz with
+ /media.1/license.zip as a backward compatibility/fallback.
+- Modified text informing where to find the license
+ (both bugzilla #298342 and FATE #302018).
+- 2.15.57
+
+-------------------------------------------------------------------
Old:
----
yast2-packager-2.15.56.tar.bz2
New:
----
yast2-packager-2.15.57.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-packager.spec ++++++
--- /var/tmp/diff_new_pack.g29523/_old 2007-08-09 23:16:29.000000000 +0200
+++ /var/tmp/diff_new_pack.g29523/_new 2007-08-09 23:16:29.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-packager (Version 2.15.56)
+# spec file for package yast2-packager (Version 2.15.57)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,12 +11,12 @@
# norootforbuild
Name: yast2-packager
-Version: 2.15.56
+Version: 2.15.57
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-packager-2.15.56.tar.bz2
+Source0: yast2-packager-2.15.57.tar.bz2
prefix: /usr
BuildRequires: docbook-xsl-stylesheets doxygen gcc-c++ libxcrypt-devel libxslt perl-XML-Writer sgml-skel update-desktop-files yast2-country yast2-devtools yast2-slp yast2-testsuite yast2-xml
BuildRequires: yast2 >= 2.15.38
@@ -55,7 +55,7 @@
Arvin Schnell
%prep
-%setup -n yast2-packager-2.15.56
+%setup -n yast2-packager-2.15.57
%build
%{prefix}/bin/y2tool y2autoconf
@@ -96,6 +96,12 @@
%doc %{prefix}/share/doc/packages/yast2-packager
%changelog
+* Thu Aug 09 2007 - locilka@suse.cz
+- Adapted License handling to search for /license.tar.gz with
+ /media.1/license.zip as a backward compatibility/fallback.
+- Modified text informing where to find the license
+ (both bugzilla #298342 and FATE #302018).
+- 2.15.57
* Wed Aug 08 2007 - lslezak@suse.cz
- shorten URL used as alias or name
- 2.15.56
++++++ yast2-packager-2.15.56.tar.bz2 -> yast2-packager-2.15.57.tar.bz2 ++++++
++++ 3319 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-packager-2.15.56/configure.in new/yast2-packager-2.15.57/configure.in
--- old/yast2-packager-2.15.56/configure.in 2007-08-08 17:05:11.000000000 +0200
+++ new/yast2-packager-2.15.57/configure.in 2007-08-02 14:17:37.000000000 +0200
@@ -1,9 +1,9 @@
dnl configure.in for yast2-packager
dnl
-dnl -- This file is generated by y2autoconf 2.14.0 - DO NOT EDIT! --
+dnl -- This file is generated by y2autoconf 2.15.2 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-packager, 2.15.56, http://bugs.opensuse.org/, yast2-packager)
+AC_INIT(yast2-packager, 2.15.52, http://bugs.opensuse.org/, yast2-packager)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -17,7 +17,7 @@
AM_INIT_AUTOMAKE(tar-ustar) dnl searches for some needed programs
dnl Important YaST2 variables
-VERSION="2.15.56"
+VERSION="2.15.52"
RPMNAME="yast2-packager"
MAINTAINER="Ladislav Slezak "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-packager-2.15.56/src/modules/ProductLicense.ycp new/yast2-packager-2.15.57/src/modules/ProductLicense.ycp
--- old/yast2-packager-2.15.56/src/modules/ProductLicense.ycp 2007-08-06 10:11:07.000000000 +0200
+++ new/yast2-packager-2.15.57/src/modules/ProductLicense.ycp 2007-08-09 14:55:40.000000000 +0200
@@ -47,6 +47,9 @@
return rt;
}
+// filename printed in the license dialog
+string license_file_print = nil;
+
/**
* Displays License with Help and ( ) Yes / ( ) No radio buttons
* @param string file with the license
@@ -155,11 +158,18 @@
`VSpacing(1),
`HBox (
`HSpacing (2*space),
- `Left (
- // TRANSLATORS: addition license information
- // FATE #302018
- `Label (_("If you want to print this EULA, you can find it
-on the first media in the directory '/media.1/licenses/'"))
+ (license_file_print != nil ?
+ `Left (
+ // FATE #302018
+ `Label (
+ // TRANSLATORS: addition license information
+ // %1 is replaced with the filename
+ sformat(_("If you want to print this EULA, you can find it
+on the first media in the file %1"), license_file_print)
+ )
+ )
+ :
+ `Empty ()
),
`HSpacing (2*space)
),
@@ -244,43 +254,113 @@
string license_dir = nil;
string info_file = nil;
-void GetSourceLicenseDirectory (integer src_id, string fallback_dir) {
- y2milestone ("Searching for licenses...");
+// Functions for handling different locations of licenses -->
- // Base-product license not in installation
- if (! Stage::initial() && src_id == nil) {
- y2milestone ("Using default license directory %1", fallback_dir);
- license_dir = fallback_dir;
- if (FileUtils::Exists ("/info.txt"))
- info_file = "/info.txt";
- // First-Stage & Add-on-product license
+boolean UnpackLicenseTgzFileToDirectory (string unpack_file, string to_directory) {
+ // License file exists
+ if (FileUtils::Exists (unpack_file)) {
+ map out = (map) SCR::Execute (.target.bash_output,
+ sformat ("
+rm -rf '%1' && \
+mkdir -p '%1' && \
+cd '%1' && \
+tar -xzf '%2'
+",
+ String::Quote (to_directory),
+ String::Quote (unpack_file)
+ )
+ );
+
+ // Extracting license failed, cannot accept the license
+ if (out["exit"]:0 != 0) {
+ y2error("Cannot untar license -> %1", out);
+ // popup error
+ Report::Error (_("An error occurred while preparing the installation system."));
+ CleanUpLicense (to_directory);
+ return false;
+ }
+
+ // Success
+ return true;
+
+ // Nothing to unpack
} else {
+ y2error ("No such file: %1", unpack_file);
+ return false;
+ }
+}
+
+void SearchForLicense_FirstStageBaseProduct (integer src_id, string fallback_dir) {
+ y2milestone ("Getting license from installation product");
+
+ string license_file = "/license.tar.gz";
+
+ if (FileUtils::Exists (license_file)) {
+ y2milestone("Installation Product has a license");
+
+ tmpdir = sformat ("%1/product-license/base-product/", (string) SCR::Read (.target.tmpdir));
+
+ if (UnpackLicenseTgzFileToDirectory (license_file, tmpdir)) {
+ license_dir = tmpdir;
+ license_file_print = "license.tar.gz";
+ } else {
+ license_file = nil;
+ }
+ } else {
+ y2milestone ("Installation Product doesn't have a license");
+
+ license_file = nil;
+ }
+
+ if (FileUtils::Exists ("/info.txt"))
+ info_file = "/info.txt";
+}
+
+void SearchForLicense_NormalRunBaseProduct (integer src_id, string fallback_dir) {
+ y2milestone ("Using default license directory %1", fallback_dir);
+
+ if (FileUtils::Exists (fallback_dir)) {
+ license_dir = fallback_dir;
+ } else {
+ y2warning ("Fallback dir doesn't exist %1", fallback_dir);
+ license_dir = nil;
+ }
+
+ if (FileUtils::Exists ("/info.txt"))
+ info_file = "/info.txt";
+}
+
+void SearchForLicense_AddOnProduct (integer src_id, string fallback_dir) {
y2milestone ("Getting license info from repository %1", src_id);
info_file = Pkg::SourceProvideOptionalFile (src_id, 1, "/media.1/info.txt");
- // FATE #302018
- // Licenses are unzipped under 1stMedia:/media.1/license/
- // Don't unzip, just use the directory
- license_dir = Pkg::SourceProvideDirectory (
- src_id, 1,
- "/media.1/license/",
- true, /* optional */
- false /* no subdirs */
- );
- if (license_dir != nil) {
- y2milestone ("Using directory %1 for licenses", license_dir);
- // return from the function
+ // using a separate license directory for all products
+ tmpdir = sformat ("%1/product-license/%2/", (string) SCR::Read(.target.tmpdir), src_id);
+
+ // FATE #302018 comment #54
+ string license_file_location = "/license.tar.gz";
+ string license_file = Pkg::SourceProvideOptionalFile (src_id, 1, license_file_location);
+
+ if (license_file != nil) {
+ y2milestone ("Using file %1 with licenses", license_file);
+
+ if (UnpackLicenseTgzFileToDirectory (license_file, tmpdir)) {
+ license_dir = tmpdir;
+ license_file_print = "license.tar.gz";
+ } else {
+ license_file = nil;
+ }
+
return;
}
- y2milestone ("Licenses in /media.1/license/... not supported");
+
+ y2milestone ("Licenses in %1... not supported", license_file_location);
// New format didn't work, try the old one 1stMedia:/media.1/license.zip
- // using a separate license directory for all products
- tmpdir = sformat ("%1/product-license/%2/", (string) SCR::Read(.target.tmpdir), src_id);
license_dir = tmpdir;
- string license_file = Pkg::SourceProvideOptionalFile (src_id, 1, "/media.1/license.zip");
+ license_file = Pkg::SourceProvideOptionalFile (src_id, 1, "/media.1/license.zip");
// no license present
if (license_file == nil) {
@@ -314,8 +394,44 @@
license_dir = nil;
} else {
license_dir = tmpdir;
+ license_file_print = "/media.1/license.zip";
}
+}
+
+// Functions for handling different locations of licenses <--
+
+void GetSourceLicenseDirectory (integer src_id, string fallback_dir) {
+ y2milestone ("Searching for licenses...");
+ license_file_print = nil;
+
+ // Base-product - license not in installation
+ // * Stage is not initial
+ // * source ID is not defined
+ if (! Stage::initial() && src_id == nil) {
+
+ SearchForLicense_NormalRunBaseProduct (src_id, fallback_dir);
+
+ // Base-product - first-stage installation
+ // * Stage is initial
+ // * Source ID is not set
+ // bugzilla #298342
+ } else if (Stage::initial() && src_id == nil) {
+
+ SearchForLicense_FirstStageBaseProduct (src_id, fallback_dir);
+
+ // Add-on-product license
+ // * Source ID is set
+ } else if (src_id != nil && src_id > -1) {
+
+ SearchForLicense_AddOnProduct (src_id, fallback_dir);
+
+ // Fallback
+ } else {
+ y2warning ("Source ID not defined, using fallback dir '%1'", fallback_dir);
+ license_dir = fallback_dir;
}
+
+ y2milestone ("ProductLicense settings: license_dir: %1, tmpdir: %2, info_file: %3", license_dir, tmpdir, info_file);
}
/**
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-packager-2.15.56/VERSION new/yast2-packager-2.15.57/VERSION
--- old/yast2-packager-2.15.56/VERSION 2007-08-08 16:58:15.000000000 +0200
+++ new/yast2-packager-2.15.57/VERSION 2007-08-09 16:04:07.000000000 +0200
@@ -1 +1 @@
-2.15.56
+2.15.57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org