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
4a2f713b
Kaydet (Commit)
4a2f713b
authored
Mar 29, 2018
tarafından
Suleyman Poyraz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Last changes before stable
üst
9ed6a21c
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
68 additions
and
46 deletions
+68
-46
ChangeLog
ChangeLog
+16
-1
ROADMAP
ROADMAP
+7
-7
inary-cli
inary-cli
+19
-15
TODO
inary/actionsapi/TODO
+0
-3
firmwares.py
inary/analyzer/firmwares.py
+3
-3
magic.py
inary/analyzer/magic.py
+4
-4
pkgconfig.py
inary/analyzer/pkgconfig.py
+1
-1
archive.py
inary/archive.py
+2
-2
atomicoperations.py
inary/atomicoperations.py
+2
-1
__init__.py
inary/cli/__init__.py
+1
-6
constants.py
inary/constants.py
+8
-0
index.py
inary/data/index.py
+2
-1
filesdb.py
inary/db/filesdb.py
+2
-2
historydb.py
inary/db/historydb.py
+1
-0
add-non-root-build-support.patch
patches/applied-patches/add-non-root-build-support.patch
+0
-0
delete-runtime-dependency-ciksemel.patch
.../applied-patches/delete-runtime-dependency-ciksemel.patch
+0
-0
No files found.
ChangeLog
Dosyayı görüntüle @
4a2f713b
2018-03-29 Suleyman Poyraz <nipalensisaquila@gmail.com>
* Hata düzeltmeleri:
Kararlı öncesi.
-> Magic modülü kararlı hale getirildi, pkgconfig librarisi düzenlenecek.
-> Arşiv çıkartılırken oluşan hata düzeltildi.
-> inary-cli betiğini hangi kafa ile düzeltmişim? Saçmalamasına
sebeb olan hata düzeltildi
* Genel iyileştirmeler
-> Actionsapi betiklerinden gereksiz fonksiyon var mı diye kontrol edilip
betikler düzenlendi.
-> Yeni bir renk skalası eklendi. ("faint")
-> Renklendirme yapıldı
2018-03-18 Suleyman Poyraz <nipalensisaquila@gmail.com>
* minidom vs cikseme
k
:
* minidom vs cikseme
l
:
minidom ile tüm inary sistemi yeniden yazıldı. Ancak ciddi manada
inar yavaşlıyor. Db initializing süresi 8 sn. Yuh yani. Ama minidom
uğraşımı öylece silmek istemediğim için minidom ve ciksemeli beraber
...
...
ROADMAP
Dosyayı görüntüle @
4a2f713b
...
...
@@ -24,7 +24,7 @@ Legend:
+ CMake Tools
/ unit test
+ source building
-
Detailed build log file
+
Detailed build log file
+ package module
+ extraction
+ add file / compression
...
...
@@ -89,9 +89,9 @@ Legend:
+ basic types
+ list type
+ class type
/
localtext/text types (localtext.... Ummm?.... )
+ write meaningful localtext datas
(Zaryob)
- return meaningful localtext summaries and descriptions (Hak getire, inşallah xml.dom ile)
+
localtext/text types (localtext.... Ummm?.... )
+ write meaningful localtext datas
+ return meaningful localtext summaries and descriptions
+ revised interface
/ Error handling
+ improved error handling, check routines, hooks, format/print routines
...
...
@@ -120,7 +120,7 @@ Legend:
+ decide how to implement
+ support repo order
+ refactor xml support and implement multiple backends
/
ciksemel based modules rewrite with xml.dom.minidom (Zaryob)
+
ciksemel based modules rewrite with xml.dom.minidom (Zaryob)
/ partial caching and automatic resume for file download (meren)
+ use a '.part' extension
- resume file downloading (Darara.... fetcher will rewrite with httplib) (Zaryob)
...
...
@@ -142,7 +142,7 @@ Legend:
+ UI
- INARYMAT
/ Automatic dependency finder
/
read pkgconfig files and find dependencies (Zaryob)
+
read pkgconfig files and find dependencies (Zaryob)
+ find cycle dependencies (Zaryob)
- Automatic build upgrader
- pykde & pygtk GUI (cartman)
...
...
@@ -214,7 +214,7 @@ Legend:
- refactoring
sort of match the refactoring of inary-2.x series and improve it
-
accelerate search
+
accelerate search
/ package signing
/ an embebed package signer.(aquila)
+ a flag to sign package after building
...
...
inary-cli
Dosyayı görüntüle @
4a2f713b
...
...
@@ -9,6 +9,7 @@
#
# Please read the COPYING file.
#
import
sys
import
errno
import
traceback
...
...
@@ -17,11 +18,6 @@ import signal
import
inary
import
inary.context
as
ctx
import
inary.cli.inarycli
as
inarycli
try
:
import
ciksemel
except
:
#FIXME: Görünüşü güzel olsa bile kodda anlamsızlık yaratıyor
sys
.
stdout
.
write
(
"
\033
[05;31mWARNING:
\033
[0m
\n\t\033
[02;37mCiksemel XML Parser not found!!!
\n\t
Falling back with minidom!!! :(
\033
[0m
\n\n
"
)
import
gettext
gettext
.
bindtextdomain
(
'inary'
,
"/usr/share/locale"
)
...
...
@@ -29,6 +25,14 @@ gettext.textdomain('inary')
__trans
=
gettext
.
translation
(
'inary'
,
fallback
=
True
)
_
=
__trans
.
gettext
try
:
import
ciksemel
except
:
#FIXME: Görünüşü güzel olsa bile kodda anlamsızlık yaratıyor
warn
=
inary
.
util
.
colorize
(
_
(
"WARNING
\n
"
),
"blinkingred"
)
+
inary
.
util
.
colorize
(
_
(
"
\t
Ciksemel XML Parser not found!!!
\n
"
"
\t
Falling back with minidom!!! :(
\n
"
),
'faintwhite'
)
sys
.
stdout
.
write
(
warn
)
def
sig_handler
(
sig
,
frame
):
if
sig
==
signal
.
SIGTERM
:
exit
()
...
...
@@ -37,19 +41,19 @@ def exit():
sys
.
exit
(
1
)
def
handle_exception
(
exception
,
value
,
tb
):
try
:
signal
.
signal
(
signal
.
SIGINT
,
signal
.
SIG_IGN
)
# disable further interrupts
ui
=
inary
.
cli
.
CLI
()
# make a temporary UI
show_traceback
=
False
except
KeyboardInterrupt
:
ui
.
error
(
_
(
"Keyboard Interrupt: Exiting..."
))
exit
()
signal
.
signal
(
signal
.
SIGINT
,
signal
.
SIG_IGN
)
# disable further interrupts
ui
=
inary
.
cli
.
CLI
()
# make a temporary UI
show_traceback
=
False
if
isinstance
(
value
,
inary
.
Error
):
ui
.
error
(
_
(
"Program terminated."
))
ui
.
error
(
_
(
"
\n
Program terminated."
))
elif
isinstance
(
value
,
KeyboardInterrupt
):
ui
.
error
(
_
(
"
\n
Keyboard Interrupt: Exiting..."
))
exit
()
elif
isinstance
(
value
,
inary
.
Exception
):
show_traceback
=
True
ui
.
error
(
_
(
"Unhandled internal exception.
\n
"
ui
.
error
(
_
(
"
\n
Unhandled internal exception.
\n
"
"Please file a bug report to <http://bugs.sulin.org>."
))
elif
isinstance
(
value
,
IOError
)
and
value
.
errno
==
errno
.
EPIPE
:
# Ignore broken pipe errors
...
...
@@ -58,7 +62,7 @@ def handle_exception(exception, value, tb):
# For any other exception (possibly Python exceptions) show
# the traceback!
show_traceback
=
ctx
.
get_option
(
'debug'
)
ui
.
error
(
_
(
"System error. Program terminated."
))
ui
.
error
(
_
(
"
\n
System error. Program terminated."
))
if
show_traceback
:
ui
.
error
(
"{}: {}"
.
format
(
exception
,
str
(
value
)))
...
...
inary/actionsapi/TODO
Dosyayı görüntüle @
4a2f713b
...
...
@@ -6,9 +6,6 @@ TODO
(-) inarytools.dodoc() may need an optional mode parameter for chmodding installed
documents
(-) inarytools.dodoc() does not allow passing a directory as source
(-) inarytools.dobin() is already doing what inarytools.doexe() is doing
(-) inarytools.dolib() and inarytools.dolib_so() are carbon copies!
(-) Unify all dolib* stuff into one function
(-) rename() could be dropped in favor of move()
(-) inarytools.dosed() does not provide all sed functionality. It only supports
substitution. Rename the function or add support for other sed commands.
...
...
inary/analyzer/firmwares.py
Dosyayı görüntüle @
4a2f713b
...
...
@@ -25,7 +25,7 @@ class Error(inary.Error):
pass
def
get_firmwares
():
ctx
.
ui
.
info
(
inary
.
util
.
colorize
(
"Extracting firmware list for {}..."
.
format
(
os
.
uname
()[
2
]),
"green"
))
ctx
.
ui
.
info
(
inary
.
util
.
colorize
(
_
(
"Extracting firmware list for {}..."
)
.
format
(
os
.
uname
()[
2
]),
"green"
))
d
=
{}
modules
=
[
os
.
path
.
basename
(
mod
.
replace
(
".ko"
,
""
))
for
mod
in
\
os
.
popen
(
"modprobe -l"
)
.
read
()
.
strip
()
.
split
(
"
\n
"
)]
...
...
@@ -45,7 +45,7 @@ def get_firmware_package(firmware):
unavailable_fw_packages
=
set
(
fw_packages
)
.
difference
(
inary
.
db
.
installdb
.
InstallDB
()
.
list_installed
())
if
unavailable_fw_packages
:
ctx
.
ui
.
info
(
inary
.
util
.
colorize
(
"The following firmwares are not installed:"
,
"yellow"
))
ctx
.
ui
.
info
(
inary
.
util
.
colorize
(
_
(
"The following firmwares are not installed:"
)
,
"yellow"
))
ctx
.
ui
.
info
(
"
\n
"
.
join
(
unavailable_fw_packages
))
for
module
,
firmwares
in
list
(
get_firmwares
()
.
items
()):
...
...
@@ -60,6 +60,6 @@ def get_firmware_package(firmware):
pass
ctx
.
ui
.
info
(
" ({})"
.
format
(
inary
.
util
.
colorize
(
firmware
,
'green'
)
if
firmware
else
\
inary
.
util
.
colorize
(
"missing"
,
'red'
)))
inary
.
util
.
colorize
(
_
(
"Missing"
)
,
'red'
)))
except
:
raise
Error
()
inary/analyzer/magic.py
Dosyayı görüntüle @
4a2f713b
...
...
@@ -38,7 +38,7 @@ if not libmagic or not libmagic._name:
magic_dlls
=
{
'darwin'
:
[
'/opt/local/lib/libmagic.dylib'
,
'/usr/local/lib/libmagic.dylib'
,
glob
.
glob
(
'/usr/local/Cellar/libmagic/*/lib/libmagic.dylib'
)],
'win32'
:
'magic1.dll'
,
'cygmagic-1.dll'
,
'win32'
:
[
'magic1.dll'
,
'cygmagic-1.dll'
]
,
'linux'
:
[
'libmagic.so.1'
],
}
...
...
@@ -141,14 +141,14 @@ class Magic:
if
os
.
path
.
isfile
(
data
):
open
(
data
)
with
self
.
lock
:
return
magic_file
(
self
.
cookie
,
data
)
return
magic_file
(
self
.
cookie
,
data
.
encode
(
'utf-8'
))
.
decode
(
'utf-8'
)
else
:
with
self
.
lock
:
if
type
(
data
)
==
str
and
str
!=
bytes
:
buf
=
data
.
encode
(
'utf-8'
,
errors
=
'replace'
)
return
magic_buffer
(
self
.
cookie
,
data
,
len
(
data
))
return
magic_buffer
(
self
.
cookie
,
data
,
len
(
data
))
.
decode
(
'utf-8'
)
except
MagicException
as
err
:
raise
(
_
(
"Can
No
t load file or buffer {}"
)
.
format
(
err
))
raise
(
_
(
"Can
'
t load file or buffer {}"
)
.
format
(
err
))
def
__del__
(
self
):
if
self
.
cookie
and
magic_close
:
...
...
inary/analyzer/pkgconfig.py
Dosyayı görüntüle @
4a2f713b
...
...
@@ -37,7 +37,7 @@ _ = __trans.gettext
class
Error
(
inary
.
Error
):
pass
class
LDD
:
class
PCor
LDD
:
def
__init__
(
self
,
packages
,
directory
,
component
,
installed_list
=
True
,
systembase
=
False
,
systemdevel
=
False
):
self
.
installdb
=
inary
.
db
.
installdb
.
InstallDB
()
...
...
inary/archive.py
Dosyayı görüntüle @
4a2f713b
...
...
@@ -198,7 +198,7 @@ class ArchiveBzip2(ArchiveBase):
import
bz2
bz2_file
=
bz2
.
BZ2File
(
self
.
file_path
,
"r"
)
output
=
open
(
output_path
,
"w"
)
output
.
write
(
bz2_file
.
read
())
output
.
write
(
bz2_file
.
read
()
.
decode
(
'utf-8'
)
)
output
.
close
()
bz2_file
.
close
()
...
...
@@ -224,7 +224,7 @@ class ArchiveGzip(ArchiveBase):
import
gzip
gzip_file
=
gzip
.
GzipFile
(
self
.
file_path
,
"r"
)
output
=
open
(
output_path
,
"w"
)
output
.
write
(
gzip_file
.
read
())
output
.
write
(
gzip_file
.
read
()
.
decode
(
'utf-8'
)
)
output
.
close
()
gzip_file
.
close
()
...
...
inary/atomicoperations.py
Dosyayı görüntüle @
4a2f713b
...
...
@@ -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
(
"*
* c
howning in postinstall ({0}:{1})"
.
format
(
_file
.
uid
,
_file
.
gid
))
ctx
.
ui
.
debug
(
"*
C
howning in postinstall ({0}:{1})"
.
format
(
_file
.
uid
,
_file
.
gid
))
os
.
chown
(
fpath
,
int
(
_file
.
uid
),
int
(
_file
.
gid
))
if
ctx
.
scom
:
...
...
@@ -321,6 +321,7 @@ class Install(AtomicOperation):
self
.
config_later
=
True
else
:
self
.
config_later
=
True
def
extract_install
(
self
):
"unzip package in place"
...
...
inary/cli/__init__.py
Dosyayı görüntüle @
4a2f713b
...
...
@@ -52,7 +52,6 @@ class CLI(inary.ui.UI):
def
close
(
self
):
inary
.
util
.
xterm_title_reset
()
######### in old releases use this output function #########
def
output
(
self
,
msg
,
err
=
False
,
verbose
=
False
):
if
(
verbose
and
self
.
show_verbose
)
or
(
not
verbose
):
if
type
(
msg
)
==
type
(
bytes
()):
...
...
@@ -61,11 +60,7 @@ class CLI(inary.ui.UI):
sys
.
stderr
.
write
(
str
(
msg
))
else
:
sys
.
stdout
.
write
(
str
(
msg
))
#######But there are formatted problem in this, #####
#######So I write a skeleton output function #####
def
output
(
self
,
msg
,
err
=
False
,
verbose
=
False
):
sys
.
stdout
.
write
(
str
(
msg
))
def
formatted_output
(
self
,
msg
,
verbose
=
False
,
noln
=
False
,
column
=
":"
):
key_width
=
20
...
...
inary/constants.py
Dosyayı görüntüle @
4a2f713b
...
...
@@ -140,6 +140,14 @@ class Constants(metaclass=Singleton):
'brightmagenta'
:
"
\033
[01;35m"
,
'brightcyan'
:
"
\033
[01;36m"
,
'brightwhite'
:
"
\033
[01;37m"
,
'faintblack'
:
"
\033
[02;30m"
,
'faintred'
:
"
\033
[02;31m"
,
'faintgreen'
:
"
\033
[02;32m"
,
'faintyellow'
:
"
\033
[02;33m"
,
'faintblue'
:
"
\033
[02;34m"
,
'faintpurple'
:
"
\033
[02;35m"
,
'faintcyan'
:
"
\033
[02;36m"
,
'faintwhite'
:
"
\033
[02;37m"
,
'underlineblack'
:
"
\033
[04;30m"
,
'underlinered'
:
"
\033
[04;31m"
,
'underlinegreen'
:
"
\033
[04;32m"
,
...
...
inary/data/index.py
Dosyayı görüntüle @
4a2f713b
...
...
@@ -184,7 +184,8 @@ class Index(xmlfile.XmlFile, metaclass=autoxml.autoxml):
pool
.
join
()
ctx
.
ui
.
info
(
""
)
raise
ctx
.
ui
.
info
(
"
%-80.80
s
\r
"
%
(
_
(
"Adding packages from directory {}... done."
.
format
(
key
))))
ctx
.
ui
.
info
(
"
%-80.80
s
\r
"
%
(
_
(
"Adding packages from directory {}... done."
.
format
(
key
))),
noln
=
False
if
ctx
.
config
.
get_option
(
"verbose"
)
else
True
)
ctx
.
ui
.
info
(
""
)
pool
.
close
()
...
...
inary/db/filesdb.py
Dosyayı görüntüle @
4a2f713b
...
...
@@ -16,6 +16,7 @@ import shelve
import
hashlib
import
inary
import
inary.util
as
util
import
inary.context
as
ctx
import
inary.db.lazydb
as
lazydb
...
...
@@ -66,11 +67,10 @@ class FilesDB(lazydb.LazyDB):
def
add_files
(
self
,
pkg
,
files
):
self
.
__check_filesdb
()
ctx
.
ui
.
info
(
inary
.
util
.
colorize
(
_
(
' |___* Adding
\'
{}
\'
to db... '
),
'purple'
)
.
format
(
pkg
),
noln
=
True
)
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
ctx
.
ui
.
info
(
inary
.
util
.
colorize
(
_
(
'OK.'
),
'backgroundmagenta'
))
def
remove_files
(
self
,
files
):
for
f
in
files
:
...
...
inary/db/historydb.py
Dosyayı görüntüle @
4a2f713b
...
...
@@ -12,6 +12,7 @@
import
os
import
inary
import
inary.context
as
ctx
import
inary.db.lazydb
as
lazydb
import
inary.data.history
as
History
...
...
patches/
non
applied-patches/add-non-root-build-support.patch
→
patches/applied-patches/add-non-root-build-support.patch
Dosyayı görüntüle @
4a2f713b
File moved
patches/
non
applied-patches/delete-runtime-dependency-ciksemel.patch
→
patches/applied-patches/delete-runtime-dependency-ciksemel.patch
Dosyayı görüntüle @
4a2f713b
File moved
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