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
ba7f8d18
Kaydet (Commit)
ba7f8d18
authored
Tem 19, 2005
tarafından
Barış Metin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
biraz temizlik...
üst
4f99a945
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
21 deletions
+26
-21
build.py
pisi/build.py
+5
-5
metadata.py
pisi/metadata.py
+1
-0
operations.py
pisi/operations.py
+12
-16
util.py
pisi/util.py
+8
-0
No files found.
pisi/build.py
Dosyayı görüntüle @
ba7f8d18
...
...
@@ -243,13 +243,13 @@ class PisiBuild:
self
.
genFilesXml
(
package
)
ui
.
info
(
" done.
\n
"
)
# testing
pkgName
=
package
.
name
+
'-'
+
self
.
spec
.
source
.
version
+
\
'-'
+
self
.
spec
.
source
.
release
+
const
.
package_prefix
name
=
util
.
package_name
(
package
.
name
,
self
.
spec
.
source
.
version
,
self
.
spec
.
source
.
release
)
ui
.
info
(
"Creating PISI package
%
s
\n
"
%
pkgN
ame
)
ui
.
info
(
"Creating PISI package
%
s
\n
"
%
n
ame
)
pkg
=
Package
(
pkgN
ame
,
'w'
)
pkg
=
Package
(
n
ame
,
'w'
)
c
=
os
.
getcwd
()
# add comar files to package
...
...
pisi/metadata.py
Dosyayı görüntüle @
ba7f8d18
...
...
@@ -88,6 +88,7 @@ class MetaData(XmlFile):
self
.
readxml
(
filename
)
self
.
source
=
SourceInfo
(
self
.
getNode
(
"Source"
))
self
.
package
=
PackageInfo
(
self
.
getNode
(
"Package"
))
self
.
package
.
version
=
self
.
package
.
history
[
0
]
.
version
self
.
package
.
release
=
self
.
package
.
history
[
0
]
.
release
...
...
pisi/operations.py
Dosyayı görüntüle @
ba7f8d18
...
...
@@ -4,6 +4,7 @@ from config import config
from
constants
import
const
from
ui
import
ui
from
purl
import
PUrl
import
util
# all package operation interfaces are here
...
...
@@ -23,35 +24,31 @@ def remove(package_name):
def
install
(
pkg
):
url
=
PUrl
(
pkg
)
#
c
heck if we are dealing with a remote file or a real path of
# package filename.
If we are working with a remote file
#
install_package() will handle it
.
#
C
heck if we are dealing with a remote file or a real path of
# package filename.
Otherwise we'll try installing a package from
#
the package repository
.
if
url
.
isRemoteFile
()
or
os
.
path
.
exists
(
url
.
uri
):
install_package
(
pkg
)
else
:
from
os.path
import
join
from
index
import
Index
# no pisi package is specified. We are goin to install a
# package from the repository.
# TODO: Currently we're supporting for only one
# repository. We'll extend this functionality soon.
repo_url
=
config
.
values
.
repos
.
default
index
=
Index
()
indexpath
=
join
(
config
.
index_dir
(),
const
.
pisi_index
)
index
.
read
(
indexpath
)
# search package in index file, if it's present in the
# repository
#
search pkg in index for it's presence in
repository
for
package
in
index
.
packages
:
if
package
.
name
==
pkg
:
# As we have no Version tag we need to get
# the last version and release information
# from the first child of History/Update. And it works :)
version
=
package
.
history
[
0
]
.
version
release
=
package
.
history
[
0
]
.
release
pkg_name
=
package
.
name
+
'-'
+
version
+
\
'-'
+
release
+
const
.
package_prefix
package_uri
=
join
(
repo_url
,
pkg
[
0
],
pkg_name
)
ui
.
info
(
"Installing
%
s from repository
%
s
\n
"
%
(
pkg_name
,
repo_url
))
name
=
util
.
package_name
(
pkg
,
version
,
release
)
package_uri
=
join
(
repo_url
,
name
[
0
],
name
)
ui
.
info
(
"Installing
%
s from repository
%
s
\n
"
%
(
name
,
repo_url
))
install_package
(
package_uri
)
return
ui
.
error
(
"Package
%
s not found in the index file.
\n
"
%
pkg
)
...
...
@@ -77,7 +74,6 @@ def index(repo_dir = '.'):
ui
.
info
(
'* Building index of PISI files under
%
s
\n
'
%
repo_dir
)
index
=
Index
()
index
.
index
(
repo_dir
)
print
const
.
pisi_index
index
.
write
(
const
.
pisi_index
)
ui
.
info
(
'* Index file written
\n
'
)
...
...
pisi/util.py
Dosyayı görüntüle @
ba7f8d18
...
...
@@ -15,6 +15,7 @@ import statvfs
# pisi modules
from
ui
import
ui
from
constants
import
const
class
FileError
(
Exception
):
pass
...
...
@@ -245,3 +246,10 @@ def partition_freespace(directory):
""" returns free space of given directory's partition """
st
=
os
.
statvfs
(
directory
)
return
st
[
statvfs
.
F_BSIZE
]
*
st
[
statvfs
.
F_BFREE
]
#############################
# Package Related Functions #
#############################
def
package_name
(
name
,
version
,
release
):
return
name
+
'-'
+
version
+
'-'
+
release
+
const
.
package_prefix
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