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)
0
Konular (issue)
0
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
0c3fe2a7
Kaydet (Commit)
0c3fe2a7
authored
Mar 18, 2018
tarafından
Suleyman Poyraz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Search-File komutu fixe edildi. Biraz renk verirsek inary'nin tamamına bütün işimiz bitmiş olacak
üst
e6179182
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
16 deletions
+10
-16
FIXME.md
FIXME.md
+3
-5
searchfile.py
inary/cli/searchfile.py
+4
-4
filesdb.py
inary/db/filesdb.py
+2
-6
search.py
inary/operations/search.py
+1
-1
No files found.
FIXME.md
Dosyayı görüntüle @
0c3fe2a7
...
...
@@ -17,11 +17,8 @@
Şu satır bir kontrol edilmeli:
2018-03-17 Suleyman POYRAZ
<nipalensisaquila@gmail.com>
*
inary searchfile command: --- status: not fixed; flag: critical ---:
Traceback:
Program terminated.
You have to be root for this operation.
Please use 'inary help' for general help.
*
inary searchfile command: --- status: fixed; flag: critical ---:
-> filesdb modulune dayalı bir hata tespit edildi.
2018-01-26 Suleyman POYRAZ
<nipalensisaquila@gmail.com>
...
...
@@ -36,6 +33,7 @@
* inary/sxml/xmlext --- status: fixed; flag: cosmetical ---:
-> Minidom kullanarak fixe edildi
-> Ciksemel için gzip modulu kullanımındaki hata fixe edildi.
xmlext modulunde bulunan getNodeText olayinda ciktilar utf-8 ile
decode edilmeli. Yoksa Localtext ve Text type veriler ile ilgili sorun
cıkıyor
...
...
inary/cli/searchfile.py
Dosyayı görüntüle @
0c3fe2a7
...
...
@@ -44,17 +44,17 @@ Finds the installed package which contains the specified file.
def
search_file
(
self
,
path
):
found
=
search
.
search_file
(
path
)
for
pkg
,
files
in
found
:
for
pkg_file
in
files
:
ctx
.
ui
.
info
(
_
(
"Package {0} has file /{1}"
)
.
format
(
pkg
,
pkg_file
))
if
not
found
:
ctx
.
ui
.
error
(
_
(
"Path '{}' does not belong to an installed package"
)
.
format
(
path
))
for
pkg
,
files
in
found
:
for
pkg_file
in
files
:
ctx
.
ui
.
info
(
_
(
"Package {0} has file /{1}"
)
.
format
(
pkg
,
pkg_file
))
def
run
(
self
):
self
.
init
(
database
=
True
,
write
=
False
)
print
(
34623456
)
if
not
self
.
args
:
self
.
help
()
...
...
inary/db/filesdb.py
Dosyayı görüntüle @
0c3fe2a7
...
...
@@ -38,10 +38,6 @@ class FilesDB(lazydb.LazyDB):
def
__del__
(
self
):
self
.
close
()
def
has_file
(
self
,
path
):
if
key
in
self
.
filesdb
:
return
True
def
create_filesdb
(
self
):
ctx
.
ui
.
info
(
inary
.
util
.
colorize
(
_
(
'Creating files database...'
),
'blue'
))
installdb
=
inary
.
db
.
installdb
.
InstallDB
()
...
...
@@ -55,8 +51,8 @@ class FilesDB(lazydb.LazyDB):
return
self
.
filesdb
.
get
(
key
),
path
def
search_file
(
self
,
term
):
if
self
.
has_file
(
term
):
pkg
,
path
=
self
.
get_file
(
term
)
pkg
,
path
=
self
.
get_file
(
term
)
if
pkg
:
return
[(
pkg
,[
path
])]
installdb
=
inary
.
db
.
installdb
.
InstallDB
()
...
...
inary/operations/search.py
Dosyayı görüntüle @
0c3fe2a7
...
...
@@ -74,5 +74,5 @@ def search_file(term):
"""
if
term
.
startswith
(
"/"
):
# FIXME: why? why?
term
=
term
[
1
:]
return
ctx
.
filesdb
.
search_file
(
term
)
return
ctx
.
filesdb
.
search_file
(
term
)
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