Fix found archive

This commit is contained in:
Dimitris Zlatanidis 2015-09-24 06:42:09 +03:00
parent 1bff73dc63
commit b1fe596e20

View file

@ -22,6 +22,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import os
from slpkg.pkg.build import BuildPackage from slpkg.pkg.build import BuildPackage
from slpkg.sbo.greps import SBoGrep from slpkg.sbo.greps import SBoGrep
@ -41,14 +43,17 @@ class AutoBuild(object):
def run(self): def run(self):
"""Build package and fix ordelist per checksum """Build package and fix ordelist per checksum
""" """
self.info_file() if os.path.isfile(self.script):
sources = self.sources self.info_file()
if len(sources) > 1 and self.sbo_sources != sources: sources = self.sources
sources = self.sbo_sources if len(sources) > 1 and self.sbo_sources != sources:
# If the list does not have the same order use from .info sources = self.sbo_sources
# order. # If the list does not have the same order use from .info
BuildPackage(self.script, sources, self.path).build() # order.
raise SystemExit() BuildPackage(self.script, sources, self.path).build()
raise SystemExit()
else:
print("\nslpkg: Error: SlackBuild archive.tar.gz not found\n")
def info_file(self): def info_file(self):
"""Grab sources from .info file and store filename """Grab sources from .info file and store filename