Fixed matching packages with case insensitive option

This commit is contained in:
Dimitris Zlatanidis 2015-09-21 07:45:16 +03:00
parent d5d6cd1f2d
commit 1bd6d3a70f
3 changed files with 8 additions and 2 deletions

View file

@ -144,10 +144,12 @@ class BinaryInstall(object):
data.append(split_package(name)[0])
data_dict = Utils().case_sensitive(data)
for pkg in self.packages:
index = self.packages.index(pkg)
for key, value in data_dict.iteritems():
if key == pkg.lower():
index = self.packages.index(pkg)
self.packages[index] = value
else:
self.packages[index] = pkg.lower()
def update_deps(self):
"""Update dependencies dictionary with all package

View file

@ -130,6 +130,8 @@ class SBoNetwork(object):
for key, value in data_dict.iteritems():
if key == self.name.lower():
self.name = value
else:
self.name = self.name.lower()
def read_choice(self):
"""Return choice

View file

@ -150,10 +150,12 @@ class SBoInstall(object):
if "--case-ins" in self.flag:
data_dict = Utils().case_sensitive(self.data)
for name in self.slackbuilds:
index = self.slackbuilds.index(name)
for key, value in data_dict.iteritems():
if key == name.lower():
index = self.slackbuilds.index(name)
self.slackbuilds[index] = value
else:
self.slackbuilds[index] = name.lower()
def update_deps(self):
"""Update dependencies dictionary with all package