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
d7aed533
Kaydet (Commit)
d7aed533
authored
Haz 08, 2011
tarafından
Ozan Çağlayan
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
check: Print a warning if some files can't be read
üst
bcf03aaa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
12 deletions
+24
-12
check.py
pisi/cli/check.py
+24
-12
No files found.
pisi/cli/check.py
Dosyayı görüntüle @
d7aed533
...
...
@@ -65,6 +65,8 @@ If no packages are given, checks all installed packages.
ctx
.
ui
.
info
(
_
(
'Checking all installed packages'
)
+
'
\n
'
)
pkgs
=
pisi
.
api
.
list_installed
()
necessary_permissions
=
True
# True if we should also check the configuration files
check_config
=
ctx
.
get_option
(
'config'
)
...
...
@@ -82,20 +84,30 @@ If no packages are given, checks all installed packages.
if
check_results
[
'missing'
]
or
check_results
[
'corrupted'
]
\
or
check_results
[
'config'
]:
ctx
.
ui
.
info
(
pisi
.
util
.
colorize
(
_
(
"Broken"
),
'brightred'
))
# Dump per file stuff
for
fpath
in
check_results
[
'missing'
]:
ctx
.
ui
.
info
(
"
%
s"
%
pisi
.
util
.
colorize
(
_
(
"Missing file: /
%
s"
)
%
fpath
,
'brightred'
))
for
fpath
in
check_results
[
'denied'
]:
ctx
.
ui
.
info
(
"
%
s"
%
pisi
.
util
.
colorize
(
_
(
"Access denied: /
%
s"
)
%
fpath
,
'yellow'
))
for
fpath
in
check_results
[
'corrupted'
]:
ctx
.
ui
.
info
(
"
%
s"
%
pisi
.
util
.
colorize
(
_
(
"Corrupted file: /
%
s"
)
%
fpath
,
'brightyellow'
))
for
fpath
in
check_results
[
'config'
]:
ctx
.
ui
.
info
(
"
%
s"
%
pisi
.
util
.
colorize
(
_
(
"Modified configuration file: /
%
s"
)
%
fpath
,
'brightyellow'
))
elif
check_results
[
'denied'
]:
# We can't deduce a result when some files can't be accessed
necessary_permissions
=
False
ctx
.
ui
.
info
(
pisi
.
util
.
colorize
(
_
(
"Unknown"
),
'yellow'
))
else
:
# Show OK packages only in verbose
ctx
.
ui
.
info
(
pisi
.
util
.
colorize
(
_
(
"OK"
),
'green'
))
continue
# Dump per file stuff
for
fpath
in
check_results
[
'missing'
]:
ctx
.
ui
.
info
(
pisi
.
util
.
colorize
(
_
(
"Missing file: /
%
s"
)
%
fpath
,
'brightred'
))
for
fpath
in
check_results
[
'denied'
]:
ctx
.
ui
.
info
(
pisi
.
util
.
colorize
(
_
(
"Access denied: /
%
s"
)
%
fpath
,
'yellow'
))
for
fpath
in
check_results
[
'corrupted'
]:
ctx
.
ui
.
info
(
pisi
.
util
.
colorize
(
_
(
"Corrupted file: /
%
s"
)
%
fpath
,
'brightyellow'
))
for
fpath
in
check_results
[
'config'
]:
ctx
.
ui
.
info
(
pisi
.
util
.
colorize
(
_
(
"Modified configuration file: /
%
s"
)
%
fpath
,
'brightyellow'
))
else
:
# Package is not installed
ctx
.
ui
.
info
(
_
(
'Package
%
s not installed'
)
%
pkg
)
if
not
necessary_permissions
:
ctx
.
ui
.
info
(
""
)
ctx
.
ui
.
warning
(
_
(
"Pisi was unable to check the integrity of packages which contain files that you don't have read access.
\n
"
"Running the check under a privileged user may help fixing this problem."
))
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