Mailinglist Archive: opensuse-bugs (7187 mails)

< Previous Next >
[Bug 356851] New: Strings: https://api.opensuse.org/... hardcoded in package_helper.rb
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Mon, 28 Jan 2008 16:57:21 -0700 (MST)
  • Message-id: <bug-356851-21960@xxxxxxxxxxxxxxxxxxxxxxxxx/>
https://bugzilla.novell.com/show_bug.cgi?id=356851


Summary: Strings: https://api.opensuse.org/... hardcoded in
package_helper.rb
Product: openSUSE.org
Version: unspecified
Platform: x86-64
OS/Version: SuSE Linux 10.1
Status: NEW
Severity: Normal
Priority: P5 - None
Component: BuildService
AssignedTo: bnc-team-screening@xxxxxxxxxxxxxxxxxxxxxx
ReportedBy: christopher.lang@xxxxxxxxxx
QAContact: adrian@xxxxxxxxxx
Found By: Other


In the file:

webclient/app/helpers/package_helper.rb

the strings "https://api.opensuse.org/..."; are hardcoded.

This leads to the following problem:

In a local obs installation the download links for "succeeded" packages lead to
the public opensuse build server api URL: https://api.opensuse.org/...

They should however lead to the local installation 127.0.42.2

or

the URLs should be configurable in some config file.


Below is a package_helper.rb where I *replaced* the URLs already to point to
the local server (old ones commented out):


module PackageHelper


def build_log_url( project, package, platform, arch )
#get_frontend_url_for( :controller => 'result' ) +
# "/#{project}/#{platform}/#{package}/#{arch}/log"

#"https://api.opensuse.org/result/#{project}/#{platform}/#{package}/#{arch}/log";
"http://127.0.42.2/result/#{project}/#{platform}/#{package}/#{arch}/log";
end


def file_url( project, package, filename )
#get_frontend_url_for( :controller => 'source') +
# "/#{project}/#{package}/#{filename}"
#"https://api.opensuse.org/source/#{project}/#{package}/#{filename}";
"http://127.0.42.2/source/#{project}/#{package}/#{filename}";
end


def rpm_url( project, package, repository, arch, filename )
#get_frontend_url_for( :controller => 'rpm' ) +
# "/#{project}/#{repository}/#{package}/#{arch}/#{filename}"

#"https://api.opensuse.org/rpm/#{project}/#{repository}/#{package}/#{arch}/#{filename}";

"http://127.0.42.2/rpm/#{project}/#{repository}/#{package}/#{arch}/#{filename}";
end

def human_readable_fsize( bytes )
number_to_human_size(bytes, 2)
end

end


--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

< Previous Next >
Follow Ups