Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
I
inary
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
1
Konular (issue)
1
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
SulinOS
inary
Commits
73d3cc81
Kaydet (Commit)
73d3cc81
authored
Ara 14, 2005
tarafından
A. Murat Eren
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
more and more..
üst
98eaef55
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
5 deletions
+22
-5
build-dep-resolver.py
tools/build-dep-resolver.py
+22
-5
No files found.
tools/build-dep-resolver.py
Dosyayı görüntüle @
73d3cc81
...
...
@@ -25,6 +25,22 @@ def getBuildDependencies(pspec):
except
:
return
[
''
]
def
getRuntimeDependencies
(
pspec
):
rdeps
=
[]
dom
=
mdom
.
parse
(
pspec
)
try
:
for
p
in
Get
(
dom
.
documentElement
,
"Package"
):
rdeps
+=
[
bdep
.
firstChild
.
wholeText
for
bdep
in
Get
(
Get
(
p
,
"RuntimeDependencies"
)[
0
],
'Dependency'
)]
except
:
pass
#remove duplicated entries..
for
d
in
rdeps
:
for
i
in
range
(
0
,
rdeps
.
count
(
d
)
-
1
):
rdeps
.
remove
(
d
)
return
rdeps
def
getPackageNames
(
pspec
):
packages
=
[]
dom
=
mdom
.
parse
(
pspec
)
...
...
@@ -45,7 +61,7 @@ def buildDepResolver(pspeclist):
clean
=
True
for
i
in
range
(
0
,
pspeccount
):
pspec
=
pspeclist
[
i
]
for
p
in
depmap
.
get
(
pspec
):
for
p
in
b
depmap
.
get
(
pspec
):
for
j
in
range
(
i
+
1
,
pspeccount
):
if
p
in
namemap
.
get
(
pspeclist
[
j
]):
pspeclist
.
insert
(
j
+
1
,
pspeclist
.
pop
(
i
))
...
...
@@ -55,14 +71,15 @@ def buildDepResolver(pspeclist):
else
:
return
pspeclist
pspeclist
=
findPspecs
()
depmap
,
namemap
,
pspeccount
=
{},
{},
len
(
pspeclist
)
for
pspec
in
pspeclist
:
depmap
[
pspec
]
=
getBuildDependencies
(
pspec
)
for
pspec
in
pspeclist
:
namemap
[
pspec
]
=
getPackageNames
(
pspec
)
bdepmap
,
rdepmap
,
namemap
,
pspeccount
=
{},
{},
{},
len
(
pspeclist
)
for
pspec
in
pspeclist
:
bdepmap
[
pspec
]
=
getBuildDependencies
(
pspec
)
for
pspec
in
pspeclist
:
rdepmap
[
pspec
]
=
getRuntimeDependencies
(
pspec
)
for
pspec
in
pspeclist
:
namemap
[
pspec
]
=
getPackageNames
(
pspec
)
while
not
buildDepResolver
(
pspeclist
):
pass
print
pspeclist
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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