Hello community, here is the log from the commit of package product-builder for openSUSE:Factory checked in at 2017-09-27 16:53:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/product-builder (Old) and /work/SRC/openSUSE:Factory/.product-builder.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "product-builder" Wed Sep 27 16:53:55 2017 rev:10 rq:528737 version:1.0~pre.1506336035.066b85a Changes: -------- --- /work/SRC/openSUSE:Factory/product-builder/product-builder.changes 2017-09-18 19:50:58.840522543 +0200 +++ /work/SRC/openSUSE:Factory/.product-builder.new/product-builder.changes 2017-09-27 16:53:57.678815286 +0200 @@ -1,0 +2,7 @@ +Fri Sep 22 08:25:18 UTC 2017 - adr...@suse.de + +- bring back media.?/media file +- drop media.?/build instead +- building seperate media is an explicit setting now + +------------------------------------------------------------------- Old: ---- product-builder-1.0~pre.1505473893.8038263.obscpio New: ---- product-builder-1.0~pre.1506336035.066b85a.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ product-builder.spec ++++++ --- /var/tmp/diff_new_pack.ex9KAW/_old 2017-09-27 16:54:00.534413557 +0200 +++ /var/tmp/diff_new_pack.ex9KAW/_new 2017-09-27 16:54:00.538412996 +0200 @@ -23,7 +23,7 @@ Name: product-builder Conflicts: kiwi Conflicts: kiwi-instsource -Version: 1.0~pre.1505473893.8038263 +Version: 1.0~pre.1506336035.066b85a Release: 0 Provides: kiwi-schema = 6.2 Source: product-builder-%version.tar.xz ++++++ product-builder-1.0~pre.1505473893.8038263.obscpio -> product-builder-1.0~pre.1506336035.066b85a.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/product-builder-1.0~pre.1505473893.8038263/modules/KIWICollect.pm new/product-builder-1.0~pre.1506336035.066b85a/modules/KIWICollect.pm --- old/product-builder-1.0~pre.1505473893.8038263/modules/KIWICollect.pm 2017-09-15 13:11:30.000000000 +0200 +++ new/product-builder-1.0~pre.1506336035.066b85a/modules/KIWICollect.pm 2017-09-25 12:48:22.000000000 +0200 @@ -548,7 +548,7 @@ return; } my @media = $this->getMediaNumbers(); - my $mult = $this->{m_proddata}->getVar("MULTIPLE_MEDIA", "yes"); + my $mult = $this->{m_proddata}->getVar("MULTIPLE_MEDIA", "true"); my $dirext = undef; if($mult eq "no" || $mult eq "false") { if(scalar(@media) == 1) { @@ -558,7 +558,7 @@ #"medium=<number>" somewhere! my $msg = 'You want a single medium distro but specified ' . "medium=... for some packages\n\tIgnoring the " - . 'MULTIPLE_MEDIA=no flag!'; + . 'MULTIPLE_MEDIA=false flag!'; $this->logMsg('W', $msg); } } @@ -570,12 +570,7 @@ $this->{m_dirlist}->{"$dirbase/repodata"} = 1; my $curdir = "$dirbase/"; my $num = $n; - if ( $this->{m_proddata}->getVar("FLAVOR", '') eq "ftp" - or $this->{m_proddata}->getVar("FLAVOR", '') eq "POOL" - or $n == $this->{m_debugmedium} - ) { - $num = 1; - } + $num = 1 if $this->seperateMedium($n); $this->{m_dirlist}->{"$dirbase/media.$num"} = 1; $this->{m_basesubdir}->{$n} = "$dirbase"; $this->{m_dirlist}->{"$this->{m_basesubdir}->{$n}"} = 1; @@ -772,7 +767,7 @@ $vname =~ s/-Media//; $vname =~ s/-Build// if length($vname) > ($volid_maxlen - 4); my $vid = substr($vname,0,($volid_maxlen)); - if ($this->{m_proddata}->getVar("MULTIPLE_MEDIA", "yes") eq "yes") { + if ($this->{m_proddata}->getVar("MULTIPLE_MEDIA", "true") eq "true") { $vid = sprintf( "%s.%03d", substr($vname,0,($volid_maxlen - 4)), $cd @@ -789,7 +784,6 @@ $attr .= " -V \"$vid\""; my $checkmedia = ''; if ( defined($this->{m_proddata}->getVar("RUN_MEDIA_CHECK")) - && $this->{m_proddata}->getVar("RUN_MEDIA_CHECK") ne "0" && $this->{m_proddata}->getVar("RUN_MEDIA_CHECK") ne "false" ) { $checkmedia = "checkmedia"; @@ -1198,6 +1192,22 @@ return $retval; } + +#================================================ +# Decide if a medium is joined with others or not +#------------------------------------------------ +sub seperateMedium { + my ($this, $number) = @_; + + # debug medium should always be optional to ship + # the dependency solver need to tell if a package is not matching + return 1 if $number == $this->{m_debugmedium}; + + return 1 if $this->{m_proddata}->getVar("SEPERATE_MEDIA") eq "true"; + + return 0; +} + #========================================== # collectPackages #------------------------------------------ @@ -1243,10 +1253,41 @@ $this->{m_sourcePacks}->{_name} = { label => "source" }; $this->{m_debugPacks}->{_name} = { label => "debug" }; - # step 2: - if($this->{m_debug}) { - $this->logMsg('I', "STEP 2 [collectPackages]" ); - $this->logMsg('I', "Select packages and create links"); + # step 2: media file + $this->logMsg('I', "Creating media file in all media:"); + my $manufacturer = $this->{m_proddata}->getVar("VENDOR"); + my $medium_name = $this->{m_proddata}->getVar("MEDIUM_NAME"); + if($manufacturer && $medium_name) { + my @media = $this->getMediaNumbers(); + for my $n(@media) { + my $num = $n; + $num = 1 if $this->seperateMedium($n); + my $mediafile = "$this->{m_basesubdir}->{$n}/media.$num/media"; + my $MEDIA = FileHandle -> new(); + if(! $MEDIA -> open (">$mediafile")) { + $this->logMsg('E', "Cannot create file <$mediafile>"); + return; + } + print $MEDIA "$manufacturer - "; + print $MEDIA "$medium_name\n"; + print $MEDIA $this->{m_proddata}->getVar("BUILD_ID", "0")."\n"; + if($num == 1) { + # some specialities for medium number 1: contains a line with + # the number of media + if ($this->seperateMedium($n)) { + print $MEDIA "1\n"; + } else { + my $set = @media; + $set-- if ( $this->{m_debugmedium} >= 2 ); + print $MEDIA $set."\n"; + } + } + $MEDIA -> close(); + } + } else { + $this->logMsg('E', + "[createMetadata] required variable \"VENDOR\" not set" + ); } # Setup the package FS layout @@ -1352,12 +1393,7 @@ $prodsummary =~ s{\s+}{-}g; # replace space(s) by a single dash for my $n($this->getMediaNumbers()) { my $num = $n; - if ( $this->{m_proddata}->getVar("FLAVOR") eq "ftp" - or $this->{m_proddata}->getVar("FLAVOR") eq "POOL" - or $n == $this->{m_debugmedium} - ) { - $num = 1; - } + $num = 1 if $this->seperateMedium($n); my $productsfile = "$this->{m_basesubdir}->{$n}/media.$num/products"; my $PRODUCT; @@ -2087,37 +2123,6 @@ ); } } - - # step 2: media.X/build file - $this->logMsg('I', "Creating media file in all media:"); - my $manufacturer = $this->{m_proddata}->getVar("VENDOR"); - if($manufacturer) { - my @media = $this->getMediaNumbers(); - for my $n(@media) { - my $num = $n; - if ( $this->{m_proddata}->getVar("FLAVOR") eq "ftp" - or $this->{m_proddata}->getVar("FLAVOR") eq "POOL" - or $n == $this->{m_debugmedium} - ) { - $num = 1; - } - my $bfile = "$this->{m_basesubdir}->{$n}/media.$num/build"; - my $BUILD; - if(! open($BUILD, ">", $bfile)) { - $this->logMsg('E', "Cannot create file <$bfile>!"); - return; - } - print $BUILD $this->{m_proddata}->getVar("BUILD_ID", "0")."\n"; - close $BUILD; - } - } else { - $this->logMsg('E', - "[createMetadata] required variable \"VENDOR\" not set" - ); - } - - # step X: create package links for installer -# $this->createBootPackageLinks(); } #========================================== ++++++ product-builder.obsinfo ++++++ --- /var/tmp/diff_new_pack.ex9KAW/_old 2017-09-27 16:54:00.722387114 +0200 +++ /var/tmp/diff_new_pack.ex9KAW/_new 2017-09-27 16:54:00.726386551 +0200 @@ -1,5 +1,5 @@ name: product-builder -version: 1.0~pre.1505473893.8038263 -mtime: 1505473893 -commit: 80382634c955155c42edf7c8c8ac843ca5298483 +version: 1.0~pre.1506336035.066b85a +mtime: 1506336035 +commit: 066b85a68cca9eb3b3e474fe8dfc12cb8b7a893b