From 3d71566125151e82d563310787565635fcf928f2 Mon Sep 17 00:00:00 2001 From: Kwpolska Date: Sat, 6 Jul 2013 15:31:41 +0200 Subject: [PATCH] v3.1.4: fix a huge mess Signed-off-by: Kwpolska --- PKGBUILD | 2 +- docs/pb.8.gz | Bin 1598 -> 1598 bytes docs/pkgbuilder.8.gz | Bin 2096 -> 2096 bytes pkgbuilder/build.py | 4 ---- pkgbuilder/upgrade.py | 20 ++++++++++++++------ setup.py | 6 ++++++ 6 files changed, 21 insertions(+), 11 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index c01fb3b..d1d8c3c 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -10,7 +10,7 @@ license=('BSD') depends=('python' 'pyalpm>=0.5.1-1' 'python-requests' 'rsync') options=(!emptydirs) source=("http://pypi.python.org/packages/source/$(echo ${_pyname} | cut -c1)/${_pyname}/${_pyname}-${pkgver}.tar.gz") -md5sums=('52e5345964a1acab71b34d4c8f53365d') +md5sums=('9a0f9a6a4400882517499c26ed207e03') package() { cd "${srcdir}/${_pyname}-${pkgver}" diff --git a/docs/pb.8.gz b/docs/pb.8.gz index 45372f6cad506628f8d38dfe58ff5f15ae8dc3c4..793ee414e5d4f760311e9cab6dfa9a053f3e8d8c 100644 GIT binary patch delta 15 WcmdnTvyX>OzMF&NwDd+c3pM~HcLXp1 delta 15 WcmdnTvyX>OzMF&Noa9C}3pM~He*`fA diff --git a/docs/pkgbuilder.8.gz b/docs/pkgbuilder.8.gz index e09ec39d577ea9d74c870241e62440a574c60488..714af4446b67dbe8fb86650532bb9202f6586e60 100644 GIT binary patch delta 15 WcmdlWut9)LzMF&NwDd+cEe-%AJp>Q{ delta 15 WcmdlWut9)LzMF&Noa9C}Ee-%AMFbH5 diff --git a/pkgbuilder/build.py b/pkgbuilder/build.py index 459282f..bbee452 100644 --- a/pkgbuilder/build.py +++ b/pkgbuilder/build.py @@ -110,7 +110,6 @@ def safeupgrade(pkgname): DS.fancy_msg2(_('{0} files extracted').format(extract(filename))) os.chdir('./{0}/'.format(pkg.name)) DS.fancy_msg(_('Building {0}...').format(pkg.name)) -<<<<<<< HEAD if DS.uid == 0: DS.fancy_warning(_('Performing a safe upgrade as root!')) @@ -120,9 +119,6 @@ def safeupgrade(pkgname): else: asroot = '' mpstatus = subprocess.call('makepkg -sicf{0}'.format(asroot), shell=True) -======= - mpstatus = subprocess.call('makepkg -sicf', shell=True) ->>>>>>> e795f5da2a630f23316a463bd6867e463c9308ba DS.fancy_msg(_('Build finished with return code {0}.').format(mpstatus)) return mpstatus diff --git a/pkgbuilder/upgrade.py b/pkgbuilder/upgrade.py index 4ce8fc7..4589f42 100644 --- a/pkgbuilder/upgrade.py +++ b/pkgbuilder/upgrade.py @@ -23,6 +23,7 @@ import datetime import subprocess import textwrap +import sys __all__ = ['gather_foreign_pkgs', 'list_upgradable', 'auto_upgrade'] @@ -188,11 +189,15 @@ def auto_upgrade(downgrade=False, vcsup=False): yesno = input(query) if yesno.lower().strip().startswith('y') or yesno.strip() == '': - pkgbuilder.build.safeupgrade(pkgbname) - # The return causes PKGBUILDer.main() to quit and do nothing. - # The else is unnecessary, as we drop to a regular upgrade - # if the luser says “no”. - return [] + status = pkgbuilder.build.safeupgrade(pkgbname) + if status > 0: + DS.log.info('safe upgrade failed with {0}'.format(status)) + sys.exit(status) + else: + # The return causes PKGBUILDer.main() to quit and do + # nothing. The else is unnecessary, as we drop to a + # regular upgrade if the luser says “no”. + return [] if DS.pacman: targetstring = _('Targets ({0}): ').format(upglen) @@ -232,6 +237,9 @@ def auto_upgrade(downgrade=False, vcsup=False): verbosepkglists = False DS.log.warning('VerbosePkgLists disabled, terminal is ' 'not wide enough') + # string stolen from pacman + print(_('warning: insufficient columns available for ' + 'table display')) else: print('\n{0}\n'.format(targetstring.strip())) print(fstring.format(i=headers)) @@ -271,4 +279,4 @@ def auto_upgrade(downgrade=False, vcsup=False): if yesno.lower().strip().startswith('y') or yesno.strip() == '': return upgnames else: - return [] + return [] diff --git a/setup.py b/setup.py index 3724533..1e7ca4a 100755 --- a/setup.py +++ b/setup.py @@ -8,12 +8,15 @@ setup(name='pkgbuilder', version='3.1.4', description='An AUR helper (and library) in Python 3.', + keywords='arch pkgbuild', author='Kwpolska', author_email='kwpolska@kwpolska.tk', url='https://github.com/Kwpolska/pkgbuilder', license='3-clause BSD', long_description=open('./docs/README.rst').read(), platforms='Arch Linux', + zip_safe=False, + test_suite='tests', classifiers=['Development Status :: 6 - Mature', 'Environment :: Console', 'Intended Audience :: End Users/Desktop', @@ -23,6 +26,9 @@ 'Operating System :: POSIX :: Linux', 'Programming Language :: Python', 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.1', + 'Programming Language :: Python :: 3.2', + 'Programming Language :: Python :: 3.3', 'Topic :: System', 'Topic :: System :: Archiving :: Packaging', 'Topic :: Utilities'],