Skip to content

Commit

Permalink
Adapted package translation on the required amount of packages (#39)
Browse files Browse the repository at this point in the history
* adapted package translation on the required amount of packages
  • Loading branch information
schubi2 committed May 25, 2020
1 parent 95dc385 commit 3e8bfb4
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 11 deletions.
7 changes: 7 additions & 0 deletions package/yast2-product-creator.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon May 25 09:34:56 CEST 2020 - schubi@suse.de

- Removing incompatible packages.<language>.gz files before
creating the image (bsc#1165247).
- 3.2.3

-------------------------------------------------------------------
Thu Mar 15 09:59:53 CET 2018 - schubi@suse.de

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-product-creator.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: yast2-product-creator
Version: 3.2.2
Version: 3.2.3
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
35 changes: 25 additions & 10 deletions src/modules/ProductCreator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
# Representation of the configuration of product-creator.
# Input and output routines.
require "yast"
require "shellwords"

module Yast
class ProductCreatorClass < Module
Expand Down Expand Up @@ -3647,16 +3648,6 @@ def CopyPackages
)
)
else
# TODO FIXME get datadir from the source
ret = ret &&
Exec(
Builtins.sformat(
"cd '%1/%2/%3' && /usr/bin/create_package_descr -x setup/descr/EXTRA_PROV -M 3",
String.Quote(basedir),
String.Quote(subdir),
String.Quote(datadir)
)
)

# check if the metadata are gzipped
compressed_meta = FileUtils.Exists(
Expand All @@ -3669,6 +3660,30 @@ def CopyPackages
)
Builtins.y2milestone("Compressed metadata: %1", compressed_meta)

# TODO FIXME get datadir from the source

# remove the translation files, they would get out of sync with the main data
# and confuse libzypp (bsc#1165247)
ret = ret &&
Exec(
Builtins.sformat(
"rm %1/%2/%3/setup/descr/packages.*",
basedir.shellescape,
subdir.shellescape,
datadir.shellescape
)
)

ret = ret &&
Exec(
Builtins.sformat(
"cd '%1/%2/%3' && /usr/bin/create_package_descr -x setup/descr/EXTRA_PROV -M 3",
String.Quote(basedir),
String.Quote(subdir),
String.Quote(datadir)
)
)

if compressed_meta
ret = ret &&
Exec(
Expand Down

0 comments on commit 3e8bfb4

Please sign in to comment.