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
911b3a5d
Kaydet (Commit)
911b3a5d
authored
Ara 06, 2005
tarafından
Eray Özkural
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
* complete the code to index sources
* to do this add an optional URI attribute to source spec
üst
fb7c4f57
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
11 deletions
+14
-11
index.py
pisi/index.py
+11
-9
packagedb.py
pisi/packagedb.py
+2
-2
specfile.py
pisi/specfile.py
+1
-0
No files found.
pisi/index.py
Dosyayı görüntüle @
911b3a5d
...
...
@@ -73,8 +73,8 @@ 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':
#
self.add_source(os.path.join(root, fn), repo_uri)
if
fn
==
'pspec.xml'
:
self
.
add_source
(
os
.
path
.
join
(
root
,
fn
),
repo_uri
)
def
update_db
(
self
,
repo
):
pkgdb
=
packagedb
.
get_db
(
repo
)
...
...
@@ -93,11 +93,11 @@ class Index(XmlFile):
md
=
metadata
.
MetaData
()
md
.
read
(
os
.
path
.
join
(
ctx
.
config
.
install_dir
(),
ctx
.
const
.
metadata_xml
))
if
ctx
.
config
.
options
and
ctx
.
config
.
options
.
absolute_uris
:
# FIXME: the name "absolute_uris" does not seem to fit below :/
md
.
package
.
packageURI
=
os
.
path
.
realpath
(
path
)
else
:
# create relative path by default
# TODO: in the future we'll do all of this with purl/pfile/&helpers
# After that, we'll remove the ugly repo_uri parameter from this
# function.
# TODO: in the future well do all of this with purl/pfile/&helpers
# really? heheh -- future exa
md
.
package
.
packageURI
=
util
.
removepathprefix
(
repo_uri
,
path
)
# check package semantics
errs
=
md
.
errors
()
...
...
@@ -116,8 +116,8 @@ class Index(XmlFile):
ctx
.
ui
.
error
(
_
(
'Component in
%
s is corrupt'
)
%
path
)
#ctx.ui.error(str(Error(*errs)))
def
add_source
(
self
,
path
):
ctx
.
ui
.
info
(
_
(
'Adding
%
s to source index'
)
%
fn
)
def
add_source
(
self
,
path
,
repo_uri
):
ctx
.
ui
.
info
(
_
(
'Adding
%
s to source index'
)
%
path
)
sf
=
specfile
.
SpecFile
()
sf
.
read
(
path
)
errs
=
sf
.
errors
()
...
...
@@ -125,6 +125,8 @@ class Index(XmlFile):
ctx
.
ui
.
error
(
_
(
'SpecFile in
%
s is corrupt'
)
%
path
)
ctx
.
ui
.
error
(
str
(
Error
(
*
errs
)))
else
:
if
ctx
.
config
.
options
and
ctx
.
config
.
options
.
absolute_uris
:
sf
.
source
.
sourceURI
=
os
.
path
.
realpath
(
path
)
else
:
# create relative path by default
sf
.
source
.
sourceURI
=
util
.
removepathprefix
(
repo_uri
,
path
)
self
.
sources
.
append
(
sf
.
source
)
#TODO: add source
pisi/packagedb.py
Dosyayı görüntüle @
911b3a5d
...
...
@@ -36,8 +36,8 @@ class Error(pisi.Error):
pass
class
PackageDB
(
object
):
"""PackageDB class provides an interface to the package database
with
a delegated dbshelve object
"""
"""PackageDB class provides an interface to the package database
using shelf objects
"""
def
__init__
(
self
,
id
):
self
.
d
=
shelve
.
LockedDBShelf
(
'package-
%
s'
%
id
)
self
.
dr
=
shelve
.
LockedDBShelf
(
'revdep-
%
s'
%
id
)
...
...
pisi/specfile.py
Dosyayı görüntüle @
911b3a5d
...
...
@@ -156,6 +156,7 @@ class Source:
t_BuildDependencies
=
[
[
Dependency
],
autoxml
.
optional
]
t_Version
=
[
autoxml
.
String
,
autoxml
.
optional
]
t_Release
=
[
autoxml
.
String
,
autoxml
.
optional
]
t_SourceURI
=
[
autoxml
.
String
,
autoxml
.
optional
]
# used in index
class
Package
:
...
...
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