Hello community, here is the log from the commit of package mksusecd for openSUSE:Factory checked in at 2016-06-23 13:36:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/mksusecd (Old) and /work/SRC/openSUSE:Factory/.mksusecd.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mksusecd" Changes: -------- --- /work/SRC/openSUSE:Factory/mksusecd/mksusecd.changes 2016-05-11 16:38:11.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.mksusecd.new/mksusecd.changes 2016-06-23 13:36:13.000000000 +0200 @@ -1,0 +2,6 @@ +Mon Jun 20 15:05:30 UTC 2016 - snw...@suse.com + +- create missing 'content' file +- 1.39 + +------------------------------------------------------------------- Old: ---- mksusecd-1.38.tar.xz New: ---- mksusecd-1.39.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mksusecd.spec ++++++ --- /var/tmp/diff_new_pack.i0lpJf/_old 2016-06-23 13:36:14.000000000 +0200 +++ /var/tmp/diff_new_pack.i0lpJf/_new 2016-06-23 13:36:14.000000000 +0200 @@ -18,7 +18,7 @@ Name: mksusecd -Version: 1.38 +Version: 1.39 Release: 0 Summary: Create SUSE Linux installation ISOs License: GPL-3.0+ ++++++ mksusecd-1.38.tar.xz -> mksusecd-1.39.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mksusecd-1.38/VERSION new/mksusecd-1.39/VERSION --- old/mksusecd-1.38/VERSION 2016-05-10 17:10:44.000000000 +0200 +++ new/mksusecd-1.39/VERSION 2016-06-20 17:04:52.000000000 +0200 @@ -1 +1 @@ -1.38 +1.39 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mksusecd-1.38/changelog new/mksusecd-1.39/changelog --- old/mksusecd-1.38/changelog 2016-05-10 17:10:44.000000000 +0200 +++ new/mksusecd-1.39/changelog 2016-06-20 17:04:52.000000000 +0200 @@ -1,3 +1,6 @@ +2016-06-20: 1.39 + - create missing 'content' file + 2016-05-10: 1.38 - adjust list of specially handled initrd modules diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mksusecd-1.38/mksusecd new/mksusecd-1.39/mksusecd --- old/mksusecd-1.38/mksusecd 2016-05-10 17:10:44.000000000 +0200 +++ new/mksusecd-1.39/mksusecd 2016-06-20 17:04:52.000000000 +0200 @@ -144,6 +144,8 @@ sub fname; sub analyze_boot; sub build_todo; +sub new_file; +sub copy_or_new_file; sub copy_file; sub prepare_mkisofs; sub build_filelist; @@ -850,6 +852,50 @@ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# new_file(fname) +# +# Create a new empty file with name fname. +# +# Return full path to fname. +# +sub new_file +{ + my $fname = $_[0]; + my $new_path = "$tmp_new/$fname"; + + if($fname =~ m#(.+)/([^/]+)#) { + system "mkdir -p '$tmp_new/$1'"; + } + + if(open my $x, ">$new_path") { close $x } + + # update file location database + $files->{$fname} = $tmp_new; + + return $new_path; +} + + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# copy_or_new_file(fname) +# +# Create a writable copy of fname or a new empty file if fname does not exist. +# +# Return full path to fname. +# +sub copy_or_new_file +{ + return copy_file($_[0]) || new_file($_[0]); +} + + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# copy_file(fname) +# +# Create a writable copy of fname. +# +# Return full path to fname or undef if it does not exist. +# sub copy_file { my $f = fname($_[0]); @@ -2272,11 +2318,10 @@ my $content_file = fname "content"; - return unless defined $content_file; - my $cont; # first, read file + # ($content_file may be undefined - which is ok) if(open(my $f, $content_file)) { while(<$f>) { next if /^\s*$/; @@ -2329,7 +2374,7 @@ # if something changed, write new file if($changed) { - my $n = copy_file "content"; + my $n = copy_or_new_file "content"; if($n) { if(open my $f, ">", $n) { @@ -2464,8 +2509,7 @@ my $c = copy_file "content"; return if !defined $c; - my $k = copy_file "content.key"; - return if !defined $k; + my $k = copy_or_new_file "content.key"; copy_file "content.asc";