Skip to content
Permalink
Browse files
CP Packages on Cent7
  • Loading branch information
usmannasir committed May 6, 2020
1 parent 87aeb1c commit f01678f86484c56e515e1eb0f63fb3b500ef50f1
Showing 1 changed file with 23 additions and 0 deletions.
@@ -753,6 +753,8 @@ def fetchPackages(request):
upgradePackages.append(pack)

packages = upgradePackages


elif ProcessUtilities.decideDistro() == ProcessUtilities.centos:

### Check Package Lock status
@@ -823,6 +825,9 @@ def fetchPackages(request):
break
else:
startForUpdate = startForUpdate + 1
elif type == 'CyberPanel':
command = 'cat /usr/local/CyberCP/CPCent7repo.json'
packages = json.loads(ProcessUtilities.outputExecutioner(command))

## make list of packages that need update

@@ -923,6 +928,24 @@ def fetchPackages(request):
checker = 1
else:
json_data = json_data + ',' + json.dumps(dic)
elif type == 'CyberPanel':

packageName = items['Package']

if packageName.split('.')[0] in locked:
lock = 1
else:
lock = 0

dic = {'package': packageName,
'version': items['Version'], 'lock': lock}

counter = counter + 1
if checker == 0:
json_data = json_data + json.dumps(dic)
checker = 1
else:
json_data = json_data + ',' + json.dumps(dic)


except BaseException as msg:

0 comments on commit f01678f

Please sign in to comment.