Mailinglist Archive: opensuse-buildservice (200 mails)

< Previous Next >
RE: [opensuse-buildservice] source services and spec file in git
Well, you don't need to look into it anymore; I myself found the next
problem with it ;-)
If the file to extract is in a subdirectory inside the subdirectory, the
original problem appeared again :-(

So my "fix" was only a workaround, and a very poor one.

I took a look at the BSHTTP.pm file, which is actually producing the crash,
and after adding a condition to skip directories, both my old case, and the
new one seem to work.

I'm using OBS 2.1.10; I'm not sure if this has already been fixed on the 2.3
branch. Just in case, I attach the new patch for BSHTTP.pm (and the old one
for extract_file can be ignored)

Br,
Guillem


-----Original Message-----
From: ext Adrian Schröter [mailto:adrian@xxxxxxx]
Sent: Freitag, 13. Mai 2011 16:42
To: opensuse-buildservice@xxxxxxxxxxxx
Cc: Pages-Gassull Guillem (Nokia-MP/Ulm)
Subject: Re: [opensuse-buildservice] source services and spec file in git


Sorry, I had not time to look into that. But I promise to do so next week.

Am Thursday, 12. May 2011, 09:04:05 schrieb guillem.pages-gassull@xxxxxxxxx:
Hi,

I was trying to use source services, to automatically fetch the
sources from a git repository, including the spec file, and start
building.
In my "_service" file I have a "tar_scm", "extract_file", "recompress"
and "set_version", but here, only the first two are relevant.

My repository actually contains more than one sub-project, so I was
using the "subdir" option in tar_scm to only get the sources I need.
<service name="tar_scm">
<param name="url">git@192.168.1.1:Blub/git/BigGit</param>
<param name="scm">git</param>
<param name="subdir">hello1</param>
<param name="exclude">.git*</param>
<param name="filename">hello1</param>
</service>

After some trial-and-error, I managed to extract the spec file:
<service name="extract_file">
<param name="archive">*hello1*tar</param>
<param name="files">*/hello1.spec</param>
<param name="outfilename">hello1.spec</param>
</service>

But then, I was getting an error from the service daemon: Unexpected EOF.
In the /srv/obs/log/src_service.log I could see the lines:
Use of uninitialized value $r in numeric eq (==) at
/usr/lib/obs/server//BSHTTP.pm line 338.
Use of uninitialized value $r in subtraction (-) at
/usr/lib/obs/server//BSHTTP.pm line 342.
Use of uninitialized value $r in numeric eq (==) at
/usr/lib/obs/server//BSHTTP.pm line 338.
Use of uninitialized value $r in subtraction (-) at
/usr/lib/obs/server//BSHTTP.pm line 342.
Use of uninitialized value $r in numeric eq (==) at
/usr/lib/obs/server//BSHTTP.pm line 338.
Use of uninitialized value $r in subtraction (-) at
/usr/lib/obs/server//BSHTTP.pm line 342.
.

I managed to track it down to an empty directory left over after
unpacking the file. After that, I added a line at the end of
extract_file, so that empty directories are removed. And now it works.
Does anyone have a better idea, or some hints that I might be doing
something wrong? Or see any problems with this? Otherwise, I am
attaching a patch, in case you want to apply it.

Kind Regards,
Guillem

--
Adrian Schroeter
SUSE Linux Products GmbH
email: adrian@xxxxxxx

< Previous Next >