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
5915e696
Kaydet (Commit)
5915e696
authored
Nis 14, 2018
tarafından
Suleyman Poyraz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Bugs are fixed
üst
ea5fdcc5
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
16 additions
and
15 deletions
+16
-15
atomicoperations.py
inary/atomicoperations.py
+2
-1
fetch.py
inary/cli/fetch.py
+1
-1
constants.py
inary/constants.py
+1
-2
filesdb.py
inary/db/filesdb.py
+2
-2
fetcher.py
inary/fetcher.py
+3
-3
sourcearchive.py
inary/sourcearchive.py
+4
-2
xmlfile_iks.py
inary/sxml/xmlfile_iks.py
+1
-1
setup.py
setup.py
+2
-3
No files found.
inary/atomicoperations.py
Dosyayı görüntüle @
5915e696
...
...
@@ -291,7 +291,7 @@ class Install(AtomicOperation):
# Chowning for additional files
for
_file
in
self
.
package
.
get_files
()
.
list
:
fpath
=
util
.
join_path
(
ctx
.
config
.
dest_dir
(),
_file
.
path
)
ctx
.
ui
.
debug
(
"* Chowning in postinstall
({0}:{1})"
.
format
(
_file
.
uid
,
_file
.
gid
))
ctx
.
ui
.
debug
(
"* Chowning in postinstall
{0} ({1}:{2})"
.
format
(
_file
.
path
,
_file
.
uid
,
_file
.
gid
))
os
.
chown
(
fpath
,
int
(
_file
.
uid
),
int
(
_file
.
gid
))
if
ctx
.
scom
:
...
...
@@ -532,6 +532,7 @@ class Install(AtomicOperation):
inary
.
db
.
installdb
.
InstallDB
()
.
mark_needs_reboot
(
package
)
# filesdb
ctx
.
ui
.
info
(
util
.
colorize
(
_
(
'Adding
\'
{}
\'
to db...'
),
'purple'
)
.
format
(
self
.
metadata
.
package
.
name
))
ctx
.
filesdb
.
add_files
(
self
.
metadata
.
package
.
name
,
self
.
files
)
# installed packages
...
...
inary/cli/fetch.py
Dosyayı görüntüle @
5915e696
...
...
@@ -46,7 +46,7 @@ Downloads the given inary packages to working directory
group
.
add_option
(
"-o"
,
"--output-dir"
,
action
=
"store"
,
default
=
os
.
path
.
curdir
,
help
=
_
(
"Output directory for the fetched packages"
))
group
.
add_option
(
"--runtime-deps"
,
action
=
"store_true"
,
default
=
None
,
help
=
_
(
"
Bağımlılıkları ile indirme açıklaması
."
))
help
=
_
(
"
Download with runtime dependencies
."
))
def
run
(
self
):
packages
=
inary
.
db
.
packagedb
.
PackageDB
()
...
...
inary/constants.py
Dosyayı görüntüle @
5915e696
...
...
@@ -93,8 +93,7 @@ class Constants(metaclass=Singleton):
self
.
__c
.
config_pending
=
"configpending"
self
.
__c
.
needs_restart
=
"needsrestart"
self
.
__c
.
needs_reboot
=
"needsreboot"
self
.
__c
.
files_db
=
"files.db"
self
.
__c
.
files_ldb
=
"files.ldb"
self
.
__c
.
files_db
=
"files_db"
self
.
__c
.
repos
=
"repos"
self
.
__c
.
devel_package_end
=
"-devel"
self
.
__c
.
doc_package_end
=
"-docs?$"
...
...
inary/db/filesdb.py
Dosyayı görüntüle @
5915e696
...
...
@@ -45,6 +45,7 @@ class FilesDB(lazydb.LazyDB):
for
pkg
in
installdb
.
list_installed
():
files
=
installdb
.
get_files
(
pkg
)
self
.
add_files
(
pkg
,
files
)
ctx
.
ui
.
info
(
"
%-80.80
s
\r
"
%
(
util
.
colorize
(
_
(
'-> Adding
\'
{}
\'
to db...'
),
'purple'
)
.
format
(
pkg
)),
noln
=
True
)
ctx
.
ui
.
info
(
inary
.
util
.
colorize
(
_
(
'
\n
Added files database...'
),
'green'
))
def
get_file
(
self
,
path
):
...
...
@@ -67,7 +68,7 @@ class FilesDB(lazydb.LazyDB):
def
add_files
(
self
,
pkg
,
files
):
self
.
__check_filesdb
()
ctx
.
ui
.
info
(
"
%-80.80
s
\r
"
%
(
util
.
colorize
(
_
(
'-> Adding
\'
{}
\'
to db...'
),
'purple'
)
.
format
(
pkg
)),
noln
=
True
)
for
f
in
files
.
list
:
key
=
hashlib
.
md5
(
f
.
path
.
encode
(
'utf-8'
))
.
hexdigest
()
self
.
filesdb
[
key
]
=
pkg
...
...
@@ -92,7 +93,6 @@ class FilesDB(lazydb.LazyDB):
return
files_db
=
os
.
path
.
join
(
ctx
.
config
.
info_dir
(),
ctx
.
const
.
files_db
)
if
not
os
.
path
.
exists
(
files_db
):
flag
=
"n"
elif
os
.
access
(
files_db
,
os
.
W_OK
):
...
...
inary/fetcher.py
Dosyayı görüntüle @
5915e696
...
...
@@ -22,7 +22,7 @@ from base64 import encodestring
# Network libraries
from
http.client
import
HTTPException
import
ftplib
import
urllib.request
,
urllib
.
parse
,
urllib
.
error
import
urllib.request
,
urllib
.
parse
,
urllib
.
error
#Gettext translation library
import
gettext
...
...
@@ -183,7 +183,7 @@ class Fetcher:
try
:
try
:
responseObj
=
urllib
.
request
.
urlopen
(
self
.
formatRequest
(
urllib
.
request
.
Request
(
uri
)))
except
RangeError
:
ctx
.
ui
.
info
(
_
(
'Requested range not satisfiable, starting again.'
))
self
.
exist_size
=
0
...
...
@@ -341,7 +341,7 @@ class HTTPRangeHandler(urllib.request.BaseHandler):
return
urllib
.
addinfourl
(
fp
,
headers
,
request
.
get_full_url
())
def
http_error_416
(
self
,
request
,
fp
,
errcode
,
msg
,
headers
):
# HTTP 1.1's 'Range Not Satisfiable' error..
raise
RangeError
raise
RangeError
class
FTPRangeHandler
(
urllib
.
request
.
FTPHandler
):
"""
...
...
inary/sourcearchive.py
Dosyayı görüntüle @
5915e696
...
...
@@ -12,6 +12,8 @@
# python standard library
import
os
import
shutil
import
gettext
__trans
=
gettext
.
translation
(
'inary'
,
fallback
=
True
)
_
=
__trans
.
gettext
...
...
@@ -83,9 +85,9 @@ class SourceArchive:
def
fetch_from_locale
(
self
):
url
=
self
.
url
.
uri
if
not
os
.
access
(
url
,
os
.
F_OK
):
if
not
os
.
access
(
url
[
7
:]
,
os
.
F_OK
):
raise
Error
(
_
(
'No such file or no permission to read'
))
shutil
.
copy
(
url
,
self
.
archiveFile
)
shutil
.
copy
(
url
[
7
:]
,
self
.
archiveFile
)
def
fetch_from_mirror
(
self
):
...
...
inary/sxml/xmlfile_iks.py
Dosyayı görüntüle @
5915e696
...
...
@@ -56,7 +56,7 @@ class XmlFile(object):
def
parsexml
(
self
,
file
):
try
:
self
.
doc
=
iks
.
parseString
(
file
)
self
.
doc
=
iks
.
parseString
(
str
(
file
)
)
return
self
.
doc
except
Exception
as
e
:
raise
Error
(
_
(
"File '{}' has invalid XML"
)
.
format
(
file
)
)
...
...
setup.py
Dosyayı görüntüle @
5915e696
...
...
@@ -101,13 +101,12 @@ class Install(install):
self
.
generateConfigFile
()
def
installi18n
(
self
):
pass
for
name
in
os
.
listdir
(
'po'
):
if
not
name
.
endswith
(
'.po'
):
continue
lang
=
name
[:
-
3
]
print
(
"Installing '{}' translations..."
.
format
(
lang
))
os
.
popen
(
"msgfmt po/{0}.po -o po/{0}.mo"
.
format
(
lang
))
os
.
system
(
"msgfmt po/{0}.po -o po/{0}.mo"
.
format
(
lang
))
if
not
self
.
root
:
self
.
root
=
"/"
destpath
=
os
.
path
.
join
(
self
.
root
,
"usr/share/locale/{}/LC_MESSAGES"
.
format
(
lang
))
...
...
@@ -200,7 +199,7 @@ setup(name="inary",
'scripts/check-newconfigs.py'
,
'scripts/inarysh'
,
'tools/pspec2po'
],
include_package_data
=
True
,
#
include_package_data=True,
cmdclass
=
{
'build'
:
Build
,
'build_po'
:
BuildPo
,
'install'
:
Install
,
...
...
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