Updated to version 3.4.0

Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
Dimitris Zlatanidis 2019-01-23 09:51:02 +01:00
commit 425595b7d9
24 changed files with 1653 additions and 1661 deletions

View file

@ -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

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

29
INSTALL
View file

@ -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
View 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`'

View file

@ -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.

View file

@ -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
View 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.

View file

@ -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()

View file

@ -16,10 +16,10 @@
Slpkg is a user-friendly package manager for Slackware installations Slpkg is a user-friendly package manager for Slackware installations
.SH SYNOPSIS .SH SYNOPSIS
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]
@ -59,9 +60,9 @@ Usage: slpkg [COMMANDS|OPTIONS] {repository|package...}
.SH DESCRIPTION .SH DESCRIPTION
Slpkg is a powerful software package manager that installs, updates, and Slpkg is a powerful software package manager that installs, updates, and
removes packages on Slackware based systems. It automatically computes removes packages on Slackware based systems. It automatically computes
dependencies and figures out what things should occur to install packages. dependencies and figures out what things should occur to install packages.
Slpkg makes it easier to maintain groups of machines without having to Slpkg makes it easier to maintain groups of machines without having to
manually update. manually update.
.SH GLOBAL OPTIONS .SH GLOBAL OPTIONS
@ -74,34 +75,34 @@ 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>
.PP .PP
Add custom binary repository. The repositories will be added to this command should Add custom binary repository. The repositories will be added to this command should
contain at least the files "PACKAGES.TXT" and "CHECKSUMS.md5" and optional file contain at least the files "PACKAGES.TXT" and "CHECKSUMS.md5" and optional file
"ChangeLog.txt" used to control changes. "ChangeLog.txt" used to control changes.
.SS repo-remove, remove custom repository .SS repo-remove, remove custom repository
\fBslpkg\fP \fBrepo-remove\fP <\fIrepository\fP> \fBslpkg\fP \fBrepo-remove\fP <\fIrepository\fP>
.PP .PP
Remove custom repository by name. Remove custom repository by name.
@ -137,7 +138,7 @@ Additional options:
.SS deps-status, print dependencies status .SS deps-status, print dependencies status
\fBslpkg\fP \fBdeps-status\fP \fB--graph=[type]\fP \fBslpkg\fP \fBdeps-status\fP \fB--graph=[type]\fP
.PP .PP
Print dependencies status used by packages. Prerequisite packages have been installed Print dependencies status used by packages. Prerequisite packages have been installed
with the option "# slpkg -s <repository> <packages>". with the option "# slpkg -s <repository> <packages>".
.PP .PP
Additional options: Additional options:
@ -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.
@ -159,15 +165,15 @@ The following arguments are available.
.SS -a, --autobuild, auto build packages .SS -a, --autobuild, auto build packages
\fBslpkg\fP \fB-a\fP <\fIscript.tar.gz\fP> <\fIsources\fP> \fBslpkg\fP \fB-a\fP <\fIscript.tar.gz\fP> <\fIsources\fP>
.PP .PP
If you already have download the script and source with this argument you can build Slackware If you already have download the script and source with this argument you can build Slackware
package from source quickly and easy. Slpkg will grab checksum from the .info file to make control package from source quickly and easy. Slpkg will grab checksum from the .info file to make control
if he does not agree with the versions you will get the wrong message. If you want switch off if he does not agree with the versions you will get the wrong message. If you want switch off
checksum from the configuration file. checksum from the configuration file.
.SS -b, --blacklist, add, remove, view packages in blacklist .SS -b, --blacklist, add, remove, view packages in blacklist
\fBslpkg\fP \fB-b\fP <\fIname of packages\fP> \fB--add\fP, \fB--remove\fP, \fBlist\fP \fBslpkg\fP \fB-b\fP <\fIname of packages\fP> \fB--add\fP, \fB--remove\fP, \fBlist\fP
.PP .PP
Add, remove or listed packages from blacklist file. The settings here affect Add, remove or listed packages from blacklist file. The settings here affect
all repositories. Remove all packages from blacklist use argument like all repositories. Remove all packages from blacklist use argument like
"# slpkg -b --remove". Use asterisk "*" to match pagkages like "# slpkg -b "# slpkg -b --remove". Use asterisk "*" to match pagkages like "# slpkg -b
py* --add", this add all installed packages with starts string "py" or "# slpkg -b py* --add", this add all installed packages with starts string "py" or "# slpkg -b
@ -179,7 +185,7 @@ multi:*multilib* --add", this add all multilib packages from repository "multi".
\fBslpkg\fP \fB-q\fP \fBlist\fP, \fBbuild\fP, \fBinstall\fP, \fBbuild-install\fP \fBslpkg\fP \fB-q\fP \fBlist\fP, \fBbuild\fP, \fBinstall\fP, \fBbuild-install\fP
.PP .PP
Add, remove and listed sbo packages from queue. This argument is very useful if you want Add, remove and listed sbo packages from queue. This argument is very useful if you want
to build and install multiple packages together. Note the correct order if there are to build and install multiple packages together. Note the correct order if there are
dependencies. If you want to remove all the packages from the list run "# slpkg -q --remove". dependencies. If you want to remove all the packages from the list run "# slpkg -q --remove".
(these arguments only working for the sbo repository) (these arguments only working for the sbo repository)
Build or install or build and install packages are queued. Build or install or build and install packages are queued.
@ -192,7 +198,7 @@ Print, reset or edit configuration file.
.SS -l, --list, list of installed packages .SS -l, --list, list of installed packages
\fBslpkg\fP \fB-l\fP <\fIrepository\fP>, \fB--index\fP, \fB--installed\fP, \fB--name\fP \fBslpkg\fP \fB-l\fP <\fIrepository\fP>, \fB--index\fP, \fB--installed\fP, \fB--name\fP
.PP .PP
Print a list of all available packages from repository, index or print only packages installed on the Print a list of all available packages from repository, index or print only packages installed on the
system. Support command "grep" like "# slpkg -l sbo | grep python". system. Support command "grep" like "# slpkg -l sbo | grep python".
.PP .PP
Additional options: Additional options:
@ -207,9 +213,9 @@ Additional options:
\fBslpkg\fP \fB-c\fP <\fIrepository\fP> \fB--upgrade\fP \fB--rebuild\fP \fB--skip=[packages...]\fP, \fBslpkg\fP \fB-c\fP <\fIrepository\fP> \fB--upgrade\fP \fB--rebuild\fP \fB--skip=[packages...]\fP,
\fB--resolve-off\fP, \fB--checklist\fP \fB--resolve-off\fP, \fB--checklist\fP
.PP .PP
Check your packages if up to date. Slackware patches repository works independently of the Check your packages if up to date. Slackware patches repository works independently of the
others i.e not need before updating the list of packages by choosing "# slpkg update", works others i.e not need before updating the list of packages by choosing "# slpkg update", works
directly with the official repository and so always you can have updated your system. directly with the official repository and so always you can have updated your system.
.PP .PP
Additional options: Additional options:
.PP .PP
@ -228,7 +234,7 @@ Additional options:
.SS -s, --sync, synchronize packages, download, build and install package with all dependencies .SS -s, --sync, synchronize packages, download, build and install package with all dependencies
\fBslpkg\fP \fB-s\fP <\fIrepository\fP> <\fInames of packages\fP>, \fB--resolve-off\fP, \fB--case-ins\fP, \fB--patches\fP \fBslpkg\fP \fB-s\fP <\fIrepository\fP> <\fInames of packages\fP>, \fB--resolve-off\fP, \fB--case-ins\fP, \fB--patches\fP
.PP .PP
Installs or upgrade packages from the repositories with automatically resolving all Installs or upgrade packages from the repositories with automatically resolving all
dependencies of the package. dependencies of the package.
.PP .PP
Additional options: Additional options:
@ -265,7 +271,7 @@ Additional options:
.SS -p, --desc, print packages description .SS -p, --desc, print packages description
\fBslpkg\fP \fB-p\fP <\fIrepository\fP> <\fIname of package\fP>, \fB--color=[]\fP \fBslpkg\fP \fB-p\fP <\fIrepository\fP> <\fIname of package\fP>, \fB--color=[]\fP
.PP .PP
Print package description from remote repository with color. Available colors: Print package description from remote repository with color. Available colors:
red, green, yellow, cyan, grey red, green, yellow, cyan, grey
.PP .PP
Additional options: Additional options:
@ -273,9 +279,9 @@ Additional options:
\fB--color=[]\fP : Change color print. \fB--color=[]\fP : Change color print.
.SS -F, --FIND, find packages from repositories .SS -F, --FIND, find packages from repositories
\fBslpkg\fP \fB-F\fP <\fInames of packages\fP>, \fI--case-ins\fP \fBslpkg\fP \fB-F\fP <\fInames of packages\fP>, \fI--case-ins\fP
.PP .PP
Find packages from all repositories are enabled. Useful command to find all available Find packages from all repositories are enabled. Useful command to find all available
packages per repository. packages per repository.
.PP .PP
Additional options: Additional options:
@ -285,7 +291,7 @@ Additional options:
.SS -f, --find, find installed packages .SS -f, --find, find installed packages
\fBslpkg\fP \fB-f\fP <\fInames of packages\fP>, \fB--case-ins\fP, \fB--third-party\fP \fBslpkg\fP \fB-f\fP <\fInames of packages\fP>, \fB--case-ins\fP, \fB--third-party\fP
.PP .PP
Find installed packages with view total file size. Find installed packages with view total file size.
Example you can view all installed sbo packages like "# slpkg -f _SBo". Example you can view all installed sbo packages like "# slpkg -f _SBo".
.PP .PP
Additional options: Additional options:
@ -297,7 +303,7 @@ Additional options:
.SS -n, --network, view SBo packages .SS -n, --network, view SBo packages
\fBslpkg\fP \fB-n\fP <\fIname of package\fP>, <\fI[pattern], --checklist\fP>, \fB--case-ins\fP \fBslpkg\fP \fB-n\fP <\fIname of package\fP>, <\fI[pattern], --checklist\fP>, \fB--case-ins\fP
.PP .PP
View complete slackbuilds.org site in your terminal. Read file, download, View complete slackbuilds.org site in your terminal. Read file, download,
build or install etc. Use "--checklist" additional option to load all repository, example: build or install etc. Use "--checklist" additional option to load all repository, example:
"# slpkg -n --checklist". "# slpkg -n --checklist".
.PP .PP
@ -308,26 +314,26 @@ Additional options:
\fB--case-ins\fP : Search package name in repository with case insensitive. \fB--case-ins\fP : Search package name in repository with case insensitive.
.SS -i, --installpkg, install Slackware binary packages .SS -i, --installpkg, install Slackware binary packages
\fBslpkg\fP \fB-i\fP \fB[--warn, --md5sum, --root /otherroot, --infobox, --menu, --terse, \fBslpkg\fP \fB-i\fP \fB[--warn, --md5sum, --root /otherroot, --infobox, --menu, --terse,
--ask, --priority ADD|REC|OPT|SKP, --tagfile /somedir/tagfile]\fP <\fIpackages.t?z\fP> --ask, --priority ADD|REC|OPT|SKP, --tagfile /somedir/tagfile]\fP <\fIpackages.t?z\fP>
.PP .PP
Installs single binary packages designed for use with the Slackware Linux Installs single binary packages designed for use with the Slackware Linux
distribution into your system. More information please read "man installpkg". distribution into your system. More information please read "man installpkg".
.SS -u, --upgradepkg, install-upgrade Slackware binary packages with new .SS -u, --upgradepkg, install-upgrade Slackware binary packages with new
\fBslpkg\fP \fB-u\fP \fB[--dry-run, --install-new, --reinstall, --verbose]\fP <\fIpackages.t?z\fP> \fBslpkg\fP \fB-u\fP \fB[--dry-run, --install-new, --reinstall, --verbose]\fP <\fIpackages.t?z\fP>
.PP .PP
Normally upgrade only upgrades packages that are already installed on the system, 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. and will skip any packages that do not already have a version installed.
More information please read "man upgradepkg". More information please read "man upgradepkg".
.SS -r, --removepkg, remove previously installed Slackware binary packages .SS -r, --removepkg, remove previously installed Slackware binary packages
\fBslpkg\fP \fB-r\fP \fB[-copy, -keep, -preserve, -warn]\fP <\fInames of packages\fP>, \fB--deps\fP, \fB--check-deps\fP, \fB--tag\fP, \fB--checklist\fP, \fB--third-party\fP \fBslpkg\fP \fB-r\fP \fB[-copy, -keep, -preserve, -warn]\fP <\fInames of packages\fP>, \fB--deps\fP, \fB--check-deps\fP, \fB--tag\fP, \fB--checklist\fP, \fB--third-party\fP
.PP .PP
Removes a previously installed Slackware package, while writing a progress report to Removes a previously installed Slackware package, while writing a progress report to
the standard output. A package may be specified either by the full package name (as the standard output. A package may be specified either by the full package name (as
you'd see listed in /var/log/packages/), or by the base package name. If installed you'd see listed in /var/log/packages/), or by the base package name. If installed
packages with command "# slpkg -s <repo> <packages>" then write a file in /var/log/slpkg/dep/ packages with command "# slpkg -s <repo> <packages>" then write a file in /var/log/slpkg/dep/
with all dependencies and it allows you can remove them all together. with all dependencies and it allows you can remove them all together.
More information please read "man removepkg". More information please read "man removepkg".
.PP .PP
@ -355,7 +361,7 @@ command.
For example: For example:
\fBslpkg \-\-help\fP - display help for slpkg \fBslpkg \-\-help\fP - display help for slpkg
.SH DEFAULT REPOSITORIES .SH DEFAULT REPOSITORIES
slackware.com = "slack" slackware.com = "slack"
SlackBuilds.org = "sbo" SlackBuilds.org = "sbo"
Alien's = "alien" Alien's = "alien"
@ -373,7 +379,7 @@ For example:
Cinnamon Desktop Environment = "csb" Cinnamon Desktop Environment = "csb"
Connochaetos slack-n-free = "connos" Connochaetos slack-n-free = "connos"
Microlinux mles = "mles" Microlinux mles = "mles"
Default enable repository is "slack" and "sbo". Default enable repository is "slack" and "sbo".
Add or remove default repository in configuration file "/etc/slpkg/repositories.conf". Add or remove default repository in configuration file "/etc/slpkg/repositories.conf".
Read REPOSITORIES file for particularities. Read REPOSITORIES file for particularities.
@ -388,8 +394,8 @@ 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>
Example: Example:
@ -425,7 +431,7 @@ For example:
SlackBuilds logs and dependencies files SlackBuilds logs and dependencies files
/var/lib/slpkg /var/lib/slpkg
PACKAGES.TXT files PACKAGES.TXT files
SLACKBUILDS.TXT files SLACKBUILDS.TXT files
CHECKSUMS.md5 files CHECKSUMS.md5 files
FILELIST.TXT files FILELIST.TXT files
@ -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

View file

@ -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"]),

View file

@ -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:

View file

@ -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

View file

@ -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

View file

@ -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]

View file

@ -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!")

View file

@ -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,

View file

@ -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

View file

@ -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)

View file

@ -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):

View file

@ -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

View file

@ -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):
""" """

View file

@ -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()

View file

@ -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__))