Skip to content

Commit

Permalink
v2.1.2.14: little bugfixes
Browse files Browse the repository at this point in the history
Signed-off-by: Kwpolska <[email protected]>
  • Loading branch information
Kwpolska committed Nov 26, 2011
1 parent b78f88c commit fe3c775
Show file tree
Hide file tree
Showing 15 changed files with 37 additions and 43 deletions.
2 changes: 1 addition & 1 deletion INSTALL.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Maintainer: Kwpolska <[email protected]>
pkgname=pkgbuilder
pkgver=2.1.2.13
pkgver=2.1.2.14
pkgrel=1
pkgdesc="A basic Python AUR helper/library."
arch=('any')
Expand All @@ -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}"
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ README for PKGBUILDer
=====================
:Info: This is the README file for PKGBUILDer.
:Author: Kwpolska <[email protected]>
:Date: 2011-11-12
:Version: 2.1.2.13
:Date: 2011-11-26
:Version: 2.1.2.14

PKGBUILDer. A Python AUR helper/library.
=========================================
Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Binary file added dist/pkgbuilder-2.1.2.14.tar.gz
Binary file not shown.
4 changes: 2 additions & 2 deletions docs/LICENSE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Appendix B. License for PKGBUILDer
==================================
:Info: This is an appendix to the PKGBUILDer documentation.
:Author: Kwpolska <[email protected]>
: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.
Expand Down
4 changes: 2 additions & 2 deletions docs/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ README for PKGBUILDer
=====================
:Info: This is the README file for PKGBUILDer.
:Author: Kwpolska <[email protected]>
:Date: 2011-11-12
:Version: 2.1.2.13
:Date: 2011-11-26
:Version: 2.1.2.14

PKGBUILDer. A Python AUR helper/library.
=========================================
Expand Down
4 changes: 2 additions & 2 deletions docs/classes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions docs/messagecodes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Appendix A. PKGBUILDer message numbers list
===========================================
:Info: This is an appendix to the PKGBUILDer documentation.
:Author: Kwpolska <[email protected]>
: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
Expand Down
Binary file modified docs/pkgbuilder.8.gz
Binary file not shown.
4 changes: 2 additions & 2 deletions docs/pkgbuilder.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ PKGBUILDer

:Author: Kwpolska <[email protected]>
: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

Expand Down
42 changes: 18 additions & 24 deletions pkgbuilder.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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?
Expand All @@ -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.
Expand Down Expand Up @@ -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 = ''
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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.
Expand All @@ -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):
Expand Down Expand Up @@ -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: <http://aur.archlinux.org/rpc.php> (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.
2 changes: 1 addition & 1 deletion scripts/pkgbuilder
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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='[email protected]',
Expand Down

0 comments on commit fe3c775

Please sign in to comment.