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

Last Changes before inary-1.0_rc3

üst caf29623
2018-03-28 Suleyman Poyraz <nipalensisaquila@gmail.com>
* Hata düzeltmeleri:
-> Kodlama hataları ele alındı, arada anlamsız gelen çıktılar düzeltildi
* Lisans:
-> GPLv3 yapıldı, eski developerlerin kullandığı Copyright da eklendi.
2018-03-15 Suleyman Poyraz <nipalensisaquila@gmail.com>
* fetcher.py:
-> Her zaman sinirimi bozan bu fetcher requests ile yeniden yazıldı.
......
2018-03-17 Suleyman POYRAZ <nipalensisaquila@gmail.com>
* inary.fetcher.py: --- status: not fixed; flag: critical ---:
* inary.fetcher.py: --- status: fixed; flag: critical ---:
->Ufak bir sihirli dokunuş düzeltmeye yetti.
Neden local dosyaları çekmiyor bu?
"""
$ inary fc dbus
......@@ -11,6 +12,8 @@
"""
* ayrıca yine fetcher:
-> local dosyalar indirilmiyor. Olduğu yerin path bilgisi alınıp kuruluyor
Oldukça temiz bir bakış açısı
sudo inary it dbus -f diyince nereye indiriyor yaw bu
......@@ -48,6 +51,7 @@
2018-01-14 Suleyman POYRAZ <nipalensisaquila@gmail.com>
* inary/atomicoperations.py --- status: not fixed flag: critical ---
* inary/atomicoperations.py --- status: fixed flag: critical ---
-> Dosya veritabanına bağlı hata düzeltildi.
In removing not asking "Do you want remove conflicted files "
Now remove all package files and conflicted files
......@@ -38,6 +38,7 @@ except:
#FIXME: Gorunusu guzel olsa bile kodda anlamsizlik yaratiyor
warn = inary.util.colorize(_("WARNING\n"),"blinkingred")+ \
inary.util.colorize(_("\tCiksemel XML Parser not found!!!\n"
"\tMinidom slower than ciksemel but\n"
"\tFalling back with minidom!!! :(\n\n"), 'faintwhite')
sys.stdout.write(warn)
......
......@@ -150,10 +150,11 @@ class InstallDB(lazydb.LazyDB):
def __get_version(self, meta_doc):
package = xmlext.getNode(meta_doc,'Package')
update = xmlext.getNode(meta_doc,'Update')
history = xmlext.getNodeText(package, 'History')
history = xmlext.getNode(package, 'History')
update = xmlext.getNode(history,'Update')
version = xmlext.getNodeText(update, 'Version')
release = xmlext.getNodeText(update, 'release')
release = xmlext.getNodeAttribute(update, 'release')
return version, release, None
......
......@@ -16,14 +16,11 @@
import os
import time
import shutil
import socket
import sys
from base64 import encodestring
# Network libraries
from http.client import HTTPException
import ftplib
# import ftplib
#Gettext translation library
import gettext
......@@ -174,16 +171,21 @@ class Fetcher:
if os.path.exists(self.archive_file) and not os.access(self.archive_file, os.W_OK):
raise FetchError(_('Access denied to destination file: "%s"') % (self.archive_file))
if self.url.is_local_file:
ctx.ui.info(_("Getting local package {}").format(self.url.filename()))
util.copy_file(self.url.get_uri(), self.partial_file)
else:
print(dir(self.url))
try:
import requests
with open(self.partial_file, "wb") as f:
response = requests.get(self.url.get_uri(),
proxies = self._get_proxies(),
headers = self.headers_dict,
verify=verify,
timeout=5,
stream=True)
verify = verify,
timeout = 5,
stream = True)
handler= UIHandler()
total_length = int(response.headers.get('content-length'))
......@@ -216,6 +218,9 @@ class Fetcher:
# TODO: Add ftp downloader with ftplib
raise FetchError(_('Package manager not support downloding from ftp mirror'))
except requests.exceptions.MissingSchema:
ctx.ui.info(_("Copying local file {}").format(self.url.get_uri()))
shutil.copy(self.url.get_uri(), self.partial_file)
if os.stat(self.partial_file).st_size == 0:
os.remove(self.partial_file)
......
......@@ -272,7 +272,7 @@ def install_pkg_files(package_URIs, reinstall = False):
def plan_install_pkg_names(A):
# try to construct a inary graph of packages to
# install / reinstall
ctx.ui.info(_('Checking packages to install...'))
packagedb = inary.db.packagedb.PackageDB()
G_f = pgraph.PGraph(packagedb) # construct G_f
......
......@@ -190,7 +190,7 @@ def newNode(node, tag):
return node.ownerDocument.createElement(tag)
def toString(node):
return node.toxml('utf-8')
return node.toxml()
def toPretty(node):
return node.toprettyxml()
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