Skip to content
Browse files

[What_can_I_update?.py] Implement the "-b" option

  • Loading branch information...
1 parent 25bab53 commit a191cf4ad56f871245f6618cabeaa6fdb3d55cd0 @chenxiaolong committed Nov 17, 2012
Showing with 12 additions and 3 deletions.
  1. +12 −3 What_can_I_update?.py
View
15 What_can_I_update?.py
@@ -203,6 +203,9 @@ def get_all_pkgname(self): # Is this needed?
temp.append(i.get_pkgname())
return(temp)
+ def get_pkgbase(self):
+ return(self._pkgbase)
+
def find_package(self, pkgname):
for i in self._subpackages:
if i.get_pkgname() == pkgname:
@@ -492,9 +495,15 @@ def main():
for i in pkginfo:
for j in i.get():
if j.get_upgrade():
- print("Package name : " + j.get_pkgname())
- print(" PKGBUILD version : " + j.get_pkgver())
- print(" Installed version : " + j.get_instver())
+ if "pkgdir" in show:
+ print("Package base : " + i.get_pkgbase())
+ print(" PKGBUILD version : " + j.get_pkgver())
+ print(" Installed version : " + j.get_instver())
+ break
+ else:
+ print("Package name : " + j.get_pkgname())
+ print(" PKGBUILD version : " + j.get_pkgver())
+ print(" Installed version : " + j.get_instver())
### Begin program ###
if __name__ == '__main__':

0 comments on commit a191cf4

Please sign in to comment.
Something went wrong with that request. Please try again.