Mailinglist Archive: opensuse-buildservice (233 mails)

< Previous Next >
Re: [opensuse-buildservice] Patches to easy Stand Alone OBS install.
  • From: "David B. Anderson" <danderson@xxxxxxxx>
  • Date: Tue, 15 May 2007 10:00:38 -0600
  • Message-id: <4649D926.7060200@xxxxxxxx>
Thanks,

Andreas Bauer wrote:
On Saturday, 12. May 2007 01:10, David B. Anderson wrote:
Hi,

Here are some patches to make setting up a stand alone OBS install easier.
They mostly remove some hard code URLs, allowing the use of the
environment configuration files.

Cool, thanks.

A few comments:

+  def link_to_repo(message='', repo='')
+ link_to "Build Service Software #{message}", URL_SW_REPO_HOST + "/#{repo}"
+  end

I'll remove the "Build Service Software" prefix, as this makes it very difficult to see what the final displayed text is.

Just trying to make the end user experience the same.

-    number_to_human_size(bytes, 2)
+    hs = number_to_human_size(bytes.to_i)
+    if hs == nil
+      hs = bytes
+    end
+    hs

I don't see the need for that. number_to_human_size can only return nil if the argument is nil. So your check effectively does nothing, because if hs == nil, bytes == nil. Additionally, the argument can never be nil as to_i, if defined, is guaranteed to always return an integer.

During the initial OBS install, I was having problems with this function causing the pages to abort with exceptions. After I put the check for nil, I figured out bytes was a numerical string, hence .to_i. I left the nil check just in case bytes ever contained a none numeric value. This is a pure sanity check. I try to make it so that after I hit a problem, it will never come back.


I'll check in the fixes for the hardcoded URLs if no one else has objections.

Also included is a patch for the obs-server.spec file to make it work
with a tarball made from current development tree.

All of the patches are against r1638.

Looking forward to the updates.

Thanks.

--
David B. Anderson Linux Networx
Sr. Software Engineer
Email: danderson@xxxxxxxx
Phone: (801) 649-1311

---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >