Revert "Removed self.repo check"

This reverts commit 53ea18f047.
This commit is contained in:
Beth Parker 2018-04-26 20:29:09 -05:00
parent 11ae26fab9
commit 96be6d02cd

View file

@ -26,7 +26,9 @@ class Package(object):
self.upToDate = False
self.aurdeps = []
self.pkgs = ""
self.inaur()
self.inrepo()
if not self.repo:
self.inaur()
if self.aur:
self.isgroup()
if not os.path.exists(self.path):
@ -39,8 +41,16 @@ class Package(object):
self.getDeps()
except BuildError:
print("Aborting build of %s" % self.name)
else:
self.repo = True
def inrepo(self):
try:
results = pacman("-Ssq", self.name)
except sh.ErrorReturnCode_1:
return
for result in results.split("\n"):
if self.name == result:
self.repo = True
def inaur(self):
response = requests.get("https://aur.archlinux.org/packages/%s" % (self.name))
if response.status_code < 400: