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
3632a637
Kaydet (Commit)
3632a637
authored
Mar 23, 2006
tarafından
Eray Özkural
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
* add an option to skip indexing sources
üst
ccbcf5d1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
+8
-5
api.py
pisi/api.py
+2
-2
commands.py
pisi/cli/commands.py
+4
-1
index.py
pisi/index.py
+2
-2
No files found.
pisi/api.py
Dosyayı görüntüle @
3632a637
...
...
@@ -292,13 +292,13 @@ def check(package):
ctx
.
ui
.
info
(
"OK"
,
False
)
return
corrupt
def
index
(
dirs
,
output
=
'pisi-index.xml'
):
def
index
(
dirs
,
output
=
'pisi-index.xml'
,
skip_sources
=
False
):
index
=
Index
()
if
not
dirs
:
dirs
=
[
'.'
]
for
repo_dir
in
dirs
:
ctx
.
ui
.
info
(
_
(
'* Building index of PISI files under
%
s'
)
%
repo_dir
)
index
.
index
(
repo_dir
)
index
.
index
(
repo_dir
,
skip_sources
)
index
.
write
(
output
)
ctx
.
ui
.
info
(
_
(
'* Index file written'
))
...
...
pisi/cli/commands.py
Dosyayı görüntüle @
3632a637
...
...
@@ -680,6 +680,9 @@ source and binary packages.
self
.
parser
.
add_option
(
"-o"
,
"--output"
,
action
=
"store"
,
default
=
'pisi-index.xml'
,
help
=
_
(
"index output file"
))
self
.
parser
.
add_option
(
"-S"
,
"--skip-sources"
,
action
=
"store_true"
,
default
=
False
,
help
=
_
(
"do not index pisi spec files."
))
def
run
(
self
):
...
...
@@ -689,7 +692,7 @@ source and binary packages.
index
(
self
.
args
,
ctx
.
get_option
(
'output'
))
elif
len
(
self
.
args
)
==
0
:
ctx
.
ui
.
info
(
_
(
'Indexing current directory.'
))
index
(
'.'
,
ctx
.
get_option
(
'output'
))
index
(
'.'
,
ctx
.
get_option
(
'output'
)
,
skip_sources
=
ctx
.
get_option
(
'skip_sources'
)
)
self
.
finalize
()
...
...
pisi/index.py
Dosyayı görüntüle @
3632a637
...
...
@@ -66,7 +66,7 @@ class Index(XmlFile):
self
.
read
(
self
.
filepath
)
def
index
(
self
,
repo_uri
):
def
index
(
self
,
repo_uri
,
skip_sources
=
False
):
self
.
repo_dir
=
repo_uri
for
root
,
dirs
,
files
in
os
.
walk
(
repo_uri
):
for
fn
in
files
:
...
...
@@ -76,7 +76,7 @@ class Index(XmlFile):
if
fn
==
'component.xml'
:
ctx
.
ui
.
info
(
_
(
'Adding
%
s to component index'
)
%
fn
)
self
.
add_component
(
os
.
path
.
join
(
root
,
fn
))
if
fn
==
'pspec.xml'
:
if
fn
==
'pspec.xml'
and
not
skip_sources
:
self
.
add_spec
(
os
.
path
.
join
(
root
,
fn
),
repo_uri
)
def
update_db
(
self
,
repo
,
txn
=
None
):
...
...
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