Skip to content

Commit

Permalink
showing installed licenses
Browse files Browse the repository at this point in the history
  • Loading branch information
schubi2 committed May 11, 2016
1 parent 2331525 commit 4c99fb4
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 9 deletions.
7 changes: 7 additions & 0 deletions package/yast2-packager.changes
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed May 11 15:49:26 CEST 2016 - schubi@suse.de

- Showing location of installed licenses.
(fate#219341)
- 3.1.99

-------------------------------------------------------------------
Tue May 10 12:31:13 UTC 2016 - igonzalezsosa@suse.com

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-packager.spec
Expand Up @@ -17,7 +17,7 @@


Name: yast2-packager
Version: 3.1.98
Version: 3.1.99
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
27 changes: 19 additions & 8 deletions src/modules/ProductLicense.rb
Expand Up @@ -64,6 +64,8 @@ def main

# filename printed in the license dialog
@license_file_print = nil
# license file is on installed system
@license_on_installed_system = false

# BNC #448598
# no-acceptance-needed file in license.tar.gz means the license
Expand Down Expand Up @@ -377,14 +379,21 @@ def GetLicenseDialog(languages, license_language, licenses, id, spare_space)
ReplacePoint(
Id(:printing_hint),
Label(
# TRANSLATORS: addition license information
# %1 is replaced with the filename
Builtins.sformat(
_(
"If you want to print this EULA, you can find it\non the first media in the file %1"
),
@license_file_print
)
@license_on_installed_system ?
# TRANSLATORS: addition license information
# %s is replaced with the directory name
format(
_("This EULA can be found in the directory %s"),
@license_file_print
) :
# TRANSLATORS: addition license information
# %s is replaced with the filename
format(
_(
"If you want to print this EULA, you can find it\non the first media in the file %s"
),
@license_file_print
)
)
)
) :
Expand Down Expand Up @@ -638,6 +647,8 @@ def SearchForLicense_NormalRunBaseProduct(src_id, fallback_dir)

if FileUtils.Exists(fallback_dir)
@license_dir = fallback_dir
@license_file_print = fallback_dir
@license_on_installed_system = true
else
Builtins.y2warning("Fallback dir doesn't exist %1", fallback_dir)
@license_dir = nil
Expand Down

0 comments on commit 4c99fb4

Please sign in to comment.