From a307c7a4c70876a233ff2fb3a57a6af938fde5b6 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Sat, 14 May 2022 10:58:46 +0300 Subject: [PATCH 01/11] Fixed stderr error output Signed-off-by: Dimitris Zlatanidis --- bin/slpkg | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/slpkg b/bin/slpkg index 064cb186..93bd0158 100755 --- a/bin/slpkg +++ b/bin/slpkg @@ -40,6 +40,5 @@ if __name__ == "__main__": s_user() virtual_env() main() - except KeyboardInterrupt: - print() - raise SystemExit() + except KeyboardInterrupt as err: + raise SystemExit(err) From 3b9d5f16678af7d2c6bc9fa5e1e5e35a0d8d7825 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Tue, 24 May 2022 16:42:04 +0300 Subject: [PATCH 02/11] Fixed stderr error output --- slpkg/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slpkg/main.py b/slpkg/main.py index d76f78ba..f7ae5933 100644 --- a/slpkg/main.py +++ b/slpkg/main.py @@ -781,7 +781,7 @@ class ArgParse(BlackList): if not_found: for ntf in not_found: self.msg.pkg_not_found("", ntf, "Not installed", "") - raise SystemExit(1) + raise SystemExit(0) def if_checklist(self): try: From dad71c41ae702e50bf005ab4e7b7b42ff2dbcf33 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Tue, 24 May 2022 16:45:57 +0300 Subject: [PATCH 03/11] Updated class name --- slpkg/auto_pkg.py | 2 +- slpkg/main.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/slpkg/auto_pkg.py b/slpkg/auto_pkg.py index 86b1310a..00cab8cc 100644 --- a/slpkg/auto_pkg.py +++ b/slpkg/auto_pkg.py @@ -28,7 +28,7 @@ from slpkg.__metadata__ import MetaData as _meta_ from slpkg.pkg.manager import PackageManager -class Auto: +class AutoInstall: """Select Slackware command to install packages """ def __init__(self, packages): diff --git a/slpkg/main.py b/slpkg/main.py index f7ae5933..aa33eeb0 100644 --- a/slpkg/main.py +++ b/slpkg/main.py @@ -29,7 +29,6 @@ from slpkg.clean import clean_tmp from slpkg.load import Regex from slpkg.desc import PkgDesc from slpkg.messages import Msg -from slpkg.auto_pkg import Auto from slpkg.config import Config from slpkg.checks import Updates from slpkg.repoinfo import RepoInfo @@ -37,6 +36,7 @@ from slpkg.repolist import RepoList from slpkg.repositories import Repo from slpkg.blacklist import BlackList from slpkg.version import prog_version +from slpkg.auto_pkg import AutoInstall from slpkg.health import PackageHealth from slpkg.new_config import NewConfig from slpkg.tracking import TrackingDeps @@ -777,7 +777,7 @@ class ArgParse(BlackList): else: not_found.append(pkg) if packages: - Auto(packages).select() + AutoInstall(packages).select() if not_found: for ntf in not_found: self.msg.pkg_not_found("", ntf, "Not installed", "") From 7598b1fe9fa7059c3fd81d3e2918cd08b9ac9cb3 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Tue, 24 May 2022 16:48:35 +0300 Subject: [PATCH 04/11] Updated examples doc --- EXAMPLES.md | 87 ----------------------------------------------------- 1 file changed, 87 deletions(-) diff --git a/EXAMPLES.md b/EXAMPLES.md index 8b3f3096..2c2858f2 100644 --- a/EXAMPLES.md +++ b/EXAMPLES.md @@ -1,92 +1,5 @@ # Slpkg - -##### Usage - -Before you start to use slpkg need to run '`slpkg update`' to synchronize the lists of packages, -also every time you add a new repository. - -To add or remove repositories you have to edit the file '`/etc/slpkg/repositories.conf`' -or run '`slpkg repo-enable`' (python3-pythondialog required). - -Add custom repositories with the command '`slpkg add-repo `' and -after run '`slpkg update`' to update package list. - -View list of repositories with the command `slpkg repo-list` or get repository information -with the command '`slpkg repo-info `'. - -Update slpkg itself simply run '`slpkg update slpkg`', and slpkg check from GitLab repository if the -new version is available. - -Checking packages health with the command '`slpkg health`' and slpkg check if the files missing -from the package file list. - -View the dependencies status with the command '`slpkg deps-status`' or draw image map dependencies -with the additional option '`--graph=[image]`'. - -Manage '`.new`' configuration files with the command '`slpkg new-config`', like remove, overwrite, -merge etc. - -If you have already downloaded the script and the source code you can build the package with the -command '`slpkg -a `'. - -Manage the packages in the blacklist with the command '`slpkg -b --add or --remove`'. - -Add the SBo packages to the queue with the command '`slpkg -q --add or --remove`' and -manage as build, install or build and install with the command '`slpkg build or install or -build-install`'. This is very useful if you want to install multiple packages together, suffice to -add in the right order if there are dependent packages. - -View list of the packages from specific repository with command '`slpkg -l `'. -Combine with the command '`grep`' to catch the results you want. - -Check and upgrade your distribution or upgrade your packages with the command '`slpkg -c ---upgrade`'. Don't forget to update the packages lists before (for the '`slack`' repository it's not -necessary). This command except upgrade the packages will fix the packages with the broken -dependencies. Switch off the automatic resolve dependencies with the additional option '`--resolve-off`'. -Use '`--checklist`' option to help you to choose easy the packages. For advanced users, the -option '`--skip`' give them more power (see manpage). - -The most famous command is '`slpkg -s `', this command downloads, build and -installs packages and resolve all the dependencies or switch off resolve with the option -'`--resolve-off`'. Also the additional option '`--case-ins`' help you find the packages with case -insensitive. Two new arguments, help you to rebuild '`--rebuild`' or reinstall '`--reinstall`' packages. -The last one argument '`--patches`' help you to switch in the '`patches/`' directory, only for the slack -repository. - -Tracking the dependencies of a package with command '`slpkg -t `', displays a -package dependency tree and also shows to you which ones are installed on your system events. -Check if the packages used from other packages with the option '`--check-deps`' or draw image map -dependencies with the additional option '`--graph=[image]`'. - -Get information description of a package with the command '`slpkg -p `' and -change the color of the text with the additional flag '`--color=[]`'. - -View a SBo package page on your terminal with command `slpkg -n ` and then manage -multiple choices such read, download, build, install etc. - -If you want to find a package of all the repositories, this command will solve your hands -'`slpkg -F `', it will search in all the enable repositories and will print all the -packages that match the description that you enter. - -If you want to see if any packages are installed on your system enter the command -'`slpkg -f `'. The option '`--third-party`' help you to view only the third-party -packages - -The next three commands '`slpkg --installpkg, --upgradepkg, --removepkg `' install, upgrade, -remove packages from your system events. Notable mention you must give in the command -'`slpkg --removepkg `' which you can remove the packages with all dependencies together -after editing configuration file '`/etc/slpkg/slpkg.conf`' (default is disable) or add additional -option '`--deps`'. Also you can check if the packages they are used as dependency with additional -option '`--check-deps`'. Option '`--tag`' allow to remove packages by TAG. Optional you can use -the dialog utility with the additional option '`--checklist`' (require python3-pythondialog). Rmove -third-party packages with the option '`--third-party`'. - -The command '`slpkg -d `' is useful to print the entire contents of a package. - -Some examples you will see below. - - ##### Slpkg Examples Enable or disable default repositories, edit '`/etc/slpkg/repositories.conf`' file or with the command. From 827cccc6efe0c33eb75d71a041876c07a57cb8d9 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Tue, 24 May 2022 17:09:17 +0300 Subject: [PATCH 05/11] Updated repositories.md file --- REPOSITORIES.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/REPOSITORIES.md b/REPOSITORIES.md index 5f9fabf9..f174c58e 100644 --- a/REPOSITORIES.md +++ b/REPOSITORIES.md @@ -1,17 +1,17 @@ -### This file was created to explain some peculiarities of repositories used by the slpkg. +## 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: +## 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 +Rworkman's (rlw) repository use dependencies where displayed in a 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. @@ -35,13 +35,13 @@ Alien's ktown (ktown), Alien's multilib (multi), Slacke E17 and E18, slack-n-fre 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. + not, because there is no different file '`ChangeLog.txt`' for each version. -##### Custom repositories: +## 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`' + the '`PACKAGES.TXT`' files and '`CHECKSUMS.md5`' at 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. @@ -51,6 +51,6 @@ Sometimes you may experience some problems with these repositories such as the n can not be calculated, good is the report these problems. -##### Slackware ARM repositories: +## Slackware ARM repositories: Slackware ARM users will must use only two repositories at the moment slack and sbo. From 1576018ee53da88d75f523e94721a8c8326a0ee3 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Tue, 24 May 2022 17:15:31 +0300 Subject: [PATCH 06/11] Added version 3.9.9 Signed-off-by: Dimitris Zlatanidis --- ChangeLog.txt | 4 ++++ README.md | 2 +- slpkg/__metadata__.py | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index e5c94670..5edbb2d2 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,7 @@ +3.9.8 - 12/05/2022 +Updated: +- Stderr error output to auto-install packages + 3.9.8 - 12/05/2022 Bugfix: - Flag (--repos=) TypeError: exceptions must derive from BaseException diff --git a/README.md b/README.md index 768a1d8f..1c658594 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# slpkg 3.9.8 +# slpkg 3.9.9 Slpkg is a powerful software package manager that installs, updates, and removes packages on [Slackware](http://www.slackware.com/) based systems. It automatically computes dependencies and diff --git a/slpkg/__metadata__.py b/slpkg/__metadata__.py index 29a6084a..99c42418 100644 --- a/slpkg/__metadata__.py +++ b/slpkg/__metadata__.py @@ -81,7 +81,7 @@ class MetaData: __all__ = "slpkg" __author__ = "dslackw" - __version_info__ = (3, 9, 8) + __version_info__ = (3, 9, 9) __version__ = "{0}.{1}.{2}".format(*__version_info__) __license__ = "GNU General Public License v3 (GPLv3)" __email__ = "d.zlatanidis@gmail.com" From 44429ea8e0ca2b13b2d98912d1e8dac08be78100 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Tue, 24 May 2022 17:30:31 +0300 Subject: [PATCH 07/11] Switch to .rst file Signed-off-by: Dimitris Zlatanidis --- README.md | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 README.md diff --git a/README.md b/README.md deleted file mode 100644 index 1c658594..00000000 --- a/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# slpkg 3.9.9 - -Slpkg is a powerful software package manager that installs, updates, and removes packages on -[Slackware](http://www.slackware.com/) based systems. It automatically computes dependencies and -figures out what things should occur to install packages. Slpkg makes it easier to maintain groups -of machines without having to manually update. - -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, -upgrading or removing packages. - -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 -display warning messages, etc. - -[EXAMPLES.md](https://gitlab.com/dslackw/slpkg/blob/master/EXAMPLES.md) Explore some examples. - - -#### Asciicast: - -[](https://asciinema.org/a/3uFNAOX8o16AmKKJDIvdezPBa) - - -##### Copyright - -Copyright 2014-2022 © Dimitris Zlatanidis. Slackware® is a Registered Trademark of Patrick Volkerding. Linux is a Registered Trademark of Linus Torvalds. From d0d2b864feace63ee3a7f8c47c59af1d8e358846 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Tue, 24 May 2022 17:30:54 +0300 Subject: [PATCH 08/11] Switch to .rst file Signed-off-by: Dimitris Zlatanidis --- README.rst | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 README.rst diff --git a/README.rst b/README.rst new file mode 100644 index 00000000..6826da12 --- /dev/null +++ b/README.rst @@ -0,0 +1,37 @@ +*********** +slpkg 3.9.9 +*********** + +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 should occur to install packages. Slpkg makes it easier to maintain groups +of machines without having to manually update. + +Slpkg works in accordance with the standards of the organization `SlackBuilds.org `_ +to build packages. Also uses the Slackware Linux instructions for installation, +upgrading or removing packages. + +What makes slpkg distinguish from the other tools; The user-friendliness it's a primary +target as well as easy to understand and use, also uses colours to highlight packages and +display warning messages, etc. + +Look in the `EXAMPLES.md `_ file to explore some examples. + + +Asciicast +--------- + + +.. image:: https://gitlab.com/dslackw/images/raw/master/slpkg/asciicast.png + :target: https://asciinema.org/a/3uFNAOX8o16AmKKJDIvdezPBa + :width: 250px + + +Copyright +--------- + +Copyright 2014-2022 © Dimitris Zlatanidis. + +Slackware® is a Registered Trademark of Patrick Volkerding. + +Linux is a Registered Trademark of Linus Torvalds. From 23d0925f2ff17e37708987d739979a1dd7523a1c Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Tue, 24 May 2022 17:31:57 +0300 Subject: [PATCH 09/11] Fixed image width Signed-off-by: Dimitris Zlatanidis --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 6826da12..eb0e193b 100644 --- a/README.rst +++ b/README.rst @@ -24,7 +24,7 @@ Asciicast .. image:: https://gitlab.com/dslackw/images/raw/master/slpkg/asciicast.png :target: https://asciinema.org/a/3uFNAOX8o16AmKKJDIvdezPBa - :width: 250px + :width: 200px Copyright From 8790588c2951bd33fd781bbc40462206e0e349c5 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Tue, 24 May 2022 17:54:32 +0300 Subject: [PATCH 10/11] Added usage and install Signed-off-by: Dimitris Zlatanidis --- README.rst | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.rst b/README.rst index eb0e193b..b6b3e1b2 100644 --- a/README.rst +++ b/README.rst @@ -27,6 +27,30 @@ Asciicast :width: 200px +Install +------- + +Install from the official third party `SBo repository `_, or directly from the source: + + +.. code-block:: bash + + $ wget slpkg-3.9.9.tar.gz + $ tar xvf slpkg-3.9.9.tar.gz + $ cd slpkg-3.9.9 + $ ./install.sh + + +Usage +----- + +.. code-block:: bash + + $ slpkg update + $ slpkg -s sbo install + $ slpkg --help + + Copyright --------- From 6b33842a952711267ab28e558bd4142db55b7095 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Tue, 24 May 2022 17:56:26 +0300 Subject: [PATCH 11/11] Rename readme Signed-off-by: Dimitris Zlatanidis --- slackbuild/slpkg.SlackBuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slackbuild/slpkg.SlackBuild b/slackbuild/slpkg.SlackBuild index 2ac8511c..f54decc8 100755 --- a/slackbuild/slpkg.SlackBuild +++ b/slackbuild/slpkg.SlackBuild @@ -108,7 +108,7 @@ 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 mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a README.md ChangeLog.txt LICENSE ISSUES KNOWN_ISSUES REPOSITORIES.md \ +cp -a README.rst ChangeLog.txt LICENSE ISSUES KNOWN_ISSUES REPOSITORIES.md \ INSTALL.md requirements.txt $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild