Entropy/*:
- use extract_xpak instead of extractXpak function (deprecated) - use read_xpak instead of read_xpak function (deprecated) - use compare_md5 instead of compareMd5 function (deprecated) - use sort_update_files instead of sortUpdateFiles function (deprecated) - use allocate_masked_file instead of allocateMaskedFile function (deprecated) - use extract_elog instead of extractElog function (deprecated) - use remove_package_operators instead of removePackageOperators (deprecated) git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@3185 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
@@ -47,7 +47,7 @@ class Fetchers:
|
||||
return 0
|
||||
else:
|
||||
# check digest
|
||||
md5res = self.entropyTools.compareMd5(etpConst['entropyworkdir']+"/"+filepath,checksum)
|
||||
md5res = self.entropyTools.compare_md5(etpConst['entropyworkdir']+"/"+filepath,checksum)
|
||||
if (md5res):
|
||||
return 0
|
||||
else:
|
||||
|
||||
@@ -227,7 +227,7 @@ class Extractors:
|
||||
for item in foundfiles: mtimes.append((self.entropyTools.getFileUnixMtime(os.path.join(log_dir,item)),item))
|
||||
mtimes = sorted(mtimes)
|
||||
elogfile = mtimes[-1][1]
|
||||
messages = self.entropyTools.extractElog(os.path.join(log_dir,elogfile))
|
||||
messages = self.entropyTools.extract_elog(os.path.join(log_dir,elogfile))
|
||||
for message in messages:
|
||||
message = message.replace("emerge","install")
|
||||
pkg_messages.append(message)
|
||||
|
||||
@@ -1183,7 +1183,7 @@ class Package:
|
||||
if tofile not in etpConst['configprotectskip']:
|
||||
prot_status = True
|
||||
if do_allocation_check:
|
||||
tofile, prot_status = self.entropyTools.allocateMaskedFile(tofile, fromfile)
|
||||
tofile, prot_status = self.entropyTools.allocate_masked_file(tofile, fromfile)
|
||||
if not prot_status:
|
||||
protected = False
|
||||
else:
|
||||
|
||||
@@ -311,7 +311,7 @@ class Repository:
|
||||
mytxt = _("self.dbformat_eapi must be in (1,2)")
|
||||
raise InvalidData('InvalidData: %s' % (mytxt,))
|
||||
|
||||
rc = self.entropyTools.compareMd5(etpRepositories[repo]['dbpath']+"/"+dbfile,md5hash)
|
||||
rc = self.entropyTools.compare_md5(etpRepositories[repo]['dbpath']+"/"+dbfile,md5hash)
|
||||
return rc
|
||||
|
||||
# @returns -1 if the file is not available
|
||||
|
||||
@@ -630,7 +630,7 @@ class LocalRepository:
|
||||
|
||||
spm = self.ServiceInterface.SpmService
|
||||
updates_dir = etpConst['systemroot']+spm.get_spm_setting("PORTDIR")+"/profiles/updates"
|
||||
update_files = self.entropyTools.sortUpdateFiles(os.listdir(updates_dir))
|
||||
update_files = self.entropyTools.sort_update_files(os.listdir(updates_dir))
|
||||
update_files = [os.path.join(updates_dir,x) for x in update_files]
|
||||
# now load actions from files
|
||||
update_actions = []
|
||||
@@ -2822,7 +2822,7 @@ class LocalRepository:
|
||||
# You must provide the full atom to this function
|
||||
# WARNING: this function does not support branches
|
||||
def isPackageAvailable(self, pkgatom):
|
||||
pkgatom = self.entropyTools.removePackageOperators(pkgatom)
|
||||
pkgatom = self.entropyTools.remove_package_operators(pkgatom)
|
||||
self.cursor.execute('SELECT idpackage FROM baseinfo WHERE atom = (?)', (pkgatom,))
|
||||
result = self.cursor.fetchone()
|
||||
if result: return result[0]
|
||||
|
||||
@@ -154,7 +154,7 @@ class SecurityInterface:
|
||||
self.advisories_changed = False
|
||||
else:
|
||||
self.advisories_changed = True
|
||||
md5res = self.entropyTools.compareMd5(self.download_package,checksum)
|
||||
md5res = self.entropyTools.compare_md5(self.download_package,checksum)
|
||||
if not md5res:
|
||||
return 3
|
||||
return 0
|
||||
|
||||
@@ -2427,7 +2427,7 @@ class Server(Singleton,TextInterface):
|
||||
|
||||
storedmd5 = dbconn.retrieveDigest(idpackage)
|
||||
pkgpath = os.path.join(self.get_local_packages_directory(repo),orig_branch,pkgfile)
|
||||
result = self.entropyTools.compareMd5(pkgpath,storedmd5)
|
||||
result = self.entropyTools.compare_md5(pkgpath,storedmd5)
|
||||
if result:
|
||||
fine.add(idpackage)
|
||||
else:
|
||||
|
||||
@@ -484,7 +484,7 @@ class Server:
|
||||
)
|
||||
|
||||
pkg_path = os.path.join(download_path,pkgfile)
|
||||
md5check = self.entropyTools.compareMd5(pkg_path,storedmd5)
|
||||
md5check = self.entropyTools.compare_md5(pkg_path,storedmd5)
|
||||
if md5check:
|
||||
self.Entropy.updateProgress(
|
||||
"[repo:%s|%s|#%s] %s: %s %s" % (
|
||||
|
||||
@@ -2612,7 +2612,7 @@ def extractElog(*args, **kwargs):
|
||||
|
||||
def removePackageOperators(*args, **kwargs):
|
||||
import warnings
|
||||
warnings.warn("deprecated, use remove_pacakge_operators instead")
|
||||
warnings.warn("deprecated, use remove_package_operators instead")
|
||||
return remove_package_operators(*args, **kwargs)
|
||||
|
||||
def compareVersions(*args, **kwargs):
|
||||
|
||||
@@ -1102,7 +1102,7 @@ class FtpServerHandler:
|
||||
return False
|
||||
elif len(checksum) == 32:
|
||||
# valid? checking
|
||||
ckres = self.entropyTools.compareMd5(local_filepath,checksum)
|
||||
ckres = self.entropyTools.compare_md5(local_filepath,checksum)
|
||||
if ckres:
|
||||
self.Entropy.updateProgress(
|
||||
"[%s|#%s|(%s/%s)] %s: %s: %s" % (
|
||||
|
||||
Reference in New Issue
Block a user