diff --git a/CHANGELOG.rst b/CHANGELOG.rst index feaba3d..15154a2 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,8 +5,8 @@ Appendix C. Changelog :Author: Kwpolska :Copyright: © 2011-2013, Kwpolska. :License: BSD (see /LICENSE or :doc:`Appendix B `.) -:Date: 2013-01-09 -:Version: 2.1.5.14 +:Date: 2013-03-02 +:Version: 2.1.6.0 .. index:: CHANGELOG diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 1ec35a2..db85b39 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -4,8 +4,8 @@ Appendix A. Contribution rules :Author: Kwpolska :Copyright: © 2011-2013, Kwpolska. :License: BSD (see /LICENSE or :doc:`Appendix B `.) -:Date: 2013-01-09 -:Version: 2.1.5.14 +:Date: 2013-03-02 +:Version: 2.1.6.0 .. index:: contributing diff --git a/PKGBUILD b/PKGBUILD index 225dfa7..a8ec488 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Kwpolska pkgname=pkgbuilder _pyname=pkgbuilder -pkgver=2.1.5.14 +pkgver=2.1.6.0 pkgrel=1 pkgdesc='A Python AUR helper/library.' arch=('any') @@ -10,7 +10,7 @@ license=('BSD') depends=('python' 'pyalpm>=0.5.1-1' 'python-requests') options=(!emptydirs) source=("http://pypi.python.org/packages/source/$(echo ${_pyname} | cut -c1)/${_pyname}/${_pyname}-${pkgver}.tar.gz") -md5sums=('06db7ffbaeafca25c02b1c85a74fc4f2') +md5sums=('d0c4f9eba561bab642b0bb63d103a081') package() { cd "${srcdir}/${_pyname}-${pkgver}" diff --git a/PKGBUILD-git b/PKGBUILD-git index b447326..3e67eb7 100644 --- a/PKGBUILD-git +++ b/PKGBUILD-git @@ -1,7 +1,7 @@ # Maintainer: Kwpolska pkgname=pkgbuilder-git _pyname=pkgbuilder -pkgver=20130109 +pkgver=20130302 pkgrel=1 pkgdesc='A Python AUR helper/library. Version from git.' arch=('any') diff --git a/README b/README index 77c1f62..c23dc9e 100644 --- a/README +++ b/README @@ -3,8 +3,8 @@ PKGBUILDer. An AUR helper (and library) in Python 3. ===================================================== :Info: This is the README file for PKGBUILDer. :Author: Kwpolska -:Date: 2013-01-09 -:Version: 2.1.5.14 +:Date: 2013-03-02 +:Version: 2.1.6.0 .. index: README diff --git a/README.rst b/README.rst index 77c1f62..c23dc9e 100644 --- a/README.rst +++ b/README.rst @@ -3,8 +3,8 @@ PKGBUILDer. An AUR helper (and library) in Python 3. ===================================================== :Info: This is the README file for PKGBUILDer. :Author: Kwpolska -:Date: 2013-01-09 -:Version: 2.1.5.14 +:Date: 2013-03-02 +:Version: 2.1.6.0 .. index: README diff --git a/dist/pkgbuilder-2.1.5.14.tar.gz b/dist/pkgbuilder-2.1.5.14.tar.gz deleted file mode 100644 index 1fde7cc..0000000 Binary files a/dist/pkgbuilder-2.1.5.14.tar.gz and /dev/null differ diff --git a/docs/CHANGELOG.rst b/docs/CHANGELOG.rst index feaba3d..15154a2 100644 --- a/docs/CHANGELOG.rst +++ b/docs/CHANGELOG.rst @@ -5,8 +5,8 @@ Appendix C. Changelog :Author: Kwpolska :Copyright: © 2011-2013, Kwpolska. :License: BSD (see /LICENSE or :doc:`Appendix B `.) -:Date: 2013-01-09 -:Version: 2.1.5.14 +:Date: 2013-03-02 +:Version: 2.1.6.0 .. index:: CHANGELOG diff --git a/docs/CONTRIBUTING.rst b/docs/CONTRIBUTING.rst index 1ec35a2..db85b39 100644 --- a/docs/CONTRIBUTING.rst +++ b/docs/CONTRIBUTING.rst @@ -4,8 +4,8 @@ Appendix A. Contribution rules :Author: Kwpolska :Copyright: © 2011-2013, Kwpolska. :License: BSD (see /LICENSE or :doc:`Appendix B `.) -:Date: 2013-01-09 -:Version: 2.1.5.14 +:Date: 2013-03-02 +:Version: 2.1.6.0 .. index:: contributing diff --git a/docs/LICENSE.rst b/docs/LICENSE.rst index f0fcd9a..a851f0c 100644 --- a/docs/LICENSE.rst +++ b/docs/LICENSE.rst @@ -3,8 +3,8 @@ Appendix B. License for PKGBUILDer ================================== :Info: This is the license for PKGBUILDer. :Author: Kwpolska -:Date: 2013-01-09 -:Version: 2.1.5.14 +:Date: 2013-03-02 +:Version: 2.1.6.0 .. index:: LICENSE diff --git a/docs/README.rst b/docs/README.rst index 77c1f62..c23dc9e 100644 --- a/docs/README.rst +++ b/docs/README.rst @@ -3,8 +3,8 @@ PKGBUILDer. An AUR helper (and library) in Python 3. ===================================================== :Info: This is the README file for PKGBUILDer. :Author: Kwpolska -:Date: 2013-01-09 -:Version: 2.1.5.14 +:Date: 2013-03-02 +:Version: 2.1.6.0 .. index: README diff --git a/docs/TODO.rst b/docs/TODO.rst index 23c3d07..d85b8c0 100644 --- a/docs/TODO.rst +++ b/docs/TODO.rst @@ -3,8 +3,8 @@ Appendix E. TODO for PKGBUILDer =============================== :Author: Kwpolska :Copyright: See Appendix B. -:Date: 2013-01-09 -:Version: 2.1.5.14 +:Date: 2013-03-02 +:Version: 2.1.6.0 .. index:: TODO diff --git a/docs/aur.rst b/docs/aur.rst index 206c283..3f72500 100644 --- a/docs/aur.rst +++ b/docs/aur.rst @@ -4,8 +4,8 @@ aur module (AUR class) :Author: Kwpolska :Copyright: © 2011-2013, Kwpolska. :License: BSD (see /LICENSE or :doc:`Appendix B `.) -:Date: 2013-01-09 -:Version: 2.1.5.14 +:Date: 2013-03-02 +:Version: 2.1.6.0 .. index:: AUR; RPC .. index:: RPC diff --git a/docs/build.rst b/docs/build.rst index 77d8966..4abba4d 100644 --- a/docs/build.rst +++ b/docs/build.rst @@ -4,8 +4,8 @@ build module (Build class) :Author: Kwpolska :Copyright: © 2011-2013, Kwpolska. :License: BSD (see /LICENSE or :doc:`Appendix B `.) -:Date: 2013-01-09 -:Version: 2.1.5.14 +:Date: 2013-03-02 +:Version: 2.1.6.0 .. index:: Build .. versionadded:: 2.1.0.0 diff --git a/docs/conf.py b/docs/conf.py index cd2a467..85ff197 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -50,7 +50,7 @@ # The short X.Y version. version = '2.1.5' # The full version, including alpha/beta/rc tags. -release = '2.1.5.14' +release = '2.1.6.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/main.rst b/docs/main.rst index 9fcdaea..f5150b4 100644 --- a/docs/main.rst +++ b/docs/main.rst @@ -4,8 +4,8 @@ main module :Author: Kwpolska :Copyright: © 2011-2013, Kwpolska. :License: BSD (see /LICENSE or :doc:`Appendix B `.) -:Date: 2013-01-09 -:Version: 2.1.5.14 +:Date: 2013-03-02 +:Version: 2.1.6.0 .. index:: main .. versionadded:: 2.1.3.0 diff --git a/docs/pb.8.gz b/docs/pb.8.gz index 2ba8920..5ecb687 100644 Binary files a/docs/pb.8.gz and b/docs/pb.8.gz differ diff --git a/docs/pb.rst b/docs/pb.rst index e4896a6..c5d49d7 100644 --- a/docs/pb.rst +++ b/docs/pb.rst @@ -6,8 +6,8 @@ PBWrapper :Author: Kwpolska :Copyright: © 2011-2013, Kwpolska. :License: BSD (see /LICENSE or Appendix B.) -:Date: 2013-01-09 -:Version: 2.1.5.14 +:Date: 2013-03-02 +:Version: 2.1.6.0 :Wrapper Version: 0.2.2 :Manual section: 8 :Manual group: PKGBUILDer manual diff --git a/docs/pbds.rst b/docs/pbds.rst index 282d897..50d739e 100644 --- a/docs/pbds.rst +++ b/docs/pbds.rst @@ -5,8 +5,8 @@ pbds module (PBDS class) :Author: Kwpolska :Copyright: © 2011-2013, Kwpolska. :License: BSD (see /LICENSE or :doc:`Appendix B `.) -:Date: 2013-01-09 -:Version: 2.1.5.14 +:Date: 2013-03-02 +:Version: 2.1.6.0 .. module: pbds diff --git a/docs/pkgbuilder.8.gz b/docs/pkgbuilder.8.gz index 60a56f6..081319f 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 269c09a..4997aee 100644 --- a/docs/pkgbuilder.rst +++ b/docs/pkgbuilder.rst @@ -6,8 +6,8 @@ PKGBUILDer :Author: Kwpolska :Copyright: © 2011-2013, Kwpolska. :License: BSD (see /LICENSE or Appendix B.) -:Date: 2013-01-09 -:Version: 2.1.5.14 +:Date: 2013-03-02 +:Version: 2.1.6.0 :Manual section: 8 :Manual group: PKGBUILDer manual diff --git a/docs/sample-scripts.rst b/docs/sample-scripts.rst index 257bb44..490022c 100644 --- a/docs/sample-scripts.rst +++ b/docs/sample-scripts.rst @@ -4,8 +4,8 @@ PKGBUILDer Sample Scripts :Author: Kwpolska :Copyright: © 2011-2013, Kwpolska. :License: BSD (see /LICENSE or :doc:`Appendix B `.) -:Date: 2013-01-09 -:Version: 2.1.5.14 +:Date: 2013-03-02 +:Version: 2.1.6.0 .. index:: sample scripts diff --git a/docs/upgrade.rst b/docs/upgrade.rst index 7207835..13432c4 100644 --- a/docs/upgrade.rst +++ b/docs/upgrade.rst @@ -5,8 +5,8 @@ upgrade module (Upgrade class) :Author: Kwpolska :Copyright: © 2011-2013, Kwpolska. :License: BSD (see /LICENSE or :doc:`Appendix B `.) -:Date: 2013-01-09 -:Version: 2.1.5.14 +:Date: 2013-03-02 +:Version: 2.1.6.0 .. index:: Upgrade .. index:: Syu diff --git a/docs/utils.rst b/docs/utils.rst index c853b79..9d2adfc 100644 --- a/docs/utils.rst +++ b/docs/utils.rst @@ -5,8 +5,8 @@ utils module (Utils class) :Author: Kwpolska :Copyright: © 2011-2013, Kwpolska. :License: BSD (see /LICENSE or :doc:`Appendix B `.) -:Date: 2013-01-09 -:Version: 2.1.5.14 +:Date: 2013-03-02 +:Version: 2.1.6.0 .. index:: Utils .. automodule:: pkgbuilder.utils diff --git a/docs/wrapper.rst b/docs/wrapper.rst index 1f73f5a..4c86736 100644 --- a/docs/wrapper.rst +++ b/docs/wrapper.rst @@ -4,8 +4,8 @@ PBWrapper :Author: Kwpolska :Copyright: © 2011-2013, Kwpolska. :License: BSD (see /LICENSE or :doc:`Appendix B `.) -:Date: 2013-01-09 -:Version: 2.1.5.14 +:Date: 2013-03-02 +:Version: 2.1.6.0 :PBWrapper Version: 0.2.2 .. index:: wrapper diff --git a/locale/en/LC_MESSAGES/pkgbuilder.mo b/locale/en/LC_MESSAGES/pkgbuilder.mo index 2a35296..40e1413 100644 Binary files a/locale/en/LC_MESSAGES/pkgbuilder.mo and b/locale/en/LC_MESSAGES/pkgbuilder.mo differ diff --git a/locale/en/LC_MESSAGES/pkgbuilder.po b/locale/en/LC_MESSAGES/pkgbuilder.po index f3117ce..a3d4e86 100644 --- a/locale/en/LC_MESSAGES/pkgbuilder.po +++ b/locale/en/LC_MESSAGES/pkgbuilder.po @@ -5,9 +5,9 @@ # msgid "" msgstr "" -"Project-Id-Version: 2.1.5.14\n" +"Project-Id-Version: 2.1.6.0\n" "Report-Msgid-Bugs-To: Kwpolska \n" -"POT-Creation-Date: 2013-01-09 18:30+0100\n" +"POT-Creation-Date: 2013-03-02 20:21+0100\n" "PO-Revision-Date: 2013-09-08 12:44+0100\n" "Last-Translator: Kwpolska \n" "Language-Team: Kwpolska \n" @@ -256,7 +256,7 @@ msgstr "Aborted by user! Exiting..." msgid "Interrupt signal received\n" msgstr "Interrupt signal received\n" -#: pkgbuilder/pbds.py:90 pkgbuilder/pbds.py:206 +#: pkgbuilder/pbds.py:90 pkgbuilder/pbds.py:230 msgid "ERROR:" msgstr "ERROR:" @@ -264,7 +264,7 @@ msgstr "ERROR:" msgid "Cannot create the configuration directory." msgstr "Cannot create the configuration directory." -#: pkgbuilder/pbds.py:92 pkgbuilder/pbds.py:192 +#: pkgbuilder/pbds.py:92 pkgbuilder/pbds.py:216 msgid "WARNING:" msgstr "WARNING:" @@ -288,11 +288,23 @@ msgstr "{}: local ({}) is newer than aur ({})" msgid "there is nothing to do" msgstr "there is nothing to do" -#: pkgbuilder/upgrade.py:157 pkgbuilder/upgrade.py:177 +#: pkgbuilder/upgrade.py:164 pkgbuilder/upgrade.py:228 msgid "Targets ({}): " msgstr "Targets ({}): " -#: pkgbuilder/upgrade.py:175 pkgbuilder/upgrade.py:181 +#: pkgbuilder/upgrade.py:180 +msgid "Name" +msgstr "Name" + +#: pkgbuilder/upgrade.py:180 +msgid "Old Version" +msgstr "Old Version" + +#: pkgbuilder/upgrade.py:180 +msgid "New Version" +msgstr "New Version" + +#: pkgbuilder/upgrade.py:226 pkgbuilder/upgrade.py:232 msgid "Proceed with installation? [Y/n] " msgstr "Proceed with installation? [Y/n] " @@ -360,7 +372,7 @@ msgid "%(prog)s [...]" msgstr "%(prog)s [...]" #. TRANSLATORS: see pacman’s localizations -#: pkgbuilder/wrapper.py:268 +#: pkgbuilder/wrapper.py:267 msgid "" "usage: {} [...]\n" "\n" diff --git a/locale/ja/LC_MESSAGES/pkgbuilder.mo b/locale/ja/LC_MESSAGES/pkgbuilder.mo index e1941d0..bafc412 100644 Binary files a/locale/ja/LC_MESSAGES/pkgbuilder.mo and b/locale/ja/LC_MESSAGES/pkgbuilder.mo differ diff --git a/locale/ja/LC_MESSAGES/pkgbuilder.po b/locale/ja/LC_MESSAGES/pkgbuilder.po index 875f41d..ce9099f 100644 --- a/locale/ja/LC_MESSAGES/pkgbuilder.po +++ b/locale/ja/LC_MESSAGES/pkgbuilder.po @@ -5,9 +5,9 @@ # msgid "" msgstr "" -"Project-Id-Version: 2.1.5.14\n" +"Project-Id-Version: 2.1.6.0\n" "Report-Msgid-Bugs-To: Kwpolska \n" -"POT-Creation-Date: 2013-01-09 18:30+0100\n" +"POT-Creation-Date: 2013-03-02 20:21+0100\n" "PO-Revision-Date: 2013-09-21 20:21+0200\n" "Last-Translator: Colin Woodbury \n" "Language-Team: Colin Woodbury \n" @@ -92,7 +92,7 @@ msgstr "パッケージ「{}」は見つからなかった。" msgid "Building {}..." msgstr "「{}」を作成中・・・" -#: pkgbuilder/build.py:264 +#: pkgbuilder/build.py:263 msgid "Synchronizing the ABS tree..." msgstr "パッケージデーターベースを同期中・・・" @@ -254,7 +254,7 @@ msgstr "ユーザーによる強制終了!" msgid "Interrupt signal received\n" msgstr "途中切断\n" -#: pkgbuilder/pbds.py:90 pkgbuilder/pbds.py:206 +#: pkgbuilder/pbds.py:90 pkgbuilder/pbds.py:230 msgid "ERROR:" msgstr "エラー:" @@ -262,7 +262,7 @@ msgstr "エラー:" msgid "Cannot create the configuration directory." msgstr "設定ディレクトリ作れなかった。" -#: pkgbuilder/pbds.py:92 pkgbuilder/pbds.py:192 +#: pkgbuilder/pbds.py:92 pkgbuilder/pbds.py:216 msgid "WARNING:" msgstr "警告:" @@ -286,11 +286,23 @@ msgstr "{}: ローカル「{}」はAURの「{}」より最新" msgid "there is nothing to do" msgstr "することがない" -#: pkgbuilder/upgrade.py:157 pkgbuilder/upgrade.py:177 +#: pkgbuilder/upgrade.py:164 pkgbuilder/upgrade.py:228 msgid "Targets ({}): " msgstr "「{}」の該当パッケージ:" -#: pkgbuilder/upgrade.py:175 pkgbuilder/upgrade.py:181 +#: pkgbuilder/upgrade.py:180 +msgid "Name" +msgstr "" + +#: pkgbuilder/upgrade.py:180 +msgid "Old Version" +msgstr "" + +#: pkgbuilder/upgrade.py:180 +msgid "New Version" +msgstr "" + +#: pkgbuilder/upgrade.py:226 pkgbuilder/upgrade.py:232 msgid "Proceed with installation? [Y/n] " msgstr "続行? [Y/n]" @@ -358,7 +370,7 @@ msgid "%(prog)s [...]" msgstr "%(prog)s <選択肢> [...]" #. TRANSLATORS: see pacman’s localizations -#: pkgbuilder/wrapper.py:268 +#: pkgbuilder/wrapper.py:267 msgid "" "usage: {} [...]\n" "\n" diff --git a/locale/pl/LC_MESSAGES/pkgbuilder.mo b/locale/pl/LC_MESSAGES/pkgbuilder.mo index 6336156..40c75c4 100644 Binary files a/locale/pl/LC_MESSAGES/pkgbuilder.mo and b/locale/pl/LC_MESSAGES/pkgbuilder.mo differ diff --git a/locale/pl/LC_MESSAGES/pkgbuilder.po b/locale/pl/LC_MESSAGES/pkgbuilder.po index 57d200c..35a8477 100644 --- a/locale/pl/LC_MESSAGES/pkgbuilder.po +++ b/locale/pl/LC_MESSAGES/pkgbuilder.po @@ -5,9 +5,9 @@ # msgid "" msgstr "" -"Project-Id-Version: 2.1.5.14\n" +"Project-Id-Version: 2.1.6.0\n" "Report-Msgid-Bugs-To: Kwpolska \n" -"POT-Creation-Date: 2013-01-09 18:30+0100\n" +"POT-Creation-Date: 2013-03-02 20:21+0100\n" "PO-Revision-Date: 2013-09-08 12:44+0100\n" "Last-Translator: Kwpolska \n" "Language-Team: Kwpolska \n" @@ -258,7 +258,7 @@ msgstr "Przerwane przez użytkownika! Kończenie..." msgid "Interrupt signal received\n" msgstr "Interrupt signal received\n" -#: pkgbuilder/pbds.py:90 pkgbuilder/pbds.py:206 +#: pkgbuilder/pbds.py:90 pkgbuilder/pbds.py:230 msgid "ERROR:" msgstr "BŁĄD:" @@ -266,7 +266,7 @@ msgstr "BŁĄD:" msgid "Cannot create the configuration directory." msgstr "Nie można utworzyć katalogu konfiguracji." -#: pkgbuilder/pbds.py:92 pkgbuilder/pbds.py:192 +#: pkgbuilder/pbds.py:92 pkgbuilder/pbds.py:216 msgid "WARNING:" msgstr "UWAGA:" @@ -290,11 +290,23 @@ msgstr "{}: local ({}) jest nowsze niż aur ({})" msgid "there is nothing to do" msgstr "nie ma nic do zrobienia" -#: pkgbuilder/upgrade.py:157 pkgbuilder/upgrade.py:177 +#: pkgbuilder/upgrade.py:164 pkgbuilder/upgrade.py:228 msgid "Targets ({}): " msgstr "Cele ({}):" -#: pkgbuilder/upgrade.py:175 pkgbuilder/upgrade.py:181 +#: pkgbuilder/upgrade.py:180 +msgid "Name" +msgstr "Nazwa" + +#: pkgbuilder/upgrade.py:180 +msgid "Old Version" +msgstr "Poprzednia wersja" + +#: pkgbuilder/upgrade.py:180 +msgid "New Version" +msgstr "Nowa wersja" + +#: pkgbuilder/upgrade.py:226 pkgbuilder/upgrade.py:232 msgid "Proceed with installation? [Y/n] " msgstr "Kontynuować instalację? [Y/n] " @@ -362,7 +374,7 @@ msgid "%(prog)s [...]" msgstr "%(prog)s [...]" #. TRANSLATORS: see pacman’s localizations -#: pkgbuilder/wrapper.py:268 +#: pkgbuilder/wrapper.py:267 msgid "" "usage: {} [...]\n" "\n" diff --git a/messages.pot b/messages.pot index 1635075..a29d881 100644 --- a/messages.pot +++ b/messages.pot @@ -5,10 +5,10 @@ # msgid "" msgstr "" -"Project-Id-Version: 2.1.5.14\n" +"Project-Id-Version: 2.1.6.0\n" "Report-Msgid-Bugs-To: Kwpolska \n" -"POT-Creation-Date: 2013-01-09 18:30+0100\n" -"PO-Revision-Date: 2013-01-09 18:30+0100\n" +"POT-Creation-Date: 2013-03-02 20:21+0100\n" +"PO-Revision-Date: 2013-03-02 20:21+0100\n" "Last-Translator: Kwpolska \n" "Language-Team: Kwpolska \n" "Language: en\n" @@ -254,7 +254,7 @@ msgstr "" msgid "Interrupt signal received\n" msgstr "" -#: pkgbuilder/pbds.py:90 pkgbuilder/pbds.py:206 +#: pkgbuilder/pbds.py:90 pkgbuilder/pbds.py:230 msgid "ERROR:" msgstr "" @@ -262,7 +262,7 @@ msgstr "" msgid "Cannot create the configuration directory." msgstr "" -#: pkgbuilder/pbds.py:92 pkgbuilder/pbds.py:192 +#: pkgbuilder/pbds.py:92 pkgbuilder/pbds.py:216 msgid "WARNING:" msgstr "" @@ -286,11 +286,23 @@ msgstr "" msgid "there is nothing to do" msgstr "" -#: pkgbuilder/upgrade.py:157 pkgbuilder/upgrade.py:177 +#: pkgbuilder/upgrade.py:164 pkgbuilder/upgrade.py:228 msgid "Targets ({}): " msgstr "" -#: pkgbuilder/upgrade.py:175 pkgbuilder/upgrade.py:181 +#: pkgbuilder/upgrade.py:180 +msgid "Name" +msgstr "" + +#: pkgbuilder/upgrade.py:180 +msgid "Old Version" +msgstr "" + +#: pkgbuilder/upgrade.py:180 +msgid "New Version" +msgstr "" + +#: pkgbuilder/upgrade.py:226 pkgbuilder/upgrade.py:232 msgid "Proceed with installation? [Y/n] " msgstr "" @@ -346,7 +358,7 @@ msgid "%(prog)s [...]" msgstr "" #. TRANSLATORS: see pacman’s localizations -#: pkgbuilder/wrapper.py:268 +#: pkgbuilder/wrapper.py:267 msgid "" "usage: {} [...]\n" "\n" diff --git a/pkgbuilder/__init__.py b/pkgbuilder/__init__.py index 5d068ae..6e5d9a6 100755 --- a/pkgbuilder/__init__.py +++ b/pkgbuilder/__init__.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 # -*- encoding: utf-8 -*- -# PKGBUILDer v2.1.5.14 +# PKGBUILDer v2.1.6.0 # An AUR helper (and library) in Python 3. # Copyright © 2011-2013, Kwpolska. # All rights reserved. @@ -44,7 +44,7 @@ """ __title__ = 'PKGBUILDer' -__version__ = '2.1.5.14' +__version__ = '2.1.6.0' __author__ = 'Kwpolska' __license__ = '3-clause BSD' __docformat__ = 'restructuredtext en' diff --git a/pkgbuilder/aur.py b/pkgbuilder/aur.py index a9e9a20..8fb833b 100755 --- a/pkgbuilder/aur.py +++ b/pkgbuilder/aur.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 # -*- encoding: utf-8 -*- -# PKGBUILDer v2.1.5.14 +# PKGBUILDer v2.1.6.0 # An AUR helper (and library) in Python 3. # Copyright © 2011-2013, Kwpolska. # See /LICENSE for licensing information. diff --git a/pkgbuilder/build.py b/pkgbuilder/build.py index 9929c58..1db7f24 100755 --- a/pkgbuilder/build.py +++ b/pkgbuilder/build.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 # -*- encoding: utf-8 -*- -# PKGBUILDer v2.1.5.14 +# PKGBUILDer v2.1.6.0 # An AUR helper (and library) in Python 3. # Copyright © 2011-2013, Kwpolska. # See /LICENSE for licensing information. @@ -261,16 +261,18 @@ def build_runner(self, pkgname, performdepcheck=True, sys.stdout.write(DS.colors['all_off']) if useabs: DS.fancy_msg(_('Synchronizing the ABS tree...')) - rsync = ['rsync', '-mrtv', '--no-motd', '--delete-after', - '--no-p', '--no-o', '--no-g', - '--include=/{}'.format(pkg['Category']), - '--include=/{}/{}'.format(pkg['Category'], - pkg['Name']), - '--exclude=/{}/*'.format(pkg['Category']), - '--exclude=/*', - 'rsync.archlinux.org::abs/{}/'.format(pkg['Arch']), - '.'] - rstatus = subprocess.call(rsync) + rstatus = DS.run_command('rsync', '-mrtv', '--no-motd', + '--delete-after', '--no-p', '--no-o', + '--no-g', + '--include=/{}'.format( + pkg['Category']), + '--include=/{}/{}'.format( + pkg['Category'], pkg['Name']), + '--exclude=/{}/*'.format( + pkg['Category']), + '--exclude=/*', + 'rsync.archlinux.org::abs/{}/'.format( + pkg['Arch']), '.') if rstatus > 0: raise PBError(_('Failed to synchronize the ABS tree.')) diff --git a/pkgbuilder/main.py b/pkgbuilder/main.py index 3a1e6d3..3f356b5 100755 --- a/pkgbuilder/main.py +++ b/pkgbuilder/main.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 # -*- encoding: utf-8 -*- -# PKGBUILDer v2.1.5.14 +# PKGBUILDer v2.1.6.0 # An AUR helper (and library) in Python 3. # Copyright © 2011-2013, Kwpolska. # See /LICENSE for licensing information. diff --git a/pkgbuilder/pbds.py b/pkgbuilder/pbds.py index f97be0d..f8b72be 100755 --- a/pkgbuilder/pbds.py +++ b/pkgbuilder/pbds.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 # -*- encoding: utf-8 -*- -# PKGBUILDer v2.1.5.14 +# PKGBUILDer v2.1.6.0 # An AUR helper (and library) in Python 3. # Copyright © 2011-2013, Kwpolska. # See /LICENSE for licensing information. @@ -98,36 +98,56 @@ class PBDS(): log = logging.getLogger('pkgbuilder') log.info('*** PKGBUILDer v' + __version__) - def sudo(self, *rargs): + def run_command(self, *rargs, **kwargs): """ - Run as root. ``sudo`` if present, ``su -c`` otherwise, nothing if - already running as root. + Run a command. - .. note:: Accepts only one command. `shell=False`, for safety. + .. note:: Accepts only one command. ``shell=False``, for safety. + asonearg is for ``su -c`` and most people don’t need nor want it. ``*rargs`` is catching all the arguments. However, in order to make sure that nothing breaks, it checks if the element is a list or a - tuple. If yes, it is appended to the argument list (Python’s ``+`` - operator); if not, it is split on spaces (``.split(' ')``) and - appended to the argument list. Finally, the list is passed to - ``subprocess.call``. + tuple. If yes, it becomes the argument list; if not, the argument list + is ``*rargs`` split on spaces (``.split(' ')``). Finally, the list is + passed to ``subprocess.call``. """ args = [] + if 'prepend' not in kwargs: + prepend = [] + else: + prepend = kwargs['prepend'] + + if 'asonearg' not in kwargs: + asonearg = False + else: + asonearg = kwargs['asonearg'] + for i in rargs: if type(i) == list or type(i) == tuple: - for j in i: - args.append(j) + args += i else: - for j in i.split(' '): - args.append(j) + args += [j for j in i.split(' ')] + if asonearg: + return subprocess.call(prepend + [' '.join(args)]) + else: + return subprocess.call(prepend + args) + + def sudo(self, *args): + """ + Run as root. ``sudo`` if present, ``su -c`` otherwise, nothing if + already running as root. + + .. note:: Accepts only one command. `shell=False`, for safety. + """ if self.uid != 0: if self.hassudo: - subprocess.call(['sudo'] + args) + return self.run_command(*args, prepend=['sudo']) else: - subprocess.call('su -c "{}"'.format(' '.join(args))) + return self.run_command(*args, prepend=['su', '-c'], + asonearg=True) else: - subprocess.call(args) + return subprocess.call(args) def debugmode(self, nochange=False): """Print all the logged messages to stderr.""" diff --git a/pkgbuilder/upgrade.py b/pkgbuilder/upgrade.py index 439674f..b69353b 100755 --- a/pkgbuilder/upgrade.py +++ b/pkgbuilder/upgrade.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 # -*- encoding: utf-8 -*- -# PKGBUILDer v2.1.5.14 +# PKGBUILDer v2.1.6.0 # An AUR helper (and library) in Python 3. # Copyright © 2011-2013, Kwpolska. # See /LICENSE for licensing information. @@ -152,25 +152,76 @@ def auto_upgrade(self, downgrade=False, vcsup=False): upgnames = [i[0] for i in upgradable] upgstrings = [i[0] + '-' + i[2] for i in upgradable] + verbosepkglists = False + with open('/etc/pacman.conf') as fh: + for i in fh.read().split('\n'): + if i.strip() == 'VerbosePkgLists': + verbosepkglists = True + break + if upglen > 0: if DS.pacman: targetstring = _('Targets ({}): ').format(upglen) + size = subprocess.check_output(['stty', 'size']) try: termwidth = int(size.split()[1]) except IndexError: - termwidth = 9001 # Auto-wrap by terminal. A reference to - # an old meme and a cheat, too. Sorry. - - nowrap = targetstring + ' '.join(upgstrings) - wrapv = textwrap.wrap(nowrap, termwidth) - wrap0 = wrapv[0] - wraprest = textwrap.wrap('\n'.join(wrapv[1:]), - termwidth - len(targetstring)) - wraprest = [i.replace(' ', ' ').replace(' ', ' ') for i in wraprest] - print(wrap0) - for i in wraprest: - print(len(targetstring) * ' ' + i) + if verbosepkglists: + # Pacman doesn’t allow tables if the terminal is too + # small. And since we don’t know the size, better + # safe than sorry. + verbosepkglists = False + DS.log.warning('VerbosePkgLists disabled, cannot ' + 'determine terminal width') + else: + termwidth = 9001 # Auto-wrap by terminal. + if verbosepkglists: + headers = [_('Name'), _('Old Version'), _('New Version')] + items = upgradable # Magical. + + sizes = [len(i) for i in headers] + + for n, ov, nv in items: + if len(n) > sizes[0]: + sizes[0] = len(n) + + if len(ov) > sizes[1]: + sizes[1] = len(ov) + + if len(nv) > sizes[2]: + sizes[2] = len(nv) + + fstring = ('{{i[0]:<{s[0]}}} {{i[1]:<{s[1]}}} ' + '{{i[2]:<{s[2]}}}').format(s=sizes) + + if len(fstring.format(i=4 * ['n'])) > termwidth: + verbosepkglists = False + DS.log.warning('VerbosePkgLists disabled, terminal ' + 'is not wide enough') + else: + print('\n{0}\n'.format(targetstring.strip())) + print(fstring.format(i=headers), end='\n\n') # NOQA + + for i in items: + print(fstring.format(i=i)) + + # Not using else because there is a fallback if the terminal + # is too small. + if not verbosepkglists: + nowrap = targetstring + ' '.join(upgstrings) + wrapv = textwrap.wrap(nowrap, termwidth, + break_on_hyphens=False) + wrap0 = wrapv[0] + wraprest = textwrap.wrap('\n'.join(wrapv[1:]), termwidth - + len(targetstring), + break_on_hyphens=False) + wraprest = [i.replace(' ', ' ').replace(' ', ' ') for i + in wraprest] + print(wrap0) + for i in wraprest: + print(len(targetstring) * ' ' + i) + print() query = _('Proceed with installation? [Y/n] ') else: diff --git a/pkgbuilder/utils.py b/pkgbuilder/utils.py index 87a2415..7067f32 100755 --- a/pkgbuilder/utils.py +++ b/pkgbuilder/utils.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 # -*- encoding: utf-8 -*- -# PKGBUILDer v2.1.5.14 +# PKGBUILDer v2.1.6.0 # An AUR helper (and library) in Python 3. # Copyright © 2011-2013, Kwpolska. # See /LICENSE for licensing information. diff --git a/pkgbuilder/wrapper.py b/pkgbuilder/wrapper.py index 9ece135..e79e307 100755 --- a/pkgbuilder/wrapper.py +++ b/pkgbuilder/wrapper.py @@ -1,7 +1,7 @@ #!/usr/bin/python3 # -*- encoding: utf-8 -*- # PBWrapper v0.2.2 -# PKGBUILDer v2.1.5.14 +# PKGBUILDer v2.1.6.0 # An AUR helper (and library) in Python 3. # Copyright © 2011-2013, Kwpolska. # See /LICENSE for licensing information. @@ -205,7 +205,7 @@ def wrapper(source='AUTO'): log.debug('Got -s.') if args.pkgnames: log.info('Running pacman.') - subprocess.call([DS.paccommand] + pacargs + pkgnames) + DS.run_command(DS.paccommand, pacargs, pkgnames) log.info('Running pkgbuilder (pkgbuilder.main.main()).') main(pbargs + pkgnames) else: @@ -215,7 +215,7 @@ def wrapper(source='AUTO'): elif args.l or args.list: log.debug('Got -l.') log.info('Running pacman.') - subprocess.call([DS.paccommand] + pacargs + pkgnames) + DS.run_command(DS.paccommand, pacargs, pkgnames) exit() elif args.u or args.sysupgrade: log.debug('Got -u.') @@ -289,5 +289,7 @@ def wrapper(source='AUTO'): pass else: print('Please don’t use the reserved UTshibboleet argument.') + elif ('-Q' in argst) or ('--query' in argst): + DS.run_command(DS.paccommand, argst) else: DS.sudo(DS.paccommand, argst) diff --git a/setup.py b/setup.py index 23bdad1..2e5e12f 100755 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ from distutils.core import setup setup(name='pkgbuilder', - version='2.1.5.14', + version='2.1.6.0', description='An AUR helper (and library) in Python 3.', author='Kwpolska', author_email='kwpolska@kwpolska.tk', diff --git a/tests.py b/tests.py index d1f8a6e..11ebb11 100755 --- a/tests.py +++ b/tests.py @@ -222,14 +222,14 @@ def test_wrapper(self): pkgbuilder.wrapper.wrapper(['unittests', 'UTshibboleet']) def test_pb_help(self): - """Make sure "pb --help" works""" + """Make sure ``pb --help`` works""" import sys from io import StringIO capture = StringIO() stdout = sys.stdout try: sys.stdout = capture - pkgbuilder.wrapper.wrapper(("--help")) + pkgbuilder.wrapper.wrapper('--help') finally: sys.stdout = stdout @@ -237,12 +237,12 @@ def test_pb_help(self): self.assertTrue(capture.getvalue()) def test_call_pacman(self): - """Make sure "pb" command can call Pacman""" + """Make sure ``pb`` command can call pacman""" pacman = pkgbuilder.DS.paccommand try: - pkgbuilder.DS.paccommand = "true" - pkgbuilder.wrapper.wrapper(["dummy-pacman-argument"]) + pkgbuilder.DS.paccommand = 'true' + pkgbuilder.wrapper.wrapper('-Qh') finally: pkgbuilder.DS.paccommand = pacman