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
4ef7ce70
Kaydet (Commit)
4ef7ce70
authored
Ock 28, 2018
tarafından
Suleyman Poyraz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Format yuzunden meydana gelen ve gelebilecek butun buglar fixe edildi
üst
4805bfff
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
102 additions
and
107 deletions
+102
-107
__init__.py
inary/__init__.py
+1
-1
README-spamtools.flags.txt
inary/actionsapi/README-spamtools.flags.txt
+3
-3
autotools.py
inary/actionsapi/autotools.py
+17
-19
cmaketools.py
inary/actionsapi/cmaketools.py
+7
-9
inarytools.py
inary/actionsapi/inarytools.py
+2
-2
inarytoolsfunctions.py
inary/actionsapi/inarytoolsfunctions.py
+1
-1
kde.py
inary/actionsapi/kde.py
+5
-5
kde4.py
inary/actionsapi/kde4.py
+1
-1
kde5.py
inary/actionsapi/kde5.py
+29
-29
qt5.py
inary/actionsapi/qt5.py
+13
-13
shelltools.py
inary/actionsapi/shelltools.py
+1
-1
texlivemodules.py
inary/actionsapi/texlivemodules.py
+8
-8
archive.py
inary/archive.py
+1
-1
build.py
inary/cli/build.py
+2
-2
component.py
inary/data/component.py
+1
-1
history.py
inary/data/history.py
+1
-1
historydb.py
inary/db/historydb.py
+1
-1
build.py
inary/operations/build.py
+1
-2
diskutils.py
inary/system_literals/diskutils.py
+1
-1
grubutils.py
inary/system_literals/grubutils.py
+1
-1
util.py
inary/util.py
+3
-3
testFetcher.py
tests/inaryTests/testFetcher.py
+2
-2
No files found.
inary/__init__.py
Dosyayı görüntüle @
4ef7ce70
...
...
@@ -45,7 +45,7 @@ import inary.context as ctx
def
init_logging
():
log_dir
=
os
.
path
.
join
(
ctx
.
config
.
dest_dir
(),
ctx
.
config
.
log_dir
())
if
os
.
access
(
log_dir
,
os
.
W_OK
)
and
"distutils.core"
not
in
sys
.
modules
:
handler
=
logging
.
handlers
.
RotatingFileHandler
(
'
%
s/inary.log'
%
log_dir
)
handler
=
logging
.
handlers
.
RotatingFileHandler
(
'
{}/inary.log'
.
format
(
log_dir
)
)
formatter
=
logging
.
Formatter
(
'
%(asctime)-12
s:
%(levelname)-8
s
%(message)
s'
)
handler
.
setFormatter
(
formatter
)
ctx
.
log
=
logging
.
getLogger
(
'inary'
)
...
...
inary/actionsapi/README-spamtools.flags.txt
Dosyayı görüntüle @
4ef7ce70
...
...
@@ -9,10 +9,10 @@ available operations:
add("param1", "param2", ..., "paramN")
e.g.
inarytools.cxxflags.add("-fpermisive")
-> shelltools.export("CXXFLAGS", "
%s -fpermisive" % get.CXXFLAGS(
))
-> shelltools.export("CXXFLAGS", "
{} -fpermisive".format(get.CXXFLAGS()
))
inarytools.flags.add("-fno-strict-aliasing", "-fPIC")
-> shelltools.export("CFLAGS", "
%s -fno-strict-aliasing -fPIC" % get.CFLAGS(
))
-> shelltools.export("CXXFLAGS", "
%s -ffno-strict-aliasing -fPIC" % get.CXXFLAGS(
))
-> shelltools.export("CFLAGS", "
{} -fno-strict-aliasing -fPIC".format(get.CFLAGS()
))
-> shelltools.export("CXXFLAGS", "
{} -ffno-strict-aliasing -fPIC".format(get.CXXFLAGS()
))
remove("param1", "param2", ..., "paramN")
e.g.
...
...
inary/actionsapi/autotools.py
Dosyayı görüntüle @
4ef7ce70
...
...
@@ -116,24 +116,22 @@ def fixpc():
def
install
(
parameters
=
''
,
argument
=
'install'
):
'''install source into install directory with given parameters'''
args
=
'make prefix=
%(prefix)
s/
%(defaultprefix)
s
\
datadir=
%(prefix)
s/
%(data)
s
\
infodir=
%(prefix)
s/
%(info)
s
\
localstatedir=
%(prefix)
s/
%(localstate)
s
\
mandir=
%(prefix)
s/
%(man)
s
\
sysconfdir=
%(prefix)
s/
%(conf)
s
\
%(parameters)
s
\
%(argument)
s'
%
{
'prefix'
:
get
.
installDIR
(),
'defaultprefix'
:
get
.
defaultprefixDIR
(),
'man'
:
get
.
manDIR
(),
'info'
:
get
.
infoDIR
(),
'localstate'
:
get
.
localstateDIR
(),
'conf'
:
get
.
confDIR
(),
'data'
:
get
.
dataDIR
(),
'parameters'
:
parameters
,
'argument'
:
argument
,
}
args
=
'make prefix={0}/{1}
\
datadir={0}/{2}
\
infodir={0}/{3}
\
localstatedir={0}/{4}
\
mandir={0}/{5}
\
sysconfdir={0}/{6}
\
{7}
\
{8}'
.
format
(
get
.
installDIR
(),
get
.
defaultprefixDIR
(),
get
.
dataDIR
(),
get
.
infoDIR
(),
get
.
localstateDIR
(),
get
.
manDIR
(),
get
.
confDIR
(),
parameters
,
argument
)
if
system
(
args
):
raise
InstallError
(
_
(
'Install failed.'
))
...
...
@@ -145,7 +143,7 @@ def install(parameters = '', argument = 'install'):
if
isDirectory
(
"{}/emul32"
.
format
(
get
.
installDIR
())):
removeDir
(
"/emul32"
)
def
rawInstall
(
parameters
=
''
,
argument
=
'install'
):
'''install source into install directory with given parameters = PREFIX=
%
s
%
get.installDIR()'''
'''install source into install directory with given parameters = PREFIX=get.installDIR()'''
if
system
(
'make {0} {1}'
.
format
(
parameters
,
argument
)):
raise
InstallError
(
_
(
'Install failed.'
))
else
:
...
...
inary/actionsapi/cmaketools.py
Dosyayı görüntüle @
4ef7ce70
...
...
@@ -86,13 +86,11 @@ def install(parameters = '', argument = 'install'):
'''install source into install directory with given parameters'''
# You can't squeeze unix paths with things like 'bindir', 'datadir', etc with CMake
# http://public.kitware.com/pipermail/cmake/2006-August/010748.html
args
=
'make DESTDIR="
%(destdir)
s"
\
%(parameters)
s
\
%(argument)
s'
%
{
'destdir'
:
get
.
installDIR
(),
'parameters'
:
parameters
,
'argument'
:
argument
,
}
args
=
'make DESTDIR="{0}"
\
{1}
\
{2}'
.
format
(
get
.
installDIR
(),
parameters
,
argument
)
if
system
(
args
):
raise
InstallError
(
_
(
'Install failed.'
))
...
...
@@ -100,9 +98,9 @@ def install(parameters = '', argument = 'install'):
fixInfoDir
()
def
rawInstall
(
parameters
=
''
,
argument
=
'install'
):
'''install source into install directory with given parameters = PREFIX=
%
s
%
get.installDIR()'''
'''install source into install directory with given parameters = PREFIX=get.installDIR()'''
if
can_access_file
(
'makefile'
)
or
can_access_file
(
'Makefile'
)
or
can_access_file
(
'GNUmakefile'
):
if
system
(
'make {
} {
} '
.
format
(
parameters
,
argument
)):
if
system
(
'make {
0} {1
} '
.
format
(
parameters
,
argument
)):
raise
InstallError
(
_
(
'Install failed.'
))
else
:
fixInfoDir
()
...
...
inary/actionsapi/inarytools.py
Dosyayı görüntüle @
4ef7ce70
...
...
@@ -77,7 +77,7 @@ def dohtml(*sourceFiles, **kw):
for
sourceFile
in
sourceFiles
:
sourceFileGlob
=
glob
.
glob
(
sourceFile
)
if
len
(
sourceFileGlob
)
==
0
:
raise
FileError
(
_
(
"No file matched pattern
\"
{}
\"
"
)
%
sourceFile
)
raise
FileError
(
_
(
"No file matched pattern
\"
{}
\"
"
)
.
format
(
sourceFile
)
)
for
source
in
sourceFileGlob
:
if
os
.
path
.
isfile
(
source
)
and
os
.
path
.
splitext
(
source
)[
1
]
in
allowed_extensions
:
...
...
@@ -149,7 +149,7 @@ def doman(*sourceFiles):
manPDIR
=
join_path
(
manDIR
,
'/man{}'
.
format
(
pageDirectory
))
makedirs
(
manPDIR
)
if
not
compressed
:
system
(
'install -m0644 {
} {
}'
.
format
(
source
,
manPDIR
))
system
(
'install -m0644 {
0} {1
}'
.
format
(
source
,
manPDIR
))
else
:
uncompress
(
compressed
,
targetDir
=
manPDIR
)
...
...
inary/actionsapi/inarytoolsfunctions.py
Dosyayı görüntüle @
4ef7ce70
...
...
@@ -85,4 +85,4 @@ def lib_insinto(sourceFile, destinationDirectory, permission = 0o644):
if
os
.
path
.
islink
(
sourceFile
):
os
.
symlink
(
os
.
path
.
realpath
(
sourceFile
),
os
.
path
.
join
(
destinationDirectory
,
sourceFile
))
else
:
system
(
'install -m0
%
o
%
s
%
s'
%
(
permission
,
sourceFile
,
destinationDirectory
))
system
(
'install -m0
{0} {1} {2}'
.
format
(
permission
,
sourceFile
,
destinationDirectory
))
inary/actionsapi/kde.py
Dosyayı görüntüle @
4ef7ce70
...
...
@@ -49,17 +49,17 @@ def configure(parameters = ''):
''' parameters = '--with-nls --with-libusb --with-something-usefull '''
if
can_access_file
(
'configure'
):
args
=
'./configure
\
--prefix={0
.kdeDIR()
}
\
--build={
0.HOST()
}
\
--prefix={0}
\
--build={
1
}
\
--with-x
\
--enable-mitshm
\
--with-xinerama
\
--with-qt-dir={
0.qtDIR()
}
\
--with-qt-dir={
2
}
\
--enable-mt
\
--with-qt-libraries={
0.qtDIR
}/lib
\
--with-qt-libraries={
2
}/lib
\
--disable-dependency-tracking
\
--disable-debug
\
{
1}'
.
format
(
get
,
parameters
)
{
3}'
.
format
(
get
.
kdeDIR
(),
get
.
HOST
(),
get
.
qtDIR
()
,
parameters
)
if
system
(
args
):
raise
ConfigureError
(
_
(
'Configure failed.'
))
...
...
inary/actionsapi/kde4.py
Dosyayı görüntüle @
4ef7ce70
...
...
@@ -23,7 +23,7 @@ modulesdir = "{0}/{1}".format(libdir, basename)
libexecdir
=
"{}/libexec"
.
format
(
modulesdir
)
iconsdir
=
"{}/share/icons"
.
format
(
prefix
)
applicationsdir
=
"{0}/share/applications/{1}"
.
format
(
prefix
,
basename
)
mandir
=
"/{}"
%
get
.
manDIR
(
)
mandir
=
"/{}"
.
format
(
get
.
manDIR
()
)
sharedir
=
"{0}/share/{1}"
.
format
(
prefix
,
basename
)
appsdir
=
"{}/apps"
.
format
(
sharedir
)
configdir
=
"{}/config"
.
format
(
sharedir
)
...
...
inary/actionsapi/kde5.py
Dosyayı görüntüle @
4ef7ce70
...
...
@@ -16,28 +16,28 @@ from inary.actionsapi import shelltools
basename
=
"kde5"
prefix
=
"/
%
s"
%
get
.
defaultprefixDIR
(
)
libdir
=
"
%
s/lib"
%
prefix
bindir
=
"
%
s/bin"
%
prefix
libexecdir
=
"
%
s/lib"
%
prefix
iconsdir
=
"
%
s/share/icons"
%
prefix
applicationsdir
=
"
%
s/share/applications/
%
s"
%
(
prefix
,
basename
)
mandir
=
"/
%
s"
%
get
.
manDIR
(
)
sharedir
=
"
%
s/share"
%
prefix
localedir
=
"
%
s/share/locale"
%
prefix
qmldir
=
"
%
s/lib/qt5/qml"
%
prefix
plugindir
=
"
%
s/lib/qt5/plugins"
%
prefix
moduledir
=
"
%
s/lib/qt5/mkspecs/modules"
%
prefix
pythondir
=
"
%
s/bin/python"
%
prefix
appsdir
=
"
%
s"
%
sharedir
prefix
=
"/
{}"
.
format
(
get
.
defaultprefixDIR
()
)
libdir
=
"
{}/lib"
.
format
(
prefix
)
bindir
=
"
{}/bin"
.
format
(
prefix
)
libexecdir
=
"
{}/lib"
.
format
(
prefix
)
iconsdir
=
"
{}/share/icons"
.
format
(
prefix
)
applicationsdir
=
"
{0}/share/applications/{1}"
.
format
(
prefix
,
basename
)
mandir
=
"/
{}"
.
format
(
get
.
manDIR
()
)
sharedir
=
"
{}/share"
.
format
(
prefix
)
localedir
=
"
{}/share/locale"
.
format
(
prefix
)
qmldir
=
"
{}/lib/qt5/qml"
.
format
(
prefix
)
plugindir
=
"
{}/lib/qt5/plugins"
.
format
(
prefix
)
moduledir
=
"
{}/lib/qt5/mkspecs/modules"
.
format
(
prefix
)
pythondir
=
"
{}/bin/python"
.
format
(
prefix
)
appsdir
=
"
{}"
.
format
(
sharedir
)
sysconfdir
=
"/etc"
configdir
=
"
%
s/xdg"
%
sysconfdir
servicesdir
=
"
%
s/services"
%
sharedir
servicetypesdir
=
"
%
s/servicetypes"
%
sharedir
includedir
=
"
%
s/include"
%
prefix
docdir
=
"/
%
s/
%
s"
%
(
get
.
docDIR
(),
basename
)
htmldir
=
"
%
s/html"
%
docdir
wallpapersdir
=
"
%
s/share/wallpapers"
%
prefix
configdir
=
"
{}/xdg"
.
format
(
sysconfdir
)
servicesdir
=
"
{}/services"
.
format
(
sharedir
)
servicetypesdir
=
"
{}/servicetypes"
.
format
(
sharedir
)
includedir
=
"
{}/include"
.
format
(
prefix
)
docdir
=
"/
{0}/{1}"
.
format
(
get
.
docDIR
(),
basename
)
htmldir
=
"
{}/html"
.
format
(
docdir
)
wallpapersdir
=
"
{}/share/wallpapers"
.
format
(
prefix
)
def
configure
(
parameters
=
''
,
installPrefix
=
prefix
,
sourceDir
=
'..'
):
''' parameters -DLIB_INSTALL_DIR="hede" -DSOMETHING_USEFUL=1'''
...
...
@@ -46,23 +46,23 @@ def configure(parameters = '', installPrefix = prefix, sourceDir = '..'):
shelltools
.
cd
(
"build"
)
cmaketools
.
configure
(
"-DCMAKE_BUILD_TYPE=Release
\
-DKDE_INSTALL_LIBEXECDIR=
%
s
\
-DKDE_INSTALL_LIBEXECDIR=
{0}
\
-DCMAKE_INSTALL_LIBDIR=lib
\
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON
\
-DKDE_INSTALL_QMLDIR=
%
s
\
-DKDE_INSTALL_SYSCONFDIR=
%
s
\
-DKDE_INSTALL_PLUGINDIR=
%
s
\
-DECM_MKSPECS_INSTALL_DIR=
%
s
\
-DKDE_INSTALL_QMLDIR=
{1}
\
-DKDE_INSTALL_SYSCONFDIR=
{2}
\
-DKDE_INSTALL_PLUGINDIR=
{3}
\
-DECM_MKSPECS_INSTALL_DIR=
{4}
\
-DBUILD_TESTING=OFF
\
-DKDE_INSTALL_LIBDIR=lib
\
-Wno-dev
\
-DCMAKE_INSTALL_PREFIX=
%
s"
%
(
libexecdir
,
qmldir
,
sysconfdir
,
plugindir
,
moduledir
,
prefix
),
installPrefix
,
sourceDir
)
-DCMAKE_INSTALL_PREFIX=
{5}"
.
format
(
libexecdir
,
qmldir
,
sysconfdir
,
plugindir
,
moduledir
,
prefix
),
installPrefix
,
sourceDir
)
shelltools
.
cd
(
".."
)
def
make
(
parameters
=
''
):
cmaketools
.
make
(
'-C build
%
s'
%
parameters
)
cmaketools
.
make
(
'-C build
{}'
.
format
(
parameters
)
)
def
install
(
parameters
=
''
,
argument
=
'install'
):
cmaketools
.
install
(
'-C build
%
s'
%
parameters
,
argument
)
cmaketools
.
install
(
'-C build
{}'
.
format
(
parameters
)
,
argument
)
inary/actionsapi/qt5.py
Dosyayı görüntüle @
4ef7ce70
...
...
@@ -36,18 +36,18 @@ includedir = "{}/include".format(prefix)
# qt5 spesific variables
headerdir
=
"{
}/include/{
}"
.
format
(
prefix
,
basename
)
datadir
=
"{
}/share/{
}"
.
format
(
prefix
,
basename
)
docdir
=
"/{
}/{
}"
.
format
(
get
.
docDIR
(),
basename
)
archdatadir
=
"{
}/{
}"
.
format
(
libdir
,
basename
)
examplesdir
=
"{
}/{
}/examples"
.
format
(
libdir
,
basename
)
importdir
=
"{
}/{
}/imports"
.
format
(
libdir
,
basename
)
plugindir
=
"{
}/{
}/plugins"
.
format
(
libdir
,
basename
)
qmldir
=
"{
}/{
}/qmldir"
.
format
(
libdir
,
basename
)
testdir
=
"{
}/share/{
}"
.
format
(
prefix
,
basename
)
translationdir
=
"{}/translations"
.
format
(
datadir
)
qmake
=
"{}/qmake-qt5"
%
bindir
headerdir
=
"{
0}/include/{1
}"
.
format
(
prefix
,
basename
)
datadir
=
"{
0}/share/{1
}"
.
format
(
prefix
,
basename
)
docdir
=
"/{
0}/{1
}"
.
format
(
get
.
docDIR
(),
basename
)
archdatadir
=
"{
0}/{1
}"
.
format
(
libdir
,
basename
)
examplesdir
=
"{
0}/{1
}/examples"
.
format
(
libdir
,
basename
)
importdir
=
"{
0}/{1
}/imports"
.
format
(
libdir
,
basename
)
plugindir
=
"{
0}/{1
}/plugins"
.
format
(
libdir
,
basename
)
qmldir
=
"{
0}/{1
}/qmldir"
.
format
(
libdir
,
basename
)
testdir
=
"{
0}/share/{1
}"
.
format
(
prefix
,
basename
)
translationdir
=
"{
0
}/translations"
.
format
(
datadir
)
qmake
=
"{}/qmake-qt5"
.
format
(
bindir
)
class
ConfigureError
(
inary
.
actionsapi
.
Error
):
def
__init__
(
self
,
value
=
''
):
...
...
@@ -63,7 +63,7 @@ def configure(projectfile='', parameters='', installPrefix=prefix):
if
len
(
profiles
)
>
1
and
projectfile
==
''
:
raise
ConfigureError
(
_
(
"It seems there are more than one .pro file, you must specify one. (Possible .pro files: {})"
)
.
format
(
", "
.
join
(
profiles
)))
shelltools
.
system
(
"{0} -makefile {1} PREFIX='{2}' QMAKE_CFLAGS+='{3
.CFLAGS()}' QMAKE_CXXFLAGS+='{3.CXXFLAGS()}' {5}"
.
format
(
qmake
,
projectfile
,
installPrefix
,
get
,
parameters
))
shelltools
.
system
(
"{0} -makefile {1} PREFIX='{2}' QMAKE_CFLAGS+='{3
}' QMAKE_CXXFLAGS+='{4}' {5}"
.
format
(
qmake
,
projectfile
,
installPrefix
,
get
.
CFLAGS
(),
get
.
CXXFLAGS
()
,
parameters
))
def
make
(
parameters
=
''
):
cmaketools
.
make
(
parameters
)
...
...
inary/actionsapi/shelltools.py
Dosyayı görüntüle @
4ef7ce70
...
...
@@ -67,7 +67,7 @@ def chmod(filePath, mode = 0o755):
try
:
os
.
chmod
(
fileName
,
mode
)
except
OSError
:
ctx
.
ui
.
error
(
_
(
'ActionsAPI [chmod]: Operation not permitted:
%
s (mode: 0
%
o)'
)
%
(
fileName
,
mode
))
ctx
.
ui
.
error
(
_
(
'ActionsAPI [chmod]: Operation not permitted:
{0} (mode: 0{1})'
)
.
format
(
fileName
,
mode
))
else
:
ctx
.
ui
.
error
(
_
(
'ActionsAPI [chmod]: File {} doesn
\'
t exists.'
)
.
format
(
fileName
))
...
...
inary/actionsapi/texlivemodules.py
Dosyayı görüntüle @
4ef7ce70
...
...
@@ -179,8 +179,8 @@ def addFormat(parameters):
elif
not
pair
[
0
]
==
'patterns'
:
para_dict
[
"patterns"
]
=
'-'
cnf_file
=
open
(
'{0
.curDIR()}/texmf/fmtutil/format.{0.srcNAME()}.cnf'
.
format
(
get
),
'a'
)
cnf_file
.
write
(
'{0[
"name"]}
\t
{0["engine"]}
\t
{0["patterns"]}
\t
{0["options"
]}
\n
'
.
format
(
para_dict
))
cnf_file
=
open
(
'{0
}/texmf/fmtutil/format.{1}.cnf'
.
format
(
get
.
curDIR
(),
get
.
srcNAME
()
),
'a'
)
cnf_file
.
write
(
'{0[
name]}
\t
{0[engine]}
\t
{0[patterns]}
\t
{0[options
]}
\n
'
.
format
(
para_dict
))
cnf_file
.
close
()
def
moveSources
():
...
...
@@ -217,12 +217,12 @@ def addLanguageDat(parameter):
if
len
(
pair
)
==
2
:
#That's just a caution, the pair should have two items, not more not less
para_dict
[
pair
[
0
]]
=
pair
[
1
]
language_dat
=
open
(
'{0
.curDIR()}/language.{0.srcNAME()}.dat'
.
format
(
get
)
,
'a'
)
language_dat
.
write
(
'{0[
"name"]}
\t
{0["file"
]}
\n
"'
.
format
(
para_dict
))
language_dat
=
open
(
'{0
}/language.{1}.dat'
.
format
(
get
.
curDIR
(),
get
.
srcNAME
()
)
,
'a'
)
language_dat
.
write
(
'{0[
name]}
\t
{0[file
]}
\n
"'
.
format
(
para_dict
))
language_dat
.
close
()
if
"synonyms"
in
para_dict
:
language_dat
=
open
(
'{0
.curDIR()}/language.{0.srcNAME()}.dat'
.
format
(
get
)
,
'a'
)
language_dat
=
open
(
'{0
}/language.{1}.dat'
.
format
(
get
.
curDIR
(),
get
.
srcNAME
()
)
,
'a'
)
language_dat
.
write
(
"={}
\n
"
.
format
(
para_dict
[
"synonyms"
]))
language_dat
.
close
()
...
...
@@ -240,18 +240,18 @@ def addLanguageDef(parameter):
if
"righthyphenmin"
in
para_dict
and
not
para_dict
[
"righthyphenmin"
]:
para_dict
[
"righthyphenmin"
]
=
"3"
language_def
=
open
(
'
%
s/language.
%
s.def'
%
(
get
.
curDIR
(),
get
.
srcNAME
())
,
'a'
)
language_def
=
open
(
'
{0}/language.{1}.def'
.
format
(
get
.
curDIR
(),
get
.
srcNAME
())
,
'a'
)
language_def
.
write
(
"
\\
addlanguage{
%
s}{
%
s}{}{
%
s}{
%
s}
\n
"
%
(
para_dict
[
"name"
],
para_dict
[
"file"
],
para_dict
[
"lefthyphenmin"
],
para_dict
[
"righthyphenmin"
]))
language_def
.
close
()
if
"synonyms"
in
para_dict
:
language_def
=
open
(
'
%
s/language.
%
s.def'
%
(
get
.
curDIR
(),
get
.
srcNAME
())
,
'a'
)
language_def
=
open
(
'
{0}/language.{1}.def'
.
format
(
get
.
curDIR
(),
get
.
srcNAME
())
,
'a'
)
language_def
.
write
(
"
\\
addlanguage{
%
s}{
%
s}{}{
%
s}{
%
s}
\n
"
%
(
para_dict
[
"synonyms"
],
para_dict
[
"file"
],
para_dict
[
"lefthyphenmin"
],
para_dict
[
"righthyphenmin"
]))
language_def
.
close
()
def
generateConfigFiles
():
'''Generate config files'''
for
tlpobjfile
in
ls
(
"
%
s/tlpkg/tlpobj/*"
%
get
.
curDIR
(
)):
for
tlpobjfile
in
ls
(
"
{}/tlpkg/tlpobj/*"
.
format
(
get
.
curDIR
()
)):
jobsfile
=
open
(
tlpobjfile
,
"r"
)
for
line
in
jobsfile
.
readlines
():
splitline
=
line
.
split
(
" "
,
2
)
...
...
inary/archive.py
Dosyayı görüntüle @
4ef7ce70
...
...
@@ -360,7 +360,7 @@ class ArchiveTar(ArchiveBase):
for
service
in
(
"NetworkManager"
,
"connman"
,
"wicd"
):
if
os
.
path
.
isfile
(
"/etc/scom/services/enabled/{}"
.
format
(
service
)):
startservices
.
append
(
service
)
os
.
system
(
"service
%
stop"
%
service
)
os
.
system
(
"service
{} stop"
.
format
(
service
)
)
os
.
system
(
"service dbus stop"
)
break
os
.
system
(
"mv -f {0} {0}.old"
.
format
(
tarinfo
.
name
))
...
...
inary/cli/build.py
Dosyayı görüntüle @
4ef7ce70
...
...
@@ -164,9 +164,9 @@ class Build(command.Command, metaclass=command.autocommand):
ctx
.
ui
.
info
(
_
(
"Supported package formats:"
))
for
format
in
inary
.
package
.
Package
.
formats
:
if
format
==
inary
.
package
.
Package
.
default_format
:
ctx
.
ui
.
info
(
_
(
" {} (default)"
)
%
format
)
ctx
.
ui
.
info
(
_
(
" {} (default)"
)
.
format
(
format
)
)
else
:
ctx
.
ui
.
info
(
" {}"
%
format
)
ctx
.
ui
.
info
(
" {}"
.
format
(
format
)
)
return
self
.
init
()
...
...
inary/data/component.py
Dosyayı görüntüle @
4ef7ce70
...
...
@@ -45,7 +45,7 @@ class Maintainer(xmlfile.XmlFile, metaclass=autoxml.autoxml):
t_Email
=
[
autoxml
.
String
,
autoxml
.
mandatory
]
def
__str__
(
self
):
s
=
"{
} <{
}>"
.
format
(
self
.
name
,
self
.
email
)
s
=
"{
0} <{1
}>"
.
format
(
self
.
name
,
self
.
email
)
return
s
class
Component
(
xmlfile
.
XmlFile
,
metaclass
=
autoxml
.
autoxml
):
...
...
inary/data/history.py
Dosyayı görüntüle @
4ef7ce70
...
...
@@ -100,7 +100,7 @@ class History(xmlfile.XmlFile, metaclass=autoxml.autoxml):
raise
Exception
(
_
(
"Unknown package operation"
))
opno
=
self
.
_get_latest
()
self
.
histfile
=
"{
}_{
}.xml"
.
format
(
opno
,
operation
)
self
.
histfile
=
"{
0}_{1
}.xml"
.
format
(
opno
,
operation
)
year
,
month
,
day
,
hour
,
minute
=
time
.
localtime
()[
0
:
5
]
self
.
operation
.
type
=
operation
...
...
inary/db/historydb.py
Dosyayı görüntüle @
4ef7ce70
...
...
@@ -77,7 +77,7 @@ class HistoryDB(lazydb.LazyDB):
configs
=
[]
for
root
,
dirs
,
files
in
os
.
walk
(
package_path
):
for
f
in
files
:
configs
.
append
((
"
%
s/
%
s"
%
(
root
,
f
)))
configs
.
append
((
"
{0}/{1}"
.
format
(
root
,
f
)))
return
configs
...
...
inary/operations/build.py
Dosyayı görüntüle @
4ef7ce70
...
...
@@ -415,8 +415,7 @@ class Builder:
if
os
.
path
.
exists
(
"/usr/lib/ccache/bin/gcc"
):
self
.
has_ccache
=
True
os
.
environ
[
"PATH"
]
=
"/usr/lib/ccache/bin:
%(PATH)
s"
\
%
os
.
environ
os
.
environ
[
"PATH"
]
=
"/usr/lib/ccache/bin:
%(PATH)
s"
%
os
.
environ
# Force ccache to use /root/.ccache instead of $HOME/.ccache
# as $HOME can be modified through actions.py
os
.
environ
[
"CCACHE_DIR"
]
=
"/root/.ccache"
...
...
inary/system_literals/diskutils.py
Dosyayı görüntüle @
4ef7ce70
...
...
@@ -38,7 +38,7 @@ def idsQuery(name, vendor, device):
else
:
if
line
.
startswith
(
"
\t
"
):
if
line
.
startswith
(
"
\t
"
+
device
):
return
"{0} - {1}"
%
(
line
[
6
:]
.
strip
(),
company
)
return
"{0} - {1}"
.
format
(
line
[
6
:]
.
strip
(),
company
)
elif
not
line
.
startswith
(
"#"
):
flag
=
0
if
company
!=
""
:
...
...
inary/system_literals/grubutils.py
Dosyayı görüntüle @
4ef7ce70
...
...
@@ -24,7 +24,7 @@ class grubCommand:
def
__str__
(
self
):
if
self
.
options
:
return
"{0} {1} {2}"
%
(
self
.
key
,
" "
.
join
(
self
.
options
),
self
.
value
)
return
"{0} {1} {2}"
.
format
(
self
.
key
,
" "
.
join
(
self
.
options
),
self
.
value
)
else
:
return
"{0} {1}"
.
format
(
self
.
key
,
self
.
value
)
...
...
inary/util.py
Dosyayı görüntüle @
4ef7ce70
...
...
@@ -613,7 +613,7 @@ def strip_file(filepath, fileinfo, outpath):
if
fileinfo
==
None
:
ret
,
out
,
err
=
run_batch
(
"file {}"
.
format
(
filepath
),
ui_debug
=
False
)
if
ret
:
ctx
.
ui
.
warning
(
_
(
"file command failed with return code {0} for file: {1}"
)
%
(
ret
,
filepath
))
ctx
.
ui
.
warning
(
_
(
"file command failed with return code {0} for file: {1}"
)
.
format
(
ret
,
filepath
))
ctx
.
ui
.
info
(
_
(
"Output:
\n
{}"
)
.
format
(
out
),
verbose
=
True
)
elif
"current ar archive"
in
fileinfo
:
...
...
@@ -706,12 +706,12 @@ def parse_package_name(package_name):
except
:
raise
Error
(
_
(
"Invalid package name: {}"
)
.
format
(
package_name
))
return
name
,
"{
}-{
}"
.
format
(
version
,
release
)
return
name
,
"{
0}-{1
}"
.
format
(
version
,
release
)
def
parse_package_dir_path
(
package_name
):
name
=
parse_package_name
(
package_name
)[
0
]
if
name
.
split
(
"-"
)
.
pop
()
in
[
"devel"
,
"32bit"
,
"doc"
,
"docs"
,
"userspace"
]:
name
=
name
[:
-
1
-
len
(
name
.
split
(
"-"
)
.
pop
())]
return
"{
}/{
}"
.
format
(
name
[
0
:
4
]
.
lower
()
if
name
.
startswith
(
"lib"
)
and
len
(
name
)
>
3
else
name
.
lower
()[
0
],
name
.
lower
())
return
"{
0}/{1
}"
.
format
(
name
[
0
:
4
]
.
lower
()
if
name
.
startswith
(
"lib"
)
and
len
(
name
)
>
3
else
name
.
lower
()[
0
],
name
.
lower
())
def
parse_delta_package_name_legacy
(
package_name
):
"""Separate delta package name and release infos for package formats <= 1.1.
...
...
tests/inaryTests/testFetcher.py
Dosyayı görüntüle @
4ef7ce70
...
...
@@ -27,8 +27,8 @@ class FetchTestCase(unittest.TestCase):
os
.
remove
(
fetchedFile
)
def
testFetcherFunctions
(
self
):
enc
=
base64
.
encodestring
(
'
%
s:
%
s'
%
self
.
url
.
auth_info
(
))
self
.
assertEqual
(
self
.
fetch
.
_get_http_headers
(),((
'Authorization'
,
'Basic
%
s'
%
enc
),))
enc
=
base64
.
encodestring
(
'
{0}:{0}'
.
format
(
self
.
url
.
auth_info
()
))
self
.
assertEqual
(
self
.
fetch
.
_get_http_headers
(),((
'Authorization'
,
'Basic
{}'
.
format
(
enc
)
),))
assert
not
self
.
fetch
.
_get_ftp_headers
()
...
...
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