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
ef797662
Kaydet (Commit)
ef797662
authored
May 12, 2020
tarafından
Ali Rıza KESKİN
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fast list-installed
üst
c1034448
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
6 deletions
+20
-6
listavailable.py
inary/cli/listavailable.py
+6
-6
packagedb.py
inary/db/packagedb.py
+14
-0
No files found.
inary/cli/listavailable.py
Dosyayı görüntüle @
ef797662
...
...
@@ -91,15 +91,15 @@ all repositories.
if
ctx
.
config
.
get_option
(
'uninstalled'
)
and
p
in
installed_list
:
continue
p
ackage
=
self
.
packagedb
.
get_package
(
p
,
repo
)
p
sum
=
self
.
packagedb
.
get_summary
(
p
,
repo
)
if
p
in
installed_list
:
p
ackage
.
name
=
util
.
colorize
(
package
.
name
,
'green'
)
p
kgname
=
util
.
colorize
(
p
,
'green'
)
else
:
p
ackage
.
name
=
util
.
colorize
(
package
.
name
,
'brightwhite'
)
p
kgname
=
util
.
colorize
(
p
,
'brightwhite'
)
if
self
.
options
.
long
:
ctx
.
ui
.
info
(
str
(
p
ackage
)
+
'
\n
'
)
ctx
.
ui
.
info
(
str
(
p
)
+
'
\n
'
)
else
:
p
ackage
.
name
+=
' '
*
max
(
0
,
maxlen
-
len
(
p
))
ctx
.
ui
.
info
(
'{0} - {1} '
.
format
(
p
ackage
.
name
,
str
(
package
.
summary
)))
p
kg
name
+=
' '
*
max
(
0
,
maxlen
-
len
(
p
))
ctx
.
ui
.
info
(
'{0} - {1} '
.
format
(
p
,
str
(
psum
)))
inary/db/packagedb.py
Dosyayı görüntüle @
ef797662
...
...
@@ -168,6 +168,12 @@ class PackageDB(lazydb.LazyDB):
return
release
@staticmethod
def
__get_summary
(
meta_doc
):
summary
=
xmlext
.
getNodeText
(
meta_doc
,
'Summary'
)
return
summary
@staticmethod
def
__get_distro_release
(
meta_doc
):
distro
=
xmlext
.
getNodeText
(
meta_doc
,
'Distribution'
)
...
...
@@ -191,6 +197,14 @@ class PackageDB(lazydb.LazyDB):
return
self
.
__get_version
(
pkg_doc
)
def
get_summary
(
self
,
name
,
repo
=
None
):
if
not
self
.
has_package
(
name
,
repo
):
raise
Exception
(
_
(
'Package
\"
{}
\"
not found.'
)
.
format
(
name
))
pkg_doc
=
xmlext
.
parseString
(
self
.
pdb
.
get_item
(
name
,
repo
))
return
self
.
__get_summary
(
pkg_doc
)
def
get_release
(
self
,
name
,
repo
):
if
not
self
.
has_package
(
name
,
repo
):
raise
Exception
(
_
(
'Package
\"
{}
\"
not found.'
)
.
format
(
name
))
...
...
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