mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-10 20:01:54 +01:00
Updated to version 3.4.0
Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
commit
425595b7d9
24 changed files with 1653 additions and 1661 deletions
|
@ -1,3 +1,13 @@
|
||||||
|
3.4.0 - 21/01/2019
|
||||||
|
Updated:
|
||||||
|
- Updated manpage
|
||||||
|
- Convert examples, repositories and install text files to markdown format
|
||||||
|
- Merge sbo/remove.py in the slpkg/remove.py file
|
||||||
|
Fixed:
|
||||||
|
- Bugfix: update slpkg itself from gitlab repository
|
||||||
|
Added:
|
||||||
|
- Command 'clean-tmp' to remove the packages and the sources from /tmp/slpkg/ directory
|
||||||
|
|
||||||
3.3.9 - 14/01/2019
|
3.3.9 - 14/01/2019
|
||||||
Updated:
|
Updated:
|
||||||
- Readme file and added example text file
|
- Readme file and added example text file
|
||||||
|
|
1412
EXAMPLES.md
Normal file
1412
EXAMPLES.md
Normal file
File diff suppressed because it is too large
Load diff
1485
EXAMPLES.txt
1485
EXAMPLES.txt
File diff suppressed because it is too large
Load diff
29
INSTALL
29
INSTALL
|
@ -1,29 +0,0 @@
|
||||||
Installation
|
|
||||||
============
|
|
||||||
|
|
||||||
|
|
||||||
Python & OS Support
|
|
||||||
-------------------
|
|
||||||
|
|
||||||
Slpkg works with Python versions 2.7.5+ .
|
|
||||||
|
|
||||||
Slpkg works on Slackware distribution and possibly in some Slackware based
|
|
||||||
distribution like SalixOS, Slackel etc.
|
|
||||||
|
|
||||||
|
|
||||||
Install slpkg
|
|
||||||
-------------
|
|
||||||
|
|
||||||
There are mainly 3 ways:
|
|
||||||
|
|
||||||
1) Suggested method, download latest slpkg version from:
|
|
||||||
https://gitlab.com/dslackw/slpkg/releases
|
|
||||||
Untar or unzip the archive, change directory in slpkg-<version>
|
|
||||||
and run './install.sh'.
|
|
||||||
slpkg auto-installed as Slackware package (root privileges are required).
|
|
||||||
|
|
||||||
2) Download binary package from https://sourceforge.net/projects/slpkg/files/binary/
|
|
||||||
and use Slackware command `upgradepkg --install-new <slpkg binary>`
|
|
||||||
|
|
||||||
3) Using pip: pip install slpkg --upgrade
|
|
||||||
|
|
25
INSTALL.md
Normal file
25
INSTALL.md
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
### Installation
|
||||||
|
|
||||||
|
|
||||||
|
##### Python & OS Support
|
||||||
|
|
||||||
|
Slpkg works with Python versions 2.7.5+ .
|
||||||
|
|
||||||
|
Slpkg works on Slackware distribution and possibly in some Slackware based
|
||||||
|
distribution like SalixOS, Slackel etc.
|
||||||
|
|
||||||
|
|
||||||
|
##### Install slpkg
|
||||||
|
|
||||||
|
There are mainly 3 ways:
|
||||||
|
|
||||||
|
1. Suggested method, download latest slpkg version from:
|
||||||
|
'`https://gitlab.com/dslackw/slpkg/releases`'
|
||||||
|
Untar or unzip the archive, change directory in '`slpkg-<version>`'
|
||||||
|
and run '`./install.sh`'.
|
||||||
|
slpkg auto-installed as Slackware package (root privileges are required).
|
||||||
|
|
||||||
|
2. Download binary package from '`https://sourceforge.net/projects/slpkg/files/binary/`'
|
||||||
|
and use Slackware command '`upgradepkg --install-new <slpkg binary>`'
|
||||||
|
|
||||||
|
3. Using pip: '`pip install slpkg --upgrade`'
|
14
README.md
14
README.md
|
@ -1,14 +1,18 @@
|
||||||
# slpkg
|
# slpkg 3.4.0
|
||||||
|
|
||||||
Slpkg is a powerful software package manager that installs, updates, and removes packages on
|
Slpkg is a powerful software package manager that installs, updates, and removes packages on
|
||||||
Slackware based systems. It automatically computes dependencies and figures out what things
|
[Slackware](http://www.slackware.com/) based systems. It automatically computes dependencies and
|
||||||
should occur to install packages. Slpkg makes it easier to maintain groups of machines without
|
figures out what things should occur to install packages. Slpkg makes it easier to maintain groups
|
||||||
having to manually update.
|
of machines without having to manually update.
|
||||||
|
|
||||||
Slpkg works in accordance with the standards of the organization slackbuilds.org
|
Slpkg works in accordance with the standards of the organization [SlackBuilds.org](https://www.slackbuilds.org)
|
||||||
to builds packages. Also uses the Slackware Linux instructions for installation,
|
to builds packages. Also uses the Slackware Linux instructions for installation,
|
||||||
upgrading or removing packages.
|
upgrading or removing packages.
|
||||||
|
|
||||||
What makes slpkg to distinguish it from the other tools; The user friendliness it's a primary
|
What makes slpkg to distinguish it from the other tools; The user friendliness it's a primary
|
||||||
target as well as easy to understand and use, also use colors to highlight packages and
|
target as well as easy to understand and use, also use colors to highlight packages and
|
||||||
display warning messages, etc.
|
display warning messages, etc.
|
||||||
|
|
||||||
|
##### Copyright
|
||||||
|
|
||||||
|
Copyright 2014-2019 © Dimitris Zlatanidis. Slackware® is a Registered Trademark of Patrick Volkerding. Linux is a Registered Trademark of Linus Torvalds.
|
||||||
|
|
52
REPOSITORIES
52
REPOSITORIES
|
@ -1,52 +0,0 @@
|
||||||
--------------------------------------------------------------------------------------
|
|
||||||
This file was created to explain some peculiarities of repositories used by the slpkg.
|
|
||||||
--------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
*** NOTE: For more informations, refer directly to the repositories ***
|
|
||||||
|
|
||||||
Default repositories:
|
|
||||||
---------------------
|
|
||||||
For -current users use sbo repository:
|
|
||||||
SlackBuilds.org (sbo) FAQ(15):
|
|
||||||
Slackware current is not supported, but as a general rule, the scripts
|
|
||||||
should work on it as well.
|
|
||||||
|
|
||||||
Rworkman's (rlw) repository use dependencies where displayed in central site
|
|
||||||
'http://rlworkman.net/pkgs/' and only those. Unfortunately there is no fixed reference
|
|
||||||
dependencies file PACKAGES.TXT. You can make changes in /etc/slpkg/rlworkman.deps file.
|
|
||||||
|
|
||||||
Conraid's (conrad) repository must be used only from Slackware64 current users
|
|
||||||
and has no reference dependencies.
|
|
||||||
|
|
||||||
Slackel.gr (slackl) repository must be used only from Slackware{x86, x86_64} -current users.
|
|
||||||
|
|
||||||
MSB (msb) repository has one ChangeLog.txt file for three sub-repositories {1.14, 1.16, latest}.
|
|
||||||
So if you have updated the list of packages with version 1.14 and want to switch to version
|
|
||||||
1.16 then run "slpkg upgrade" instead of "slpkg update". MSB (msb) repository has no reference
|
|
||||||
dependencies. Similarly apply and for the repository Cinnamon (csb) but with the different
|
|
||||||
versions. Both repositories Mate and Cinnamon support Slackware -current x86_64 but not x86.
|
|
||||||
|
|
||||||
Slonly repository do not support -current for x86 arch.
|
|
||||||
|
|
||||||
Alien's ktown (ktown), Alien's multilib (multi), Slacke E17 and E18, slack-n-free, csb,
|
|
||||||
mles and Alien's restricted repository has no reference dependencies.
|
|
||||||
|
|
||||||
IMPORTANT: For Alien's (Eric Hameleers) repositories (alien, multi and ktown) should run
|
|
||||||
'slpkg upgrade' instant 'slpkg update', if you want to spend from -stable in -current or not
|
|
||||||
because there is not different file 'ChangeLog.txt' for each version.
|
|
||||||
|
|
||||||
Custom repositories:
|
|
||||||
--------------------
|
|
||||||
There is the possibility of adding the repository directly from the user enough to address
|
|
||||||
up to be the 'PACKAGES.TXT' files and 'CHECKSUMS.md5' least. If not is there file 'ChangeLog.txt'
|
|
||||||
will get warning messages that the 'ChangeLog.txt' file can not be read but not worry, the process
|
|
||||||
is completed normally have each time you run the command 'slpkg update' the package lists for such
|
|
||||||
a repository will be recreated from start automatically.
|
|
||||||
|
|
||||||
Sometimes you may experience some problems with these repositories such as the not correctly
|
|
||||||
resolve dependencies, and this may happen some specificities separate list which unfortunately
|
|
||||||
can not be calculated, good is the report these problems.
|
|
||||||
|
|
||||||
Slackware ARM repositories:
|
|
||||||
---------------------------
|
|
||||||
Slackware ARM users will must use only two repositories at the moment slack and sbo.
|
|
56
REPOSITORIES.md
Normal file
56
REPOSITORIES.md
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
### This file was created to explain some peculiarities of repositories used by the slpkg.
|
||||||
|
|
||||||
|
|
||||||
|
*NOTE: For more informations, refer directly to the repositories*
|
||||||
|
|
||||||
|
|
||||||
|
##### Default repositories:
|
||||||
|
|
||||||
|
For the -current users who they use the sbo repository:
|
||||||
|
SlackBuilds.org (sbo) FAQ(15):
|
||||||
|
Slackware current is not supported, but as a general rule, the scripts
|
||||||
|
should work on it as well.
|
||||||
|
|
||||||
|
Rworkman's (rlw) repository use dependencies where displayed in central site
|
||||||
|
'`http://rlworkman.net/pkgs/`' and only those. Unfortunately there is no fixed reference
|
||||||
|
dependencies in the file PACKAGES.TXT. You can make changes in '`/etc/slpkg/rlworkman.deps`'
|
||||||
|
file.
|
||||||
|
|
||||||
|
Conraid's (conrad) repository must be used only from Slackware64 current users and it has no
|
||||||
|
reference dependencies.
|
||||||
|
|
||||||
|
Slackel.gr (slackl) repository must be used only from Slackware{x86, x86_64} -current users.
|
||||||
|
|
||||||
|
MSB (msb) repository has one ChangeLog.txt file for three sub-repositories {1.14, 1.16, latest}.
|
||||||
|
So if you have updated the list of packages with the version 1.14 and you want to switch to
|
||||||
|
version 1.16 you must run '`slpkg upgrade`' instead of '`slpkg update`'. MSB (msb) repository
|
||||||
|
has no reference to the dependencies. Similarly apply and for the repository Cinnamon (csb)
|
||||||
|
but with the different versions. Both repositories Mate and Cinnamon support Slackware -current
|
||||||
|
x86_64 but not x86.
|
||||||
|
|
||||||
|
Slonly repository don't support -current for x86 arch.
|
||||||
|
|
||||||
|
Alien's ktown (ktown), Alien's multilib (multi), Slacke E17 and E18, slack-n-free, csb,
|
||||||
|
mles and Alien's restricted repository has no reference dependencies.
|
||||||
|
|
||||||
|
IMPORTANT: For Alien's (Eric Hameleers) repositories (alien, multi and ktown) should run
|
||||||
|
'`slpkg upgrade`' instant '`slpkg update`', if you want to spend from -stable in -current or
|
||||||
|
not, because there is not different file '`ChangeLog.txt`' for each version.
|
||||||
|
|
||||||
|
|
||||||
|
##### Custom repositories:
|
||||||
|
|
||||||
|
There is the possibility of adding the repository directly from the user enough to address
|
||||||
|
up to be the '`PACKAGES.TXT`' files and '`CHECKSUMS.md5`' least. If not is there file '`ChangeLog.txt`'
|
||||||
|
will get warning messages that the '`ChangeLog.txt`' file can not be read but not worry, the process
|
||||||
|
is completed normally have each time you run the command '`slpkg update`' the package lists for such
|
||||||
|
a repository will be recreated from start automatically.
|
||||||
|
|
||||||
|
Sometimes you may experience some problems with these repositories such as the not correctly
|
||||||
|
resolve dependencies, and this may happen some specificities separate list which unfortunately
|
||||||
|
can not be calculated, good is the report these problems.
|
||||||
|
|
||||||
|
|
||||||
|
##### Slackware ARM repositories:
|
||||||
|
|
||||||
|
Slackware ARM users will must use only two repositories at the moment slack and sbo.
|
6
clean.py
6
clean.py
|
@ -30,9 +30,8 @@ class Clean(object):
|
||||||
"""Clean all data like man page, log files, PACKAGES.TXT and
|
"""Clean all data like man page, log files, PACKAGES.TXT and
|
||||||
configuration files. This is useful if "slpkg" installed via
|
configuration files. This is useful if "slpkg" installed via
|
||||||
"pip" because pip uninstalls only Python packages and script
|
"pip" because pip uninstalls only Python packages and script
|
||||||
and not data. So if uninstall "# pip uninstall slpkg" after run
|
and not data. So if uninstall with "# pip uninstall slpkg" after
|
||||||
"# python clean.py" to remove all data and configuration file.
|
run "# python clean.py" to remove all data and configuration files.
|
||||||
keep this script if you want to remove data some time.
|
|
||||||
NOTE: Run this script as root."""
|
NOTE: Run this script as root."""
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.files = [
|
self.files = [
|
||||||
|
@ -57,5 +56,6 @@ class Clean(object):
|
||||||
print("Remove directory --> {0}".format(d))
|
print("Remove directory --> {0}".format(d))
|
||||||
shutil.rmtree(d)
|
shutil.rmtree(d)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
Clean().start()
|
Clean().start()
|
||||||
|
|
22
man/slpkg.8
22
man/slpkg.8
|
@ -18,8 +18,8 @@ Slpkg is a user-friendly package manager for Slackware installations
|
||||||
Usage: slpkg [COMMANDS|OPTIONS] {repository|package...}
|
Usage: slpkg [COMMANDS|OPTIONS] {repository|package...}
|
||||||
|
|
||||||
Commands:
|
Commands:
|
||||||
[update, --only=[...]]
|
[update, --repositories=[...]]
|
||||||
[upgrade, --only=[...]]
|
[upgrade, --repositories=[...]]
|
||||||
[repo-add [repository name] [URL]]
|
[repo-add [repository name] [URL]]
|
||||||
[repo-remove [repository]]
|
[repo-remove [repository]]
|
||||||
[repo-enable]
|
[repo-enable]
|
||||||
|
@ -29,6 +29,7 @@ Usage: slpkg [COMMANDS|OPTIONS] {repository|package...}
|
||||||
[health, --silent]
|
[health, --silent]
|
||||||
[deps-status, --tree, --graph=[type]]
|
[deps-status, --tree, --graph=[type]]
|
||||||
[new-config]
|
[new-config]
|
||||||
|
[clean]
|
||||||
|
|
||||||
Optional arguments:
|
Optional arguments:
|
||||||
[-h] [-v]
|
[-h] [-v]
|
||||||
|
@ -74,24 +75,24 @@ Print the version of program and exit.
|
||||||
The following commands are available.
|
The following commands are available.
|
||||||
|
|
||||||
.SS update, create and update packages list
|
.SS update, create and update packages list
|
||||||
\fBslpkg\fP \fBupdate\fP, \fB--only=[repositories...]\fP
|
\fBslpkg\fP \fBupdate\fP, \fB--repositories=[repositories...]\fP
|
||||||
.PP
|
.PP
|
||||||
Used to re-synchronize the package lists and create some important files.
|
Used to re-synchronize the package lists and create some important files.
|
||||||
This command must run every new repository is added or new updates is available.
|
This command must run every new repository is added or new updates is available.
|
||||||
.PP
|
.PP
|
||||||
Additional options:
|
Additional options:
|
||||||
.PP
|
.PP
|
||||||
\fB--only=[repositories...]\fP : Update at specifically repositories separate by comma.
|
\fB--repositories=[repositories...]\fP : Update at specifically repositories separate by comma.
|
||||||
|
|
||||||
.SS upgrade, recreate packages list
|
.SS upgrade, recreate packages list
|
||||||
\fBslpkg\fP \fBupgrade\fP, \fB--only=[repositories...]\fP
|
\fBslpkg\fP \fBupgrade\fP, \fB--repositories=[repositories...]\fP
|
||||||
.PP
|
.PP
|
||||||
It is sometimes useful to create all of the base file from the beginning so this
|
It is sometimes useful to create all of the base file from the beginning so this
|
||||||
command delete all the package lists and recreated.
|
command delete all the package lists and recreated.
|
||||||
.PP
|
.PP
|
||||||
Additional options:
|
Additional options:
|
||||||
.PP
|
.PP
|
||||||
\fB--only=[repositories...]\fP : Update at specifically repositories separate by comma.
|
\fB--repositories=[repositories...]\fP : Update at specifically repositories separate by comma.
|
||||||
|
|
||||||
.SS repo-add, add custom repository
|
.SS repo-add, add custom repository
|
||||||
\fBslpkg\fP \fBrepo-add\fP <\fIrepository name\fP> <\fIURL\fP>
|
\fBslpkg\fP \fBrepo-add\fP <\fIrepository name\fP> <\fIURL\fP>
|
||||||
|
@ -152,6 +153,11 @@ Additional options:
|
||||||
This command searches for .new configuration files in /etc/ path and ask the user what todo with those
|
This command searches for .new configuration files in /etc/ path and ask the user what todo with those
|
||||||
files.
|
files.
|
||||||
|
|
||||||
|
.SS clean-tmp, the tmp/ directory
|
||||||
|
\fBslpkg\fP \fBclean-tmp\fP
|
||||||
|
.PP
|
||||||
|
Clean the /tmp/slpkg/ directory from downloaded packages and sources.
|
||||||
|
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
.PP
|
.PP
|
||||||
The following arguments are available.
|
The following arguments are available.
|
||||||
|
@ -388,7 +394,7 @@ For example:
|
||||||
All packages ends with: "*string"
|
All packages ends with: "*string"
|
||||||
All packages include: "*string*"
|
All packages include: "*string*"
|
||||||
|
|
||||||
.SH PASS VARIABLES TO SCRIPT
|
.SH PASS VARIABLES TO THE SCRIPT
|
||||||
If you want to pass variables to the script exported as:
|
If you want to pass variables to the script exported as:
|
||||||
Usage: <NAME_VARIABLE=value>
|
Usage: <NAME_VARIABLE=value>
|
||||||
|
|
||||||
|
@ -437,7 +443,7 @@ For example:
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
Dimitris Zlatanidis <d.zlatanidis@gmail.com>
|
Dimitris Zlatanidis <d.zlatanidis@gmail.com>
|
||||||
.SH HOMEPAGE
|
.SH HOMEPAGE
|
||||||
https://gitlab.com/dslackw/slpkg
|
https://dslackw.gitlab.io/slpkg/
|
||||||
.SH COPYRIGHT
|
.SH COPYRIGHT
|
||||||
Copyright \(co 2014-2019 Dimitris Zlatanidis
|
Copyright \(co 2014-2019 Dimitris Zlatanidis
|
||||||
|
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -69,7 +69,7 @@ setup(
|
||||||
"view", "slackpkg", "tool", "build"],
|
"view", "slackpkg", "tool", "build"],
|
||||||
author=_meta_.__author__,
|
author=_meta_.__author__,
|
||||||
author_email=_meta_.__email__,
|
author_email=_meta_.__email__,
|
||||||
url="https://gitlab.com/dslackw/slpkg",
|
url="https://dslackw.gitlab.io/slpkg/",
|
||||||
package_data={"": ["LICENSE", "README.md", "CHANGELOG"]},
|
package_data={"": ["LICENSE", "README.md", "CHANGELOG"]},
|
||||||
data_files=[("man/man8", ["man/slpkg.8"]),
|
data_files=[("man/man8", ["man/slpkg.8"]),
|
||||||
("/etc/bash_completion.d", ["conf/slpkg.bash-completion"]),
|
("/etc/bash_completion.d", ["conf/slpkg.bash-completion"]),
|
||||||
|
|
|
@ -14,6 +14,6 @@ slpkg: computes dependencies and figures out what things should occur
|
||||||
slpkg: to install packages. Slpkg makes it easier to maintain groups of
|
slpkg: to install packages. Slpkg makes it easier to maintain groups of
|
||||||
slpkg: of machines without having to manually update.
|
slpkg: of machines without having to manually update.
|
||||||
slpkg:
|
slpkg:
|
||||||
slpkg: Homepage: https://gitlab.com/dslackw/slpkg
|
slpkg: Homepage: https://dslackw.gitlab.io/slpkg/
|
||||||
slpkg:
|
slpkg:
|
||||||
slpkg:
|
slpkg:
|
||||||
|
|
|
@ -110,8 +110,8 @@ find $PKG/usr/man -type f -exec gzip -9 {} \;
|
||||||
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
|
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
|
||||||
|
|
||||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||||
cp -a README.md ChangeLog.txt LICENSE TESTING ISSUES KNOWN_ISSUES REPOSITORIES \
|
cp -a README.md ChangeLog.txt LICENSE TESTING ISSUES KNOWN_ISSUES REPOSITORIES.md \
|
||||||
requirements.txt $PKG/usr/doc/$PRGNAM-$VERSION
|
INSTALL.md requirements.txt $PKG/usr/doc/$PRGNAM-$VERSION
|
||||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||||
|
|
||||||
mkdir -p $PKG/install
|
mkdir -p $PKG/install
|
||||||
|
|
|
@ -78,11 +78,13 @@ class MetaData(object):
|
||||||
|
|
||||||
__all__ = "slpkg"
|
__all__ = "slpkg"
|
||||||
__author__ = "dslackw"
|
__author__ = "dslackw"
|
||||||
__version_info__ = (3, 3, 9)
|
__version_info__ = (3, 4, 0)
|
||||||
__version__ = "{0}.{1}.{2}".format(*__version_info__)
|
__version__ = "{0}.{1}.{2}".format(*__version_info__)
|
||||||
__license__ = "GNU General Public License v3 (GPLv3)"
|
__license__ = "GNU General Public License v3 (GPLv3)"
|
||||||
__email__ = "d.zlatanidis@gmail.com"
|
__email__ = "d.zlatanidis@gmail.com"
|
||||||
__maintainer__ = "Dimitris Zlatanidis (dslackw)"
|
__maintainer__ = "Dimitris Zlatanidis (dslackw)"
|
||||||
|
__twitter__ = "https://twitter.com/dslackw"
|
||||||
|
__homepage__ = "https://dslackw.gitlab.io/slpkg/"
|
||||||
|
|
||||||
# Default Slackware release
|
# Default Slackware release
|
||||||
slack_rel = "stable"
|
slack_rel = "stable"
|
||||||
|
@ -159,7 +161,7 @@ class MetaData(object):
|
||||||
slpkg_tmp_patches = _conf_slpkg["PATCHES"]
|
slpkg_tmp_patches = _conf_slpkg["PATCHES"]
|
||||||
checkmd5 = _conf_slpkg["CHECKMD5"]
|
checkmd5 = _conf_slpkg["CHECKMD5"]
|
||||||
del_all = _conf_slpkg["DEL_ALL"]
|
del_all = _conf_slpkg["DEL_ALL"]
|
||||||
del_build = _conf_slpkg["DEL_BUILD"]
|
del_folder = _conf_slpkg["DEL_BUILD"]
|
||||||
sbo_build_log = _conf_slpkg["SBO_BUILD_LOG"]
|
sbo_build_log = _conf_slpkg["SBO_BUILD_LOG"]
|
||||||
makeflags = _conf_slpkg["MAKEFLAGS"]
|
makeflags = _conf_slpkg["MAKEFLAGS"]
|
||||||
default_answer = _conf_slpkg["DEFAULT_ANSWER"]
|
default_answer = _conf_slpkg["DEFAULT_ANSWER"]
|
||||||
|
@ -215,7 +217,7 @@ class MetaData(object):
|
||||||
"ENDC": ""
|
"ENDC": ""
|
||||||
}
|
}
|
||||||
|
|
||||||
CHECKSUMS_link = ("https://raw.gitlabusercontent.com/{0}/{1}/"
|
CHECKSUMS_link = ("https://gitlab.com/{0}/{1}/raw/"
|
||||||
"master/CHECKSUMS.md5".format(__author__, __all__))
|
"master/CHECKSUMS.md5".format(__author__, __all__))
|
||||||
|
|
||||||
# file spacer
|
# file spacer
|
||||||
|
|
|
@ -48,10 +48,10 @@ Usage: slpkg [COMMANDS|OPTIONS] {repository|package...}
|
||||||
_Slackware package manager_______
|
_Slackware package manager_______
|
||||||
|
|
||||||
Commands:
|
Commands:
|
||||||
update, --only=[...] Run this command to update all
|
update, --repositories=[...] Run this command to update all
|
||||||
the packages list.
|
the packages lists.
|
||||||
|
|
||||||
upgrade, --only=[...] Delete and recreate all packages
|
upgrade, --repositories=[...] Delete and recreate all packages
|
||||||
lists.
|
lists.
|
||||||
|
|
||||||
repo-add [repository name] [URL] Add custom repository.
|
repo-add [repository name] [URL] Add custom repository.
|
||||||
|
@ -78,13 +78,15 @@ Commands:
|
||||||
|
|
||||||
new-config Manage .new configuration files.
|
new-config Manage .new configuration files.
|
||||||
|
|
||||||
|
clean-tmp Clean the tmp/ directory from
|
||||||
|
downloaded packages and sources.
|
||||||
Optional arguments:
|
Optional arguments:
|
||||||
-h | --help Print this help message and exit.
|
-h | --help Print this help message and exit.
|
||||||
|
|
||||||
-v | --version Print program version and exit.
|
-v | --version Print program version and exit.
|
||||||
|
|
||||||
-a | --autobuild, [script] [source...] Auto build SBo packages.
|
-a | --autobuild, [script] [source...] Auto build SBo packages.
|
||||||
If you already have downloaded the
|
If you have already downloaded the
|
||||||
script and the source code you can
|
script and the source code you can
|
||||||
build a new package with this
|
build a new package with this
|
||||||
command.
|
command.
|
||||||
|
@ -163,7 +165,7 @@ Optional arguments:
|
||||||
|
|
||||||
You can read more about slpkg from manpage or see examples from readme file.
|
You can read more about slpkg from manpage or see examples from readme file.
|
||||||
Issues: https://gitlab.com/dslackw/slpkg/issues
|
Issues: https://gitlab.com/dslackw/slpkg/issues
|
||||||
Homepage: https://gitlab.com/dslackw/slpkg
|
Homepage: https://dslackw.gitlab.io/slpkg/
|
||||||
"""
|
"""
|
||||||
header()
|
header()
|
||||||
print(options.__doc__)
|
print(options.__doc__)
|
||||||
|
@ -173,8 +175,8 @@ def usage(repo):
|
||||||
"""Usage: slpkg [COMMANDS|OPTIONS] {repository|package...}
|
"""Usage: slpkg [COMMANDS|OPTIONS] {repository|package...}
|
||||||
|
|
||||||
Commands:
|
Commands:
|
||||||
[update, --only=[...]]
|
[update, --repositories=[...]]
|
||||||
[upgrade, --only=[...]]
|
[upgrade, --repositories=[...]]
|
||||||
[repo-add [repository name] [URL]]
|
[repo-add [repository name] [URL]]
|
||||||
[repo-remove [repository]]
|
[repo-remove [repository]]
|
||||||
[repo-enable]
|
[repo-enable]
|
||||||
|
@ -184,6 +186,7 @@ def usage(repo):
|
||||||
[health, --silent]
|
[health, --silent]
|
||||||
[deps-status, --tree, --graph=[type]]
|
[deps-status, --tree, --graph=[type]]
|
||||||
[new-config]
|
[new-config]
|
||||||
|
[clean-tmp]
|
||||||
|
|
||||||
Optional arguments:
|
Optional arguments:
|
||||||
[-h] [-v]
|
[-h] [-v]
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# remove.py file is part of slpkg.
|
# clean.py file is part of slpkg.
|
||||||
|
|
||||||
# Copyright 2014-2019 Dimitris Zlatanidis <d.zlatanidis@gmail.com>
|
# Copyright 2014-2019 Dimitris Zlatanidis <d.zlatanidis@gmail.com>
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
|
@ -28,8 +28,22 @@ import shutil
|
||||||
from slpkg.__metadata__ import MetaData as _meta_
|
from slpkg.__metadata__ import MetaData as _meta_
|
||||||
|
|
||||||
|
|
||||||
def delete(build_folder):
|
def clean_tmp():
|
||||||
"""Delete build directory and all its contents.
|
"""Delete packages and sources from tmp/ directory
|
||||||
"""
|
"""
|
||||||
if _meta_.del_build in ["on", "ON"] and os.path.exists(build_folder):
|
tmps = [_meta_.tmp_path, # /tmp/slpkg/
|
||||||
shutil.rmtree(build_folder)
|
_meta_.build_path, # /tmp/slpkg/build/
|
||||||
|
_meta_.slpkg_tmp_packages, # /tmp/slpkg/packages/
|
||||||
|
_meta_.slpkg_tmp_patches # /tmp/slpkg/patches/
|
||||||
|
]
|
||||||
|
# Delete a whole slpkg folder from the tmp directory
|
||||||
|
if os.path.exists(tmps[0]):
|
||||||
|
shutil.rmtree(tmps[0])
|
||||||
|
print("All packages and sources were deleted from: {0}".format(
|
||||||
|
tmps[0]))
|
||||||
|
# Recreate the paths again
|
||||||
|
if not os.path.exists(tmps[0]):
|
||||||
|
for tmp in tmps:
|
||||||
|
print("Created directory: {0}".format(tmp))
|
||||||
|
os.mkdir(tmp)
|
||||||
|
print("Done!")
|
|
@ -25,6 +25,7 @@
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
from slpkg.clean import clean_tmp
|
||||||
from slpkg.load import Regex
|
from slpkg.load import Regex
|
||||||
from slpkg.desc import PkgDesc
|
from slpkg.desc import PkgDesc
|
||||||
from slpkg.messages import Msg
|
from slpkg.messages import Msg
|
||||||
|
@ -82,7 +83,8 @@ class ArgParse(object):
|
||||||
"update-slpkg",
|
"update-slpkg",
|
||||||
"health",
|
"health",
|
||||||
"deps-status",
|
"deps-status",
|
||||||
"new-config"
|
"new-config",
|
||||||
|
"clean"
|
||||||
]
|
]
|
||||||
|
|
||||||
# checking if repositories exists
|
# checking if repositories exists
|
||||||
|
@ -122,7 +124,7 @@ class ArgParse(object):
|
||||||
if len(self.args) == 1 and self.args[0] == "update":
|
if len(self.args) == 1 and self.args[0] == "update":
|
||||||
Update().repository(only="")
|
Update().repository(only="")
|
||||||
elif (len(self.args) == 2 and self.args[0] == "update" and
|
elif (len(self.args) == 2 and self.args[0] == "update" and
|
||||||
self.args[1].startswith("--only=")):
|
self.args[1].startswith("--repositories=")):
|
||||||
repos = self.args[1].split("=")[-1].split(",")
|
repos = self.args[1].split("=")[-1].split(",")
|
||||||
for rp in repos:
|
for rp in repos:
|
||||||
if rp not in self.meta.repositories:
|
if rp not in self.meta.repositories:
|
||||||
|
@ -178,7 +180,7 @@ class ArgParse(object):
|
||||||
if len(self.args) == 1 and self.args[0] == "upgrade":
|
if len(self.args) == 1 and self.args[0] == "upgrade":
|
||||||
Initialization(False).upgrade(only="")
|
Initialization(False).upgrade(only="")
|
||||||
elif (len(self.args) == 2 and self.args[0] == "upgrade" and
|
elif (len(self.args) == 2 and self.args[0] == "upgrade" and
|
||||||
self.args[1].startswith("--only=")):
|
self.args[1].startswith("--repositories=")):
|
||||||
repos = self.args[1].split("=")[-1].split(",")
|
repos = self.args[1].split("=")[-1].split(",")
|
||||||
for rp in repos:
|
for rp in repos:
|
||||||
if rp not in self.meta.repositories:
|
if rp not in self.meta.repositories:
|
||||||
|
@ -239,6 +241,13 @@ class ArgParse(object):
|
||||||
else:
|
else:
|
||||||
usage("")
|
usage("")
|
||||||
|
|
||||||
|
def command_clean_tmp(self):
|
||||||
|
"""Clean all downloaded packages and sources"""
|
||||||
|
if len(self.args) == 1 and self.args[0] == "clean-tmp":
|
||||||
|
clean_tmp()
|
||||||
|
else:
|
||||||
|
usage("")
|
||||||
|
|
||||||
def auto_build(self):
|
def auto_build(self):
|
||||||
"""Auto built tool
|
"""Auto built tool
|
||||||
"""
|
"""
|
||||||
|
@ -806,6 +815,7 @@ def main():
|
||||||
"health": argparse.command_health,
|
"health": argparse.command_health,
|
||||||
"deps-status": argparse.command_deps_status,
|
"deps-status": argparse.command_deps_status,
|
||||||
"new-config": argparse.command_new_config,
|
"new-config": argparse.command_new_config,
|
||||||
|
"clean-tmp": argparse.command_clean_tmp,
|
||||||
"-a": argparse.auto_build,
|
"-a": argparse.auto_build,
|
||||||
"--autobuild": argparse.auto_build,
|
"--autobuild": argparse.auto_build,
|
||||||
"-l": argparse.pkg_list,
|
"-l": argparse.pkg_list,
|
||||||
|
|
|
@ -226,7 +226,7 @@ class PackageManager(object):
|
||||||
print("| {0}{1}*** WARNING ***{2}").format(
|
print("| {0}{1}*** WARNING ***{2}").format(
|
||||||
" " * 27, self.meta.color["RED"], self.meta.color["ENDC"])
|
" " * 27, self.meta.color["RED"], self.meta.color["ENDC"])
|
||||||
print("| Before you use third-party option, be sure you have"
|
print("| Before you use third-party option, be sure you have"
|
||||||
" updated the package \n| lists. Run the command"
|
" updated the packages \n| lists. Run the command"
|
||||||
" 'slpkg update' and 'slpkg -c slack --upgrade'")
|
" 'slpkg update' and 'slpkg -c slack --upgrade'")
|
||||||
self.msg.template(78)
|
self.msg.template(78)
|
||||||
return removed
|
return removed
|
||||||
|
|
|
@ -23,13 +23,22 @@
|
||||||
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import shutil
|
||||||
|
|
||||||
|
|
||||||
from slpkg.__metadata__ import MetaData as _meta_
|
from slpkg.__metadata__ import MetaData as _meta_
|
||||||
|
|
||||||
|
|
||||||
def delete_package(path, packages):
|
def delete_package(path, packages):
|
||||||
"""Remove downloaded packages
|
"""Delete downloaded packages
|
||||||
"""
|
"""
|
||||||
if _meta_.del_all in ["on", "ON"]:
|
if _meta_.del_all in ["on", "ON"]:
|
||||||
for pkg in packages:
|
for pkg in packages:
|
||||||
os.remove(path + pkg)
|
os.remove(path + pkg)
|
||||||
|
|
||||||
|
|
||||||
|
def delete_folder(folder):
|
||||||
|
"""Delete folder with all files.
|
||||||
|
"""
|
||||||
|
if _meta_.del_folder in ["on", "ON"] and os.path.exists(folder):
|
||||||
|
shutil.rmtree(folder)
|
||||||
|
|
|
@ -30,6 +30,7 @@ from slpkg.utils import Utils
|
||||||
from slpkg.messages import Msg
|
from slpkg.messages import Msg
|
||||||
from slpkg.blacklist import BlackList
|
from slpkg.blacklist import BlackList
|
||||||
from slpkg.downloader import Download
|
from slpkg.downloader import Download
|
||||||
|
from slpkg.remove import delete_folder
|
||||||
from slpkg.dialog_box import DialogUtil
|
from slpkg.dialog_box import DialogUtil
|
||||||
from slpkg.security import pkg_security
|
from slpkg.security import pkg_security
|
||||||
from slpkg.__metadata__ import MetaData as _meta_
|
from slpkg.__metadata__ import MetaData as _meta_
|
||||||
|
@ -39,7 +40,6 @@ from slpkg.pkg.build import BuildPackage
|
||||||
from slpkg.pkg.manager import PackageManager
|
from slpkg.pkg.manager import PackageManager
|
||||||
|
|
||||||
from slpkg.sbo.read import ReadSBo
|
from slpkg.sbo.read import ReadSBo
|
||||||
from slpkg.sbo.remove import delete
|
|
||||||
from slpkg.sbo.greps import SBoGrep
|
from slpkg.sbo.greps import SBoGrep
|
||||||
from slpkg.sbo.sbo_arch import SBoArch
|
from slpkg.sbo.sbo_arch import SBoArch
|
||||||
from slpkg.sbo.compressed import SBoLink
|
from slpkg.sbo.compressed import SBoLink
|
||||||
|
@ -223,7 +223,7 @@ class SBoNetwork(object):
|
||||||
"""Build package
|
"""Build package
|
||||||
"""
|
"""
|
||||||
self.build()
|
self.build()
|
||||||
delete(self.build_folder)
|
delete_folder(self.build_folder)
|
||||||
raise SystemExit()
|
raise SystemExit()
|
||||||
|
|
||||||
def choice_install(self):
|
def choice_install(self):
|
||||||
|
|
|
@ -32,6 +32,7 @@ from slpkg.toolbar import status
|
||||||
from slpkg.log_deps import write_deps
|
from slpkg.log_deps import write_deps
|
||||||
from slpkg.blacklist import BlackList
|
from slpkg.blacklist import BlackList
|
||||||
from slpkg.downloader import Download
|
from slpkg.downloader import Download
|
||||||
|
from slpkg.remove import delete_folder
|
||||||
from slpkg.security import pkg_security
|
from slpkg.security import pkg_security
|
||||||
from slpkg.__metadata__ import MetaData as _meta_
|
from slpkg.__metadata__ import MetaData as _meta_
|
||||||
|
|
||||||
|
@ -41,7 +42,6 @@ from slpkg.pkg.manager import PackageManager
|
||||||
from slpkg.pkg.installed import GetFromInstalled
|
from slpkg.pkg.installed import GetFromInstalled
|
||||||
|
|
||||||
from slpkg.sbo.greps import SBoGrep
|
from slpkg.sbo.greps import SBoGrep
|
||||||
from slpkg.sbo.remove import delete
|
|
||||||
from slpkg.sbo.sbo_arch import SBoArch
|
from slpkg.sbo.sbo_arch import SBoArch
|
||||||
from slpkg.sbo.compressed import SBoLink
|
from slpkg.sbo.compressed import SBoLink
|
||||||
from slpkg.sbo.dependency import Requires
|
from slpkg.sbo.dependency import Requires
|
||||||
|
@ -196,7 +196,7 @@ class SBoInstall(object):
|
||||||
raise SystemExit()
|
raise SystemExit()
|
||||||
self.msg.reference(installs, upgraded)
|
self.msg.reference(installs, upgraded)
|
||||||
write_deps(self.deps_dict)
|
write_deps(self.deps_dict)
|
||||||
delete(self.build_folder)
|
delete_folder(self.build_folder)
|
||||||
|
|
||||||
def view_installing_for_deps(self):
|
def view_installing_for_deps(self):
|
||||||
"""View installing message for dependencies
|
"""View installing message for dependencies
|
||||||
|
|
|
@ -130,7 +130,7 @@ class Patches(object):
|
||||||
if self.meta.arch == "x86_64":
|
if self.meta.arch == "x86_64":
|
||||||
slack_arch = "64"
|
slack_arch = "64"
|
||||||
print("\nSlackware{0} '{1}' v{2} distribution is up to "
|
print("\nSlackware{0} '{1}' v{2} distribution is up to "
|
||||||
"date\n".format(slack_arch, self.version, slack_ver()))
|
"date!\n".format(slack_arch, self.version, slack_ver()))
|
||||||
|
|
||||||
def store(self):
|
def store(self):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -39,11 +39,13 @@ def it_self_update():
|
||||||
download and update itself
|
download and update itself
|
||||||
"""
|
"""
|
||||||
__new_version__ = ""
|
__new_version__ = ""
|
||||||
repository = "gitlab.com"
|
repository = "gitlab"
|
||||||
branch = "master"
|
branch = "master"
|
||||||
ver_link = ("https://{0}/{1}/{2}/raw/"
|
ver_link = ("https://{0}.com/{1}/{2}/raw/"
|
||||||
"{3}/{4}/__metadata__.py".format(repository, _meta_.__author__,
|
"{3}/{4}/__metadata__.py".format(repository,
|
||||||
_meta_.__all__, branch,
|
_meta_.__author__,
|
||||||
|
_meta_.__all__,
|
||||||
|
branch,
|
||||||
_meta_.__all__))
|
_meta_.__all__))
|
||||||
version_data = URL(ver_link).reading()
|
version_data = URL(ver_link).reading()
|
||||||
for line in version_data.splitlines():
|
for line in version_data.splitlines():
|
||||||
|
@ -65,12 +67,13 @@ def it_self_update():
|
||||||
print("") # new line after answer
|
print("") # new line after answer
|
||||||
else:
|
else:
|
||||||
raise SystemExit()
|
raise SystemExit()
|
||||||
dwn_link = ["https://{0}.com/{1}/{2}/archive/"
|
dwn_link = ["https://{0}.com/{1}/{2}/-/archive/"
|
||||||
"v{3}/{4}-{5}.tar.gz".format(repository, _meta_.__author__,
|
"{3}/{4}-{5}.tar.gz".format(repository,
|
||||||
_meta_.__all__,
|
_meta_.__author__,
|
||||||
__new_version__,
|
_meta_.__all__,
|
||||||
_meta_.__all__,
|
__new_version__,
|
||||||
__new_version__)]
|
_meta_.__all__,
|
||||||
|
__new_version__)]
|
||||||
if not os.path.exists(_meta_.build_path):
|
if not os.path.exists(_meta_.build_path):
|
||||||
os.makedirs(_meta_.build_path)
|
os.makedirs(_meta_.build_path)
|
||||||
Download(_meta_.build_path, dwn_link, repo="").start()
|
Download(_meta_.build_path, dwn_link, repo="").start()
|
||||||
|
|
|
@ -31,7 +31,11 @@ def prog_version():
|
||||||
print("Version : {0}\n"
|
print("Version : {0}\n"
|
||||||
"Licence : {1}\n"
|
"Licence : {1}\n"
|
||||||
"Email : {2}\n"
|
"Email : {2}\n"
|
||||||
"Maintainer: {3}".format(_meta_.__version__,
|
"Homepage : {3}\n"
|
||||||
|
"Twitter : {4}\n"
|
||||||
|
"Maintainer: {5}".format(_meta_.__version__,
|
||||||
_meta_.__license__,
|
_meta_.__license__,
|
||||||
_meta_.__email__,
|
_meta_.__email__,
|
||||||
|
_meta_.__homepage__,
|
||||||
|
_meta_.__twitter__,
|
||||||
_meta_.__maintainer__))
|
_meta_.__maintainer__))
|
||||||
|
|
Loading…
Reference in a new issue