Fixed references

This commit is contained in:
Dimitris Zlatanidis 2015-08-08 00:56:45 +03:00
parent 0f4339bc26
commit ca046029bc
2 changed files with 5 additions and 8 deletions

View file

@ -171,8 +171,7 @@ class BinaryInstall(object):
self.meta.color["GREEN"], self.meta.color["ENDC"], inst))
installs.append(pkg_ver)
PackageManager(package).upgrade("--reinstall")
elif find_package(split_package(inst)[0] + self.meta.sp,
self.meta.pkg_path):
elif GetFromInstalled(split_package(inst)[0]).name():
print("[ {0}upgrading{1} ] --> {2}".format(
self.meta.color["YELLOW"], self.meta.color["ENDC"], inst))
upgraded.append(pkg_ver)

View file

@ -24,6 +24,7 @@
import sys
from installed import GetFromInstalled
from __metadata__ import MetaData as _meta_
from pkg.find import find_package
@ -151,11 +152,8 @@ class Msg(object):
self.template(78)
for installed in (install + upgrade):
name = "-".join(installed.split("-")[:-1])
if find_package(installed, self.meta.pkg_path):
if installed in upgrade:
if GetFromInstalled(name).name():
print("| Package {0} upgraded successfully".format(name))
else:
print("| Package {0} installed successfully".format(name))
else:
print("| Package {0} NOT installed".format(name))
self.template(78)