Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Cloud:OpenStack:Newton
erlang-rebar
0001-Find-all-deps-locally-first.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Find-all-deps-locally-first.patch of Package erlang-rebar
From 19a4fb0ecb48a4cbc48626133f54da9cd17962ba Mon Sep 17 00:00:00 2001 From: "Matwey V. Kornilov" <matwey.kornilov@gmail.com> Date: Wed, 16 Apr 2014 20:22:56 +0400 Subject: [PATCH 1/2] Find all deps locally first. In Open Build Service we don't have internet access, we have to find all the deps locally. --- src/rebar_deps.erl | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) Index: rebar-2.6.1+git20150928.365ac64/src/rebar_deps.erl =================================================================== --- rebar-2.6.1+git20150928.365ac64.orig/src/rebar_deps.erl +++ rebar-2.6.1+git20150928.365ac64/src/rebar_deps.erl @@ -373,27 +373,20 @@ find_deps(_Config, _Mode, [Other | _Rest ?ABORT("Invalid dependency specification ~p in ~s\n", [Other, rebar_utils:get_cwd()]). +%% +%% In Open Build Service we don't have internet access, +%% we have to find all the deps locally. +%% find_dep(Config, Dep) -> - %% Find a dep based on its source, - %% e.g. {git, "https://github.com/mochi/mochiweb.git", "HEAD"} - %% Deps with a source must be found (or fetched) locally. - %% Those without a source may be satisfied from lib dir (get_lib_dir). find_dep(Config, Dep, Dep#dep.source). -find_dep(Config, Dep, undefined) -> - %% 'source' is undefined. If Dep is not satisfied locally, - %% go ahead and find it amongst the lib_dir's. +find_dep(Config, Dep, Source) -> case find_dep_in_dir(Config, Dep, get_deps_dir(Config, Dep#dep.app)) of {_Config1, {avail, _Dir}} = Avail -> Avail; {Config1, {missing, _}} -> find_dep_in_dir(Config1, Dep, get_lib_dir(Dep#dep.app)) - end; -find_dep(Config, Dep, _Source) -> - %% _Source is defined. Regardless of what it is, we must find it - %% locally satisfied or fetch it from the original source - %% into the project's deps - find_dep_in_dir(Config, Dep, get_deps_dir(Config, Dep#dep.app)). + end. find_dep_in_dir(Config, _Dep, {false, Dir}) -> {Config, {missing, Dir}};
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor