Mailinglist Archive: opensuse-buildservice (266 mails)

< Previous Next >
Re: [opensuse-buildservice] Kiwi-inside-obs - bug-squashing the loop
  • From: "Jan-Simon Möller" <dl9pf@xxxxxx>
  • Date: Tue, 4 Nov 2008 11:26:41 +0100
  • Message-id: <200811041126.41256.dl9pf@xxxxxx>
Here are 2 patches for the filetypes kiwi uses - as schafi told me ...

But that seems to be not the only problem ...
"
Nov-04 11:08:26 <1> : KIWI exited successfully done
build succeeded
$VAR1 = [];
build did not create anything to send back!
build failed, send back logfile...
sent, all done...

"
$VAR1 is the @files to send.

I tried to handle this - look at worker_kiwifiletypes_extended.diff .
Then the build sends files back but still rebuilds in a loop.
Probably it fails somewhere else ...

best regards,
Jan-Simon
Index: bs_repserver
===================================================================
--- bs_repserver (Revision 5507)
+++ bs_repserver (Arbeitskopie)
@@ -740,7 +740,7 @@
# right job, fetch everything!
my $dir = "$jobsdir/$arch/$job:dir";
mkdir_p($dir);
- my $uploaded = BSServer::read_cpio($dir, 'accept' =>
'^(meta|.*\.rpm|.*\.deb|.*\.iso|.*\.desktopfiles|logfile)$');
+ my $uploaded = BSServer::read_cpio($dir, 'accept' =>
'^(meta|.*\.rpm|.*\.deb|.*\.iso|.*0.1|.*\.raw|.*\.vmdk|.*\.ovf|.*\.reiserfs|.*\.ext3|.*\.ext2|.*\.desktopfiles|logfile)$');
die("upload error\n") unless $uploaded;
if ($BSConfig::sign) {
my @signargs;
Index: bs_worker
===================================================================
--- bs_worker (Revision 5507)
+++ bs_worker (Arbeitskopie)
@@ -1129,7 +1129,8 @@
@d = ('KIWI') if $buildinfo->{'file'} =~ /\.kiwi$/;
for my $d (@d) {
my @files = sort(ls("$buildroot/.build.packages/$d"));
- @files = grep {/\.(?:deb|rpm|iso|desktopfiles)$/} @files;
+ @files = grep
{/\.(?:deb|rpm|iso|ext2|ext3|reiserfs|raw|vmdk|ovf|0.0.1|desktopfiles)$/}
@files;
+ print Dumper(\@files);
push @send, map {"$buildroot/.build.packages/$d/$_"} @files;
}
@send = map {{name => (split('/', $_))[-1], filename => $_}} @send;
Index: bs_worker
===================================================================
--- bs_worker (Revision 5507)
+++ bs_worker (Arbeitskopie)
@@ -1127,11 +1127,38 @@
push @d, 'SRPMS';
@d = ('DEBS') if $buildinfo->{'file'} =~ /\.dsc$/;
@d = ('KIWI') if $buildinfo->{'file'} =~ /\.kiwi$/;
+
+
for my $d (@d) {
- my @files = sort(ls("$buildroot/.build.packages/$d"));
- @files = grep {/\.(?:deb|rpm|iso|desktopfiles)$/} @files;
- push @send, map {"$buildroot/.build.packages/$d/$_"} @files;
- }
+ if ($d =~ /KIWI/i) {
+ system("find $buildroot/.build.packages/");
+ if (opendir(D, "$buildroot/.build.packages/$d")) {
+ my @x;
+ @x = readdir(D);
+ my @y;
+ # available extensions in kiwi: .version (e.g. 0.0.1), raw, iso,
ext2/3, reiserfs, vmdk, ovf
+ @y = map {"$buildroot/.build.packages/$d/$_"} grep
{/\.(?:1|raw|iso|ext2|ext3|reiserfs|vmdk|ovf)$/} @x;
+ push @send, @y;
+ close D;
+ }
+ }
+ else {
+ if (opendir(D, "$buildroot/.build.packages/$d")) {
+ push @send, map {"$buildroot/.build.packages/$d/$_"} grep
{/\.(?:deb|rpm|iso)$/} readdir(D);
+ close D;
+ }
+ }
+ }
+
+
+# original code
+#
+# for my $d (@d) {
+# my @files = sort(ls("$buildroot/.build.packages/$d"));
+# @files = grep
{/\.(?:deb|rpm|iso|ext2|ext3|reiserfs|raw|vmdk|ovf|0.0.1|desktopfiles)$/}
@files;
+# print Dumper(\@files);
+# push @send, map {"$buildroot/.build.packages/$d/$_"} @files;
+# }
@send = map {{name => (split('/', $_))[-1], filename => $_}} @send;
if (!@send) {
print "build did not create anything to send back!\n";
< Previous Next >