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
4bf93a4a
Kaydet (Commit)
4bf93a4a
authored
May 06, 2021
tarafından
Ali Rıza KESKİN
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge branch 'develop' of
https://gitlab.com/sulinos/devel/inary
into develop
üst
379dc1f7
7ef6d860
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
18 deletions
+32
-18
sourcedb.py
inary/db/sourcedb.py
+1
-0
emerge.py
inary/operations/emerge.py
+31
-18
No files found.
inary/db/sourcedb.py
Dosyayı görüntüle @
4bf93a4a
...
...
@@ -94,6 +94,7 @@ class SourceDB(lazydb.LazyDB):
for
src
in
self
.
list_sources
(
repo
):
for
pkg
in
self
.
list_package_from_source
(
src
):
pkg_src
[
pkg
]
=
src
self
.
pkg_src_nodes
=
pkg_src
return
pkg_src
def
list_sources
(
self
,
repo
=
None
):
...
...
inary/operations/emerge.py
Dosyayı görüntüle @
4bf93a4a
...
...
@@ -27,8 +27,6 @@ import gettext
__trans
=
gettext
.
translation
(
'inary'
,
fallback
=
True
)
_
=
__trans
.
gettext
@util.locked
def
emerge
(
A
):
"""
Builds and installs the given packages from source
...
...
@@ -55,24 +53,25 @@ def emerge(A):
need_build
=
[]
order_build
=
A
if
need_build
:
ctx
.
ui
.
info
(
_
(
"""The following list of packages will be built:"""
)
+
"
\n
"
+
util
.
strlist
(
need_build
)
+
util
.
strlist
(
order_build
))
if
ctx
.
get_option
(
'dry_run'
):
return
if
len
(
need_build
)
+
len
(
order_build
)
>
len
(
A_0
):
if
not
ctx
.
ui
.
confirm
(
_
(
'There are extra packages due to dependencies. Would you like to continue?'
)):
return
False
# TODO: Enable this code
#if need_build:
# ctx.ui.info(_("""The following list of packages will be built:\n{} {}""").format(
# util.strlist(need_build),
# util.strlist(order_build)))
#
#if len(need_build) + len(order_build) > len(A_0):
# if not ctx.ui.confirm(
# _('There are extra packages due to dependencies. Would you like to continue?')):
# return False
ctx
.
ui
.
notify
(
ui
.
packagestogo
,
order
=
need_build
)
# Dependency install from source repo (fully emerge)
sourcedb
=
inary
.
db
.
sourcedb
.
SourceDB
()
inary
.
operations
.
emerge
.
emerge
(
need_build
)
# Dependency install from binary repo (half emerge)
# TODO: Add half-emerge support from parameter
# for x in order_inst:
...
...
@@ -125,7 +124,8 @@ def plan_emerge(A):
B
=
A
install_list
=
set
()
need_build
=
set
()
need_build
=
[]
skip_list
=
set
()
while
len
(
B
)
>
0
:
Bp
=
set
()
for
x
in
B
:
...
...
@@ -136,13 +136,26 @@ def plan_emerge(A):
# add dependencies
def
find_build_dep
(
A
):
# need_build is build list
# order_build is build list from input
# A is current process list
# skip_list is finished list
for
i
in
A
:
if
i
in
need_build
:
if
i
in
need_build
or
\
i
in
order_build
or
\
i
in
A
or
\
i
in
skip_list
:
return
else
:
need_build
.
add
(
pkgtosrc
(
i
))
src
=
get_spec
(
pkgtosrc
(
i
))
.
source
find_build_dep
(
src
.
buildDependencies
)
pkg
=
pkgtosrc
(
i
)
need_build
.
insert
(
0
,
pkg
)
src
=
get_spec
(
pkg
)
.
source
for
dep
in
src
.
buildDependencies
:
if
not
installdb
.
has_package
(
dep
.
package
):
if
dep
.
package
not
in
install_list
:
find_build_dep
([
dep
.
package
])
else
:
skip_list
.
add
(
dep
.
package
)
def
process_dep
(
dep
):
if
not
dep
.
satisfied_by_installed
():
...
...
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