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
938d884d
Kaydet (Commit)
938d884d
authored
Ock 23, 2018
tarafından
Suleyman Poyraz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
İtem by repo catladi
üst
1703bef4
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
144 additions
and
28 deletions
+144
-28
FIXME
FIXME
+8
-11
pkgconfig.py
inary/actionsapi/pkgconfig.py
+1
-1
ctypes.py
inary/analyzer/ctypes.py
+48
-0
sysutils.py
inary/system_literals/sysutils.py
+74
-0
runtests.py
tests/runtests.py
+6
-8
testOO.py
tests/typeTests/testOO.py
+4
-5
testAutoxml.py
tests/xmlTests/testAutoxml.py
+3
-3
No files found.
FIXME
Dosyayı görüntüle @
938d884d
2018-01-22 Suleyman POYRAZ <nipalensisaquila@gmail.com>
* itembyrepo patladı --- STATUS: NOT FIXED; FLAG: CRITICAL ---
itemby repo ile paketlerin getirilmesi sirasinda ters giden
biseyler var. Mevcut binary depodaki hicbir sey listelenmiyor
Ya index alinirken bir sikinti oldugu icin ya da ciddi ciddi
itembyrepo patladi gitti. Uff cok sinir bozucu bisey.
2018-01-14 Suleyman POYRAZ <nipalensisaquila@gmail.com>
* inary/atomicoperations.py --- STATUS: NOT FIXED ---
In removing not asking "Do you want remove conflicted files "
Now remove all package files and conflicted files
2018-01-13 Suleyman POYRAZ <nipalensisaquila@gmail.com>
* inary/util.py --- STATUS: FIXED ---
When packaging an error occured in inary/util.py line 371
'utf-8' codec can not decode byte '0xae' in position 78
Ummm. this is the same es an unicode-byte typing error
2017-09-30 AquilaNipalensis <nipalensisaquila@gmail.com>
* inary/operations/delta.py ----STATUS: NOT FIXED----
In making delta packages can not adding actions.py files in delta package
in line 79. I try fix it but not work well.
inary/actionsapi/pkgconfig.py
Dosyayı görüntüle @
938d884d
...
...
@@ -133,7 +133,7 @@ def libraryExists(library):
"{}"
.
format
(
library
)])
except
OSError
as
exception
:
if
exception
.
errno
==
2
:
raise
PkgconfigError
(
_
(
"
pkg-
config is not installed on your system."
))
raise
PkgconfigError
(
_
(
"
Package pkg
config is not installed on your system."
))
else
:
return
result
==
0
inary/analyzer/ctypes.py
0 → 100644
Dosyayı görüntüle @
938d884d
# -*- coding: utf-8 -*-
#
# Copyright (C) 2016 - 2018, Suleyman POYRAZ (Zaryob)
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.
#
# Please read the COPYING file.
#
"ctype analyzer"
class
CTypes
:
def
__init__
(
self
,
fname
):
"""Analyze ctypes. Find libraries and load"""
self
.
library_handle
=
{}
self
.
library_names
=
{}
self
.
name
=
name
try
:
import
ctypes
import
ctypes.util
except
ImportError
:
try
:
ctypes
.
cdll
except
:
raise
Exception
(
_
(
"Module
\"
ctypes
\"
can not import"
))
def
find_library
(
self
):
fname
=
self
.
library_names
.
get
(
name
)
if
fname
is
None
:
fname
=
ctypes
.
util
.
find_library
(
name
)
if
fname
is
None
:
fname
=
False
self
.
library_names
[
name
]
=
fname
if
fname
is
False
:
return
None
return
fname
def
LoadLibrary
(
name
):
handle
=
self
.
library_handle
.
get
(
name
)
if
handle
is
None
:
handle
=
ctypes
.
CDLL
(
name
,
use_errno
=
True
)
self
.
library_handles
[
name
]
=
handle
return
handle
inary/system_literals/sysutils.py
Dosyayı görüntüle @
938d884d
...
...
@@ -15,6 +15,7 @@
import
os
import
time
import
fcntl
import
platform
class
FileLock
:
...
...
@@ -89,3 +90,76 @@ def get_kernel_option(option):
args
[
arg
]
=
""
return
args
def
get_cpu_count
():
"""
This function part of portage
Copyright 2015 Gentoo Foundation
Distributed under the terms of the GNU General Public License v2
Using:
Try to obtain the number of CPUs available.
@return: Number of CPUs or None if unable to obtain.
"""
try
:
import
multiprocessing
return
multiprocessing
.
cpu_count
()
except
(
ImportError
,
NotImplementedError
):
return
None
def
get_vm_info
():
vm_info
=
{}
try
:
import
subprocess
except
ImportError
:
raise
Exception
(
_
(
"Module:
\"
subprocess
\"
can not import"
))
if
platform
.
system
()
==
'Linux'
:
try
:
proc
=
subprocess
.
Popen
([
"free"
],
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
STDOUT
)
except
OSError
:
pass
output
=
proc
.
communicate
()[
0
]
.
decode
(
'utf-8'
)
if
proc
.
wait
()
==
os
.
EX_OK
:
for
line
in
output
.
splitlines
():
line
=
line
.
split
()
if
len
(
line
)
<
2
:
continue
if
line
[
0
]
==
"Mem:"
:
try
:
vm_info
[
"ram.total"
]
=
int
(
line
[
1
])
*
1024
except
ValueError
:
pass
if
len
(
line
)
>
3
:
try
:
vm_info
[
"ram.free"
]
=
int
(
line
[
3
])
*
1024
except
ValueError
:
pass
elif
line
[
0
]
==
"Swap:"
:
try
:
vm_info
[
"swap.total"
]
=
int
(
line
[
1
])
*
1024
except
ValueError
:
pass
if
len
(
line
)
>
3
:
try
:
vm_info
[
"swap.free"
]
=
int
(
line
[
3
])
*
1024
except
ValueError
:
pass
else
:
try
:
proc
=
subprocess
.
Popen
([
"sysctl"
,
"-a"
],
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
STDOUT
)
except
OSError
:
pass
else
:
output
=
proc
.
communicate
()[
0
]
.
decode
(
'utf-8'
)
if
proc
.
wait
()
==
os
.
EX_OK
:
for
line
in
output
.
splitlines
():
line
=
line
.
split
(
":"
,
1
)
if
len
(
line
)
!=
2
:
continue
tests/runtests.py
Dosyayı görüntüle @
938d884d
...
...
@@ -13,7 +13,6 @@
import
os
import
unittest
import
database
import
inary
import
inary.context
as
ctx
...
...
@@ -36,7 +35,7 @@ from packageTests.testHistory import HistoryTestCase
from
packageTests.testMetadata
import
MetadataTestCase
from
packageTests.testPackage
import
PackageTestCase
from
packageTests.testPspec
import
SpecFileTestCase
from
packageTests.
relationtest
import
RelationTestCase
from
packageTests.
testRelations
import
RelationTestCase
from
packageTests.testReplace
import
ReplaceTestCase
#File Tests
...
...
@@ -45,23 +44,22 @@ from fileTests.testFile import FileTestCase
from
fileTests.testSrcArchive
import
SourceArchiveTestCase
#Inary Tests
from
inaryTests.testConstant
import
ConstantTestCase
from
inaryTests.testConstant
s
import
ConstantTestCase
from
inaryTests.testConfigFile
import
ConfigFileTestCase
from
inaryTests.testFetcher
import
FetchTestCase
from
inaryTests.testMirrors
import
MirrorsTestCase
from
inaryTests.testShell
import
ShellTestCase
from
inaryTests.testUri
import
UriTestCase
from
inaryTests.testUtil
import
UtilTestCase
from
inaryTests.testVersion
import
VersionTestCase
#Process Tests
from
processTests.testFetch
import
FetchTestCase
#Type Tests
from
typeTests.testOO
import
OOTestCase
from
typeTests.testPgraph
import
GraphTestCase
# XML tests
from
xmlTests.testAutoxml
import
Auto
x
mlTestCase
from
xmlTests.testAutoxml
import
Auto
X
mlTestCase
def
setup
():
options
=
inary
.
config
.
Options
()
...
...
@@ -69,8 +67,8 @@ def setup():
inary
.
api
.
set_options
(
options
)
inary
.
api
.
set_scom
(
False
)
ctx
.
config
.
values
.
general
.
distribution
=
"
Pardus
"
ctx
.
config
.
values
.
general
.
distribution_release
=
"20
07
"
ctx
.
config
.
values
.
general
.
distribution
=
"
Sulin
"
ctx
.
config
.
values
.
general
.
distribution_release
=
"20
18
"
if
__name__
==
'__main__'
:
...
...
tests/typeTests/testOO.py
Dosyayı görüntüle @
938d884d
...
...
@@ -7,14 +7,13 @@
#
# Please read the COPYING file.
#
# Author: Eray Ozkural <eray@pardus.org.tr>
import
unittest
import
os
import
time
from
pisi
import
version
from
pisi
.oo
import
*
from
inary
import
version
from
inary
.oo
import
*
class
OOTestCase
(
unittest
.
TestCase
):
def
setUp
(
self
):
...
...
@@ -47,7 +46,7 @@ class OOTestCase(unittest.TestCase):
try
:
passed
=
False
mya
.
a
=
0
except
ConstError
,
e
:
except
ConstError
as
e
:
passed
=
True
self
.
assert_
(
passed
)
...
...
@@ -70,7 +69,7 @@ class OOTestCase(unittest.TestCase):
try
:
passed
=
False
mya
.
a
=
0
except
ConstError
,
e
:
except
ConstError
as
e
:
passed
=
True
self
.
assert_
(
passed
)
self
.
assertEqual
(
mya
.
a
,
1
)
...
...
tests/xmlTests/testAutoxml.py
Dosyayı görüntüle @
938d884d
...
...
@@ -19,9 +19,6 @@ from inary.sxml import xmlfile
from
inary.sxml
import
autoxml
import
inary.util
as
util
suite1
=
unittest
.
makeSuite
(
AutoXmlTestCase
)
suite2
=
unittest
.
makeSuite
(
LocalTextTestCase
)
suite
=
unittest
.
TestSuite
((
suite1
,
suite2
))
class
AutoXmlTestCase
(
unittest
.
TestCase
):
def
setUp
(
self
):
...
...
@@ -101,3 +98,6 @@ class LocalTextTestCase(unittest.TestCase):
s
=
unicode
(
self
.
a
)
self
.
assert_
(
s
!=
None
and
len
(
s
)
>=
6
)
suite1
=
unittest
.
makeSuite
(
AutoXmlTestCase
)
suite2
=
unittest
.
makeSuite
(
LocalTextTestCase
)
suite
=
unittest
.
TestSuite
((
suite1
,
suite2
))
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