diff --git a/.gitignore b/.gitignore index 65b9bb69..e3b020ca 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ __pycache__ .pipy *.egg-info/ +/slpkg_Build diff --git a/CHANGELOG b/CHANGELOG index 63f1fa82..02bb90e8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,12 +1,13 @@ 17-08-2014 Version 1.7.4 -[Feature] - Added downloaded .asc files with packages to upgrade from - Slackware patches directory. +[Updated] - Bugfix NameError: global name 'getpass' is not defined + +[Feature] - Added downloaded .asc files to upgrade or install + packages from Slackware tree. Added calculate file sizes in the process of installing packages or upgrading from Slackware mirrors - 16-8-2014 Verion 1.7.3 diff --git a/CONTRIBUTING b/CONTRIBUTING new file mode 100644 index 00000000..e5794032 --- /dev/null +++ b/CONTRIBUTING @@ -0,0 +1,12 @@ +Contributions are very much appreciated !!! + +Pull requests should be based on and submitted to the "develop" branch + +It would be preferable to have a basic knowledge about the distribution Slackware, +as important how a package is build. + +Small changes in the code each time more appreciated. +Keep the style code applicable items. + +Please ensure your changes work in Python 2.7.5+ +Python3 not support yet. diff --git a/INSTALL b/INSTALL new file mode 100644 index 00000000..2c9b1510 --- /dev/null +++ b/INSTALL @@ -0,0 +1,45 @@ +Installation +============ + + +Python & OS Support +------------------- + +slpkg works with Python versions 2.7.5+ +slpkg works on Slackware stable distribution. + +Slackware current not support yet. + +Install slpkg +------------- + +There are mainly four ways: + +1) Using the SlackBuild script in the directory slpkg-?.?.?/slackbuild. + + Untar the archive `tar xvf slpkg-?.?.?.tar.gz` + + Copy the source tar archive `cp slpkg-?.?.?.tar.gz slpkg-?.?.?/slackbuild`, + change directory `cd slpkg-?.?.?/slackbuild`, fix the version if need in + SlackBuild.slpkg give execution permissions to script `chmod +x SlackBuild.slpkg` + and run as root ./SlackBuild.slpkg. + + SlackBuild package created so install package with `upgradepkg --install-new + /tmp/slpkg-?.?.?-x86_64-1_dsw.tgz` (x86_64 for Slackware64). + +2) Using pip: + + `pip install slpkg` or upgrade `pip install --upgrade slpkg` + +3) Download slpkg package from slackbuilds.org and run the first procedure described above. + +4) Download binary package from sourceforge: + + https://sourceforge.net/projects/slpkg/ + + +Proposed mode if you want to have installed the most updated version is 1 and 2 +process. + + + diff --git a/ISSUES b/ISSUES new file mode 100644 index 00000000..a5471b38 --- /dev/null +++ b/ISSUES @@ -0,0 +1,3 @@ +Please report issues: + +https://github.com/dslackw/slpkg/issues diff --git a/PKG-INFO b/PKG-INFO index f22e642d..a7330123 100644 --- a/PKG-INFO +++ b/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: slpkg -Version: 1.7.3 +Version: 1.7.4 Author: dslackw Author-email: d zlatanidis at gmail com Maintainer: dslackw diff --git a/README.rst b/README.rst index 0d473a18..21e2448f 100644 --- a/README.rst +++ b/README.rst @@ -143,6 +143,9 @@ download and install: Reading package lists.............................. Done + Need to get 6.02 Mb of archives. + After this process, 15.72 Mb of additional disk space will be used. + [ install ] --> mozilla-firefox-24.1.0esr-x86_64-1 [ install ] --> mozilla-nss-3.15.2-x86_64-2 [ install ] --> mozilla-thunderbird-24.1.0-x86_64-1 @@ -192,7 +195,7 @@ Check if your packages is up to date from slackbuilds.org: $ slpkg -c sbo ranger Reading package lists. Done - Package 'ranger-1.6.1' is up to date + Package ranger-1.6.1 is up to date $ slpkg -c sbo termcolor Reading package lists. Done @@ -213,6 +216,9 @@ Check if your distribution is up to date from `Slackware official mirrors [ upgrade ] --> samba-4.1.11-x86_64-1_slack14.1.txz [ upgrade ] --> xscreensaver-5.29-x86_64-1_slack14.1.txz + Need to get 1.70 Mb of archives. + After this process, 9.51 Mb of additional disk space will be used. + Would you like to upgrade [Y/y]? Find packages from slackbuilds.org: diff --git a/THANKS b/THANKS new file mode 100644 index 00000000..58419fde --- /dev/null +++ b/THANKS @@ -0,0 +1,10 @@ +I want to Thank: + +Dave Reese - https://github.com/wvragga + + For your interest in the project and the small changes in the code. + +Willy Sudiarto Raharjo - https://github.com/willysr + + For the interesting and valuable advice around the systems of Slackware + and SBo packages. diff --git a/requirements.txt b/requirements.txt index b064aa8f..aae56963 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,10 +1,5 @@ # Python 2.7.5 -# Slackware current (not support installing & upgrading via Slackware mirror - because slpkg look /etc/slackware-version file to grep - version and select mirror. - Please don't use slpkg -s slackpkg - & slpkg -c slack upgrade. Expected a solution in a short - time) +# Slackware current (not supported yet) # Slackware # Slackware 64 # No other Python packages needed diff --git a/slackbuild/slpkg.SlackBuild b/slackbuild/slpkg.SlackBuild index a8af573f..bdfe1e9f 100755 --- a/slackbuild/slpkg.SlackBuild +++ b/slackbuild/slpkg.SlackBuild @@ -23,11 +23,18 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=slpkg -VERSION=${VERSION:-1.7.3} +VERSION=${VERSION:-1.7.4} BUILD=${BUILD:-1} TAG=${TAG:-_dsw} -ARCH="noarch" +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + CWD=$(pwd) TMP=${TMP:-/tmp/SBo} diff --git a/slackbuild/slpkg.info b/slackbuild/slpkg.info index 9c8f3531..18f23ea1 100644 --- a/slackbuild/slpkg.info +++ b/slackbuild/slpkg.info @@ -1,7 +1,7 @@ PRGNAM="slpkg" -VERSION="1.7.3" +VERSION="1.7.4" HOMEPAGE="https://github.com/dslackw/slpkg" -DOWNLOAD="https://github.com/dslackw/slpkg/archive/v1.7.3.tar.gz" +DOWNLOAD="https://github.com/dslackw/slpkg/archive/v1.7.4.tar.gz" MD5SUM="" DOWNLOAD_x86_64="" MD5SUM_x86_64="" diff --git a/slpkg/__metadata__.py b/slpkg/__metadata__.py index 855524f0..8a5e127d 100644 --- a/slpkg/__metadata__.py +++ b/slpkg/__metadata__.py @@ -26,7 +26,7 @@ import subprocess __all__ = "slpkg" __author__ = "dslackw" -__version_info__ = (1, 7, 3) +__version_info__ = (1, 7, 4) __version__ = "{0}.{1}.{2}".format(*__version_info__) __license__ = "GNU General Public License v3 (GPLv3)" __email__ = "d.zlatanidis@gmail.com" diff --git a/slpkg/sbo/views.py b/slpkg/sbo/views.py index 5e8a763b..30140501 100755 --- a/slpkg/sbo/views.py +++ b/slpkg/sbo/views.py @@ -94,7 +94,6 @@ def sbo_network(name): subprocess.call("less {0}{1}{2}".format(rdm_path, name, site), shell=True) os.remove("{0}{1}{2}".format(rdm_path, name, site)) elif read == "B" or read == "b": - s_user(getpass.getuser()) os.chdir(build_path) script = get_file(sbo_dwn, "/") source = get_file(source_dwn, "/") @@ -108,7 +107,6 @@ def sbo_network(name): build_package(script, source, extra, build_path) break elif read == "I" or read == "i": - s_user(getpass.getuser()) os.chdir(build_path) pkg_for_install = ("{0}-{1}".format(name, sbo_version)) if find_package(name + sp, pkg_path) == []: diff --git a/slpkg/slack/install.py b/slpkg/slack/install.py index 08370ffc..674650ba 100755 --- a/slpkg/slack/install.py +++ b/slpkg/slack/install.py @@ -123,8 +123,8 @@ def install(slack_pkg): if uncompressed < 1: uncompressed = sum(map(int, uncomp_sum)) uncomp_unit = "Kb" - print("\nNeed to get {0} {1} of archives".format(compressed, comp_unit)) - print("After this process, {0} {1} of additional disk space will be used".format( + print("\nNeed to get {0} {1} of archives.".format(compressed, comp_unit)) + print("After this process, {0} {1} of additional disk space will be used.".format( uncompressed, uncomp_unit)) read = raw_input("\nWould you like to install [Y/n]? ") if read == "Y" or read == "y": diff --git a/slpkg/slack/patches.py b/slpkg/slack/patches.py index ba568cac..5dd56a36 100755 --- a/slpkg/slack/patches.py +++ b/slpkg/slack/patches.py @@ -44,7 +44,7 @@ def patches(): try: dwn_list, dwn_patches, comp_size, uncomp_size = [], [], [], [] upgrade_all, package_name, package_location = [], [], [] - comp_list, uncomp_list, comp_sum, uncomp_sum = [], [], [], [] + comp_list, uncomp_list, comp_sum, uncomp_sum = [], [], [], [] pch_path = slpkg_tmp + "patches/" if not os.path.exists(pch_path): if not os.path.exists(slpkg_tmp): @@ -119,8 +119,8 @@ def patches(): if uncompressed < 1: uncompressed = sum(map(int, uncomp_sum)) uncomp_unit = "Kb" - print("\nNeed to get {0} {1} of archives".format(compressed, comp_unit)) - print("After this process, {0} {1} of additional disk space will be used".format( + print("\nNeed to get {0} {1} of archives.".format(compressed, comp_unit)) + print("After this process, {0} {1} of additional disk space will be used.".format( uncompressed, uncomp_unit)) read = raw_input("\nWould you like to upgrade [Y/n]? ") if read == "Y" or read == "y":