mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-30 20:34:38 +01:00
updated for version 2.0.5
This commit is contained in:
parent
9133dd9f7d
commit
bb2860f942
31 changed files with 408 additions and 210 deletions
12
CHANGELOG
12
CHANGELOG
|
@ -1,3 +1,15 @@
|
|||
Version 2.0.5
|
||||
15-11-2014
|
||||
|
||||
[Feature] - Add /etc/slpkg.conf file.
|
||||
- Move "--current" switch in /etc/slpkg.conf file.
|
||||
- Add local PACKAGES.TXT for Slackware repository.
|
||||
- Add options to view package description.
|
||||
- Add all repositories in tracking dependencies options '-t'.
|
||||
- Add configuration file managment
|
||||
|
||||
[Updated] - Bugfix upgrading binary packages.
|
||||
|
||||
Version 2.0.4
|
||||
07-11-2014
|
||||
|
||||
|
|
2
PKG-INFO
2
PKG-INFO
|
@ -1,6 +1,6 @@
|
|||
Metadata-Version: 1.1
|
||||
Name: slpkg
|
||||
Version: 2.0.4
|
||||
Version: 2.0.5
|
||||
Author: dslackw
|
||||
Author-email: d zlatanidis at gmail com
|
||||
Maintainer: dslackw
|
||||
|
|
43
README.rst
43
README.rst
|
@ -11,9 +11,9 @@
|
|||
|
||||
Latest Release:
|
||||
|
||||
- Version: 2.0.4
|
||||
- Version: 2.0.5
|
||||
- `Package <https://sourceforge.net/projects/slpkg/files/slpkg/binary/>`_
|
||||
- `Source <https://github.com/dslackw/slpkg/archive/v2.0.4.tar.gz>`_
|
||||
- `Source <https://github.com/dslackw/slpkg/archive/v2.0.5.tar.gz>`_
|
||||
- `CHANGELOG <https://github.com/dslackw/slpkg/blob/master/CHANGELOG>`_
|
||||
|
||||
.. image:: https://raw.githubusercontent.com/dslackw/images/master/slpkg/logo.png
|
||||
|
@ -102,8 +102,8 @@ Untar the archive and run install.sh script:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ tar xvf slpkg-2.0.4.tar.gz
|
||||
$ cd slpkg-2.0.4
|
||||
$ tar xvf slpkg-2.0.5.tar.gz
|
||||
$ cd slpkg-2.0.5
|
||||
$ ./install.sh
|
||||
|
||||
Using `pip <https://pip.pypa.io/en/latest/>`_ :
|
||||
|
@ -123,7 +123,7 @@ Download binary package from `SourceForge <https://sourceforge.net/projects/slpk
|
|||
Slackware Current
|
||||
-----------------
|
||||
|
||||
For Slackware 'current' users must change the VERSION in /etc/slpkg.conf file.
|
||||
For Slackware 'current' users must change the variable VERSION in /etc/slpkg.conf file.
|
||||
|
||||
Command Line Tool Usage
|
||||
-----------------------
|
||||
|
@ -137,31 +137,24 @@ Command Line Tool Usage
|
|||
-v, --version print version and exit
|
||||
-a, script.tar.gz [source...] auto build SBo packages
|
||||
-b, --list, [package...] --add, --remove add, remove packages in blacklist
|
||||
-q, --list, [package...] --add, --remove add, remove packages in queue
|
||||
--build, --install, --build-install build or install from queue
|
||||
-l, <repository>, all, noarch list of installed packages
|
||||
-c, <repository> --upgrade check for updated packages
|
||||
-s, <repository> <package> download, build & install
|
||||
-t, <repository> <package> tracking dependencies
|
||||
-p, <repository> <package> --color= print package description
|
||||
red, green, yellow, cyan, grey colors support
|
||||
-f, <package> find installed packages
|
||||
-n, <package> view packages from SBo
|
||||
-q, --list, [package...] --add, --remove add, remove SBo packages in queue
|
||||
--build, --install, --build-install build or install packages from queue
|
||||
-g, --config, --config=[editor] configuration file management
|
||||
-l, [repository], all, noarch list of installed packages
|
||||
-c, [repository] --upgrade check for updated packages
|
||||
-s, [repository] [package] download, build & install
|
||||
-t, [repository] [package] tracking dependencies
|
||||
-p, [repository] [package] --color=[] print package description
|
||||
-f, [package] find installed packages
|
||||
-n, [package] view packages from SBo
|
||||
-i, [package...] install binary packages
|
||||
-u, [package...] upgrade binary packages
|
||||
-o, [package...] reinstall binary packages
|
||||
-r, [package...] remove binary packages
|
||||
-d, [package...] display the contents
|
||||
|
||||
Note: '-q' options is working only for SBo repository
|
||||
|
||||
Repositories:
|
||||
Slackware = slack
|
||||
Alien = alien
|
||||
SlackBuilds = sbo
|
||||
Slacky = slacky
|
||||
Robby's = rlw
|
||||
|
||||
|
||||
Repositories: <slack, sbo, alien, slacky, rlw>
|
||||
Colors = [red, green, yellow, cyan, grey]
|
||||
|
||||
Slpkg Examples
|
||||
--------------
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
PRGNAM=slpkg
|
||||
VERSION=${VERSION:-2.0.4}
|
||||
VERSION=${VERSION:-2.0.5}
|
||||
TAG=${TAG:-_dsw}
|
||||
|
||||
cd ..
|
||||
|
|
108
man/slpkg.8
108
man/slpkg.8
|
@ -19,12 +19,12 @@ slpkg - Utility for easy management packages in Slackware
|
|||
[-b --list, --add, --remove [...]]
|
||||
[-q --list, [...] --add, --remove]
|
||||
[ --build, --install, --build-install]
|
||||
[-l <repository>, all, noarch]
|
||||
[-c <repository> --upgrade]
|
||||
[-s <repository> <package>]
|
||||
[-t <repository> <package>]
|
||||
[-p <repository> <package> --color=]
|
||||
[ red, green, yellow, cyan, grey]
|
||||
[-g --config, --config=[editor]]
|
||||
[-l [repository], all, noarch]
|
||||
[-c [repository] --upgrade]
|
||||
[-s [repository] [package][
|
||||
[-t [repository] [package]]
|
||||
[-p [repository] [package] --color=]
|
||||
[-f] [-n] [-i [...]] [-u [...]]
|
||||
[-o [...]] [-r [...]] [-d [...]]\fp
|
||||
|
||||
|
@ -33,37 +33,32 @@ slpkg - Utility for easy management packages in Slackware
|
|||
.PP
|
||||
It's a quick and easy way to manage your packages in slackware to a command.
|
||||
.SH EXAMPLES
|
||||
\fBUtility for easy management packages in Slackware
|
||||
\fB
|
||||
Utility for easy management packages in Slackware
|
||||
|
||||
Optional arguments:
|
||||
-h, --help show this help message and exit
|
||||
-v, --version print version and exit
|
||||
-a, script.tar.gz [source...] auto build SBo packages
|
||||
-b, --list, [package...] --add, --remove add, remove packages in blacklist
|
||||
-q, --list, [package...] --add, --remove add, remove packages in queue
|
||||
--build, --install, --build-install build or install from queue
|
||||
-l, <repository>, all, noarch list of installed packages
|
||||
-c, <repository> --upgrade check for updated packages
|
||||
-s, <repository> <package> download, build & install
|
||||
-t, <repository> <package> tracking dependencies
|
||||
-p, <repository> <package> --color= view package description
|
||||
red, green, yellow, cyan, grey colors support
|
||||
-f, <package> find installed packages
|
||||
-n, <package> view packages from SBo
|
||||
-i, [package...] install binary packages
|
||||
-u, [package...] upgrade binary packages
|
||||
-o, [package...] reinstall binary packages
|
||||
-r, [package...] remove binary packages
|
||||
-d, [package...] display the contents
|
||||
Optional arguments:
|
||||
-h, --help show this help message and exit
|
||||
-v, --version print version and exit
|
||||
-a, script.tar.gz [source...] auto build SBo packages
|
||||
-b, --list, [package...] --add, --remove add, remove packages in blacklist
|
||||
-q, --list, [package...] --add, --remove add, remove SBo packages in queue
|
||||
--build, --install, --build-install build or install packages from queue
|
||||
-g, --config, --config=<editor> configuration file management
|
||||
-l, [repository], all, noarch list of installed packages
|
||||
-c, [repository] --upgrade check for updated packages
|
||||
-s, [repository] [package] download, build & install
|
||||
-t, [repository] [package] tracking dependencies
|
||||
-p, [repository] [package] --color=[] print package description
|
||||
-f, [package] find installed packages
|
||||
-n, [package] view packages from SBo
|
||||
-i, [package...] install binary packages
|
||||
-u, [package...] upgrade binary packages
|
||||
-o, [package...] reinstall binary packages
|
||||
-r, [package...] remove binary packages
|
||||
-d, [package...] display the contents
|
||||
|
||||
Note: '-q' options is working only for SBo repository
|
||||
|
||||
Repositories:
|
||||
Slackware = slack
|
||||
Alien = alien
|
||||
SlackBuilds = sbo
|
||||
Slacky = slacky
|
||||
Robby's = rlw\fP
|
||||
Repositories: <slack, sbo, alien, slacky, rlw>
|
||||
Colors = [red, green, yellow, cyan, grey]\fP
|
||||
|
||||
.SH GLOBAL OPTIONS
|
||||
.TP
|
||||
|
@ -72,62 +67,77 @@ Print the version of program and exit.
|
|||
.SH COMMANDS
|
||||
.PP
|
||||
The following commands are available.
|
||||
.SS -a script source extra
|
||||
|
||||
.SS -a, auto build packages
|
||||
\fBslpkg\fP \fB-a\fP <\fIscript\fP> <\fIsources\fP>
|
||||
.PP
|
||||
With this argument, build slackware package from source quickly and easy.
|
||||
.SS -b , --list <packages> -- add --remove
|
||||
|
||||
.SS -b , add, remove, view packages in blacklist
|
||||
\fBslpkg\fP \fB-b\fP \fB--list\fP <\fIpackages\fP> \fB--add\fP \fB--remove\fP
|
||||
.PP
|
||||
List, add or remove packages from blacklist file. The settings here affect
|
||||
all repositories.
|
||||
.SS -q , --list <packages> --add, --remove, --build, --install, --build-install
|
||||
|
||||
.SS -q , add, remove, view packages in queue
|
||||
\fBslpkg\fP \fB-q\fP \fB--list\fP <\fIpackages\fP> \fB--add\fP \fB--remove\fP
|
||||
.TP
|
||||
\fBslpkg\fP \fB-q\fP \fB--build\fP \fB--install\fP \fB--build-install\fP
|
||||
.PP
|
||||
List, add, or remove sbo packages from queue. If you want to remove all the packages
|
||||
from the list 'slpkg -q all --remove'. (these arguments only working for the sbo repository)
|
||||
.PP
|
||||
\fBslpkg\fP \fB-q\fP \fB--build\fP \fB--install\fP \fB--build-install\fP
|
||||
.PP
|
||||
Build or install or build and install packages are queued.
|
||||
.SS -l all, sbo, slack, noarch
|
||||
\fBslpkg\fP \fB-l\fP \fIall\fP \fIsbo\fP \fIslack\fP \fInoarch\fP
|
||||
|
||||
.SS -g , configuration file management
|
||||
\fBslpkg\fP \fB--config\fP \fB--config=[editor]\fP
|
||||
.PP
|
||||
Four display options list, sbo, slack, noarch and all packages
|
||||
items that are installed on the system.
|
||||
.SS -c , <repository> check if your packages is up to date
|
||||
Print configuration file or edit with editor.
|
||||
|
||||
.SS -l , list of installed packages per repository
|
||||
\fBslpkg\fP \fB-l\fP <\fIrepository\fP> \fIall\fP \fInoarch\fP
|
||||
.PP
|
||||
List of installed packages per repository or all.
|
||||
|
||||
.SS -c , check if your packages is up to date
|
||||
\fBslpkg\fP \fB-c\fP <\fIrepository\fP> \fI--upgrade\f
|
||||
.PP
|
||||
Check your packages is up to date.
|
||||
.SS -s , <repository> download, build and install package with all dependencies
|
||||
|
||||
.SS -s , download, build and install package with all dependencies
|
||||
\fBslpkg\fP \fB-s\fP <\fIrepository\fP> <\fIname of package\fP>
|
||||
.PP
|
||||
Installs or upgrade packages from the repositories with automatically resolving all
|
||||
dependencies of the package. Also installs the official distribution Slackware
|
||||
packages.
|
||||
|
||||
.SS -t , tracking dependencies
|
||||
\fBslpkg\fP \fB-t\fP <\fIrepository\fP> <\fIname of package\fP>
|
||||
.PP
|
||||
Tracking all dependencies of that package.
|
||||
The sequence shown is that you must follow to correctly install package.
|
||||
|
||||
.SS -p , print packages description
|
||||
\fBslpkg\fP \fB-p\fP <\fIrepository\fP> <\fIname of package\fP>
|
||||
.PP
|
||||
Print package description
|
||||
|
||||
.SS -f find packages
|
||||
\fBslpkg\fP \fB-f\fP <\fIname of package\fP>
|
||||
.PP
|
||||
Find installed packages with view total file size.
|
||||
|
||||
.SS -n , find packages from SBo repositority
|
||||
\fBslpkg\fP \fB-n\fP <\fIname of package\fP>
|
||||
.PP
|
||||
With this method you can find the SBo script that interests you through
|
||||
the network. (www.slackbuilds.org)
|
||||
|
||||
.SS -i , install binary packages
|
||||
\fBslpkg\fP \fB-i\fP <\fIpackages.t?z\fP>
|
||||
.PP
|
||||
Installs single binary packages designed for use with the
|
||||
Slackware Linux distribution into your system.
|
||||
|
||||
.SS -u , install-upgrade packages with new
|
||||
\fBslpkg\fP \fB-u\fP <\fIpackages.t?z\fP>
|
||||
.PP
|
||||
|
@ -135,6 +145,7 @@ Normally upgrade only upgrades packages that are already
|
|||
installed on the system, and will skip any packages that do not
|
||||
already have a version installed. 'Requires root privileges'
|
||||
(like slackware command upgradepkg --install-new)
|
||||
|
||||
.SS -o , reinstall binary packages
|
||||
\fBslpkg\fP \fB-o\fP <\fIpackages.t?z\fP>
|
||||
.PP
|
||||
|
@ -142,6 +153,7 @@ Upgradepkg usually skips packages if the exact same package
|
|||
(matching name, version, arch, and build number) is already
|
||||
installed on the system.'Requires root privileges' (like
|
||||
slackware command upgradepkg --reinstall)
|
||||
|
||||
.SS -r , remove packages
|
||||
\fBslpkg\fP \fB-r\fP <\fIname of packages\fP>
|
||||
.PP
|
||||
|
@ -153,10 +165,12 @@ packages with command 'slpkg -s sbo <package>' then write a file
|
|||
in /var/log/slpkg/dep/ with all dependencies and it allows you
|
||||
can remove them all together. 'Requires root
|
||||
privileges' (like slackware command removepkg)
|
||||
|
||||
.SS -d , display contents
|
||||
\fBslpkg\fP \fB-d\fP <\fIname of packages\fP>
|
||||
.PP
|
||||
Display the contents of the package with all descriptions.
|
||||
|
||||
.SH HELP OPTION
|
||||
Specifying the help option displays help for slpkg itself, or a
|
||||
command.
|
||||
|
|
|
@ -93,7 +93,7 @@ gzip -9 man/$PRGNAM.8
|
|||
install -D -m0644 man/$PRGNAM.8.gz $PKG/usr/man/man8/$PRGNAM.8.gz
|
||||
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a README.rst CHANGELOG LICENSE CONTRIBUTING ISSUES $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a README.rst CHANGELOG LICENSE TESTING ISSUES $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||
|
||||
mkdir -p $PKG/install
|
||||
|
|
|
@ -22,9 +22,10 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import os
|
||||
import getpass
|
||||
|
||||
from config import slpkg_conf
|
||||
|
||||
from config import config_file
|
||||
from messages import s_user
|
||||
|
||||
__all__ = "slpkg"
|
||||
__author__ = "dslackw"
|
||||
|
@ -33,6 +34,7 @@ __version__ = "{0}.{1}.{2}".format(*__version_info__)
|
|||
__license__ = "GNU General Public License v3 (GPLv3)"
|
||||
__email__ = "d.zlatanidis@gmail.com"
|
||||
|
||||
s_user(getpass.getuser())
|
||||
|
||||
# temponary path
|
||||
tmp = "/tmp/"
|
||||
|
@ -42,7 +44,7 @@ if not os.path.exists("/etc/slpkg/"):
|
|||
|
||||
if not os.path.isfile("/etc/slpkg/slpkg.conf"):
|
||||
with open("/etc/slpkg/slpkg.conf", "w") as conf:
|
||||
for line in slpkg_conf:
|
||||
for line in config_file():
|
||||
conf.write(line)
|
||||
conf.close()
|
||||
|
||||
|
|
|
@ -40,15 +40,15 @@ def options():
|
|||
"in queue",
|
||||
" --build, --install, --build-install build or install packages "
|
||||
"from queue",
|
||||
" -g, --config, --config=<editor> configuration file " +
|
||||
" -g, --config, --config=[editor] configuration file " +
|
||||
"management",
|
||||
" -l, <repository>, all, noarch list of installed " +
|
||||
" -l, [repository], all, noarch list of installed " +
|
||||
"packages",
|
||||
" -c, <repository> --upgrade check for updated " +
|
||||
" -c, [repository] --upgrade check for updated " +
|
||||
"packages",
|
||||
" -s, <repository> [package] download, build & install",
|
||||
" -t, <repository> [package] tracking dependencies",
|
||||
" -p, <repository> [package] --color=[] print package description",
|
||||
" -s, [repository] [package] download, build & install",
|
||||
" -t, [repository] [package] tracking dependencies",
|
||||
" -p, [repository] [package] --color=[] print package description",
|
||||
" -f, [package] find installed packages",
|
||||
" -n, [package] view packages from SBo",
|
||||
" -i, [package...] install binary packages",
|
||||
|
@ -70,15 +70,14 @@ def usage():
|
|||
" [-b --list, [...] --add, --remove]",
|
||||
" [-q --list, [...] --add, --remove]",
|
||||
" [ --build, --install, --build-install]",
|
||||
" [-g --config, --config=<editor>]",
|
||||
" [-l <repository>, all, noarch]",
|
||||
" [-c <repository> --upgrade]",
|
||||
" [-s <repository> <package>]",
|
||||
" [-t <repository> <package>]",
|
||||
" [-p <repository> <package> --color=]",
|
||||
" [ red, green, yellow, cyan, grey]",
|
||||
" [-g --config, --config=[editor]]",
|
||||
" [-l [repository], all, noarch]",
|
||||
" [-c [repository] --upgrade]",
|
||||
" [-s [repository] [package]",
|
||||
" [-t [repository] [package]",
|
||||
" [-p [repository] [package] --color=[]]",
|
||||
" [-f] [-n] [-i [...]] [-u [...]]",
|
||||
" [-o [...]] [-r [...]] [-d [...]]\n"
|
||||
" [-o [...]] [-r [...]] [-d [...]]\n",
|
||||
"For more information try 'slpkg --help'\n"
|
||||
]
|
||||
for usg in view:
|
||||
|
|
|
@ -24,7 +24,11 @@
|
|||
import os
|
||||
|
||||
from __metadata__ import bls_path
|
||||
from colors import RED, GREEN, ENDC
|
||||
from colors import (
|
||||
RED,
|
||||
GREEN,
|
||||
ENDC
|
||||
)
|
||||
|
||||
|
||||
class BlackList(object):
|
||||
|
|
129
slpkg/config.py
129
slpkg/config.py
|
@ -24,66 +24,75 @@
|
|||
import os
|
||||
import subprocess
|
||||
|
||||
from colors import CYAN, ENDC
|
||||
from colors import (
|
||||
CYAN,
|
||||
ENDC
|
||||
)
|
||||
|
||||
slpkg_conf = [
|
||||
"# Configuration file for slpkg\n",
|
||||
"\n",
|
||||
"# slpkg.conf file is part of slpkg.\n",
|
||||
"\n",
|
||||
"# Copyright 2014 Dimitris Zlatanidis <d.zlatanidis@gmail.com>\n",
|
||||
"# All rights reserved.\n",
|
||||
"\n",
|
||||
"# Utility for easy management packages in Slackware\n",
|
||||
"\n",
|
||||
"# https://github.com/dslackw/slpkg\n",
|
||||
"\n",
|
||||
"# Slpkg is free software: you can redistribute it and/or modify\n",
|
||||
"# it under the terms of the GNU General Public License as published by\n",
|
||||
"# the Free Software Foundation, either version 3 of the License, or\n",
|
||||
"# (at your option) any later version.\n",
|
||||
"# This program is distributed in the hope that it will be useful,\n",
|
||||
"# but WITHOUT ANY WARRANTY; without even the implied warranty of\n",
|
||||
"# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n",
|
||||
"# GNU General Public License for more details.\n",
|
||||
"# You should have received a copy of the GNU General Public License\n",
|
||||
"# along with this program. If not, see <http://www.gnu.org/licenses/>.\n",
|
||||
"\n",
|
||||
"# Slackware version 'stable' or 'current'.\n",
|
||||
"VERSION=stable\n",
|
||||
"\n",
|
||||
"# Build directory for repository slackbuilds.org. In this directory\n",
|
||||
"# downloaded sources and scripts for building.\n",
|
||||
"BUILD=/tmp/slpkg/build/\n",
|
||||
"\n",
|
||||
"# If SBO_CHECK_MD5 is 'on' the system will check all downloaded\n",
|
||||
"# sources from SBo repository.\n",
|
||||
"SBO_CHECK_MD5=on\n",
|
||||
"\n",
|
||||
"# Download directory for others repositories that use binaries files\n",
|
||||
"# for installation.\n",
|
||||
"PACKAGES=/tmp/slpkg/packages/\n",
|
||||
"\n",
|
||||
"# Download directory for Slackware patches file.\n",
|
||||
"PATCHES=/tmp/slpkg/patches/\n",
|
||||
"\n",
|
||||
"# Delete all downloaded files if DEL_ALL is 'on'.\n",
|
||||
"DEL_ALL=on\n",
|
||||
"\n",
|
||||
"# Delete build directory after each process if DEL_BUILD is 'on'.\n",
|
||||
"DEL_BUILD=off\n",
|
||||
"\n",
|
||||
"# Keep build log file if SBO_BUILD_LOG is 'on'.\n",
|
||||
"SBO_BUILD_LOG=on\n"
|
||||
]
|
||||
|
||||
if not os.path.exists("/etc/slpkg"):
|
||||
os.mkdir("/etc/slpkg")
|
||||
if not os.path.isfile("/etc/slpkg/slpkg.conf"):
|
||||
with open("/etc/slpkg/slpkg.conf", "w") as conf:
|
||||
for line in slpkg_conf:
|
||||
conf.write(line)
|
||||
conf.close()
|
||||
def config_file():
|
||||
slpkg_conf = [
|
||||
"# Configuration file for slpkg\n",
|
||||
"\n",
|
||||
"# slpkg.conf file is part of slpkg.\n",
|
||||
"\n",
|
||||
"# Copyright 2014 Dimitris Zlatanidis <d.zlatanidis@gmail.com>\n",
|
||||
"# All rights reserved.\n",
|
||||
"\n",
|
||||
"# Utility for easy management packages in Slackware\n",
|
||||
"\n",
|
||||
"# https://github.com/dslackw/slpkg\n",
|
||||
"\n",
|
||||
"# Slpkg is free software: you can redistribute it and/or modify\n",
|
||||
"# it under the terms of the GNU General Public License as published " +
|
||||
"by\n",
|
||||
"# the Free Software Foundation, either version 3 of the License, or\n",
|
||||
"# (at your option) any later version.\n",
|
||||
"# This program is distributed in the hope that it will be useful,\n",
|
||||
"# but WITHOUT ANY WARRANTY; without even the implied warranty of\n",
|
||||
"# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n",
|
||||
"# GNU General Public License for more details.\n",
|
||||
"# You should have received a copy of the GNU General Public License\n",
|
||||
"# along with this program. If not, see <http://www.gnu.org/licenses/" +
|
||||
">.\n",
|
||||
"\n",
|
||||
"# Slackware version 'stable' or 'current'.\n",
|
||||
"VERSION=stable\n",
|
||||
"\n",
|
||||
"# Build directory for repository slackbuilds.org. In this directory\n",
|
||||
"# downloaded sources and scripts for building.\n",
|
||||
"BUILD=/tmp/slpkg/build/\n",
|
||||
"\n",
|
||||
"# If SBO_CHECK_MD5 is 'on' the system will check all downloaded\n",
|
||||
"# sources from SBo repository.\n",
|
||||
"SBO_CHECK_MD5=on\n",
|
||||
"\n",
|
||||
"# Download directory for others repositories that use binaries files" +
|
||||
"\n",
|
||||
"# for installation.\n",
|
||||
"PACKAGES=/tmp/slpkg/packages/\n",
|
||||
"\n",
|
||||
"# Download directory for Slackware patches file.\n",
|
||||
"PATCHES=/tmp/slpkg/patches/\n",
|
||||
"\n",
|
||||
"# Delete all downloaded files if DEL_ALL is 'on'.\n",
|
||||
"DEL_ALL=on\n",
|
||||
"\n",
|
||||
"# Delete build directory after each process if DEL_BUILD is 'on'.\n",
|
||||
"DEL_BUILD=off\n",
|
||||
"\n",
|
||||
"# Keep build log file if SBO_BUILD_LOG is 'on'.\n",
|
||||
"SBO_BUILD_LOG=on\n"
|
||||
]
|
||||
|
||||
if not os.path.exists("/etc/slpkg"):
|
||||
os.mkdir("/etc/slpkg")
|
||||
if not os.path.isfile("/etc/slpkg/slpkg.conf"):
|
||||
with open("/etc/slpkg/slpkg.conf", "w") as conf:
|
||||
for line in slpkg_conf:
|
||||
conf.write(line)
|
||||
conf.close()
|
||||
return slpkg_conf
|
||||
|
||||
|
||||
class Config(object):
|
||||
|
@ -95,7 +104,7 @@ class Config(object):
|
|||
'''
|
||||
View slpkg config file
|
||||
'''
|
||||
print("")
|
||||
print("") # new line at start
|
||||
conf_args = [
|
||||
'VERSION',
|
||||
'BUILD',
|
||||
|
@ -114,7 +123,7 @@ class Config(object):
|
|||
print(line)
|
||||
else:
|
||||
print("{0}{1}{2}".format(CYAN, line, ENDC))
|
||||
print("")
|
||||
print("") # new line at end
|
||||
|
||||
def edit(self, editor):
|
||||
'''
|
||||
|
|
|
@ -24,8 +24,19 @@
|
|||
|
||||
from init import Initialization
|
||||
from messages import pkg_not_found
|
||||
from colors import RED, GREEN, YELLOW, CYAN, GREY, ENDC
|
||||
from __metadata__ import pkg_path, lib_path, repositories
|
||||
from colors import (
|
||||
RED,
|
||||
GREEN,
|
||||
YELLOW,
|
||||
CYAN,
|
||||
GREY,
|
||||
ENDC
|
||||
)
|
||||
from __metadata__ import (
|
||||
pkg_path,
|
||||
lib_path,
|
||||
repositories
|
||||
)
|
||||
|
||||
from pkg.find import find_package
|
||||
|
||||
|
|
|
@ -24,7 +24,10 @@
|
|||
import sys
|
||||
import subprocess
|
||||
|
||||
from colors import GREEN, ENDC
|
||||
from colors import (
|
||||
GREEN,
|
||||
ENDC
|
||||
)
|
||||
|
||||
|
||||
class Download(object):
|
||||
|
|
|
@ -43,7 +43,7 @@ class FileSize(object):
|
|||
print("\nError: connection refused\n")
|
||||
sys.exit()
|
||||
except KeyboardInterrupt:
|
||||
print # new line at cancel
|
||||
print("") # new line at cancel
|
||||
sys.exit()
|
||||
|
||||
def local(self):
|
||||
|
|
|
@ -27,8 +27,14 @@ import sys
|
|||
from url_read import URL
|
||||
from repositories import Repo
|
||||
from file_size import FileSize
|
||||
from __metadata__ import (log_path, lib_path, slack_rel,
|
||||
build_path, slpkg_tmp_packages, slpkg_tmp_patches)
|
||||
from __metadata__ import (
|
||||
log_path,
|
||||
lib_path,
|
||||
slack_rel,
|
||||
build_path,
|
||||
slpkg_tmp_packages,
|
||||
slpkg_tmp_patches
|
||||
)
|
||||
|
||||
from slack.mirrors import mirrors
|
||||
from slack.slack_version import slack_ver
|
||||
|
|
|
@ -32,7 +32,11 @@ from tracking import track_dep
|
|||
from blacklist import BlackList
|
||||
from version import prog_version
|
||||
from arguments import options, usage
|
||||
from __metadata__ import path, repositories, slack_rel
|
||||
from __metadata__ import (
|
||||
path,
|
||||
repositories,
|
||||
slack_rel
|
||||
)
|
||||
|
||||
from pkg.build import BuildPackage
|
||||
from pkg.manager import PackageManager
|
||||
|
@ -168,7 +172,7 @@ def main():
|
|||
PackageManager(args[1:]).remove()
|
||||
elif len(args) > 1 and args[0] == "-f":
|
||||
PackageManager(args[1:]).find()
|
||||
elif len(args) == 3 and args[0] == "-p":
|
||||
elif len(args) == 3 and args[0] == "-p" and args[1] in repositories:
|
||||
PkgDesc(args[2], args[1], "").view()
|
||||
elif len(args) == 4 and args[0] == "-p" and args[3].startswith("--color="):
|
||||
colors = ['red', 'green', 'yellow', 'cyan', 'grey']
|
||||
|
|
|
@ -22,7 +22,12 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import sys
|
||||
from colors import RED, CYAN, ENDC
|
||||
|
||||
from colors import (
|
||||
RED,
|
||||
CYAN,
|
||||
ENDC
|
||||
)
|
||||
|
||||
|
||||
def pkg_not_found(bol, pkg, message, eol):
|
||||
|
|
|
@ -30,7 +30,11 @@ from messages import template
|
|||
from blacklist import BlackList
|
||||
from init import Initialization
|
||||
from splitting import split_package
|
||||
from colors import YELLOW, GREY, ENDC
|
||||
from colors import (
|
||||
YELLOW,
|
||||
GREY,
|
||||
ENDC
|
||||
)
|
||||
from __metadata__ import (
|
||||
pkg_path,
|
||||
lib_path,
|
||||
|
|
|
@ -24,9 +24,9 @@
|
|||
import os
|
||||
|
||||
from toolbar import status
|
||||
from init import Initialization
|
||||
from __metadata__ import lib_path
|
||||
from splitting import split_package
|
||||
from init import Initialization
|
||||
from slack.slack_version import slack_ver
|
||||
|
||||
|
||||
|
|
|
@ -29,11 +29,24 @@ from repositories import Repo
|
|||
from init import Initialization
|
||||
from blacklist import BlackList
|
||||
from splitting import split_package
|
||||
from messages import pkg_not_found, template
|
||||
from colors import RED, GREEN, CYAN, YELLOW, GREY, ENDC
|
||||
from __metadata__ import (pkg_path, lib_path, log_path,
|
||||
slpkg_tmp_packages)
|
||||
|
||||
from messages import (
|
||||
pkg_not_found,
|
||||
template
|
||||
)
|
||||
from colors import (
|
||||
RED,
|
||||
GREEN,
|
||||
CYAN,
|
||||
YELLOW,
|
||||
GREY,
|
||||
ENDC
|
||||
)
|
||||
from __metadata__ import (
|
||||
pkg_path,
|
||||
lib_path,
|
||||
log_path,
|
||||
slpkg_tmp_packages
|
||||
)
|
||||
|
||||
from pkg.find import find_package
|
||||
from pkg.manager import PackageManager
|
||||
|
|
|
@ -30,9 +30,20 @@ import tarfile
|
|||
import subprocess
|
||||
|
||||
from checksum import md5sum
|
||||
from colors import RED, GREEN, ENDC
|
||||
from messages import pkg_not_found, template
|
||||
from __metadata__ import log_path, sbo_build_log, sbo_check_md5
|
||||
from colors import (
|
||||
RED,
|
||||
GREEN,
|
||||
ENDC
|
||||
)
|
||||
from messages import (
|
||||
pkg_not_found,
|
||||
template
|
||||
)
|
||||
from __metadata__ import (
|
||||
log_path,
|
||||
sbo_build_log,
|
||||
sbo_check_md5
|
||||
)
|
||||
|
||||
from sbo.greps import SBoGrep
|
||||
|
||||
|
@ -97,7 +108,7 @@ class BuildPackage(object):
|
|||
except (OSError, IOError):
|
||||
pkg_not_found("\n", self.prgnam, "Wrong file", "\n")
|
||||
except KeyboardInterrupt:
|
||||
print # new line at exit
|
||||
print("") # new line at exit
|
||||
sys.exit()
|
||||
|
||||
|
||||
|
@ -123,7 +134,7 @@ def check_md5(sbo_md5, src):
|
|||
print("| MD5SUM check for {0} [ {1}PASSED{2} ]".format(src, GREEN,
|
||||
ENDC))
|
||||
template(78)
|
||||
print # new line after pass checksum
|
||||
print("") # new line after pass checksum
|
||||
|
||||
|
||||
def log_head(path, log_file, log_time):
|
||||
|
|
|
@ -25,9 +25,22 @@ import os
|
|||
import sys
|
||||
import subprocess
|
||||
|
||||
from messages import pkg_not_found, template
|
||||
from colors import RED, GREEN, CYAN, GREY, ENDC
|
||||
from __metadata__ import pkg_path, sp, log_path
|
||||
from messages import (
|
||||
pkg_not_found,
|
||||
template
|
||||
)
|
||||
from colors import (
|
||||
RED,
|
||||
GREEN,
|
||||
CYAN,
|
||||
GREY,
|
||||
ENDC
|
||||
)
|
||||
from __metadata__ import (
|
||||
pkg_path,
|
||||
sp,
|
||||
log_path
|
||||
)
|
||||
|
||||
from find import find_package
|
||||
|
||||
|
@ -70,9 +83,8 @@ class PackageManager(object):
|
|||
'''
|
||||
for pkg in self.binary:
|
||||
try:
|
||||
print(
|
||||
subprocess.check_output("upgradepkg --reinstall {0}".format(
|
||||
pkg), shell=True))
|
||||
print(subprocess.check_output(
|
||||
"upgradepkg --reinstall {0}".format(pkg), shell=True))
|
||||
print("Completed!\n")
|
||||
except subprocess.CalledProcessError:
|
||||
self.not_found("Can't reinstall", self.binary, pkg)
|
||||
|
|
|
@ -24,8 +24,16 @@
|
|||
import os
|
||||
|
||||
from downloader import Download
|
||||
from colors import GREEN, RED, ENDC
|
||||
from __metadata__ import lib_path, build_path, tmp
|
||||
from colors import (
|
||||
GREEN,
|
||||
RED,
|
||||
ENDC
|
||||
)
|
||||
from __metadata__ import (
|
||||
lib_path,
|
||||
build_path,
|
||||
tmp
|
||||
)
|
||||
|
||||
from sbo.greps import SBoGrep
|
||||
from pkg.find import find_package
|
||||
|
|
|
@ -32,9 +32,23 @@ from toolbar import status
|
|||
from init import Initialization
|
||||
from downloader import Download
|
||||
from splitting import split_package
|
||||
from messages import template, build_FAILED
|
||||
from colors import RED, GREEN, GREY, YELLOW, ENDC
|
||||
from __metadata__ import tmp, pkg_path, build_path, sp
|
||||
from messages import (
|
||||
template,
|
||||
build_FAILED
|
||||
)
|
||||
from colors import (
|
||||
RED,
|
||||
GREEN,
|
||||
GREY,
|
||||
YELLOW,
|
||||
ENDC
|
||||
)
|
||||
from __metadata__ import (
|
||||
tmp,
|
||||
pkg_path,
|
||||
build_path,
|
||||
sp
|
||||
)
|
||||
|
||||
from greps import SBoGrep
|
||||
from remove import delete
|
||||
|
|
|
@ -21,7 +21,10 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from __metadata__ import arch, lib_path
|
||||
from __metadata__ import (
|
||||
arch,
|
||||
lib_path
|
||||
)
|
||||
|
||||
|
||||
class SBoGrep(object):
|
||||
|
|
|
@ -28,12 +28,28 @@ from toolbar import status
|
|||
from init import Initialization
|
||||
from downloader import Download
|
||||
from splitting import split_package
|
||||
from __metadata__ import (tmp, pkg_path, build_path,
|
||||
log_path, lib_path, sp)
|
||||
|
||||
from colors import RED, GREEN, GREY, YELLOW, CYAN, ENDC
|
||||
from messages import (pkg_found, template, build_FAILED,
|
||||
pkg_not_found)
|
||||
from __metadata__ import (
|
||||
tmp,
|
||||
pkg_path,
|
||||
build_path,
|
||||
log_path,
|
||||
lib_path,
|
||||
sp
|
||||
)
|
||||
from colors import (
|
||||
RED,
|
||||
GREEN,
|
||||
GREY,
|
||||
YELLOW,
|
||||
CYAN,
|
||||
ENDC
|
||||
)
|
||||
from messages import (
|
||||
pkg_found,
|
||||
template,
|
||||
build_FAILED,
|
||||
pkg_not_found
|
||||
)
|
||||
|
||||
from pkg.find import find_package
|
||||
from pkg.build import BuildPackage
|
||||
|
|
|
@ -27,10 +27,26 @@ import pydoc
|
|||
|
||||
from init import Initialization
|
||||
from downloader import Download
|
||||
from __metadata__ import tmp, build_path, pkg_path, sp
|
||||
from colors import RED, GREEN, GREY, CYAN, YELLOW, ENDC
|
||||
from messages import (pkg_found, pkg_not_found, template,
|
||||
build_FAILED)
|
||||
from __metadata__ import (
|
||||
tmp,
|
||||
build_path,
|
||||
pkg_path,
|
||||
sp
|
||||
)
|
||||
from colors import (
|
||||
RED,
|
||||
GREEN,
|
||||
GREY,
|
||||
CYAN,
|
||||
YELLOW,
|
||||
ENDC
|
||||
)
|
||||
from messages import (
|
||||
pkg_found,
|
||||
pkg_not_found,
|
||||
template,
|
||||
build_FAILED
|
||||
)
|
||||
|
||||
from pkg.find import find_package
|
||||
from pkg.build import BuildPackage
|
||||
|
@ -52,11 +68,12 @@ class SBoNetwork(object):
|
|||
sys.stdout.flush()
|
||||
grep = SBoGrep(self.name)
|
||||
self.sbo_url = sbo_search_pkg(self.name)
|
||||
self.sbo_desc = grep.description()[len(self.name) + 2:-1]
|
||||
self.sbo_req = grep.requires()
|
||||
self.source_dwn = grep.source().split()
|
||||
self.sbo_dwn = SBoLink(self.sbo_url).tar_gz()
|
||||
self.sbo_version = grep.version()
|
||||
if self.sbo_url:
|
||||
self.sbo_desc = grep.description()[len(self.name) + 2:-1]
|
||||
self.source_dwn = grep.source().split()
|
||||
self.sbo_req = grep.requires()
|
||||
self.sbo_dwn = SBoLink(self.sbo_url).tar_gz()
|
||||
self.sbo_version = grep.version()
|
||||
self.space = ("\n" * 50)
|
||||
sys.stdout.write("{0}Done{1}\n".format(GREY, ENDC))
|
||||
|
||||
|
|
|
@ -28,9 +28,23 @@ from sizes import units
|
|||
from blacklist import BlackList
|
||||
from init import Initialization
|
||||
from splitting import split_package
|
||||
from messages import pkg_not_found, template
|
||||
from colors import RED, GREEN, CYAN, YELLOW, GREY, ENDC
|
||||
from __metadata__ import pkg_path, lib_path, slpkg_tmp_packages
|
||||
from messages import (
|
||||
pkg_not_found,
|
||||
template
|
||||
)
|
||||
from colors import (
|
||||
RED,
|
||||
GREEN,
|
||||
CYAN,
|
||||
YELLOW,
|
||||
GREY,
|
||||
ENDC
|
||||
)
|
||||
from __metadata__ import (
|
||||
pkg_path,
|
||||
lib_path,
|
||||
slpkg_tmp_packages
|
||||
)
|
||||
|
||||
from pkg.find import find_package
|
||||
from pkg.manager import PackageManager
|
||||
|
|
|
@ -30,8 +30,15 @@ from url_read import URL
|
|||
from messages import template
|
||||
from blacklist import BlackList
|
||||
from splitting import split_package
|
||||
from colors import GREY, YELLOW, ENDC
|
||||
from __metadata__ import pkg_path, slpkg_tmp_patches
|
||||
from colors import (
|
||||
GREY,
|
||||
YELLOW,
|
||||
ENDC
|
||||
)
|
||||
from __metadata__ import (
|
||||
pkg_path,
|
||||
slpkg_tmp_patches
|
||||
)
|
||||
|
||||
from pkg.manager import PackageManager
|
||||
|
||||
|
|
|
@ -24,7 +24,10 @@
|
|||
import sys
|
||||
import time
|
||||
|
||||
from colors import GREY, ENDC
|
||||
from colors import (
|
||||
GREY,
|
||||
ENDC
|
||||
)
|
||||
|
||||
|
||||
def status(index, width, step):
|
||||
|
|
|
@ -25,8 +25,18 @@ import sys
|
|||
|
||||
from messages import template
|
||||
from init import Initialization
|
||||
from __metadata__ import pkg_path, sp
|
||||
from colors import RED, GREEN, GREY, YELLOW, CYAN, ENDC
|
||||
from __metadata__ import (
|
||||
pkg_path,
|
||||
sp
|
||||
)
|
||||
from colors import (
|
||||
RED,
|
||||
GREEN,
|
||||
GREY,
|
||||
YELLOW,
|
||||
CYAN,
|
||||
ENDC
|
||||
)
|
||||
|
||||
from pkg.find import find_package
|
||||
|
||||
|
|
|
@ -21,7 +21,11 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from __metadata__ import __version__, __license__, __email__
|
||||
from __metadata__ import (
|
||||
__version__,
|
||||
__license__,
|
||||
__email__
|
||||
)
|
||||
|
||||
|
||||
def prog_version():
|
||||
|
|
Loading…
Add table
Reference in a new issue