Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Gepetto
dashboard
Commits
c6340e33
Commit
c6340e33
authored
Apr 08, 2020
by
Guilhem Saurel
Browse files
ordered_projects: provide deps
parent
d27ae6dd
Pipeline
#8996
passed with stage
in 7 minutes and 42 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
rainboard/models.py
View file @
c6340e33
...
...
@@ -1200,4 +1200,12 @@ def ordered_projects():
for
old
,
new
in
switch
:
lst
[
old
],
lst
[
new
]
=
lst
[
new
],
lst
[
old
]
return
lst
def
get_deps
(
cat
,
pkg
,
ns
,
lst
):
with
(
settings
.
RAINBOARD_RPKG
/
cat
/
pkg
/
'Makefile'
).
open
()
as
file_handle
:
cont
=
file_handle
.
read
()
deps
=
[
dep_pkg
for
dep_cat
,
dep_pkg
,
_
in
lst
if
f
'
\n
include ../../
{
dep_cat
}
/
{
dep_pkg
}
/depend.mk
\n
'
in
cont
]
if
pkg
.
startswith
(
'py-'
)
and
(
cat
,
pkg
[
3
:],
ns
)
in
lst
:
deps
.
append
(
pkg
[
3
:])
return
list
(
set
(
deps
))
return
[[
cat
,
pkg
,
ns
,
get_deps
(
cat
,
pkg
,
ns
,
lst
)]
for
cat
,
pkg
,
ns
in
lst
]
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment