diff --git a/INSTALL.py b/INSTALL.py index 37ce622..435a25e 100755 --- a/INSTALL.py +++ b/INSTALL.py @@ -83,7 +83,7 @@ ASROOT = ' --asroot' MPKG = subprocess.call('/usr/bin/makepkg -si'+ASROOT, shell=True) - if MPKG == 1: + if MPKG != 0: print(_(""" Something went wrong. Please read makepkg's output and try again. diff --git a/PKGBUILD b/PKGBUILD index 7772d72..31444be 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,6 +1,6 @@ # Maintainer: Kwpolska pkgname=pkgbuilder -pkgver=2.1.2.13 +pkgver=2.1.2.14 pkgrel=1 pkgdesc="A basic Python AUR helper/library." arch=('any') @@ -9,7 +9,7 @@ license=('BSD') depends=('python' 'pyalpm>=0.5.1-1' 'python-pyparsing' 'pacman>=4.0.0-1') options=(!emptydirs) source=("http://pypi.python.org/packages/source/p/${pkgname}/${pkgname}-${pkgver}.tar.gz") -md5sums=('171434d2f351f855f9011bfe75632a1a') +md5sums=('949fa3a72ea6b2e510295d937e7d5ae0') package() { cd "${srcdir}/${pkgname}-${pkgver}" diff --git a/README.rst b/README.rst index 949af4d..4b8b000 100644 --- a/README.rst +++ b/README.rst @@ -3,8 +3,8 @@ README for PKGBUILDer ===================== :Info: This is the README file for PKGBUILDer. :Author: Kwpolska -:Date: 2011-11-12 -:Version: 2.1.2.13 +:Date: 2011-11-26 +:Version: 2.1.2.14 PKGBUILDer. A Python AUR helper/library. ========================================= diff --git a/Rakefile b/Rakefile index 723e630..751c16b 100755 --- a/Rakefile +++ b/Rakefile @@ -95,7 +95,7 @@ task :git, :ver, :msg do |t, args| end if args[:msg].to_s.chomp == '' - puts "Commit message (sans the version)? |" + puts "Commit message (sans the version)? |" commitmsg = STDIN.gets.chomp else commitmsg = args[:msg].chomp diff --git a/dist/pkgbuilder-2.1.2.14.tar.gz b/dist/pkgbuilder-2.1.2.14.tar.gz new file mode 100644 index 0000000..582eae9 Binary files /dev/null and b/dist/pkgbuilder-2.1.2.14.tar.gz differ diff --git a/docs/LICENSE.rst b/docs/LICENSE.rst index 95136b6..1c053a5 100644 --- a/docs/LICENSE.rst +++ b/docs/LICENSE.rst @@ -3,8 +3,8 @@ Appendix B. License for PKGBUILDer ================================== :Info: This is an appendix to the PKGBUILDer documentation. :Author: Kwpolska -:Date: 2011-11-12 -:Version: 2.1.2.13 +:Date: 2011-11-26 +:Version: 2.1.2.14 Copyright (C) 2011, Kwpolska All rights reserved. diff --git a/docs/README.rst b/docs/README.rst index 949af4d..4b8b000 100644 --- a/docs/README.rst +++ b/docs/README.rst @@ -3,8 +3,8 @@ README for PKGBUILDer ===================== :Info: This is the README file for PKGBUILDer. :Author: Kwpolska -:Date: 2011-11-12 -:Version: 2.1.2.13 +:Date: 2011-11-26 +:Version: 2.1.2.14 PKGBUILDer. A Python AUR helper/library. ========================================= diff --git a/docs/classes.rst b/docs/classes.rst index 298287b..ef014c8 100644 --- a/docs/classes.rst +++ b/docs/classes.rst @@ -4,8 +4,8 @@ Classes in PKGBUILDer :Author: Kwpolska :Copyright: See Appendix B. -:Date: 2011-11-12 -:Version: 2.1.2.13 +:Date: 2011-11-26 +:Version: 2.1.2.14 .. index:: classes .. module:: PKGBUILDer diff --git a/docs/conf.py b/docs/conf.py index 7f44b62..dabd6a4 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -50,7 +50,7 @@ # The short X.Y version. version = '2.1.2' # The full version, including alpha/beta/rc tags. -release = '2.1.2.13' +release = '2.1.2.14' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/messagecodes.rst b/docs/messagecodes.rst index 8595af4..81a15ea 100644 --- a/docs/messagecodes.rst +++ b/docs/messagecodes.rst @@ -3,8 +3,8 @@ Appendix A. PKGBUILDer message numbers list =========================================== :Info: This is an appendix to the PKGBUILDer documentation. :Author: Kwpolska -:Date: 2011-11-12 -:Version: 2.1.2.13 +:Date: 2011-11-26 +:Version: 2.1.2.14 In order to help debugging, messages are numbered. Each message number has four digits: the first one is the diff --git a/docs/pkgbuilder.8.gz b/docs/pkgbuilder.8.gz index 848a565..c8bf45f 100644 Binary files a/docs/pkgbuilder.8.gz and b/docs/pkgbuilder.8.gz differ diff --git a/docs/pkgbuilder.rst b/docs/pkgbuilder.rst index 8c256fd..1221cbd 100644 --- a/docs/pkgbuilder.rst +++ b/docs/pkgbuilder.rst @@ -4,8 +4,8 @@ PKGBUILDer :Author: Kwpolska :Copyright: See Appendix B. -:Date: 2011-11-12 -:Version: 2.1.2.13 +:Date: 2011-11-26 +:Version: 2.1.2.14 :Manual section: 8 :Manual group: PKGBUILDer manual diff --git a/pkgbuilder.py b/pkgbuilder.py index f63f09d..a4ef349 100755 --- a/pkgbuilder.py +++ b/pkgbuilder.py @@ -1,5 +1,5 @@ #!/usr/bin/python3 -# PKGBUILDer v2.1.2.13 +# PKGBUILDer v2.1.2.14 # A Python AUR helper/library. # Copyright (C) 2011, Kwpolska # All rights reserved. @@ -52,7 +52,7 @@ import functools import logging -VERSION = '2.1.2.13' +VERSION = '2.1.2.14' ### PBDS PB global data storage ### class PBDS: @@ -193,7 +193,7 @@ def __init__(self, msg): :Arguments: a message.""" self.msg = msg - L.exception(self.msg) + L.error('PBError: '+self) def __str__(self): """You want to see error messages, don't you? @@ -209,8 +209,8 @@ def __init__(self): """AUR init. :Returns: an AUR object.""" - self.rpc = '{0}://aur.archlinux.org/rpc.php?type={1}&arg={2}' - self.mrpc = '{0}://aur.archlinux.org/rpc.php?type=multiinfo{1}' + self.rpc = '{0}://aur.archlinux.org/rpc.pachandle.?type={1}&arg={2}' + self.mrpc = '{0}://aur.archlinux.org/rpc.pachandle.?type=multiinfo{1}' def jsonreq(self, rtype, arg, prot = 'http'): """Makes a request and returns plain JSON data. @@ -307,8 +307,8 @@ def print_package(self, pkg, use_categories = True, prefix=''): :Former data: 2.0 Name: showInfo.""" - H = pycman.config.init_with_config('/etc/pacman.conf') - localdb = H.get_localdb() + pachandle = pycman.config.init_with_config('/etc/pacman.conf') + localdb = pachandle.get_localdb() lpkg = localdb.get_pkg(pkg['Name']) category = '' @@ -366,8 +366,9 @@ def auto_build(self, pkgname, validate = True, performdepcheck = True, os.chdir('../') if validate == True: # check if installed - H = pycman.config.init_with_config('/etc/pacman.conf') - localdb = H.get_localdb() + pachandle = pycman.config.init_with_config( + '/etc/pacman.conf') + localdb = pachandle.get_localdb() pkg = localdb.get_pkg(pkgname) aurversion = self.utils.info(pkgname)['Version'] if pkg is None: @@ -489,12 +490,12 @@ def depcheck(self, depends): return {} else: parseddeps = {} - H = pycman.config.init_with_config('/etc/pacman.conf') - localpkgs = H.get_localdb().pkgcache + pachandle = pycman.config.init_with_config('/etc/pacman.conf') + localpkgs = pachandle.get_localdb().pkgcache syncpkgs = [] - for j in [ i.pkgcache for i in H.get_syncdbs() ]: + for j in [ i.pkgcache for i in pachandle.get_syncdbs() ]: syncpkgs.append(j) - syncpkgs = functools.reduce(lambda x,y:x+y,syncpkgs) + syncpkgs = functools.reduce(lambda x, y:x+y, syncpkgs) #can someone help me fix the above line? TODO. for dep in depends: if re.search('[<=>]', dep): @@ -577,7 +578,7 @@ def build_runner(self, pkgname, performdepcheck = True, for pkg, pkgtype in deps.items(): if pkgtype == -1: raise PBError(_('[ERR3201] depcheck: cannot \ -find {0} anywhere').format(dep)) +find {0} anywhere').format(pkg)) if pkgtype == 2: aurbuild.append(pkg) @@ -623,8 +624,8 @@ def __init__(self): """Upgrade init.""" self.aur = AUR() self.build = Build() - self.H = pycman.config.init_with_config('/etc/pacman.conf') - self.localdb = self.H.get_localdb() + self.pachandle = pycman.config.init_with_config('/etc/pacman.conf') + self.localdb = self.pachandle.get_localdb() def gather_foreign_pkgs(self): """Gathers a list of all foreign packages. @@ -636,7 +637,7 @@ def gather_foreign_pkgs(self): # Based on paconky.py. installed = set(p for p in self.localdb.pkgcache) - syncdbs = self.H.get_syncdbs() + syncdbs = self.pachandle.get_syncdbs() for sdb in syncdbs: for pkg in list(installed): if sdb.get_pkg(pkg.name): @@ -876,10 +877,3 @@ def main(): main() logging.shutdown() - -# Over 900 lines! Compare this to build.pl's 56 (including ~8 useless...) -# New features will be included when they will be added to the AUR RPC. -# RPC: (search info msearch multiinfo) -# If something new will appear there, tell me through GH Issues or mail. -# They would be implemented later. -# Some other features might show up, too. diff --git a/scripts/pkgbuilder b/scripts/pkgbuilder index dd9b374..724e414 100755 --- a/scripts/pkgbuilder +++ b/scripts/pkgbuilder @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # This file is a part of PKGBUILDer. -# File version: 2.1.2.13 +# File version: 2.1.2.14 # # Copyright (C) 2011, Kwpolska # All rights reserved. diff --git a/setup.py b/setup.py index 6c198d3..edfc527 100755 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from distutils.core import setup setup(name='pkgbuilder', - version='2.1.2.13', + version='2.1.2.14', description='An AUR helper (and library) in python3', author='Kwpolska', author_email='kwpolska@kwpolska.tk',