[entropy.client] web-install package files are bzip2 compressed, add complete support
This commit is contained in:
@@ -618,6 +618,16 @@ class RepositoryMixin:
|
||||
repodata['pkgpath'] = os.path.realpath(pkg_file) # extra info added
|
||||
repodata['smartpackage'] = False # extra info added
|
||||
repodata['webinstall_package'] = False
|
||||
if pkg_file.endswith(etpConst['packagesext_webinstall']):
|
||||
repodata['webinstall_package'] = True
|
||||
# unbzip2
|
||||
tmp_fd, tmp_path = tempfile.mkstemp(dir = db_dir)
|
||||
try:
|
||||
entropy.tools.uncompress_file(dbfile, tmp_path, bz2.BZ2File)
|
||||
finally:
|
||||
os.close(tmp_fd)
|
||||
os.rename(tmp_path, dbfile)
|
||||
|
||||
|
||||
repo = self.open_generic_repository(dbfile)
|
||||
# read all idpackages
|
||||
@@ -631,8 +641,7 @@ class RepositoryMixin:
|
||||
product = self._settings['repositories']['product']
|
||||
repodata['packages'] = []
|
||||
repodata['plain_packages'] = []
|
||||
if pkg_file.endswith(etpConst['packagesext_webinstall']):
|
||||
repodata['webinstall_package'] = True
|
||||
if repodata['webinstall_package']:
|
||||
try:
|
||||
plain_packages = repo.getSetting("plain_packages")
|
||||
except KeyError:
|
||||
|
||||
@@ -423,6 +423,7 @@ def const_default_settings(rootdir):
|
||||
'userpackagesetsid': "__user__",
|
||||
'cachedumpext': ".dmp",
|
||||
'packagesext': ".tbz2",
|
||||
'packagesext_webinstall': ".etp",
|
||||
# entropy package files binary delta extension
|
||||
'packagesdeltaext': ".edelta",
|
||||
# entropy package files binary delta subdir
|
||||
|
||||
Reference in New Issue
Block a user