mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-28 09:58:21 +01:00
Merge branch 'develop'
This commit is contained in:
commit
7c70428c25
11 changed files with 87 additions and 13 deletions
|
@ -1,3 +1,11 @@
|
|||
Version 2.2.7
|
||||
18-3-2015
|
||||
|
||||
[Feature] - Added bash completion file.
|
||||
- Added fish completion file.
|
||||
[Updated] - Fix synchronization issues when upgrading SBo repository.
|
||||
- Fix remove to the right spaces on view.
|
||||
|
||||
Version 2.2.6
|
||||
26-2-2015
|
||||
|
||||
|
|
2
PKG-INFO
2
PKG-INFO
|
@ -1,6 +1,6 @@
|
|||
Metadata-Version: 1.1
|
||||
Name: slpkg
|
||||
Version: 2.2.6
|
||||
Version: 2.2.7
|
||||
Author: dslackw
|
||||
Author-email: d zlatanidis at gmail com
|
||||
Maintainer: dslackw
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
.. contents:: Table of Contents:
|
||||
|
||||
Slpkg
|
||||
About
|
||||
-----
|
||||
|
||||
Slpkg is a software package manager that installs, updates, and removes packages on Slackware
|
||||
|
@ -172,8 +172,8 @@ Untar the archive and run install.sh script:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ tar xvf slpkg-2.2.6.tar.gz
|
||||
$ cd slpkg-2.2.6
|
||||
$ tar xvf slpkg-2.2.7.tar.gz
|
||||
$ cd slpkg-2.2.7
|
||||
$ ./install.sh
|
||||
|
||||
Using pip:
|
||||
|
|
14
conf/slpkg.bash-completion
Normal file
14
conf/slpkg.bash-completion
Normal file
|
@ -0,0 +1,14 @@
|
|||
_slpkg()
|
||||
{
|
||||
local cur
|
||||
cur=${COMP_WORDS[COMP_CWORD]}
|
||||
|
||||
if [[ "$cur" == -* ]]; then
|
||||
COMPREPLY=( $( compgen -W "--help --version update upgrade repo-add repo-remove repo-list repo-info slpkg --list --add --remove --build --install --build-install --config --index --installed --upgrade --color" -- $cur ))
|
||||
|
||||
else
|
||||
_filedir
|
||||
fi
|
||||
}
|
||||
|
||||
complete -F _slpkg slpkg
|
25
conf/slpkg.fish
Normal file
25
conf/slpkg.fish
Normal file
|
@ -0,0 +1,25 @@
|
|||
complete --command slpkg --long-option help --short-option h --description 'show this help message and exit'
|
||||
complete --command slpkg --long-option version --short-option v --description 'print version and exit'
|
||||
complete --command slpkg --long-option '' --short-option a --description 'auto build SBo packages'
|
||||
complete --command slpkg --long-option '' --short-option b --description 'add, remove packages in blacklist'
|
||||
complete --command slpkg --long-option '' --short-option q --description 'add, remove SBo packages in queue'
|
||||
complete --command slpkg --long-option '' --short-option g --description 'configuration file management'
|
||||
complete --command slpkg --long-option '' --short-option l --description 'list of repositories packages'
|
||||
complete --command slpkg --long-option '' --short-option c --description 'check for updated packages'
|
||||
complete --command slpkg --long-option '' --short-option s --description 'download, build & install packages'
|
||||
complete --command slpkg --long-option '' --short-option t --description 'package tracking dependencies'
|
||||
complete --command slpkg --long-option '' --short-option p --description 'print package description'
|
||||
complete --command slpkg --long-option '' --short-option n --description 'view SBo packages through network'
|
||||
complete --command slpkg --long-option '' --short-option f --description 'find installed packages'
|
||||
complete --command slpkg --long-option '' --short-option i --description 'install binary packages'
|
||||
complete --command slpkg --long-option '' --short-option u --description 'upgrade binary packages'
|
||||
complete --command slpkg --long-option '' --short-option o --description 'reinstall binary packages'
|
||||
complete --command slpkg --long-option '' --short-option r --description 'remove binary packages'
|
||||
complete --command slpkg --long-option '' --short-option d --description 'display the contents'
|
||||
complete --command slpkg --long-option add --short-option '' --description 'additional options for blacklist and queue'
|
||||
complete --command slpkg --long-option remove --short-option '' --description 'additional options for blacklist and queue'
|
||||
complete --command slpkg --long-option list --short-option '' --description 'additional options for blacklist and queue'
|
||||
complete --command slpkg --long-option build --short-option '' --description 'additional options for queue'
|
||||
complete --command slpkg --long-option install --short-option '' --description 'additional options for queue'
|
||||
complete --command slpkg --long-option build-install --short-option '' --description 'additional options for queue'
|
||||
complete --command slpkg --long-option config --short-option '' --description 'additional options for configuration file management'
|
16
setup.py
16
setup.py
|
@ -80,8 +80,22 @@ if "install" in sys.argv:
|
|||
f_out.close()
|
||||
f_in.close()
|
||||
shutil.copy2(gzip_man, man_path)
|
||||
os.chmod(man_path, int("444", 8))
|
||||
|
||||
bash_completion = "/etc/bash_completion.d/"
|
||||
fish_completion = "/etc/fish/completions/"
|
||||
completion_file = [
|
||||
'conf/slpkg.bash-completion',
|
||||
'conf/slpkg.fish'
|
||||
]
|
||||
if not os.path.exists(bash_completion):
|
||||
os.makedirs(bash_completion)
|
||||
print("Installing '{0}' file".format(completion_file[0].split('/')[1]))
|
||||
shutil.copy2(completion_file[0], bash_completion)
|
||||
os.chmod(bash_completion + completion_file[0].split('/')[1], 744)
|
||||
if os.path.exists(fish_completion):
|
||||
print("Installing '{0}' file".format(completion_file[1].split('/')[1]))
|
||||
shutil.copy2(completion_file[1], fish_completion)
|
||||
os.chmod(fish_completion + completion_file[1].split('/')[1], 744)
|
||||
conf_file = [
|
||||
'conf/slpkg.conf',
|
||||
'conf/blacklist',
|
||||
|
|
|
@ -92,6 +92,17 @@ for file in $CONFIGS; do
|
|||
install -D -m0644 conf/$file $PKG/etc/slpkg/${file}.new
|
||||
done
|
||||
|
||||
# install bash completion file
|
||||
mkdir -p $PKG/etc/bash_completion.d
|
||||
install -D -m0744 conf/${PRGNAM}.bash-completion \
|
||||
$PKG/etc/bash_completion.d/${PRGNAM}.bash-completion
|
||||
|
||||
# install fish completion file
|
||||
if [ -d "/etc/fish/completions" ]; then
|
||||
install -D -m0744 conf/${PRGNAM}.fish \
|
||||
$PKG/etc/fish/completions/${PRGNAM}.fish
|
||||
fi
|
||||
|
||||
# install man page
|
||||
mkdir -p $PKG/usr/man/man8
|
||||
gzip -9 man/$PRGNAM.8
|
||||
|
|
|
@ -87,7 +87,7 @@ class MetaData(object):
|
|||
|
||||
__all__ = "slpkg"
|
||||
__author__ = "dslackw"
|
||||
__version_info__ = (2, 2, 6)
|
||||
__version_info__ = (2, 2, 7)
|
||||
__version__ = "{0}.{1}.{2}".format(*__version_info__)
|
||||
__license__ = "GNU General Public License v3 (GPLv3)"
|
||||
__email__ = "d.zlatanidis@gmail.com"
|
||||
|
|
|
@ -253,7 +253,7 @@ class BinaryInstall(object):
|
|||
" " * (18-len(pkg_split[1])), pkg_split[2],
|
||||
" " * (8-len(pkg_split[2])), pkg_split[3],
|
||||
" " * (7-len(pkg_split[3])), repo,
|
||||
comp, " K"))
|
||||
comp, " K")).rstrip()
|
||||
return [pkg_sum, upg_sum, uni_sum]
|
||||
|
||||
def top_view(self):
|
||||
|
|
|
@ -92,7 +92,7 @@ class SBoInstall(object):
|
|||
self.dependencies, dep_src = self.sbo_version_source(
|
||||
self.one_for_all(self.deps))
|
||||
Msg().done()
|
||||
self.master_packages = self.clear_masters()
|
||||
self.master_packages, self.pkg_ver = self.clear_masters()
|
||||
if self.package_found:
|
||||
print("\nThe following packages will be automatically "
|
||||
"installed or upgraded \nwith new version:\n")
|
||||
|
@ -165,11 +165,13 @@ class SBoInstall(object):
|
|||
Clear master slackbuilds if already exist in dependencies
|
||||
or if added to install two or more times
|
||||
'''
|
||||
slackbuilds = []
|
||||
for mas in Utils().remove_dbs(self.master_packages):
|
||||
slackbuilds, version = [], []
|
||||
for mas, ver in zip(Utils().remove_dbs(self.master_packages),
|
||||
self.pkg_ver):
|
||||
if mas not in self.dependencies:
|
||||
slackbuilds.append(mas)
|
||||
return slackbuilds
|
||||
version.append(ver)
|
||||
return slackbuilds, version
|
||||
|
||||
def matching(self, sbo_not_found):
|
||||
'''
|
||||
|
@ -246,7 +248,7 @@ class SBoInstall(object):
|
|||
" " * (24-len(args[1])), args[2],
|
||||
" " * (18-len(args[2])), args[3],
|
||||
" " * (15-len(args[3])), "",
|
||||
"", "SBo", "", ""))
|
||||
"", "SBo", "", "")).rstrip()
|
||||
|
||||
def tag(self, sbo, count_ins, count_upg, count_uni):
|
||||
'''
|
||||
|
|
|
@ -146,7 +146,7 @@ class Patches(object):
|
|||
" " * (18-len(pkg_split[1])), pkg_split[2],
|
||||
" " * (8-len(pkg_split[2])), pkg_split[3],
|
||||
" " * (7-len(pkg_split[3])), "Slack",
|
||||
size, " K"))
|
||||
size, " K")).rstrip()
|
||||
|
||||
def upgrade(self):
|
||||
'''
|
||||
|
|
Loading…
Reference in a new issue