Hello community,
here is the log from the commit of package obs-service-product_converter for
openSUSE:Factory checked in at 2018-02-01 21:31:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/obs-service-product_converter (Old)
and /work/SRC/openSUSE:Factory/.obs-service-product_converter.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "obs-service-product_converter"
Thu Feb 1 21:31:15 2018 rev:3 rq:571750 version:1.1.1
Changes:
--------
---
/work/SRC/openSUSE:Factory/obs-service-product_converter/obs-service-product_converter.changes
2017-10-13 14:18:59.716557905 +0200
+++
/work/SRC/openSUSE:Factory/.obs-service-product_converter.new/obs-service-product_converter.changes
2018-02-01 21:31:49.266245624 +0100
@@ -1,0 +2,8 @@
+Thu Feb 1 15:49:35 UTC 2018 - [email protected]
+
+- update to 1.1.1
+ * support listig of pool repositories in sle mode for installed
+ .prod files. (FATE#323664)
+ * drop all old code pathes before Leap 15 / SLE 15
+
+-------------------------------------------------------------------
Old:
----
obs-service-product_converter-0.0.0.1507786103.a85f0d4.obscpio
New:
----
obs-service-product_converter-1.1.1.obscpio
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ obs-service-product_converter.spec ++++++
--- /var/tmp/diff_new_pack.MKqVhb/_old 2018-02-01 21:31:49.838218866 +0100
+++ /var/tmp/diff_new_pack.MKqVhb/_new 2018-02-01 21:31:49.838218866 +0100
@@ -1,7 +1,7 @@
#
# spec file for package obs-service-product_converter
#
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
%define service product_converter
Name: obs-service-%service
-Version: 0.0.0.1507786103.a85f0d4
+Version: 1.1.1
Release: 0
Summary: An OBS source service: create product media build descriptions
License: GPL-2.0+
++++++ _service ++++++
--- /var/tmp/diff_new_pack.MKqVhb/_old 2018-02-01 21:31:49.862217743 +0100
+++ /var/tmp/diff_new_pack.MKqVhb/_new 2018-02-01 21:31:49.866217556 +0100
@@ -2,8 +2,8 @@
<service name="obs_scm" mode="disabled">
<param
name="url">https://github.com/openSUSE/obs-service-product_converter.git</param>
<param name="scm">git</param>
- <param name="versionformat">0.0.0.%ct.%h</param>
- <param name="revision">master</param>
+ <param name="version">1.1.1</param>
+ <param name="revision">1.1.1</param>
</service>
<service name="set_version" mode="disabled"/>
<service name="tar" mode="buildtime"/>
++++++ obs-service-product_converter-0.0.0.1507786103.a85f0d4.obscpio ->
obs-service-product_converter-1.1.1.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-product_converter-0.0.0.1507786103.a85f0d4/BSProductXML.pm
new/obs-service-product_converter-1.1.1/BSProductXML.pm
--- old/obs-service-product_converter-0.0.0.1507786103.a85f0d4/BSProductXML.pm
2017-10-12 07:28:58.000000000 +0200
+++ new/obs-service-product_converter-1.1.1/BSProductXML.pm 2018-02-01
17:55:35.000000000 +0100
@@ -90,7 +90,6 @@
# Defines a single product, will be used in installed system to indentify it
our $product = [
'product' =>
- 'id', # obsolete, do not use anymore
'schemeversion',
[],
'vendor',
@@ -137,17 +136,17 @@
[[ 'repository' =>
'project', # input
'name',
- 'repoid', # output for .prod file
'arch', # for arch specific definitions
$zypp,
]],
],
- [ 'repositories' =>
- [[ 'repository' =>
- 'path',
- ]],
- ], # this is for prod file export only, not used for SLE
12/openSUSE 13.2 media style anymore
],
+ [ 'repositories' =>
+ [[ 'repository' =>
+ 'type',
+ 'repoid',
+ ]],
+ ], # this is for prod file export only
[ 'upgrades' => # to announce service pack releases
[[ 'upgrade' =>
[],
@@ -255,7 +254,7 @@
[[ 'repository' =>
'path',
'build',
- 'product_file',
+ 'product_file'
]],
],
[ 'archsets' =>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-product_converter-0.0.0.1507786103.a85f0d4/create_single_product
new/obs-service-product_converter-1.1.1/create_single_product
---
old/obs-service-product_converter-0.0.0.1507786103.a85f0d4/create_single_product
2017-10-12 07:28:58.000000000 +0200
+++ new/obs-service-product_converter-1.1.1/create_single_product
2018-02-01 17:55:35.000000000 +0100
@@ -47,7 +47,7 @@
my $project;
# hardcoded for now
-$obsname = "build.o.o";
+$obsname = $::ENV{'OBS_NAME'} || "build.o.o";
# read the product xml file
@@ -267,31 +267,28 @@
$varsH{MEDIUM_NAME} = $medium->{'name'}."-".join( "-", @allarchs );
}
$varsH{PRODUCT_THEME} = $product->{'buildconfig'}->{'producttheme'};
- $varsH{SEPERATE_MEDIA} = "false";
- $varsH{SEPARATE_MEDIA} = "true" if (defined($medium->{'separate'}) &&
$medium->{'separate'} eq 'true');
+ $varsH{SEPARATE_MEDIA} = "true" unless (defined($medium->{'separate'}) &&
$medium->{'separate'} eq 'false');
$varsH{MULTIPLE_MEDIA} = "false";
$varsH{MULTIPLE_MEDIA} = "true" if (defined($medium->{'sourcemedia'}) &&
$medium->{'sourcemedia'} > 1);
$varsH{MULTIPLE_MEDIA} = "true" if (defined($medium->{'debugmedia'}) &&
$medium->{'debugmedia'} > 1);
$varsH{RUN_MEDIA_CHECK} = "true" if
(defined($medium->{'run_media_check'})) && $medium->{'run_media_check'} ne "no"
&& $medium->{'run_media_check'} eq "false";
$varsH{RUN_ISOHYBRID} = "true" if (defined($medium->{'run_hybridiso'})) &&
$medium->{'run_hybridiso'} eq "true";
- $varsH{MAKE_LISTINGS} = 'false' if
(defined($medium->{'run_make_listings'})) && $medium->{'run_make_listings'} ne
"yes" && $medium->{'run_make_listings'} ne "true";
+ $varsH{MAKE_LISTINGS} = 'true' if (defined($medium->{'run_make_listings'})
&& $medium->{'run_make_listings'} eq "true");
$varsH{SHA1OPT} = "-x";
$varsH{REPO_ONLY} = "true" if (defined($medium->{'repo_only'})) &&
$medium->{'repo_only'} ne "no" && $medium->{'repo_only'} ne "false";
# explicit removal of additional tree
$varsH{DROP_REPOSITORY} = "true" if (defined($medium->{'drop_repo'})) &&
$medium->{'drop_repo'} ne "no" && $medium->{'drop_repo'} ne "false";
- unless ($mediaStyle =~ /^suse-1[12]/ || $mediaStyle =~ /^suse-sle11/) {
- # remove tree for media style sle12/13.2 by default
- $varsH{DROP_REPOSITORY} = "true" unless defined($medium->{'drop_repo'})
|| $varsH{REPO_ONLY} || $varsH{DROP_REPOSITORY};
- foreach my $shortsummary ( @{$product->{'shortsummary'}} ){
- $varsH{PRODUCT_SUMMARY} = $shortsummary->{'_content'} if ( !
$shortsummary->{'language'} );
- }
- die("No short summary defined, but required for current media styles")
unless $varsH{PRODUCT_SUMMARY};
- $varsH{PRODUCT_RELEASE} = $product->{'release'} if
defined($product->{'release'});
+ # remove tree for media style sle12/13.2 by default
+ $varsH{DROP_REPOSITORY} = "true" unless defined($medium->{'drop_repo'}) ||
$varsH{REPO_ONLY} || $varsH{DROP_REPOSITORY};
+ foreach my $shortsummary ( @{$product->{'shortsummary'}} ){
+ $varsH{PRODUCT_SUMMARY} = $shortsummary->{'_content'} if ( !
$shortsummary->{'language'} );
}
+ die("No short summary defined, but required for current media styles")
unless $varsH{PRODUCT_SUMMARY};
+ $varsH{PRODUCT_RELEASE} = $product->{'release'} if
defined($product->{'release'});
- # switch to sha256 sums except for old distros
- $varsH{SHA1OPT} .= " -2" unless $mediaStyle eq "suse-11.1" || $mediaStyle
eq "suse-11.2" || $mediaStyle eq "suse-11.3" || $mediaStyle eq "suse-sle11-sp2";
+ # switch to sha256 sums
+ $varsH{SHA1OPT} .= " -2";
$varsH{VENDOR} = $product->{'vendor'};
$varsH{DISTNAME} = $product->{'name'};
@@ -332,33 +329,12 @@
if (defined($medium->{'preselected_patterns'})){
$info{'PATTERNS'} .= join(' ',map(
$_->{'name'},@{$medium->{'preselected_patterns'}->[0]->{'pattern'}}));
}
- if ($mediaStyle =~ "^suse-11" || $mediaStyle =~ "^suse-12" || $mediaStyle
=~ "^suse-sle11") {
- $info{'DISTRIBUTION'} = $product->{'installconfig'}->{'distribution'};
- $info{'NAME'} = $product->{'name'};
- $info{'VERSION'} = $product->{'version'};
- $info{'SP_VERSION'} = $product->{'patchlevel'} if
(defined($product->{'patchlevel'}));
-
- foreach my $summary ( @{$product->{'summary'}} ){
- $info{'LABEL'} = $summary->{'_content'} if ( !
$summary->{'language'} );
- }
- foreach my $shortsummary ( @{$product->{'shortsummary'}} ){
- $info{'SHORTLABEL'} = $shortsummary->{'_content'} if ( !
$shortsummary->{'language'} );
- }
- $info{'RELNOTESURL'} = getUrl($product,$arch,"releasenotes");
-
- $info{'BASEARCHS'} = "";
- foreach my $ar ( @$archSetList ) {
- $info{'BASEARCHS'} .= "$archSets{$ar->{ref}}->{productarch} " if(
$archSets{$ar->{ref}} );
- }
- } else {
- # for SLE 12 and later
- my $label="";
- foreach my $shortsummary ( @{$product->{'summary'}} ){
- $label = $shortsummary->{'_content'} if ( !
$shortsummary->{'language'} );
- }
- my $cpe = getCpeId($prodRef, $product);
- $info{'DISTRO'} = "$cpe,$label";
+ my $label="";
+ foreach my $shortsummary ( @{$product->{'summary'}} ){
+ $label = $shortsummary->{'_content'} if ( ! $shortsummary->{'language'}
);
}
+ my $cpe = getCpeId($prodRef, $product);
+ $info{'DISTRO'} = "$cpe,$label";
$options{'REPO_LOCATION'} = getUrl($product,$arch,"repository");
$info{'LINGUAS'} = "";
@@ -421,10 +397,6 @@
die( "ERROR: No such archset $ref\n" ) unless $archSets{$ref};
push @onlyarch, $archSets{$ref}->{productarch} unless grep { $_ eq
$archSets{$ref}->{productarch} } @onlyarch;
}
- # In 11.4 and later noarch metapackages need explicit a
onlyarch="noarch" in config because we do now fail on missing packages
- if ((not defined $medium->{'mediastyle'}) || $medium->{'mediastyle'} eq
"suse-11.1" || $medium->{'mediastyle'} eq "suse-11.2" ||
$medium->{'mediastyle'} eq "suse-11.3") {
- push @onlyarch, "noarch" unless grep { $_ eq "noarch" } @onlyarch;
- }
}
my $h = { name => $pack->{name},
medium => $metadata_medium,
@@ -873,7 +845,7 @@
sub getMediaStyle($)
{
my( $prodRef ) = @_;
- my $mediaStyle = "suse-11.1"; # fallback value
+ my $mediaStyle = "suse-tumbleweed"; # fallback value, always latest style
so it may break
my $medium = $prodRef->{mediasets}->{media}[0];
$mediaStyle = $medium->{'mediastyle'} if
(defined($medium->{'mediastyle'}));
return $mediaStyle;
@@ -1049,15 +1021,9 @@
} else {
$str =~ s/___BETA_VERSION___//g;
}
- if ((not defined $medium->{'mediastyle'}) || $medium->{'mediastyle'} eq
"suse-11.1" || $medium->{'mediastyle'} eq "suse-11.2" ||
$medium->{'mediastyle'} eq "suse-11.3") {
- # this is the product release, not a package release. should not be
used anymore.
- # this old way is a problem because it can produce leading zeros in
product provides
- $str =~ s/___RELEASE___/0%{?release}/g;
- } else {
- # product release is not really used so far, but defined in zypp stack.
So let's
- # support it. But it is so far 0 on all our products
- $str =~ s/___RELEASE___/$product->{release}/g;
- }
+ # product release is not really used so far, but defined in zypp stack. So
let's
+ # support it. But it is so far 0 on all our products
+ $str =~ s/___RELEASE___/$product->{release}/g;
$str =~ s/___PATCH_LEVEL___/$product->{'patchlevel'}/g;
$str =~ s/___PACKAGE_NAME___/$product->{releasepkgname}/g;
$str =~ s/___PRODUCT_NAME___/$product->{name}/g;
@@ -1075,16 +1041,6 @@
writestr($file, undef, $str);
}
-sub createPreSelectPatternDepsOld ( $ ) {
- my ( $patterns ) = @_;
-
- my $pattern_lines="";
- foreach my $pattern (@{$patterns->[0]->{'pattern'}}){
- $pattern_lines.="Recommends: pattern() = $pattern->{'name'}\n";
- }
- return $pattern_lines;
-}
-
sub createPreSelectPatternDeps ( $ ) {
my ( $patterns ) = @_;
@@ -1142,26 +1098,13 @@
$product_flavors.="Provides: product_flavor()\n";
$product_flavors.="Provides: flavor($flavor->{flavor})\n";
if (defined($flavor->{'preselected_patterns'})){
- if ($flavor->{'mediastyle'} ne "suse-sle12" && $flavor->{'mediastyle'}
ne "suse-sle12-sp1" ) {
-
$product_flavors.=createPreSelectPatternDeps($flavor->{'preselected_patterns'});
- } else {
-
$product_flavors.=createPreSelectPatternDepsOld($flavor->{'preselected_patterns'});
- }
- }
- if ((not defined $flavor->{'mediastyle'}) || $flavor->{'mediastyle'} eq
"suse-11.1" || $flavor->{'mediastyle'} eq "suse-11.2" ||
$flavor->{'mediastyle'} eq "suse-11.3") {
- $product_flavors.="Provides: product_flavor($product->{name}) =
%version-%release\n";
- } else {
- # this is the product version and release, not a package release.
- my $release = $product->{release};
- $release ||= "0";
- $product_flavors.="Provides: product_flavor($product->{name}) =
$product->{version}-$release\n";
+
$product_flavors.=createPreSelectPatternDeps($flavor->{'preselected_patterns'});
}
+ # this is the product version and release, not a package release.
+ my $release = $product->{release};
+ $release ||= "0";
+ $product_flavors.="Provides: product_flavor($product->{name}) =
$product->{version}-$release\n";
if (defined($flavor->{'productdependency'})){
- # old compat code.
- die("productdependency works only with new mediastyles") unless
defined($defaultmedium->{'mediastyle'});
- if ($defaultmedium->{'mediastyle'} ne "suse-11.1" &&
$defaultmedium->{'mediastyle'} ne "suse-11.2" && $defaultmedium->{'mediastyle'}
ne "suse-11.3" && $defaultmedium->{'mediastyle'} ne "suse-12.1" &&
$defaultmedium->{'mediastyle'} ne "suse-sle11-sp2" ) {
- die("productdependency must be defined per product for post 12.1
media styles");
- }
$product_flavors.=createProductDependencyLines($flavor->{'productdependency'});
}
foreach my $summary ( @{$product->{'summary'}} ){
@@ -1226,7 +1169,6 @@
sub getCpeId ($$) {
my ($prodRef, $product) = @_;
my $mediaStyle = getMediaStyle($prodRef);
- return undef if ($mediaStyle =~ /^suse-1[12].[123]$/ || $mediaStyle =~
/^suse-sle11/);
my $tag = "/o"; # operating system
# is this an add-on product?
foreach my $flavor ( @{$prodRef->{mediasets}->{media}} ){
@@ -1301,68 +1243,65 @@
$d->{"target"} = $product->{'register'}->{'target'};
$d->{"release"} = $product->{'register'}->{'release'} if
defined($product->{'register'}->{'release'}); # < SLE 12
- my $special_arch_update_repo;
+ my $special_arch_repo;
my $special_arch_update_ncc;
- if ($mediaStyle =~ /^suse-1[12].[123]$/ || $mediaStyle =~ /^suse-sle11/) {
- # old style, export used repositories for support tool
- my @r;
- foreach my $repo ( @{$prodRef->{repositories}{repository} } ) {
- next if defined($repo->{product_file}) && $repo->{product_file} eq
"ignore";
- # do only export when build name is specified
- push @r, { "path" => $repo->{path} } if $repo->{path} =~
/^obs:\/\/(.*)\/(.*)\/(.*)/ && $1 && $2 && $3 ;
- };
- $d->{"repositories"}{"repository"} = \@r;
- } else {
- if ($mediaStyle =~ /^suse-sle12/) {
- die("Define NCC targets instead of target") if
$product->{'register'}->{'target'};
- # SLE 12 medias require an end-of-life definition
- die("400 endoflife not defined") unless
defined($product->{'endoflife'});
- }
- # convert them to repoids
- my @r;
- foreach my $repo ( @{$product->{register}->{updates}->{repository}} ) {
- my $obsurl =
"obsrepository://$obsname/$repo->{project}/$repo->{name}";
- if ($repo->{zypp}) {
- die("400 zypp lacks alias attribute") unless
$repo->{zypp}->{alias};
- die("400 zypp lacks name attribute") unless
$repo->{zypp}->{name};
- }
- if ($repo->{arch}) {
- push @r, { "repoid" => "___INTERNAL_MARKER___" } unless
$special_arch_update_repo;
- $special_arch_update_repo.="%ifarch $repo->{arch}\n";
- $special_arch_update_repo.=" <repository repoid=\"$obsurl\"
/>\n";
- $special_arch_update_repo.="%endif\n";
- next;
- }
- push @r, { "repoid" => $obsurl };
- };
- $d->{"updates"}{"repository"} = \@r;
- }
- foreach my $dt ( @{$product->{register}->{updates}->{distrotarget}} ) {
- $d->{"target"} = "___INTERNAL_NCC_MARKER___";
- $special_arch_update_ncc.="%ifarch $dt->{arch}\n" if $dt->{'arch'};
- $special_arch_update_ncc.=" <target>$dt->{'_content'}</target>\n";
- $special_arch_update_ncc.="%endif\n" if $dt->{'arch'};
- next;
+ if ($mediaStyle =~ /^suse-sle1[25]/) {
+ # SLE SCC repositry register section
+ die("Define NCC targets instead of target") if
$product->{'register'}->{'target'};
+ die("400 endoflife not defined") unless defined($product->{'endoflife'});
+ foreach my $dt ( @{$product->{register}->{updates}->{distrotarget}} ) {
+ $d->{"target"} = "___INTERNAL_NCC_MARKER___";
+ $special_arch_update_ncc.="%ifarch $dt->{arch}\n" if $dt->{'arch'};
+ $special_arch_update_ncc.="
<target>$dt->{'_content'}</target>\n";
+ $special_arch_update_ncc.="%endif\n" if $dt->{'arch'};
+ next;
+ }
+ $d->{flavor} = $product->{register}->{flavor} if
defined($product->{register}->{flavor});
+ $zypp_product->{'register'} = $d;
}
- $d->{flavor} = $product->{register}->{flavor} if
defined($product->{register}->{flavor});
- $zypp_product->{'register'} = $d;
+
+ # convert them to repoids
+ my @r;
+ foreach my $repo ( @{$product->{register}->{updates}->{repository}} ) {
+ my $obsurl = "obsrepository://$obsname/$repo->{project}/$repo->{name}";
+ if ($repo->{zypp}) {
+ die("400 zypp lacks alias attribute") unless $repo->{zypp}->{alias};
+ die("400 zypp lacks name attribute") unless $repo->{zypp}->{name};
+ }
+ if ($repo->{arch}) {
+ push @r, { "repoid" => "___INTERNAL_MARKER___" } unless
$special_arch_repo;
+ $special_arch_repo.="%ifarch $repo->{arch}\n";
+ $special_arch_repo.=" <repository type=\"update\"
repoid=\"$obsurl\" />\n";
+ $special_arch_repo.="%endif\n";
+ next;
+ }
+ push @r, { 'type' => 'update', "repoid" => $obsurl };
+ };
+ foreach my $repo ( @{$product->{register}->{pool}->{repository}} ) {
+ my $obsurl = "obsrepository://$obsname/$repo->{project}/$repo->{name}";
+ if ($repo->{zypp}) {
+ die("400 zypp lacks alias attribute") unless $repo->{zypp}->{alias};
+ die("400 zypp lacks name attribute") unless $repo->{zypp}->{name};
+ }
+ if ($repo->{arch}) {
+ push @r, { "repoid" => "___INTERNAL_MARKER___" } unless
$special_arch_repo;
+ $special_arch_repo.="%ifarch $repo->{arch}\n";
+ $special_arch_repo.=" <repository type=\"pool\"
repoid=\"$obsurl\" />\n";
+ $special_arch_repo.="%endif\n";
+ next;
+ }
+ push @r, { 'type' => 'pool', "repoid" => $obsurl };
+ };
+ $zypp_product->{'repositories'}{'repository'} = \@r;
# Release package number shall go with the package release
$zypp_product->{'release'} = $product->{release};
- if ($mediaStyle =~ /^suse-11.[123]$/ || $mediaStyle eq "suse-sle11-sp2") {
- $zypp_product->{'release'} = "%{release}";
- }
-
my $xml = XMLout( $BSProductXML::product, $zypp_product );
die ( "ERROR: Unable to create xml for $product->{name} !" ) unless $xml;
# replace arch specific parts
- if ($special_arch_update_repo) {
- $xml =~ s/.*___INTERNAL_MARKER___.*\n/$special_arch_update_repo/;
- }
- if ($special_arch_update_ncc) {
- $xml =~ s/.*___INTERNAL_NCC_MARKER___.*\n/$special_arch_update_ncc/;
- }
+ $xml =~ s/.*___INTERNAL_MARKER___.*\n/$special_arch_repo/ if
$special_arch_repo;
+ $xml =~ s/.*___INTERNAL_NCC_MARKER___.*\n/$special_arch_update_ncc/ if
$special_arch_update_ncc;
# add header
$xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n$xml";
$zypp_product_file .= "cat >$pfile << EOF\n";
@@ -1398,9 +1337,7 @@
die("ERROR: File name does not match to product name
($infile/$prodRef->{'products'}->{'product'}[0]->{'name'}.product)\n") if not
$infile =~ /.*\/$prodRef->{'products'}->{'product'}[0]->{'name'}.product$/;
die("no support for multi product definitions\n") if
$prodRef->{'products'}->{'product'}[1];
my $mediaStyle = getMediaStyle($prodRef);
-unless ($mediaStyle =~ /^suse-1[12].[123]$/ || $mediaStyle =~ /^suse-sle11/) {
- die("Do not set id attribute in product anymore.\n") if
$prodRef->{'products'}->{'product'}[0]->{'id'};
-}
+die("Do not set id attribute in product anymore.\n") if
$prodRef->{'products'}->{'product'}[0]->{'id'};
$product->{'releasepkgname'} ||= "$product->{'name'}-release";
#
@@ -1537,15 +1474,6 @@
$releasepkgname =
$prodRef->{'products'}->{'product'}[0]->{'releasepkgname'};
}
- # bug compatibility for 11.3 and before (ignoring product name definition
per media)
- if ((not defined $medium->{'mediastyle'}) || $medium->{'mediastyle'} eq
"suse-11.1" || $medium->{'mediastyle'} eq "suse-11.2" ||
$medium->{'mediastyle'} eq "suse-11.3") {
- $productname = $prodRef->{'products'}->{'product'}[0]->{'name'};
- if ($medium->{'product'}) {
- print "WARNING: own product attribute \"product\" per media is used.
This may create inconsistent medias!\n";
- $productname = $medium->{'product'};
- }
- }
-
next if( $opt_m && $name ne $opt_m );
# create one kiwi file each for every of the archsets
@@ -1557,17 +1485,11 @@
my $supportstates;
my $kiwi = Storable::dclone(\%generalImage);
- if (defined($medium->{'mediastyle'}) && $medium->{'mediastyle'} ne
"suse-11.1" && $medium->{'mediastyle'} ne "suse-11.2") {
- $kiwi->{schemaversion} = "4.1"; # new kiwi requires exact this
version
- my $attrs = {image => "product"};
- $attrs->{'firmware'} = $medium->{'firmware'} if
$medium->{'firmware'};
- $attrs->{'hybrid'} = 'true' if
(defined($medium->{'run_hybridiso'})) && $medium->{'run_hybridiso'} eq "true";
- $kiwi->{preferences}->{type} = [$attrs];
- }else{
- # the schemE vs. schemA is intended by kiwi!
- $kiwi->{schemeversion} = "2.4"; # before openSUSE 11.3, until
kiwi 3.74
- $kiwi->{preferences}->{type} = [{_content => "product"}];
- }
+ $kiwi->{schemaversion} = "4.1"; # new kiwi requires exact this version
+ my $attrs = {image => "product"};
+ $attrs->{'firmware'} = $medium->{'firmware'} if $medium->{'firmware'};
+ $attrs->{'hybrid'} = 'true' if (defined($medium->{'run_hybridiso'}))
&& $medium->{'run_hybridiso'} eq "true";
+ $kiwi->{preferences}->{type} = [$attrs];
$kiwi->{preferences}->{version} = "1.0.0"; # hardcoded to fullfill
kiwi scheme, real version is defined elsewhere
$kiwi->{preferences}->{packagemanager} = "zypper" ; # hardcoded
since no other support exist yet.
++++++ obs-service-product_converter.obsinfo ++++++
--- /var/tmp/diff_new_pack.MKqVhb/_old 2018-02-01 21:31:49.958213252 +0100
+++ /var/tmp/diff_new_pack.MKqVhb/_new 2018-02-01 21:31:49.958213252 +0100
@@ -1,5 +1,5 @@
name: obs-service-product_converter
-version: 0.0.0.1507786103.a85f0d4
-mtime: 1507786103
-commit: a85f0d410ae4f465aca381ecf7a026e17f283588
+version: 1.1.1
+mtime: 1517504016
+commit: 353bfb7934872e1daee14e645d6b3a412a8c48f8