Kaydet (Commit) ef19c09a authored tarafından Ali Rıza KESKİN's avatar Ali Rıza KESKİN

tonla optimize ayarlaması yaptım. deli dehşet çalışıyo

üst 83280502
......@@ -565,7 +565,7 @@ class ArchiveTarZ(ArchiveBase):
def unpack_dir(self, target_dir):
self.file_path = util.remove_suffix(".Z", self.file_path)
ret, out, err = util.run_batch(
ret = util.run_batch_no_stdio(
"uncompress -cf {0}.Z > {0}".format(self.file_path))
if ret != 0:
raise RuntimeError(_("Problem occured while uncompressing \"{}.Z\" file").format(self.file_path))
......
......@@ -92,7 +92,8 @@ class Install(AtomicOperation):
installdb = inary.db.installdb.InstallDB()
# Package is installed. This is an upgrade. Check delta.
if installdb.has_package(pkg.name):
(version, release, build, distro, distro_release) = installdb.get_version_and_distro_release(pkg.name)
release = installdb.get_release(pkg.name)
(distro, distro_release) = installdb.get_distro_release(pkg.name)
# inary distro upgrade should not use delta support
if distro == pkg.distribution and distro_release == pkg.distributionRelease:
delta = pkg.get_delta(release)
......@@ -253,7 +254,7 @@ class Install(AtomicOperation):
pkg = self.pkginfo
if self.installdb.has_package(pkg.name): # is this a reinstallation?
(iversion_s, irelease_s, ibuild) = self.installdb.get_version(pkg.name)
(iversion_s, irelease_s) = self.installdb.get_version(pkg.name)[:2]
# determine if same version
if pkg.release == irelease_s:
......@@ -528,7 +529,7 @@ class Install(AtomicOperation):
# need service or system restart?
if self.installdb.has_package(self.pkginfo.name):
(version, release, build) = self.installdb.get_version(self.pkginfo.name)
release = self.installdb.get_release(self.pkginfo.name)
actions = self.pkginfo.get_update_actions(release)
else:
actions = self.pkginfo.get_update_actions("1")
......@@ -647,7 +648,7 @@ class Remove(AtomicOperation):
# package (this can legitimately occur while upgrading
# two packages such that a file has moved from one package to
# another as in #2911)
pkg, existing_file = ctx.filesdb.get_file(fileinfo.path)
pkg = ctx.filesdb.get_file_name(fileinfo.path)
if pkg and pkg != package_name:
ctx.ui.warning(_('Not removing conflicted file : \"{}\"').format(fpath))
return
......
......@@ -155,5 +155,5 @@ class History(xmlfile.XmlFile, metaclass=autoxml.autoxml):
# files.sort(key=lambda x,y:int(x.split("_")[0]) - int(y.split("_")[0]))
files.sort(key=lambda x: int(x.split("_")[0].replace("0o", "0")))
no, osxml = files[-1].replace("0o", "0").split("_")
no = files[-1].replace("0o", "0").split("_")[0]
return "%03d" % (int(no) + 1)
......@@ -117,7 +117,7 @@ class Index(xmlfile.XmlFile, metaclass=autoxml.autoxml):
for fn in files:
if fn.endswith(ctx.const.delta_package_suffix):
name, version = util.parse_package_name(fn)
name = util.parse_package_name_get_name(fn)
deltas.setdefault(name, []).append(os.path.join(root, fn))
elif fn.endswith(ctx.const.package_suffix):
packages.append(os.path.join(root, fn))
......
......@@ -355,7 +355,7 @@ class Package(metaclass=autoxml.autoxml):
if not installdb.has_package(self.name):
return {}
version, old_release, build = installdb.get_version(self.name)
old_release = installdb.get_release(self.name)
actions = {}
......
......@@ -54,6 +54,10 @@ class FilesDB(lazydb.LazyDB):
key = hashlib.md5(path.encode('utf-8')).hexdigest()
return self.filesdb.get(key), path
def get_file_name(self, path):
key = hashlib.md5(path.encode('utf-8')).hexdigest()
return self.filesdb.get(key)
def has_file(self, path):
key = hashlib.md5(path.encode('utf-8')).hexdigest()
if key in self.filesdb:
......
......@@ -264,7 +264,7 @@ class File:
ctx.ui.warning(NoSignatureFound(uri))
return True
ret, out, err = inary.util.run_batch('gpg --verify ' + sigfilename)
ret, err = inary.util.run_batch_no_out('gpg --verify ' + sigfilename)
if ctx.config.values.general.ssl_verify and ret:
ctx.ui.info("Checking GPG Signature failed ('gpg --verify {}')".format(sigfilename), color='cyan')
ctx.ui.info(err.decode("utf-8"), color='faintcyan')
......
file.py:267:17: W0612: Unused variable 'out' (unused-variable)
db/historydb.py:86:18: W0612: Unused variable 'dirs' (unused-variable)
db/repodb.py:142:12: W0612: Unused variable 'status' (unused-variable)
archive.py:400:39: W0612: Unused variable 'dirs' (unused-variable)
archive.py:568:13: W0612: Unused variable 'out' (unused-variable)
archive.py:568:18: W0612: Unused variable 'err' (unused-variable)
actionsapi/libtools.py:46:14: W0612: Unused variable 'dirs' (unused-variable)
actionsapi/javamodules.py:218:22: W0612: Unused variable 'dirs' (unused-variable)
actionsapi/get.py:57:11: W0612: Unused variable 'c' (unused-variable)
......@@ -17,28 +14,16 @@ actionsapi/pythonmodules.py:96:14: W0612: Unused variable 'dirs' (unused-variabl
actionsapi/inarytools.py:155:26: W0612: Unused variable 'dirs' (unused-variable)
actionsapi/inarytools.py:201:20: W0612: Unused variable 'pageName' (unused-variable)
actionsapi/inarytools.py:271:18: W0612: Unused variable 'dirs' (unused-variable)
data/history.py:158:12: W0612: Unused variable 'osxml' (unused-variable)
data/specfile.py:358:12: W0612: Unused variable 'version' (unused-variable)
data/specfile.py:358:34: W0612: Unused variable 'build' (unused-variable)
data/index.py:120:26: W0612: Unused variable 'version' (unused-variable)
data/index.py:234:16: W0612: Unused variable 'name' (unused-variable)
data/index.py:234:22: W0612: Unused variable 'version' (unused-variable)
data/index.py:234:31: W0612: Unused variable 'release' (unused-variable)
atomicoperations.py:95:17: W0612: Unused variable 'version' (unused-variable)
atomicoperations.py:95:35: W0612: Unused variable 'build' (unused-variable)
atomicoperations.py:256:37: W0612: Unused variable 'ibuild' (unused-variable)
atomicoperations.py:531:13: W0612: Unused variable 'version' (unused-variable)
atomicoperations.py:531:31: W0612: Unused variable 'build' (unused-variable)
atomicoperations.py:650:13: W0612: Unused variable 'existing_file' (unused-variable)
util.py:228:4: W0612: Unused variable 'term_rows' (unused-variable)
util.py:331:4: W0612: Unused variable 'out' (unused-variable)
util.py:331:9: W0612: Unused variable 'err' (unused-variable)
util.py:577:18: W0612: Unused variable 'dirs' (unused-variable)
util.py:854:4: W0612: Unused variable 'run_chrpath' (unused-variable)
util.py:954:32: W0612: Unused variable 'distro_id' (unused-variable)
util.py:1015:46: W0612: Unused variable 'distro_id' (unused-variable)
util.py:1053:26: W0612: Unused variable 'build' (unused-variable)
util.py:1091:13: W0612: Unused variable 'sep' (unused-variable)
util.py:605:18: W0612: Unused variable 'dirs' (unused-variable)
util.py:882:4: W0612: Unused variable 'run_chrpath' (unused-variable)
util.py:982:32: W0612: Unused variable 'distro_id' (unused-variable)
util.py:1043:46: W0612: Unused variable 'distro_id' (unused-variable)
util.py:1081:26: W0612: Unused variable 'build' (unused-variable)
util.py:1119:13: W0612: Unused variable 'sep' (unused-variable)
cli/__init__.py:76:8: W0612: Unused variable 'term_height' (unused-variable)
cli/__init__.py:152:8: W0612: Unused variable 'endmsg' (unused-variable)
cli/__init__.py:197:16: W0612: Unused variable 'complated' (unused-variable)
......@@ -61,11 +46,8 @@ sxml/autoxml.py:773:8: W0612: Unused variable 'name' (unused-variable)
sxml/autoxml.py:783:9: W0612: Unused variable 'init_item' (unused-variable)
sxml/autoxml.py:838:8: W0612: Unused variable 'name' (unused-variable)
sxml/autoxml.py:838:29: W0612: Unused variable 'path' (unused-variable)
operations/history.py:68:25: W0612: Unused variable 'operation' (unused-variable)
operations/history.py:273:28: W0612: Unused variable 'configs' (unused-variable)
operations/build.py:894:18: W0612: Unused variable 'dirs' (unused-variable)
operations/build.py:1054:18: W0612: Unused variable 'dirs' (unused-variable)
operations/build.py:1066:30: W0612: Unused variable 'err' (unused-variable)
operations/info.py:31:25: W0612: Unused variable 'repo' (unused-variable)
operations/delta.py:33:4: W0612: Unused variable 'name' (unused-variable)
operations/delta.py:33:10: W0612: Unused variable 'new_version' (unused-variable)
......
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