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
380bc562
Kaydet (Commit)
380bc562
authored
Agu 07, 2021
tarafından
ğ
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
AdvancedList integration for integration check and dependency calculation. Speedup %300
üst
d30bd070
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
22 deletions
+21
-22
pgraph.py
inary/data/pgraph.py
+14
-13
install.py
inary/operations/install.py
+5
-8
__init__.py
inary/util/__init__.py
+1
-0
list.py
inary/util/list.py
+1
-1
No files found.
inary/data/pgraph.py
Dosyayı görüntüle @
380bc562
...
...
@@ -30,7 +30,7 @@ class PGraph:
def
__init__
(
self
,
packagedb
=
None
,
installdb
=
None
):
self
.
packagedb
=
packagedb
self
.
installdb
=
installdb
self
.
packages
=
[]
self
.
packages
=
inary
.
util
.
AdvancedList
(
2
)
self
.
vertic
=
[]
self
.
checked
=
[]
self
.
reinstall
=
False
...
...
@@ -48,7 +48,8 @@ class PGraph:
return
self
.
packagedb
def
topological_sort
(
self
):
return
inary
.
util
.
unique_list
(
self
.
packages
)
print
(
self
.
packages
.
all
())
return
inary
.
util
.
unique_list
(
self
.
packages
.
all
())
def
check_package
(
self
,
pkg
=
None
,
reverse
=
False
):
if
pkg
not
in
self
.
checked
:
...
...
@@ -56,30 +57,30 @@ class PGraph:
else
:
return
if
pkg
in
self
.
packages
:
if
self
.
packages
.
exists
(
pkg
)
:
return
else
:
if
reverse
:
if
pkg
not
in
self
.
packages
:
self
.
packages
.
append
(
pkg
)
if
not
self
.
packages
.
exists
(
pkg
)
:
self
.
packages
(
pkg
)
for
(
dep
,
depinfo
)
in
self
.
installdb
.
get_rev_deps
(
pkg
):
if
dep
not
in
self
.
packages
:
if
not
self
.
packages
.
exists
(
dep
)
:
self
.
check_package
(
dep
,
reverse
)
if
self
.
installdb
.
has_package
(
dep
):
self
.
packages
.
a
ppen
d
(
dep
)
self
.
packages
.
a
d
d
(
dep
)
else
:
if
self
.
installdb
.
has_package
(
pkg
):
if
self
.
packagedb
.
get_package
(
pkg
)
.
release
==
self
.
installdb
.
get_package
(
pkg
)
.
release
:
if
not
self
.
reinstall
:
return
if
pkg
not
in
self
.
packages
:
self
.
packages
.
a
ppen
d
(
pkg
)
if
not
self
.
packages
.
exists
(
pkg
)
:
self
.
packages
.
a
d
d
(
pkg
)
for
dep
in
self
.
packagedb
.
get_package
(
pkg
)
.
runtimeDependencies
():
if
dep
not
in
self
.
packages
:
if
not
self
.
packages
.
exists
(
dep
)
:
self
.
check_package
(
dep
.
package
,
reverse
)
if
not
self
.
installdb
.
has_package
(
dep
.
package
):
self
.
packages
.
a
ppen
d
(
dep
.
package
)
self
.
packages
.
a
d
d
(
dep
.
package
)
def
add_package
(
self
,
package
):
self
.
check_package
(
package
,
False
)
...
...
@@ -88,9 +89,9 @@ class PGraph:
self
.
check_package
(
package
,
True
)
def
add_package_file
(
self
,
pkg
):
self
.
packages
.
a
ppen
d
(
pkg
)
self
.
packages
.
a
d
d
(
pkg
)
for
dep
in
self
.
installdb
.
get_package
(
pkg
)
.
runtimeDependencies
():
if
dep
not
in
self
.
packages
:
if
not
self
.
packages
.
exists
(
dep
)
:
self
.
check_package
(
dep
.
package
)
def
vertices
(
self
):
...
...
inary/operations/install.py
Dosyayı görüntüle @
380bc562
...
...
@@ -124,7 +124,7 @@ def install_pkg_names(A, reinstall=False, extra=False):
if
conflicts
:
operations
.
remove
.
remove_conflicting_packages
(
conflicts
)
install_files
=
{}
install_files
=
util
.
AdvancedList
()
file_conflicts
=
[]
for
path
in
paths
:
pkg
=
inary
.
package
.
Package
(
path
)
...
...
@@ -135,15 +135,12 @@ def install_pkg_names(A, reinstall=False, extra=False):
"} / {} ] => {}"
)
.
format
(
paths
.
index
(
path
)
+
1
,
len
(
paths
),
pkg
.
metadata
.
package
.
name
),
color
=
"yellow"
)
for
file
in
pkg
.
files
.
list
:
sha
=
util
.
sha1_data
(
file
.
path
)[
0
:
5
]
if
sha
not
in
install_files
:
install_files
[
sha
]
=
[]
if
file
not
in
install_files
[
sha
]:
install_files
[
sha
]
.
append
(
file
)
else
:
if
install_files
.
exists
(
file
):
file_conflicts
.
append
(
file
)
else
:
install_files
.
add
(
file
)
ctx
.
ui
.
info
(
_
(
"Current {} / Total {} files counted."
)
.
format
(
len
(
pkg
.
files
.
list
),
len
(
install_files
)))
_
(
"Current {} / Total {} files counted."
)
.
format
(
len
(
pkg
.
files
.
list
),
install_files
.
length
(
)))
if
len
(
file_conflicts
)
>
0
:
ctx
.
ui
.
warning
(
_
(
"Integration check error detected."
))
for
path
in
file_conflicts
:
...
...
inary/util/__init__.py
Dosyayı görüntüle @
380bc562
...
...
@@ -30,6 +30,7 @@ from inary.util.process import *
from
inary.util.strings
import
*
from
inary.util.terminal
import
*
from
inary.util.cpuinfo
import
*
from
inary.util.list
import
*
# Gettext Library
import
gettext
...
...
inary/util/list.py
Dosyayı görüntüle @
380bc562
...
...
@@ -60,7 +60,7 @@ class AdvancedList:
def
exists
(
self
,
element
):
"""check element available in list"""
path
=
self
.
__get_path
(
element
)
return
element
in
self
.
__liststore
[
path
]
return
path
in
self
.
__liststore
and
element
in
self
.
__liststore
[
path
]
def
length
(
self
):
"""return list length"""
...
...
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