Kaydet (Commit) 938d884d authored tarafından Suleyman Poyraz's avatar Suleyman Poyraz

İtem by repo catladi

üst 1703bef4
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.
......@@ -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 pkgconfig is not installed on your system."))
else:
return result == 0
# -*- 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
......@@ -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
......@@ -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.testConstants 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 AutoxmlTestCase
from xmlTests.testAutoxml import AutoXmlTestCase
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 = "2007"
ctx.config.values.general.distribution = "Sulin"
ctx.config.values.general.distribution_release = "2018"
if __name__ == '__main__':
......
......@@ -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)
......
......@@ -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))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment