File obs-server-2.10-0028-frontend-Require-some-dependencies-explicitly.patch of Package obs-server

From 1b59175f84215c7cfc5643d4aca4569730094a7a Mon Sep 17 00:00:00 2001
From: Oleg Girko <ol@infoserver.lv>
Date: Sun, 28 Jun 2020 18:33:36 +0100
Subject: [PATCH] [frontend] Require some dependencies explicitly.

Loading some modules started breaking for some reason in Fedora 32
using bundler_ext with "Undefined constant" error for some class names
that are defined in a different module.

This results in immediate error when eager loading is used
(if class name causing error is defined in a module eager loaded later)
or delayed error is eager loading is not used.

The cause of this problem is unclear. Probably, this could be because
Fedora 32 switched from bundler 1 to bundler 2 (2.1.4 to be exact).

Anyway, this change adds explicit requires to work around this problem.

Signed-off-by: Oleg Girko <ol@infoserver.lv>
---
 src/api/app/models/package_file.rb       | 2 ++
 src/api/lib/backend/api/build/project.rb | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/src/api/app/models/package_file.rb b/src/api/app/models/package_file.rb
index c2bcd6bf87..6b27fa13b6 100644
--- a/src/api/app/models/package_file.rb
+++ b/src/api/app/models/package_file.rb
@@ -1,4 +1,6 @@
 # Backend::File model to represent files that belongs to the package in the backend
+require_dependency 'backend/file'
+
 class PackageFile < Backend::File
   attr_accessor :project_name, :package_name
 
diff --git a/src/api/lib/backend/api/build/project.rb b/src/api/lib/backend/api/build/project.rb
index 017a944170..070a32eb10 100644
--- a/src/api/lib/backend/api/build/project.rb
+++ b/src/api/lib/backend/api/build/project.rb
@@ -1,3 +1,5 @@
+require_dependency 'backend/connection_helper'
+
 module Backend
   module Api
     module Build
-- 
2.31.1