diff --git a/.gitignore b/.gitignore index ed20ece0..38df1be4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ /dist /build +/public *.pyc __pycache__ .pipy diff --git a/ChangeLog.txt b/ChangeLog.txt index 723069f5..6f74a8ab 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,14 @@ +3.3.9 - 14/01/2019 +Updated: +- Readme file and added example text file +- Checklist error message +- Removed unnecessary arguments ALL +Added: +- Support elilo and grub upgrade boot loader after kernel upgrade +- View third party packages +- Remove third party packages +- Added file size in the removed packages + 3.3.8 - 09/06/2018 Fixed: - aria2c (optional downloader) downloading path @@ -42,7 +53,7 @@ Added: - Set computer architecture via configuration file /etc/slpkg/slpkg.conf 3.3.0 - 01/10/2017 -Fixed: +Fixed: - TypeError: stat() argument 1 must be encoded string without null bytes, not str #100 - Check file script before build (IOError: [Errno 2] No such file or @@ -144,7 +155,7 @@ Remove: 3.1.8 - 11/10/2016 Added: - Feature rebuild packages for sbo repository and reinstall binaries packages -- Slackware package management tools. Thanks to Thomas Szteliga #71 +- Slackware package management tools. Thanks to Thomas Szteliga #71 Fixed: - Print repository error message without usage - Count packages in deps-status option @@ -284,7 +295,7 @@ Added: - Additional option "--case-ins" case insensitive in "--tracking" option Fixed: - Matching packages with case insensitive option - + 2.9.2 - 21/09/2015 Added: - Clear screen in "--network" option @@ -931,7 +942,7 @@ Fixed: - Build time Added: - Search dependencies from local SLACKBUILDS.TXT file - + 1.8.7 - 19/09/2014 Fixed: - Build time @@ -942,7 +953,7 @@ Fixed: - Updated find installed packages Added: - Print total file size of installed packages -- Highlight upgraded packages from slack repo +- Highlight upgraded packages from slack repo 1.8.5 - 13/09/2014 Fixed: @@ -984,7 +995,7 @@ Added: - Install.sh script Fixed: - Remove destination file after copy to sbo script directory -- Fix appearance build tag, the packages that do not include +- Fix appearance build tag, the packages that do not include - _slack tag 1.7.8 - 28/08/2014 @@ -1006,7 +1017,7 @@ Added: - Upgrade all SBo packages 1.7.5 - 22/08/2014 -Added: +Added: - Report of packages will be installed the options `slpkg -s sbo `, `slpkg -s slack `, `slpkg -c slack upgrade` Fixed: - Mirrors for Slackware x86 @@ -1016,7 +1027,7 @@ Fixed: - BugFix NameError: global name 'getpass' is not defined Added: - Downloaded .asc files to upgrade or install packages from Slackware tree -- Calculate file sizes in the process of installing +- Calculate file sizes in the process of installing - Packages or upgrading from Slackware mirrors 1.7.3 - 16/8/2014 @@ -1026,7 +1037,7 @@ Fixed: - Removed some code system and replaced with Python code. - Reinstall if packages exist and upgrading if not in options slpkg -s slack - New paths created, ChangeLog.txt saved in /var/log/slpkg and SLACKBUILDS.TXT in /var/lib/slpkg/sbo_repo -- Upgrade initilazation method +- Upgrade initilazation method - Replace mkdir -p with os.mkdir and create directories only if not exists 1.7.2 - 13/08/2014 @@ -1095,7 +1106,7 @@ Fixed: Added: - Distribution upgrade from official Slackware mirrors `slpkg -c slack upgrade` Fixed: -- Change detection packages mode. 2x much faster +- Change detection packages mode. 2x much faster - Messages 1.6.1 - 22/07/2014 @@ -1103,10 +1114,10 @@ Fixed: - Fix messages - Package remove - Package find -- Package print contents +- Package print contents 1.6.0 - 21/07/2014 -Fixed: +Fixed: - Remove package (slpkg -r) - Added and fix messages - Create __metadata__ @@ -1158,7 +1169,7 @@ Fixed: - Source code 1.4.8 - 06/06/2014 -Fixed: +Fixed: - Print message to upgrade, install, reinstall and report files to removed 1.4.7 - 04/06/2014 @@ -1177,7 +1188,7 @@ Added: 1.4.4 - 03/06/2014 Added: - Support ALL extra sources -Fixed: +Fixed: - Out of range in SBo version link with filename 1.4.3 - 03/06/2014 @@ -1235,7 +1246,7 @@ Added: Fixed: - Bbuild arguments messages - TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' in sbo_requires_pkg function (sbo_url = sbo_url + name + ".info") - + 1.3.1 - 21/05/2014 Added: - View README file @@ -1269,7 +1280,7 @@ Added: - Download source code by pc arcitecture 1.2.3 - 19-05-2014 -Fixed: +Fixed: - Check packages for updates Added: - Progress bar to searching @@ -1302,7 +1313,7 @@ Fixed: 1.1.6 - 15-05-2014 Fixed: -- Removed stupid option binary search +- Removed stupid option binary search 1.1.5 - 15/05/2014 Added: @@ -1330,7 +1341,7 @@ Added: - Search from SBo and print link for download 1.0.9 - 12/05/2014 -Fixed: +Fixed: - Warning messages amd colors print out 1.0.8 - 12/05/2014 @@ -1349,7 +1360,7 @@ Fixed: - Updated slackbuild argument 1.0.5 - 10/05/2014 -Added: +Added: - Auto build package choice Fixed: - Man page and README.rst file diff --git a/EXAMPLES.txt b/EXAMPLES.txt index 1c30e369..e7980d63 100644 --- a/EXAMPLES.txt +++ b/EXAMPLES.txt @@ -1,4 +1,4 @@ -Slpkg +Slpkg ===== @@ -13,71 +13,83 @@ run '# slpkg repo-enable' (python2-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 +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 -new versions are available. +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. +Checking packages health with the command "# slpkg health" and slpkg check if the files missing +from the package file list. -Print the dependencies status used by packages with the command '# slpkg deps-status' or -drawing image map dependencies with the additional option '--graph=[image]'. +Print 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 +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 black list with the command '# slpkg -b --add or --remove'. +Manage the packages in the blacklist with the command '# slpkg -b --add or --remove'. -Add the SBo packages to 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 +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 +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 list before (for '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 man page). +Check and upgrade your distribution or upgrade your packages with the command '# slpkg -c +--upgrade'. Don't forget to update the packages list 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 with the resolve all the dependencies or switch off resolve with the -additional option '--resolve-off'. +The most famous command is '# slpkg -s ', this command downloads, build +and installs packages with the resolve all the dependencies or switch off resolve with the +additional option '--resolve-off'. Also the additional option "--case-ins" help you find the packages with case insensitive. Two new arguments will help you to rebuild '--rebuild' or reinstall '--reinstall' packages. The last one argument "--patches" help you to switch in the patches/ directory only for 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 +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 additional option '--check-deps' or -drawing image map dependencies with the additional option '--graph=[image]'. +Check if the packages used from other packages with the additional 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 ' +Get information description of a package with the command '# slpkg -p ' and change the color of text with the additional flag '--color=[]'. -View a SBo package page on your terminal with command '# slpkg -n ' and then manage +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 the packages of all the repositories, that command will solve your hands '# slpkg -F '. It will search in all the enabled repositories will find the configuration file '/etc/slpkg/repositories.conf' will print all the packages that match the description that you enter. +If you want to find the packages of all the repositories, that 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 surprise in the end is the reporting of the packages sum and size that found. +If you want to see if any packages are installed on your system enter the command '# slpkg -f '. +The surprise in the end is the reporting of the packages sum and size that +found. The additional option "--third-party" help to view only the third-party +packages -The next four commands '# slpkg --installpkg, --upgradepkg, --removepkg ' install, upgrade, +The next four commands '# slpkg --installpkg, --upgradepkg, --removepkg ' install, upgrade, remove packages from your system events. -Notable mention must give the command '# slpkg --removepkg ' which 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 used as dependency with additional the option "--check-deps". Option "--tag" allow to remove packages with by TAG. -Optional you can use the dialog utility with the additional option "--checklist" (require python2-pythondialog). +Notable mention must you give in the command '# slpkg --removepkg ' +which 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 with by TAG. +Optional you can use the dialog utility with the additional option +"--checklist" (require python2-pythondialog). Rmove the third-party packages +with the option "--third-party". -The last command is useful to print the entire contents of a package installed on the system with the command '# slpkg -d '. +The last command is useful to print the entire contents of a package installed on the system with +the command '# slpkg -d '. Some examples you will see below. @@ -203,7 +215,7 @@ Command Line Tool Usage -r | --removepkg, [options] [package...], Removes a previously installed --deps, --check-deps, --tag, Slackware binary packages, - --checklist while writing a progress report + --checklist, --third-party while writing a progress report options=[-warn, -preserve, -copy, to the standard output. -keep] Use only package name. @@ -213,7 +225,7 @@ Command Line Tool Usage Slpkg Examples -------------- -Enable or disable default repositories, edit /etc/slpkg/repositories.conf file or with +Enable or disable default repositories, edit /etc/slpkg/repositories.conf file or with the command. (require pythondialog, install with '# slpkg -s sbo python2-pythondialog'): @@ -222,7 +234,7 @@ the command. .. image:: https://gitlab.com/dslackw/images/raw/master/slpkg/repo_enable.png -If you use slpkg for the first time will have to create and update the package +If you use slpkg for the first time will have to create and update the package list. This command must be executed to update the package lists: $ slpkg update @@ -247,7 +259,7 @@ list. This command must be executed to update the package lists: Also you can check ChangeLog.txt for changes like: $ slpkg -c sbo - + +============================================================================== | Repository Status +============================================================================== @@ -258,7 +270,7 @@ Also you can check ChangeLog.txt for changes like: From 1 repositories need 1 updating. Run the command 'slpkg update'. - $ slpkg -c ALL + $ slpkg --check +============================================================================== | Repository Status @@ -282,19 +294,19 @@ Add and remove custom repositories: $ slpkg repo-add repo1 file:///home/user1/repos/alien/ - + Repository 'repo1' successfully added - + $ slpkg repo-remove ponce Repository 'ponce' successfully removed - + View information about the repositories: - + $ slpkg repo-list - + +============================================================================== | Repo id Repo URL Default Status +============================================================================== @@ -317,7 +329,7 @@ View information about the repositories: Repositories summary =============================================================================== 3/14 enabled default repositories and 1 custom. - For enable or disable default repositories edit '/etc/slpkg/repositories.conf' + For enable or disable default repositories edit '/etc/slpkg/repositories.conf' file. $ slpkg repo-info alien @@ -338,7 +350,7 @@ Installing packages from the repositories (supporting multi packages): Reading package lists... Done Resolving dependencies... Done - The following packages will be automatically installed or upgraded + The following packages will be automatically installed or upgraded with new version: +============================================================================== @@ -359,17 +371,17 @@ Installing packages from the repositories (supporting multi packages): will be upgraded. Would you like to continue [y/N]? - - + + Example install multi packages: - + $ slpkg -s sbo brasero pylint atkmm Reading package lists... Done Resolving dependencies... Done - The following packages will be automatically installed or upgraded + The following packages will be automatically installed or upgraded with new version: - + +============================================================================== | Package New version Arch Build Repos Size +============================================================================== @@ -426,13 +438,13 @@ Installing packages from the repositories (supporting multi packages): Would you like to continue [y/N]? - + Close auto resolve dependencies: $ slpkg -s alien atkm --resolve-off Reading package lists... Done - The following packages will be automatically installed or upgraded + The following packages will be automatically installed or upgraded with new version: +============================================================================== @@ -440,25 +452,25 @@ Close auto resolve dependencies: +============================================================================== Installing: atkmm 2.22.6 x86_64 1 alien 124 K - - Installing summary - =============================================================================== - Total 1 package. - 1 package will be installed, 0 will be upgraded and 0 will be reinstalled. - Need to get 124 Kb of archives. - After this process, 620 Kb of additional disk space will be used. - Would you like to continue [y/N]? + Installing summary + =============================================================================== + Total 1 package. + 1 package will be installed, 0 will be upgraded and 0 will be reinstalled. + Need to get 124 Kb of archives. + After this process, 620 Kb of additional disk space will be used. + + Would you like to continue [y/N]? Build packages and passing variables to the script: First export variable(s) like: - + $ export FFMPEG_ASS=yes FFMPEG_X264=yes - - + + And then run as you know: $ slpkg -s sbo ffmpeg @@ -471,7 +483,7 @@ Build packages and passing variables to the script: $ slpkg -a ffmpeg.tar.gz ffmpeg-2.1.5.tar.bz2 - + Tracking all the dependencies of packages, and also displays the installed packages: @@ -481,7 +493,7 @@ and also displays the installed packages: +========================= | brasero dependencies : +========================= - \ + \ +---[ Tree of dependencies ] | +--1 orc @@ -494,7 +506,7 @@ and also displays the installed packages: | +--5 libunique - + Check if the dependencies used: $ slpkg -t sbo Flask --check-deps @@ -506,17 +518,17 @@ Check if the dependencies used: \ +---[ Tree of dependencies ] | - +--1: pysetuptools is dependency --> Flask, bpython, pip, pylint + +--1: pysetuptools is dependence on --> Flask, bpython, pip, pylint | - +--2: MarkupSafe is dependency --> Flask + +--2: MarkupSafe is dependence on --> Flask | - +--3: itsdangerous is dependency --> Flask + +--3: itsdangerous is dependence on --> Flask | - +--4: Jinja2 is dependency --> Flask + +--4: Jinja2 is dependence on --> Flask | - +--5: werkzeug is dependency --> Flask + +--5: werkzeug is dependence on --> Flask + - Drawing the dependencies diagram: $ slpkg -t sbo flexget --graph=image.x11 @@ -533,15 +545,15 @@ Drawing the dependencies diagram: \ +---[ Tree of dependencies ] | - +--1: pysetuptools is dependency --> APScheduler, Flask, Jinja2, MarkupSafe, astroid, autopep8, blessings, bpython, cffi, cryptography, curtsies, itsdangerous, monty, ndg_httpsclient, pip, pyOpenSSL, pylint, wcwidth + +--1: pysetuptools is dependence on --> APScheduler, Flask, Jinja2, MarkupSafe, astroid, autopep8, blessings, bpython, cffi, cryptography, curtsies, itsdangerous, monty, ndg_httpsclient, pip, pyOpenSSL, pylint, wcwidth | - +--2: MarkupSafe is dependency --> Flask, Jinja2 + +--2: MarkupSafe is dependence on --> Flask, Jinja2 | - +--3: itsdangerous is dependency --> Flask + +--3: itsdangerous is dependence on --> Flask | - +--4: Jinja2 is dependency --> Flask + +--4: Jinja2 is dependence on --> Flask | - +--5: werkzeug is dependency --> Flask + +--5: werkzeug is dependence on --> Flask .. image:: https://gitlab.com/dslackw/images/raw/master/slpkg/deps3.png @@ -549,7 +561,7 @@ Drawing the dependencies diagram: Drawing the dependencies ascii diagram: $ slpkg -t sbo botocore --graph=ascii - + +---------------------------------+ | | | | @@ -641,19 +653,19 @@ And check if the packages need upgrade with: Reading package lists... Done Resolving dependencies... Done - The following packages will be automatically installed or upgraded + The following packages will be automatically installed or upgraded with new version: +============================================================================== | Package New version Arch Build Repos Size +============================================================================== Upgrading: - astroid-1.3.2 1.3.4 x86_64 SBo - jdk-7u51 8u31 x86_64 SBo + astroid-1.3.2 1.3.4 x86_64 SBo + jdk-7u51 8u31 x86_64 SBo Installing for dependencies: - six-1.7.3 1.8.0 x86_64 SBo - logilab-common-0.60.1 0.63.2 x86_64 SBo - pysetuptools-6.1 7.0 x86_64 SBo + six-1.7.3 1.8.0 x86_64 SBo + logilab-common-0.60.1 0.63.2 x86_64 SBo + pysetuptools-6.1 7.0 x86_64 SBo Installing summary =============================================================================== @@ -682,7 +694,7 @@ And check if the packages need upgrade with: Need to get 1.53 Mb of archives. After this process, 14.55 Mb of additional disk space will be used. - Would you like to continue [y/N]? + Would you like to continue [y/N]? Check if your Slackware distribution is up to date. @@ -694,7 +706,7 @@ why always you should have update your system: Reading package lists... Done These packages need upgrading: - + +============================================================================== | Package New version Arch Build Repos Size +============================================================================== @@ -708,16 +720,16 @@ why always you should have update your system: Total 3 package will be upgrading and 0 will be installed. Need to get 13.58 Mb of archives. After this process, 76.10 Mb of additional disk space will be used. - + Would you like to continue [y/N]? - - + + Upgrade only distribution: - $ slpkg -c slack --upgrade --skip="multi:*multilib*,ktown:*" // This upgrade + $ slpkg -c slack --upgrade --skip="multi:*multilib*,ktown:*" // This upgrade Checking... Done // distribution - // and skip all + // and skip all Slackware64 'stable' v14.2 distribution is up to date // packages from // ktown repository // and multilib @@ -729,7 +741,7 @@ Skip the packages when upgrading: Reading package lists... Done // repository:string* Resolving dependencies... Done // repository:*string - The following packages will be automatically installed or upgraded + The following packages will be automatically installed or upgraded with new version: +============================================================================== @@ -765,7 +777,7 @@ Read files, download, build or install: +=============================================================================== | Description: multi-player combat game | SlackBuild: bitfighter.tar.gz - | Sources: bitfighter-019c.tar.gz, classic_level_pack.zip + | Sources: bitfighter-019c.tar.gz, classic_level_pack.zip | Requirements: OpenAL, SDL2, speex, libmodplug +=============================================================================== | README View the README file @@ -777,21 +789,21 @@ Read files, download, build or install: | Install Download/Build/Install | Clear Clear screen Quit Quit - +================================================================================ + +================================================================================ Choose an option > _ Use the dialog utility to help you find the packages: - + Load all repository: - $ slpkg -n ALL --checklist + $ slpkg -n --checklist Reading package lists... .. image:: https://gitlab.com/dslackw/images/raw/master/slpkg/pythondialog5.png - + Search from pattern such as all 'perl' packages: $ slpkg -n perl --checklist @@ -799,7 +811,7 @@ Use the dialog utility to help you find the packages: .. image:: https://gitlab.com/dslackw/images/raw/master/slpkg/pythondialog6.png - + Auto tool to build a package: Two files termcolor.tar.gz and termcolor-1.1.0.tar.gz @@ -831,12 +843,12 @@ Auto tool to build a package: creating /tmp/SBo/package-termcolor/usr/lib64 creating /tmp/SBo/package-termcolor/usr/lib64/python2.7 creating /tmp/SBo/package-termcolor/usr/lib64/python2.7/site-packages - copying build/lib/termcolor.py -> + copying build/lib/termcolor.py -> /tmp/SBo/package-termcolor/usr/lib64/python2.7/site-packages - byte-compiling /tmp/SBo/package-termcolor/usr/lib64/python2.7/site-packages/termcolor.py + byte-compiling /tmp/SBo/package-termcolor/usr/lib64/python2.7/site-packages/termcolor.py to termcolor.pyc running install_egg_info - Writing + Writing /tmp/SBo/package-termcolor/usr/lib64/python2.7/site-packages/termcolor-1.1.0-py2.7.egg-info Slackware package maker, version 3.14159. @@ -901,8 +913,8 @@ Upgrade, install the packages like Slackware command '# upgradepkg --install-new Install mass-packages: $ slpkg -u --install-new *.t?z - - or + + or $ slpkg -i *.t?z @@ -924,7 +936,7 @@ Slpkg auto detect Slackware binary packages (.tgz, .txz, .tlz and .tbz) for inst +============================================================================== > _ - + Search for the packages from the enabled repositories: $ slpkg -F aria2 @@ -938,12 +950,12 @@ Search for the packages from the enabled repositories: slonly aria2-1.18.10-x86_64-1_slack.txz 1124 K salix aria2-1.18.1-x86_64-1rl.txz 1052 K conrad aria2-1.18.10-x86_64-1cf.txz 1140 K - + Found summary =============================================================================== Total found 4 packages in 4 repositories. - + Search in repositories with case insensitives: $ slpkg -F pyqt5 AAA --case-ins @@ -970,19 +982,42 @@ Find the installed packages: $ slpkg -f apr - Packages with matching name [ apr ] - - [ installed ] - apr-1.5.0-x86_64-1_slack14.1 - [ installed ] - apr-util-1.5.3-x86_64-1_slack14.1 - [ installed ] - xf86dgaproto-2.1-noarch-1 - [ installed ] - xineramaproto-1.2.1-noarch-1 + Sckages with matching name [ apr ] + + [ installed ] [ 1.1M ] - apr-1.5.2-x86_64-1 + [ installed ] [ 530K ] - apr-util-1.5.4-x86_64-2 + [ installed ] [ 40K ] - xf86dgaproto-2.1-noarch-1 + [ installed ] [ 50K ] - xineramaproto-1.2.1-noarch-1 Found summary =============================================================================== - Total found 4 matcing packages - Size of installed packages 1.61 Mb + Total found 4 matching packages. + Size of installed packages 1.71 Mb. + + + Find only the third-party packages: + + $ slpkg -f python --third-party + + Packages with matching name [ python ] + + [ installed ] [ 1.4M ] - bpython-0.17.1-x86_64-1_SBo + [ installed ] [ 590K ] - python-certifi-2018.11.29-x86_64-1_SBo + [ installed ] [ 1.9M ] - python-chardet-3.0.4-x86_64-1_SBo + [ installed ] [ 220K ] - python-libtmux-0.8.0-x86_64-1_SBo + [ installed ] [ 50K ] - python-notify2-0.3.1-x86_64-1_SBo + [ installed ] [ 1.5M ] - python-requests-2.20.1-x86_64-1_SBo + [ installed ] [ 110K ] - python-scandir-1.8-x86_64-1_SBo + [ installed ] [ 1.5M ] - python-urllib3-1.23-x86_64-1_SBo + [ installed ] [ 440K ] - python2-pythondialog-3.4.0-x86_64-1_SBo + [ installed ] [ 120M ] - python3-3.6.7-x86_64-1_SBo + + Found summary + =============================================================================== + Total found 10 matching packages. + Size of installed packages 127.68 Mb. + - Display the contents of the packages: $ slpkg -d termcolor lua @@ -1026,16 +1061,16 @@ Display the contents of the packages: usr/doc/termcolor-1.1.0/COPYING.txt install/ install/slack-desc - + No such package lua: Cant find -Removes a previously installed Slackware binary packages: +Removes a previously installed Slackware binary package: $ slpkg -r termcolor - + Packages with name matching [ termcolor ] - + [ delete ] --> termcolor-1.1.0-x86_64-1_SBo Removed summary @@ -1045,7 +1080,7 @@ Removes a previously installed Slackware binary packages: Are you sure to remove 1 package(s) [y/N]? y Package: termcolor-1.1.0-x86_64-1_SBo - Removing... + Removing... Removing package /var/log/packages/termcolor-1.1.0-x86_64-1_SBo... Removing files: @@ -1070,10 +1105,10 @@ Removes a previously installed Slackware binary packages: +============================================================================== -Remove packages with all the dependencies and check if used as dependency: +Remove packages with all dependencies and check if used as dependency: (Presupposes install with the option '# slpkg -s ') - $ slpkg -r Flask --check-deps + $ slpkg -r Flask --check-deps Packages with name matching [ Flask ] @@ -1098,10 +1133,10 @@ Remove packages with all the dependencies and check if used as dependency: +============================================================================== Remove dependencies (maybe used by other packages) [y/N]? y - - + + +============================================================================== - | !!! WARNING !!! + | !!! WARNING !!! +============================================================================== | pysetuptools is dependency of the package --> Flask | MarkupSafe is dependency of the package --> Flask @@ -1135,7 +1170,7 @@ Remove packages with all the dependencies and check if used as dependency: Remove the packages with by TAG: $ slpkg -r _SBo --tag - + Packages with name matching [ _SBo ] [ delete ] --> Jinja2-2.7.3-x86_64-1_SBo @@ -1157,11 +1192,11 @@ Remove the packages with by TAG: =============================================================================== Size of removed packages 24.61 Mb. - Are you sure to remove 14 packages [y/N]? + Are you sure to remove 14 packages [y/N]? + Remove the packages using dialog utility: - $ slpkg -r _SBo --tag --checklist .. image:: https://gitlab.com/dslackw/images/raw/master/slpkg/pythondialog.png @@ -1175,32 +1210,63 @@ Remove the packages using dialog utility: .. image:: https://gitlab.com/dslackw/images/raw/master/slpkg/pythondialog4.png +Remove only the third-party packages: + + $ slpkg -r python --third-party + + Packages with name matching [ python ] + + [ delete ] --> bpython-0.17.1-x86_64-1_SBo + [ delete ] --> python-certifi-2018.11.29-x86_64-1_SBo + [ delete ] --> python-chardet-3.0.4-x86_64-1_SBo + [ delete ] --> python-libtmux-0.8.0-x86_64-1_SBo + [ delete ] --> python-notify2-0.3.1-x86_64-1_SBo + [ delete ] --> python-requests-2.20.1-x86_64-1_SBo + [ delete ] --> python-scandir-1.8-x86_64-1_SBo + [ delete ] --> python-urllib3-1.23-x86_64-1_SBo + [ delete ] --> python2-pythondialog-3.4.0-x86_64-1_SBo + [ delete ] --> python3-3.6.7-x86_64-1_SBo + + Removed summary + =============================================================================== + Size of removed packages 127.68 Mb. + + + +============================================================================== + | *** WARNING *** + | Before you use third-party option, be sure you have updated the package + | lists. Run the command 'slpkg update' and 'slpkg -c slack --upgrade' + +============================================================================== + + Are you sure to remove 10 packages [y/N]? + + Build and install the packages that have added to the queue: $ slpkg -q roxterm SDL2 CEGUI --add - + Add packages in queue: roxterm SDL2 CEGUI - - $ slpkg -q roxterm --remove (or 'slpkg -q ALL --remove' remove all packages) - + + $ slpkg -q roxterm --remove (or 'slpkg -q --remove' remove all packages) + Remove packages from queue: roxterm - + $ slpkg -q list Packages in queue: SDL2 CEGUI - - + + $ slpkg -q build (build only packages from queue) $ slpkg -q install (install packages from queue) @@ -1208,19 +1274,19 @@ Build and install the packages that have added to the queue: $ slpkg -q build-install (build and install) -Add or remove the packages in blacklist file manually from +Add or remove the packages in blacklist file manually from /etc/slpkg/blacklist or with the following options: $ slpkg -b live555 speex faac --add - Add packages in blacklist: + Add packages in blacklist: live555 speex faac - $ slpkg -b speex --remove (or 'slpkg -b ALL --remove' remove all packages) + $ slpkg -b speex --remove (or 'slpkg -b --remove' remove all packages) Remove packages from blacklist: @@ -1242,7 +1308,7 @@ Add or remove the packages in blacklist file manually from multi:*multilib* \\ Add all packages include string "multilib" from "multi" \\ repository. - + Print a package description: $ slpkg -p alien vlc --color=green @@ -1367,7 +1433,7 @@ Read files from the sbo repository: libreoffice.SlackBuild\n This *might* work, but upstream has a habit of ch anging the naming\n and structure of the files, etc. between versions, so: YMMV.\n' - + >>> ReadSBo(url).slackbuild("libreoffice", ".SlackBuild") ... @@ -1388,7 +1454,7 @@ Read files from the sbo repository: -x /usr/bin/gtk-update-icon-cache ]; then\n for theme in gnome locolor hicolor ; do\n if [ -e usr/share/icons/$theme/icon-theme.cache ]; then\n /usr/b in/gtk-update-icon-cache -f usr/share/icons/$theme >/dev/null 2>&1\n fi\n do - ne\nfi\ + ne\nfi\' Get the Slackware version: @@ -1411,7 +1477,7 @@ Check for the installed packages: '-3.2.4' -Copyright +Copyright --------- - Copyright 2014-2018 © Dimitris Zlatanidis diff --git a/README.md b/README.md new file mode 100644 index 00000000..3c5d96a1 --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ +# slpkg + +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 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. diff --git a/README.rst b/README.rst deleted file mode 100644 index c2369faa..00000000 --- a/README.rst +++ /dev/null @@ -1,429 +0,0 @@ -Slpkg v3.3.8 -============ - - -.. image:: https://gitlab.com/dslackw/images/raw/master/slpkg/slpkg_package.png - :target: https://gitlab.com/dslackw/slpkg - -.. image:: https://gitlab.com/dslackw/images/raw/master/slpkg/poweredbyslack.gif - :target: http://www.slackware.com/ - - -.. contents:: Table of Contents: - - -About ------ - -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 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. - - -Features --------- - -- Dependency resolution -- Dependencies visualizations -- Multiple options -- Multiple repositories -- Easy configuration -- Fully configurable -- Adaptability -- Powerful options -- Source builder -- Faster process -- Better Security - - -Installation ------------- - -Download latest release: - -.. code-block:: bash - - Required root privileges - - $ tar xvf slpkg-3.3.8.tar.gz (don't delete the archive file after extract) - $ cd slpkg-3.3.8 - $ ./install.sh - - Installed as Slackware package - - Uninstall: - - $ slpkg -r slpkg - - or - - $ removepkg slpkg - - -Using pip: - -.. code-block:: bash - - $ pip install https://gitlab.com/dslackw/slpkg/-/archive/3.3.8/slpkg-3.3.8.tar.gz - - Uninstall: - - $ pip uninstall slpkg - - Data remove run from source code: - - $ python clean.py - - -Requirements ------------- - -See `requirements.txt `_ file - - -Optional dependencies ---------------------- - -`python2-pythondialog `_ for dialog box interface - -`pygraphviz `_ for drawing dependencies diagram - -`graph-easy `_ for drawing ascii dependencies diagram - -`httpie `_ alternative downloader - -`aria2 `_ alternative downloader - - -Recommended ------------ - -Stay updated, see `SUN (Slackware Update Notifier) `_ - - -Upgrade -------- - -Since the version '2.1.4' you can update slpkg itself with the command '# slpkg update slpkg'. -In each slpkg upgrade you will have to keep track of changes to the configuration files -in the directory '/etc/slpkg'. - - -Demonstration -------------- - -.. image:: https://gitlab.com/dslackw/images/raw/master/slpkg/slpkg_youtube.png - :target: https://www.youtube.com/watch?v=oTtD4XhHKlA - - -Youtube Asciicasts ------------------- - -`Playlist Tutorials `_ - - -Repositories ------------- - -Default available Repositories: - -- `SBo `_ - Arch: {x86, x86_64} - Versions: {13.1, 13.37, 14.0, 14.1, 14.2} -- `Slack `_ - Arch: {x86, x86_64} - Versions: {3.3, 8.1, 9.0, 9.1, 10.0, 10.1, 10.2, 11.0, 12.0, 12.2, 13.0, 13.37, 14.0, 14.1, 14.2, current} -- `Alien's `_ - Arch: {x86, x86_64} - Versions: {13.0, 13.1, 13.37, 14.0, 14.1, 14.2, current} -- `Slacky `_ - Arch: {x86, x86_64} - Versions: {11.0, 12.0, 12.1, 12.2, 13.0, 13.1, 13.37, 14.0, 14.1, 14.2} -- `Robby's `_ - Arch: {x86, x86_64} - Versions: {11.0, 12.0, 12.1, 12.2, 13.0, 13.1, 13.37, 14.0, 14.1, 14,2} -- `Conraid's `_ - Arch: {x86_64} - Versions: {current} -- `Slackonly `_ - Arch: {x86, x86_64} - Versions: {14.1, 14.2} -- `Alien's ktown `_ - Arch: {x86, x86_64} - Versions: {13.37, 14.0, 14.1, 14.2, current} -- `Alien's multi `_ - Arch: {x86_64} - Versions: {13.0, 13.1, 13.37, 14.0, 14.1, 14.2, current} -- `Slacke E17 and E18 `_ - Arch: {x86, x86_64, arm} - Versions: {14.1} -- `SalixOS `_ - Arch: {x86, x86_64} - Versions: {13.0, 13.1, 13.37, 14.0, 14.1, 14.2} -- `Slackel `_ - Arch: {x86, x86_64} - Versions: {current} -- `Restricted `_ - Arch: {x86, x86_64} - Versions: {11.0, 12.0, 12.1, 12.2, 13.0, 13.1, 13.37, 14.0, 14,1, 14.2, current} -- `MATE Desktop Environment `_ - Arch: {x86, x86_64} - Versions: {14.0, 14,1, 14.2, current} -- `Cinnamon Desktop Environment `_ - Arch: {x86, x86_64} - Versions: {14,1, 14.2, current} -- `Connochaetos (Slack-n-Free) `_ - Arch: {x86, x86_64} - Versions: {14,1, 14.2} -- `Microlinux mles `_ - Arch: {x86, x86_64} - Versions: {14,1, 14.2} - - -* Choose default repositories you need to work from the file '/etc/slpkg/repositories.conf' - defaults are 'slack' and 'sbo' repositories and please read the REPOSITORIES file for each - of the particularities. - If a repository is not in the above list, manage the custom repositories with the commands - 'repo-add' and 'repo-remove'. - - -Issues ------- - -Please report any bugs in `ISSUES `_ - - -Testing -------- - -The majority of trials have been made in an environment Slackware x86_64 'stable' -and x86 'current' version 14.2. - - -Slackware Current ------------------ - -For Slackware 'current' users must to change the variable VERSION in '/etc/slpkg/slpkg.conf' -file. - -.. code-block:: bash - - $ slpkg -g edit - - -Slackware ARM -------------- - -Must you use only two repositories currently there are 'slack' and 'sbo'. - - -Slackware Mirrors ------------------ - -Slpkg uses the central mirror "http://mirrors.slackware.com/slackware/" to find the -nearest one. If however for some reason this troublesome please edit the file in -'/etc/slpkg/slackware-mirrors'. - - -Slpkg configuration -------------------- - -It is important to read the configuration file '/etc/slpkg/slpkg.conf'. You will find many -useful options to configure the program so as you need it. - - -Configuration Files -------------------- - -.. code-block:: bash - - /tmp/slpkg - Slpkg temponary donwloaded files and build packages - - /etc/slpkg/slpkg.conf - General configuration of slpkg - - /etc/slpkg/repositories.conf - Configuration file for repositories - - /etc/slpkg/blacklist - List of packages to skip - - /etc/slpkg/slackware-mirrors - List of Slackware Mirrors - - /etc/slpkg/default-repositories - List of default repositories - - /etc/slpkg/custom-repositories - List of custom repositories - - /etc/slpkg/pkg_security - List of packages for security reasons - - /var/log/slpkg - ChangeLog.txt repositories files - SlackBuilds logs and dependencies files - - /var/lib/slpkg - PACKAGES.TXT files - SLACKBUILDS.TXT files - CHECKSUMS.md5 files - FILELIST.TXT files - - -Command Line Tool Usage ------------------------ - -.. code-block:: bash - - Slpkg is a user-friendly package manager for Slackware installations - - Usage: slpkg [COMMANDS|OPTIONS] {repository|package...} - _ _ - ___| |_ __ | | ____ _ - / __| | '_ \| |/ / _` | - \__ \ | |_) | < (_| | - |___/_| .__/|_|\_\__, | - |_| |___/ - - _Slackware package manager_______ - Commands: - update, --only=[...] Run this command to update all - the packages list. - - upgrade, --only=[...] Delete and recreate all packages - lists. - - repo-add [repository name] [URL] Add custom repository. - - repo-remove [repository] Remove custom repository. - - repo-enable Enable or disable default - repositories via dialog utility. - - repo-list Print a list of all the - repositories. - - repo-info [repository] Get information about a - repository. - - update slpkg Upgrade the program directly from - repository. - - health, --silent Health check installed packages. - - deps-status, --tree, --graph=[type] Print dependencies status used by - packages or drawing dependencies - diagram. - - new-config Manage .new configuration files. - - Optional arguments: - -h | --help Print this help message and exit. - - -v | --version Print program version and exit. - - -a | --autobuild, [script] [source...] Auto build SBo packages. - If you already have downloaded the - script and the source code you can - build a new package with this - command. - - -b | --blacklist, [package...] --add, Manage packages in the blacklist. - --remove, list Add or remove packages and print - the list. Each package is added - here will not be accessible by the - program. - - -q | --queue, [package...] --add, Manage SBo packages in the queue. - --remove, list, build, install, Add or remove and print the list - build-install of packages. Build and then - install the packages from the - queue. - - -g | --config, print, edit, reset Configuration file management. - Print, edit the configuration file - or reset in the default values. - - -l | --list, [repository], --index, Print a list of all available - --installed, --name packages from repository, index or - print only packages installed on - the system. - - -c | --check, [repository], --upgrade, Check for updated packages from - --skip=[...], --resolve--off the repositories and upgrade or - --checklist install with all dependencies. - - -s | --sync, [repository] [package...], Sync packages. Install packages - --rebuild, --reinstall, directly from remote repositories - --resolve-off, --download-only, with all dependencies. - --directory-prefix=[dir], - --case-ins, --patches - - -t | --tracking, [repository] [package], Tracking package dependencies and - --check-deps, --graph=[type], print package dependencies tree - --case-ins with highlight if packages is - installed. Also check if - dependencies used or drawing - dependencies diagram. - - -p | --desc, [repository] [package], Print description of a package - --color=[] directly from the repository and - change color text. - - -n | --network, [package], --checklist, View a standard of SBo page in - --case-ins terminal and manage multiple - options like reading, downloading, - building, installation, etc. - - -F | --FIND, [package...], --case-ins Find packages from each enabled - repository and view results. - - -f | --find, [package...], --case-ins Find and print installed packages - reporting the size and the sum. - - -i | --installpkg, [options] [package...] Installs single or multiple \*.tgz - options=[--warn, --md5sum, --root, (or .tbz, .tlz, .txz) Slackware - --infobox, --menu, --terse, --ask, binary packages designed for use - --priority, --tagfile] with the Slackware Linux - distribution onto your system. - - -u | --upgradepkg, [options] [package...] Upgrade single or multiple - options=[--dry-run, --install-new, Slackware binary packages from - --reinstall, --verbose] an older version to a newer one. - - -r | --removepkg, [options] [package...], Removes a previously installed - --deps, --check-deps, --tag, Slackware binary packages, - --checklist while writing a progress report - options=[-warn, -preserve, -copy, to the standard output. - -keep] Use only package name. - - -d | --display, [package...] Display the contents of installed - packages and file list - - -Donate ------- - -If you feel satisfied with this project and want to thanks me make a donation. - -.. image:: https://gitlab.com/dslackw/images/raw/master/donate/paypaldonate.png - :target: https://www.paypal.me/dslackw - - -Copyright ---------- - -- Copyright 2014-2018 © Dimitris Zlatanidis -- Slackware® is a Registered Trademark of Patrick Volkerding. -- Linux is a Registered Trademark of Linus Torvalds. diff --git a/bin/slpkg b/bin/slpkg index 527b9dfd..573fb380 100755 --- a/bin/slpkg +++ b/bin/slpkg @@ -3,7 +3,7 @@ # slpkg file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/clean.py b/clean.py index a5a3d373..d61d5535 100755 --- a/clean.py +++ b/clean.py @@ -3,7 +3,7 @@ # clean.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/conf/blacklist b/conf/blacklist index 67cfa9a5..72f68ed9 100644 --- a/conf/blacklist +++ b/conf/blacklist @@ -2,7 +2,7 @@ # # blacklist file is part of slpkg. # -# Copyright 2014-2017 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # # Slpkg is a user-friendly package manager for Slackware installations. @@ -34,11 +34,11 @@ # *lib* # # Add packages in blacklist by repository: -# slacky:* `add all packages from slacky repository` -# sbo:py* `add all packages from sbo starts with 'py'` -# sbo:jdk `add jdk package from sbo repository` -# slack:*multi* `add packages include string 'multi' from slack` -# msb:*.txz `add packages ends with '.txz' from msb repository` +# slacky:* `add all packages from the slacky repository` +# sbo:py* `add all packages from the sbo starts with 'py'` +# sbo:jdk `add jdk package from the sbo repository` +# slack:*multi* `add packages include string 'multi' from the slack` +# msb:*.txz `add packages ends with '.txz' from the msb repository` # # Sometimes the automatic kernel update creates problems because you # may need to file intervention 'lilo'. The slpkg automatically detects diff --git a/conf/custom-repositories b/conf/custom-repositories index e35d9302..b599cc19 100644 --- a/conf/custom-repositories +++ b/conf/custom-repositories @@ -2,7 +2,7 @@ # # custom-repositories file is part of slpkg. # -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # # Slpkg is a user-friendly package manager for Slackware installations. @@ -25,8 +25,8 @@ # ---------------------------------------------------------------------------- # This file is used to read, write and remove custom repositories by # the user. The repositories will be added here should have a different -# name from existing repositories and the default. Also, the link must -# contain the PACKAGES.TXT files, CHECKSUMS.md5 and optional ChangeLog.txt. +# name from existing repositories and the default. Also the URL must have +# contained the PACKAGES.TXT, CHECKSUMS.md5 and optional ChangeLog.txt files. # ---------------------------------------------------------------------------- # # NAME URL diff --git a/conf/default-repositories b/conf/default-repositories index 0f381613..a2c2f217 100644 --- a/conf/default-repositories +++ b/conf/default-repositories @@ -2,7 +2,7 @@ # # default-repositories file is part of slpkg. # -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # # Slpkg is a user-friendly package manager for Slackware installations. @@ -23,9 +23,9 @@ # END OF LEGAL NOTICE # # ---------------------------------------------------------------------------- -# This file provide the urls from repositories. Change only the url -# if necessary finishing with "/". For local repository start with -# "file:///" avoid end path with "/". Do NOT change the name of the +# This file provide the URLs from repositories. Change only the URL +# if necessary finishing with "/". For local repository start with +# "file:///" avoid end path with "/". Do NOT change the name of the # repository. # # Default repositories names: diff --git a/conf/pkg_security b/conf/pkg_security index 1b116feb..68ac715e 100644 --- a/conf/pkg_security +++ b/conf/pkg_security @@ -2,7 +2,7 @@ # # pkg_security file is part of slpkg. # -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # # Slpkg is a user-friendly package manager for Slackware installations. diff --git a/conf/repositories.conf b/conf/repositories.conf index cad3516a..74081959 100644 --- a/conf/repositories.conf +++ b/conf/repositories.conf @@ -2,7 +2,7 @@ # # repositories.conf file is part of slpkg. # -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # # Slpkg is a user-friendly package manager for Slackware installations. diff --git a/conf/rlworkman.deps b/conf/rlworkman.deps index 7f40fa87..aff5bf6f 100644 --- a/conf/rlworkman.deps +++ b/conf/rlworkman.deps @@ -2,7 +2,7 @@ # # rlworkman.deps file is part of slpkg. # -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # # Slpkg is a user-friendly package manager for Slackware installations. diff --git a/conf/slackware-mirrors b/conf/slackware-mirrors index a5ceb5fe..758b607f 100644 --- a/conf/slackware-mirrors +++ b/conf/slackware-mirrors @@ -3,7 +3,7 @@ # # slackware-mirrors file is part of slpkg. # -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # # Slpkg is a user-friendly package manager for Slackware installations. @@ -28,11 +28,11 @@ # to find the nearest one. If however for some reason this troublesome # please uncomment (remove the '#' character) only one mirror from # the list available below. You can also add a new mirror in the list -# below. Be careful is the template that the rest. +# below. Be careful with the template. # ---------------------------------------------------------------------------- # # -# Last Updated: Sun Apr 1 13:54:02 UTC 2018 +# Last Updated: Tue Jan 15 14:54:01 UTC 2019 # # Available https mirrors: # @@ -40,6 +40,7 @@ # bg https://mirrors.netix.net/slackware/ # ca https://mirror.csclub.uwaterloo.ca/slackware/ # ca https://mirror.its.dal.ca/slackware/ +# ca https://slackware.freemirror.org/slackware/ # cr https://mirrors.ucr.ac.cr/slackware/pub/slackware/ # de https://ftp6.gwdg.de/pub/linux/slackware/ # de https://linux.rz.rub.de/slackware/ @@ -47,14 +48,16 @@ # de https://mirror.netcologne.de/slackware/ # dk https://mirrors.dotsrc.org/slackware/ # ec https://mirror.cedia.org.ec/slackware/ +# fr https://mirrors.phx.ms/slackware/ # gb https://lon.mirror.rackspace.com/slackware/ # gb https://mirror.bytemark.co.uk/slackware/ -# gb https://www.mirrorservice.org/sites/ftp.slackware.com/pub/slackware/ +# gb https://www.mirrorservice.org/sites/ftp.slackware.com/pub/slackware/ # gr https://ftp.cc.uoc.gr/mirrors/linux/slackware/ # hk https://hkg.mirror.rackspace.com/slackware/ +# hk https://mirror-hk.koddos.net/slackware/ +# hu https://quantum-mirror.hu/mirrors/pub/slackware/ # id https://iso.ukdw.ac.id/slackware/ # id https://repo.ukdw.ac.id/slackware/ -# ie https://ftp.heanet.ie/mirrors/ftp.slackware.com/pub/slackware/ # it https://ba.mirror.garr.it/mirrors/Slackware/ # lt https://mirrors.atviras.lt/slackware/ # nl https://ftp.nluug.nl/os/Linux/distr/slackware/ @@ -66,7 +69,7 @@ # ro https://mirrors.nxthost.com/slackware/ # ru https://mirror.yandex.ru/slackware/ # se https://ftp.acc.umu.se/mirror/slackware.com/ -# se https://ftp.sunet.se/mirror/slackware.com/ +# se https://mirror.linux.pizza/slackware/ # sk https://mirror.wheel.sk/slackware/ # tw https://ftp.yzu.edu.tw/Linux/Slackware/ # ua https://ifconfig.com.ua/slackware/ @@ -82,7 +85,6 @@ # us https://slackware.absolutehosting.net/pub/slackware/ # # -# # Available http mirrors: # # au http://ftp.swin.edu.au/slackware/ @@ -97,7 +99,6 @@ # br http://linorg.usp.br/slackware/ # br http://slackmirror.cbpf.br/pub/slackware/ # by http://mirror.datacenter.by/pub/slackware/ -# ch http://mirror.switch.ch/ftp/mirror/slackware/ # cz http://ftp.linux.cz/pub/linux/slackware/ # de http://download.dlackware.com/slackware/ # de http://ftp.tu-chemnitz.de/pub/linux/slackware/ @@ -136,7 +137,6 @@ # za http://slackware.mirror.ac.za/ # # -# # Available ftp mirrors: # # au ftp://ftp.swin.edu.au/slackware/ @@ -152,7 +152,7 @@ # by ftp://mirror.datacenter.by/pub/slackware/ # ca ftp://mirror.csclub.uwaterloo.ca/slackware/ # ca ftp://mirror.its.dal.ca/slackware/ -# ch ftp://mirror.switch.ch/mirror/slackware/ +# ca ftp://slackware.freemirror.org/slackware/ # cr ftp://mirrors.ucr.ac.cr/slackware/pub/slackware/ # cz ftp://ftp.linux.cz/pub/linux/slackware/ # de ftp://ftp.tu-chemnitz.de/pub/linux/slackware/ @@ -172,7 +172,6 @@ # gr ftp://ftp.otenet.gr/pub/linux/slackware/ # hk ftp://hkg.mirror.rackspace.com/slackware/ # hr ftp://mirror.slackware.hr/slackware/ -# ie ftp://ftp.heanet.ie/mirrors/ftp.slackware.com/pub/slackware/ # jp ftp://ftp.kddilabs.jp/Linux/distributions/Slackware/ # jp ftp://ftp.nara.wide.ad.jp/pub/Linux/slackware/ # jp ftp://ftp.riken.jp/Linux/slackware/ @@ -188,7 +187,7 @@ # pt ftp://ftp.rnl.tecnico.ulisboa.pt/pub/slackware/ # ru ftp://mirror.yandex.ru/slackware/ # ru ftp://slackware.tsu.ru/slackware/ -# se ftp://ftp.sunet.se/mirror/slackware.com/ +# se ftp://ftp.acc.umu.se/mirror/slackware.com/ # tr ftp://ftp.linux.org.tr/slackware/ # tw ftp://ftp.yzu.edu.tw/Linux/Slackware/ # ua ftp://ifconfig.com.ua/pub/Mirror/slackware/ diff --git a/conf/slpkg.conf b/conf/slpkg.conf index caa7be91..25d0fd2d 100644 --- a/conf/slpkg.conf +++ b/conf/slpkg.conf @@ -2,7 +2,7 @@ # # slpkg.conf file is part of slpkg. # -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # # Slpkg is a user-friendly package manager for Slackware installations. diff --git a/convert-py3k b/convert-py3k index e36c135f..21dbac97 100755 --- a/convert-py3k +++ b/convert-py3k @@ -5,6 +5,10 @@ # source tree that works under Python 3. # (Thanks beautifulsoup4 for the script). # +# ******************************** WARNING *********************************** +# There are some issues here, please do not use before Slackware 15.0 release. +# **************************************************************************** + echo "About to destroy and rebuild the py3k/slpkg directory." rm -rf py3k/slpkg mkdir -p py3k/slpkg diff --git a/install.sh b/install.sh index 44e85f17..4dbd5831 100755 --- a/install.sh +++ b/install.sh @@ -2,7 +2,7 @@ # install.sh file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # # Redistribution and use of this script, with or without modification, is diff --git a/man/slpkg.8 b/man/slpkg.8 index 8ac749fd..2a22541a 100644 --- a/man/slpkg.8 +++ b/man/slpkg.8 @@ -1,5 +1,5 @@ .\" -*- nroff -*- -.\" Copyright (C) 2014-2017 Dimitris Zlatanidis +.\" Copyright (C) 2014-2019 Dimitris Zlatanidis .\" .\" This program is free software: you can redistribute it and/or modify .\" it under the terms of the GNU General Public License as published by @@ -11,7 +11,7 @@ .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" -.TH Slpkg "21" "10" 2017" "slpkg" +.TH Slpkg "14" "01" 2019" "slpkg" .SH NAME Slpkg is a user-friendly package manager for Slackware installations .SH SYNOPSIS @@ -50,7 +50,7 @@ Usage: slpkg [COMMANDS|OPTIONS] {repository|package...} [-p [repository] [package], --color=[]] [-n [SBo package], --checklist, --case-ins] [-F [package...], --case-ins] - [-f [package...], --case-ins] + [-f [package...], --case-ins, --third-party] [-i [options] [package...]] [-u [options] [package...]] [-r [options] [package...], --deps, --check-deps, --tag, @@ -116,7 +116,7 @@ Enable or disable repositories via dialog utility (require python2-pythondialog) Lists all enabled or disabled repositories. .SS repo-info, repository information -\fBslpkg\fP \fBrepo-info\fP <\fBrepository\fP> +\fBslpkg\fP \fBrepo-info\fP <\fIrepository\fP> .PP View repository information. @@ -138,7 +138,7 @@ Additional options: \fBslpkg\fP \fBdeps-status\fP \fB--graph=[type]\fP .PP Print dependencies status used by packages. Prerequisite packages have been installed -with the option "slpkg -s ". +with the option "# slpkg -s ". .PP Additional options: .PP @@ -168,9 +168,9 @@ checksum from the configuration file. \fBslpkg\fP \fB-b\fP <\fIname of packages\fP> \fB--add\fP, \fB--remove\fP, \fBlist\fP .PP Add, remove or listed packages from blacklist file. The settings here affect -all repositories. Remove all packages from blacklist use argument "ALL" for package -like "# slpkg -b ALL --remove". Use asterisk "*" to match pagkages like "# slpkg -b -py* --add", this add all installed packages with starts string "py" or "# slpkg -b +all repositories. Remove all packages from blacklist use argument like +"# 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 multi:*multilib* --add", this add all multilib packages from repository "multi". .SS -q, --queue, add, remove, view packages in queue @@ -180,7 +180,7 @@ multi:*multilib* --add", this add all multilib packages from repository "multi". .PP 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 -dependencies. If you want to remove all the packages from the list run "# slpkg -q ALL --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) Build or install or build and install packages are queued. @@ -213,7 +213,7 @@ directly with the official repository and so always you can have updated your sy .PP Additional options: .PP -\fB-c ALL\fP : Check ChangeLog.txt files for changes. +\fB-c \fP : Check ChangeLog.txt files for changes. .PP \fB--upgrade\fP : Check and install packages for upgrade. .PP @@ -221,7 +221,7 @@ Additional options: .PP \fB--resolve-off\fP : Switch off automatic resolve dependencies. .PP -\fB--skip=[packages...]\fP : Skip packages from upgrade separate by comma like "slpkg -c sbo --skip=jdk,pep8,pip" (See REGEX). +\fB--skip=[packages...]\fP : Skip packages from upgrade separate by comma like "# slpkg -c sbo --skip=jdk,pep8,pip" (See REGEX). .PP \fB--checklist\fP : Enable dialog utility and checklist option. (Require python2-pythondialog) @@ -283,7 +283,7 @@ Additional options: \fB--case-ins\fP : Search package name in repository with case insensitive. .SS -f, --find, find installed packages -\fBslpkg\fP \fB-f\fP <\fInames of packages\fP>, \fI--case-ins\fP +\fBslpkg\fP \fB-f\fP <\fInames of packages\fP>, \fB--case-ins\fP, \fB--third-party\fP .PP Find installed packages with view total file size. Example you can view all installed sbo packages like "# slpkg -f _SBo". @@ -291,13 +291,15 @@ Example you can view all installed sbo packages like "# slpkg -f _SBo". Additional options: .PP \fB--case-ins\fP : Search package name with case insensitive. +.PP +\fB--third-party\fP : View all the third-party packages. .SS -n, --network, view SBo packages -\fBslpkg\fP \fB-n\fP <\fIname of package\fP>, <\fI[pattern], --checklist\fP>, \fI--case-ins\fP +\fBslpkg\fP \fB-n\fP <\fIname of package\fP>, <\fI[pattern], --checklist\fP>, \fB--case-ins\fP .PP View complete slackbuilds.org site in your terminal. Read file, download, -build or install etc. Use 'ALL' in [pattern] and "--checklist" additional option to load all -repository, example "slpkg -n ALL --checklist". +build or install etc. Use "--checklist" additional option to load all repository, example: +"# slpkg -n --checklist". .PP Additional options: .PP @@ -320,12 +322,12 @@ and will skip any packages that do not already have a version installed. More information please read "man upgradepkg". .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 +\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 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 you'd see listed in /var/log/packages/), or by the base package name. If installed -packages with command "slpkg -s " then write a file in /var/log/slpkg/dep/ +packages with command "# slpkg -s " then write a file in /var/log/slpkg/dep/ with all dependencies and it allows you can remove them all together. More information please read "man removepkg". .PP @@ -338,6 +340,8 @@ Additional options: \fB--tag\fP : Remove packages with by TAG. .PP \fB--checklist\fP : Enable dialog utility and checklist option. (Require python2-pythondialog) +.PP +\fB--third-party\fP : Remove all the third-party packages. (Be sure update the package lists before) .SS -d, --display, display the installed packages contents and file list \fBslpkg\fP \fB-d\fP <\fInames of packages\fP> @@ -435,7 +439,7 @@ Dimitris Zlatanidis .SH HOMEPAGE https://gitlab.com/dslackw/slpkg .SH COPYRIGHT -Copyright \(co 2014-2017 Dimitris Zlatanidis +Copyright \(co 2014-2019 Dimitris Zlatanidis .SH SEE ALSO installpkg(8), upgradepkg(8), removepkg(8), pkgtool(8), slackpkg(8), explodepkg(8), diff --git a/setup.py b/setup.py index dbca3671..7b7bc7c3 100755 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ # setup.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations @@ -54,8 +54,10 @@ def print_logo(): print(logo) time.sleep(1) + print_logo() + setup( name="slpkg", packages=["slpkg", "slpkg/sbo", "slpkg/pkg", "slpkg/slack", @@ -68,7 +70,7 @@ setup( author=_meta_.__author__, author_email=_meta_.__email__, url="https://gitlab.com/dslackw/slpkg", - package_data={"": ["LICENSE", "README.rst", "CHANGELOG"]}, + package_data={"": ["LICENSE", "README.md", "CHANGELOG"]}, data_files=[("man/man8", ["man/slpkg.8"]), ("/etc/bash_completion.d", ["conf/slpkg.bash-completion"]), ("/etc/fish/completions", ["conf/slpkg.fish"])], @@ -92,7 +94,7 @@ setup( "Topic :: System :: Archiving :: Packaging", "Topic :: System :: Software Distribution", "Topic :: Utilities"], - long_description=open("README.rst").read() + long_description=open("README.md").read() ) # Install configuration files with pip. diff --git a/slackbuild/slpkg.SlackBuild b/slackbuild/slpkg.SlackBuild index 0e169d7b..8047f757 100755 --- a/slackbuild/slpkg.SlackBuild +++ b/slackbuild/slpkg.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for slpkg -# Copyright 2014-2018 Dimitris Zlatanidis Orestiada, Greece +# Copyright 2014-2019 Dimitris Zlatanidis Orestiada, Greece # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -110,7 +110,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.rst ChangeLog.txt LICENSE TESTING ISSUES KNOWN_ISSUES REPOSITORIES \ +cp -a README.md ChangeLog.txt LICENSE TESTING ISSUES KNOWN_ISSUES REPOSITORIES \ requirements.txt $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild diff --git a/slpkg/__metadata__.py b/slpkg/__metadata__.py index e9d93304..974d7fd3 100644 --- a/slpkg/__metadata__.py +++ b/slpkg/__metadata__.py @@ -3,7 +3,7 @@ # __metadata__.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations @@ -78,7 +78,7 @@ class MetaData(object): __all__ = "slpkg" __author__ = "dslackw" - __version_info__ = (3, 3, 8) + __version_info__ = (3, 3, 9) __version__ = "{0}.{1}.{2}".format(*__version_info__) __license__ = "GNU General Public License v3 (GPLv3)" __email__ = "d.zlatanidis@gmail.com" diff --git a/slpkg/arguments.py b/slpkg/arguments.py index 6977b9cb..31672fa1 100644 --- a/slpkg/arguments.py +++ b/slpkg/arguments.py @@ -3,7 +3,7 @@ # arguments.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations @@ -139,8 +139,8 @@ Optional arguments: -F | --FIND, [package...], --case-ins Find packages from each enabled repository and view results. - -f | --find, [package...], --case-ins Find and print installed packages - reporting the size and the sum. + -f | --find, [package...], --case-ins, Find and print installed packages + --third-party reporting the size and the sum. -i | --installpkg, [options] [package...] Installs single or multiple *.tgz options=[--warn, --md5sum, --root, (or .tbz, .tlz, .txz) Slackware @@ -154,7 +154,7 @@ Optional arguments: -r | --removepkg, [options] [package...], Removes a previously installed --deps, --check-deps, --tag, Slackware binary packages, - --checklist while writing a progress report + --checklist, --third-party while writing a progress report options=[-warn, -preserve, -copy, to the standard output. -keep] Use only package name. @@ -205,11 +205,11 @@ def usage(repo): [-p [repository] [package], --color=[]] [-n [SBo package], --checklist, --case-ins] [-F [package...], --case-ins] - [-f [package...], --case-ins] + [-f [package...], --case-ins, --third-party] [-i [options] [package...]] [-u [options] [package...]] [-r [options] [package...], --deps, --check-deps, --tag, - --checklist] + --checklist, --third-party] [-d [package...]] """ if repo and repo not in _meta_.repositories: diff --git a/slpkg/auto_pkg.py b/slpkg/auto_pkg.py index 70f32eb0..a82c20ec 100644 --- a/slpkg/auto_pkg.py +++ b/slpkg/auto_pkg.py @@ -3,7 +3,7 @@ # auto_pkg.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/binary/check.py b/slpkg/binary/check.py index 89b8e3ca..cd6c6910 100644 --- a/slpkg/binary/check.py +++ b/slpkg/binary/check.py @@ -3,7 +3,7 @@ # check.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/binary/dependency.py b/slpkg/binary/dependency.py index 406b2a2b..cecab35e 100644 --- a/slpkg/binary/dependency.py +++ b/slpkg/binary/dependency.py @@ -3,7 +3,7 @@ # dependency.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/binary/greps.py b/slpkg/binary/greps.py index febeaf76..9aa52167 100644 --- a/slpkg/binary/greps.py +++ b/slpkg/binary/greps.py @@ -3,7 +3,7 @@ # greps.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/binary/install.py b/slpkg/binary/install.py index 71f12391..2a760e88 100644 --- a/slpkg/binary/install.py +++ b/slpkg/binary/install.py @@ -3,7 +3,7 @@ # install.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/binary/repo_init.py b/slpkg/binary/repo_init.py index fdf30f14..53e29854 100644 --- a/slpkg/binary/repo_init.py +++ b/slpkg/binary/repo_init.py @@ -3,7 +3,7 @@ # repo_init.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/binary/search.py b/slpkg/binary/search.py index 562e83e3..fc50b673 100644 --- a/slpkg/binary/search.py +++ b/slpkg/binary/search.py @@ -3,7 +3,7 @@ # search.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/blacklist.py b/slpkg/blacklist.py index 866bd99e..d87b5916 100644 --- a/slpkg/blacklist.py +++ b/slpkg/blacklist.py @@ -3,7 +3,7 @@ # blacklist.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/checks.py b/slpkg/checks.py index f68237b6..887763e6 100644 --- a/slpkg/checks.py +++ b/slpkg/checks.py @@ -3,7 +3,7 @@ # checks.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/checksum.py b/slpkg/checksum.py index 23f571c0..a35daa75 100644 --- a/slpkg/checksum.py +++ b/slpkg/checksum.py @@ -3,7 +3,7 @@ # checksum.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/config.py b/slpkg/config.py index aaa425be..37f08a45 100644 --- a/slpkg/config.py +++ b/slpkg/config.py @@ -3,7 +3,7 @@ # config.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/desc.py b/slpkg/desc.py index 53cd460a..c1e9c9a1 100644 --- a/slpkg/desc.py +++ b/slpkg/desc.py @@ -3,7 +3,7 @@ # desc.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/dialog_box.py b/slpkg/dialog_box.py index 167398ab..4fe32a7a 100644 --- a/slpkg/dialog_box.py +++ b/slpkg/dialog_box.py @@ -3,7 +3,7 @@ # dialog_box.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations @@ -34,8 +34,6 @@ class DialogUtil(object): try: from dialog import Dialog except ImportError: - print("Require 'pythondialog': Install with 'slpkg -s sbo " - "python2-pythondialog'") raise SystemExit() self.d = Dialog(dialog="dialog", autowidgetsize=True) self.data = args[0] diff --git a/slpkg/downloader.py b/slpkg/downloader.py index ef1cd1e6..e2fc60b2 100644 --- a/slpkg/downloader.py +++ b/slpkg/downloader.py @@ -3,7 +3,7 @@ # downloader.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/file_size.py b/slpkg/file_size.py index 35b447c5..3d63c155 100644 --- a/slpkg/file_size.py +++ b/slpkg/file_size.py @@ -3,7 +3,7 @@ # file_size.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/graph.py b/slpkg/graph.py index 0d6cbb50..5d115413 100644 --- a/slpkg/graph.py +++ b/slpkg/graph.py @@ -3,7 +3,7 @@ # graph.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/grep_md5.py b/slpkg/grep_md5.py index 4319304a..552e2194 100644 --- a/slpkg/grep_md5.py +++ b/slpkg/grep_md5.py @@ -3,7 +3,7 @@ # grep_md5.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/health.py b/slpkg/health.py index 7ccdbcd4..9fa844c6 100644 --- a/slpkg/health.py +++ b/slpkg/health.py @@ -3,7 +3,7 @@ # health.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/init.py b/slpkg/init.py index 00fdf6be..c0a37fea 100644 --- a/slpkg/init.py +++ b/slpkg/init.py @@ -3,7 +3,7 @@ # init.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/load.py b/slpkg/load.py index 8f807c0b..65f86bb3 100644 --- a/slpkg/load.py +++ b/slpkg/load.py @@ -3,7 +3,7 @@ # load.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/log_deps.py b/slpkg/log_deps.py index ede61922..5ba7cc80 100644 --- a/slpkg/log_deps.py +++ b/slpkg/log_deps.py @@ -3,7 +3,7 @@ # log_deps.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/main.py b/slpkg/main.py index 1133ccae..1b761a7e 100644 --- a/slpkg/main.py +++ b/slpkg/main.py @@ -3,7 +3,7 @@ # main.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations @@ -101,7 +101,7 @@ class ArgParse(object): ] and self.args[1] == repo and repo in enabled_repos: print("\n Please update the packages lists. Run 'slpkg update'.\n" " This command should be used to synchronize the packages\n" - " lists from the repositories are enabled.\n") + " lists from the repositories that are enabled.\n") raise SystemExit() def help_version(self): @@ -142,6 +142,7 @@ class ArgParse(object): def command_repo_enable(self): """Repositories enable/disable """ + self.if_checklist() if len(self.args) == 1 and self.args[0] == "repo-enable": RepoEnable().choose() else: @@ -309,13 +310,13 @@ class ArgParse(object): else: Patches(skip, flag).start() elif self.args[1] == "sbo": - SBoInstall(sbo_upgrade(skip, flag), flag).start(is_upgrade=True) + SBoInstall(sbo_upgrade(skip, flag), flag).start( + is_upgrade=True) else: usage(self.args[1]) - elif len(self.args) == 2 and self.args[0] in options: - if self.args[1] == "ALL": + elif len(self.args) == 1 and self.args[0] in options: Updates(repo="").ALL() - else: + elif len(self.args) == 2 and self.args[0] in options: Updates(self.args[1]).run() elif (len(self.args) >= 2 and self.args[0] in options and self.args[1] not in self.meta.repositories): @@ -336,6 +337,8 @@ class ArgParse(object): flag.append(arg) if arg in self.args: self.args.remove(arg) + if "--checklist" in flag: + self.if_checklist() return flag, skip def pkg_install(self): @@ -433,9 +436,15 @@ class ArgParse(object): if add in self.args: flag.append(add) self.args.remove(add) + if "--checklist" in flag: + self.if_checklist() if (len(self.args) == 2 and self.args[0] in options and "sbo" in self.meta.repositories): SBoNetwork(self.args[1], flag).view() + elif (len(self.args) == 1 and self.args[0] in options and + "sbo" in self.meta.repositories and + additional_options[0] in flag): + SBoNetwork("", flag).view() else: usage("sbo") @@ -459,8 +468,8 @@ class ArgParse(object): flag[0] in self.args): self.args.remove(flag[0]) blacklist.add(self.args[1:]) - elif (len(self.args) == 3 and self.args[0] in options and - "ALL" in self.args and flag[1] in self.args): + elif (len(self.args) == 2 and self.args[0] in options and + flag[1] in self.args): self.args.remove(flag[1]) blacklist.remove(blacklist.get_black()) elif (len(self.args) > 2 and self.args[0] in options and @@ -492,8 +501,8 @@ class ArgParse(object): flag[0] in self.args): self.args.remove(flag[0]) queue.add(self.args[1:]) - elif (len(self.args) == 3 and self.args[0] in options and - "ALL" in self.args and flag[1] in self.args): + elif (len(self.args) == 2 and self.args[0] in options and + flag[1] in self.args): self.args.remove(flag[1]) queue.remove(queue.packages()) elif (len(self.args) > 2 and self.args[0] in options and @@ -579,7 +588,8 @@ class ArgParse(object): "--deps", "--check-deps", "--tag", - "--checklist" + "--checklist", + "--third-party" ] flag, extra = "", [] flags = [ @@ -602,6 +612,10 @@ class ArgParse(object): if fl in self.args: flag = self.args[1] packages = self.args[2:] + if "--checklist" in extra: + self.if_checklist() + if not packages: + packages = [""] PackageManager(packages).remove(flag, extra) else: usage("") @@ -614,13 +628,20 @@ class ArgParse(object): "-f", "--find" ] - additional_options = ["--case-ins"] - for arg in self.args: - if arg in additional_options: - flag.append(arg) - self.args.remove(arg) + additional_options = [ + "--case-ins", + "--third-party" + ] + for add in additional_options: + if add in self.args: + flag.append(add) + self.args.remove(add) packages = self.args[1:] - if len(self.args) > 1 and self.args[0] in options: + if not packages: + packages = [""] + if len(self.args) == 1 and self.args[0] in options: + PackageManager(packages).find(flag) + elif len(self.args) > 1 and self.args[0] in options: PackageManager(packages).find(flag) else: usage("") @@ -744,6 +765,14 @@ class ArgParse(object): self.msg.pkg_not_found("", ntf, "Not installed", "") raise SystemExit() + def if_checklist(self): + try: + from dialog import Dialog + except ImportError: + print("Require 'pythondialog': Install with 'slpkg -s sbo " + "python2-pythondialog'") + raise SystemExit() + def main(): diff --git a/slpkg/md5sum.py b/slpkg/md5sum.py index 6a0f90fe..716cb3f9 100644 --- a/slpkg/md5sum.py +++ b/slpkg/md5sum.py @@ -3,7 +3,7 @@ # md5sum.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/messages.py b/slpkg/messages.py index c0f71927..e3fcc937 100644 --- a/slpkg/messages.py +++ b/slpkg/messages.py @@ -3,7 +3,7 @@ # messages.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/new_config.py b/slpkg/new_config.py index 17273732..0c552578 100644 --- a/slpkg/new_config.py +++ b/slpkg/new_config.py @@ -3,7 +3,7 @@ # new_config.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/pkg/build.py b/slpkg/pkg/build.py index 7702813d..3c7b8c57 100644 --- a/slpkg/pkg/build.py +++ b/slpkg/pkg/build.py @@ -3,7 +3,7 @@ # build.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/pkg/find.py b/slpkg/pkg/find.py index bcb80437..858b4b00 100644 --- a/slpkg/pkg/find.py +++ b/slpkg/pkg/find.py @@ -3,7 +3,7 @@ # find.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/pkg/installed.py b/slpkg/pkg/installed.py index efdeb11a..861e3854 100644 --- a/slpkg/pkg/installed.py +++ b/slpkg/pkg/installed.py @@ -3,7 +3,7 @@ # installed.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/pkg/manager.py b/slpkg/pkg/manager.py index 27666803..483ee604 100644 --- a/slpkg/pkg/manager.py +++ b/slpkg/pkg/manager.py @@ -3,7 +3,7 @@ # manager.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations @@ -36,6 +36,8 @@ from slpkg.dialog_box import DialogUtil from slpkg.splitting import split_package from slpkg.__metadata__ import MetaData as _meta_ +from slpkg.slack.slackware_repo import slackware_repository + class PackageManager(object): """Package manager class for install, upgrade, @@ -115,9 +117,11 @@ class PackageManager(object): if remove_pkg in ["y", "Y"]: self._check_if_used(self.binary) for rmv in self.removed: - # If package build and install with "slpkg -s sbo " - # then look log file for dependencies in /var/log/slpkg/dep, - # read and remove all else remove only the package. + ''' + If package build and install with "slpkg -s sbo " + then look log file for dependencies in /var/log/slpkg/dep, + read and remove all else remove only the package. + ''' if (os.path.isfile(self.dep_path + rmv) and self.meta.del_deps in ["on", "ON"] or os.path.isfile(self.dep_path + rmv) and @@ -152,16 +156,29 @@ class PackageManager(object): def _get_removed(self): """Manage removed packages by extra options """ - removed, packages = [], [] - if "--tag" in self.extra: + extra = self.extra + removed, packages, pkg = [], [], "" + if "--tag" in extra: for pkg in find_package("", self.meta.pkg_path): for tag in self.binary: if pkg.endswith(tag): removed.append(split_package(pkg)[0]) packages.append(pkg) - if not removed: - self.msg.pkg_not_found("", "'tag'", "Can't remove", "\n") - raise SystemExit(1) + pkg = "" + extra = "" + elif "--third-party" in extra: + slack_packages, slack_names = slackware_repository() + slpkg_pkg = self.meta.__all__ + "-" + self.meta.__version__ + binary = self.binary + for pkg in find_package("", self.meta.pkg_path): + slack_name = split_package(pkg)[0] + for tag in binary: + if (slack_name not in slack_names and + slpkg_pkg not in pkg and tag in pkg): + removed.append(split_package(pkg)[0]) + packages.append(pkg) + pkg = "" + extra = "" else: for pkg in self.binary: name = GetFromInstalled(pkg).name() @@ -171,9 +188,9 @@ class PackageManager(object): if pkg and name == pkg: removed.append(pkg) packages.append(package[0]) - else: - self.msg.pkg_not_found("", pkg, "Can't remove", "\n") - raise SystemExit(1) + if not removed: + self.msg.pkg_not_found("", pkg, "Can't remove", "\n") + raise SystemExit(1) return removed, packages def _view_removed(self): @@ -197,11 +214,21 @@ class PackageManager(object): self.meta.default_answer = "y" else: for rmv, pkg in zip(removed, packages): - print("[ {0}delete{1} ] --> {2}".format( - self.meta.color["RED"], self.meta.color["ENDC"], pkg)) self._sizes(pkg) + print("[ {0}delete{1} ] --> [ {2} ] - {3}".format( + self.meta.color["RED"], self.meta.color["ENDC"], + self.file_size, pkg)) self._calc_sizes() self._remove_summary() + if "--third-party" in self.extra: + print("\n") + self.msg.template(78) + print("| {0}{1}*** WARNING ***{2}").format( + " " * 27, self.meta.color["RED"], self.meta.color["ENDC"]) + print("| Before you use third-party option, be sure you have" + " updated the package \n| lists. Run the command" + " 'slpkg update' and 'slpkg -c slack --upgrade'") + self.msg.template(78) return removed def _calc_sizes(self): @@ -334,8 +361,8 @@ class PackageManager(object): dependency.append(rmv) if package: if "--checklist" in self.extra: - text = ("Press 'spacebar' to choose packages for the remove" - " exception") + text = ("Press 'spacebar' to choose packages for the" + " remove exception") backtitle = "{0} {1}".format(self.meta.__all__, self.meta.__version__) status = False @@ -379,24 +406,37 @@ class PackageManager(object): def find(self, flag): """Find installed Slackware packages """ - matching, pkg_cache, match_cache = 0, "", "" + matching, packages = 0, [] + pkg_cache, match_cache = "", "" + slack_packages, slack_names = slackware_repository() print("\nPackages with matching name [ {0}{1}{2} ]\n".format( self.meta.color["CYAN"], ", ".join(self.binary), self.meta.color["ENDC"])) for pkg in self.binary: for match in find_package("", self.meta.pkg_path): + pkg_cache = pkg + match_cache = match + split_name = split_package(match)[0] if "--case-ins" in flag: pkg_cache = pkg.lower() match_cache = match.lower() - else: - pkg_cache = pkg - match_cache = match - if pkg_cache in match_cache: - matching += 1 - self._sizes(match) - print("[ {0}installed{1} ] [ {2} ] - {3}".format( - self.meta.color["GREEN"], self.meta.color["ENDC"], - self.file_size, match)) + if ("--third-party" in flag and not self.binary and + split_name not in slack_names): + packages.append(match) + if ("--third-party" in flag and pkg_cache in match_cache and + split_name not in slack_names): + packages.append(match) + if pkg_cache in match_cache and not flag: + packages.append(match) + if ("--case-ins" in flag and "--third-party" not in flag and + pkg_cache in match_cache): + packages.append(match) + for pkgs in packages: + matching += 1 + self._sizes(pkgs) + print("[ {0}installed{1} ] [ {2} ] - {3}".format( + self.meta.color["GREEN"], self.meta.color["ENDC"], + self.file_size, pkgs)) if matching == 0: message = "Can't find" self.msg.pkg_not_found("", ", ".join(self.binary), message, "\n") @@ -418,7 +458,7 @@ class PackageManager(object): for line in data.splitlines(): if line.startswith("UNCOMPRESSED PACKAGE SIZE:"): digit = float((''.join(re.findall( - "[-+]?\d+[\.]?\d*[eE]?[-+]?\d*", line[26:])))) + r"[-+]?\d+[\.]?\d*[eE]?[-+]?\d*", line[26:])))) self.file_size = line[26:].strip() if "M" in line[26:]: self.size += digit * 1024 @@ -533,7 +573,8 @@ class PackageManager(object): "SLACKBUILDS.TXT".format(repo)) else: if (os.path.isfile( - self.meta.lib_path + "{0}_repo/PACKAGES.TXT".format(repo))): + self.meta.lib_path + "{0}_repo/PACKAGES.TXT".format( + repo))): packages = Utils().read_file(self.meta.lib_path + "{0}_repo/" "PACKAGES.TXT".format(repo)) return packages diff --git a/slpkg/pkg_find.py b/slpkg/pkg_find.py index 5b171a30..ee21f05f 100644 --- a/slpkg/pkg_find.py +++ b/slpkg/pkg_find.py @@ -3,7 +3,7 @@ # pkg_find.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/remove.py b/slpkg/remove.py index c390589f..7f9ec7ef 100644 --- a/slpkg/remove.py +++ b/slpkg/remove.py @@ -3,7 +3,7 @@ # remove.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/repoenable.py b/slpkg/repoenable.py index 6b939503..7be80758 100644 --- a/slpkg/repoenable.py +++ b/slpkg/repoenable.py @@ -3,7 +3,7 @@ # repoenable.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/repoinfo.py b/slpkg/repoinfo.py index 76d0153d..ba20ebf2 100644 --- a/slpkg/repoinfo.py +++ b/slpkg/repoinfo.py @@ -3,7 +3,7 @@ # repoinfo.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/repolist.py b/slpkg/repolist.py index a3a7594c..3bb0c807 100644 --- a/slpkg/repolist.py +++ b/slpkg/repolist.py @@ -3,7 +3,7 @@ # repolist.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/repositories.py b/slpkg/repositories.py index c153547b..ab58ab00 100644 --- a/slpkg/repositories.py +++ b/slpkg/repositories.py @@ -3,7 +3,7 @@ # repositories.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/sbo/autobuild.py b/slpkg/sbo/autobuild.py index 2fca02ed..6e1c70ef 100644 --- a/slpkg/sbo/autobuild.py +++ b/slpkg/sbo/autobuild.py @@ -3,7 +3,7 @@ # autobuild.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/sbo/build_num.py b/slpkg/sbo/build_num.py index b0a3b6ef..9bd66a13 100644 --- a/slpkg/sbo/build_num.py +++ b/slpkg/sbo/build_num.py @@ -3,7 +3,7 @@ # build_num.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/sbo/check.py b/slpkg/sbo/check.py index 8bf7f36d..5d6129fe 100644 --- a/slpkg/sbo/check.py +++ b/slpkg/sbo/check.py @@ -3,7 +3,7 @@ # check.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/sbo/compressed.py b/slpkg/sbo/compressed.py index 754387a4..98917d29 100644 --- a/slpkg/sbo/compressed.py +++ b/slpkg/sbo/compressed.py @@ -3,7 +3,7 @@ # download.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/sbo/dependency.py b/slpkg/sbo/dependency.py index 5d0269e3..c12550d7 100644 --- a/slpkg/sbo/dependency.py +++ b/slpkg/sbo/dependency.py @@ -3,7 +3,7 @@ # dependency.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/sbo/greps.py b/slpkg/sbo/greps.py index 3394cf92..03ffae28 100644 --- a/slpkg/sbo/greps.py +++ b/slpkg/sbo/greps.py @@ -3,7 +3,7 @@ # greps.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/sbo/network.py b/slpkg/sbo/network.py index 2ac336fe..2e8ad798 100644 --- a/slpkg/sbo/network.py +++ b/slpkg/sbo/network.py @@ -3,7 +3,7 @@ # network.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations @@ -268,9 +268,11 @@ class SBoNetwork(object): self.msg.template(78) print("| {0} > {1} > {2}{3}{4}".format(slack_ver(), sbo_url.split("/")[-3].title(), - self.cyan, self.name, self.endc)) + self.cyan, self.name, + self.endc)) self.msg.template(78) - print("| {0}Package url{1}: {2}".format(self.green, self.endc, sbo_url)) + print("| {0}Package url{1}: {2}".format(self.green, self.endc, + sbo_url)) self.msg.template(78) print("| {0}Description: {1}{2}".format(self.green, self.endc, self.sbo_desc)) @@ -310,7 +312,7 @@ class SBoNetwork(object): """Using dialog and checklist option """ data = [] - if self.name == "ALL": + if not self.name: data = self.data else: for name in self.data: diff --git a/slpkg/sbo/queue.py b/slpkg/sbo/queue.py index 860b014d..7649ff88 100644 --- a/slpkg/sbo/queue.py +++ b/slpkg/sbo/queue.py @@ -3,7 +3,7 @@ # queue.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/sbo/read.py b/slpkg/sbo/read.py index 61ab84cc..61719003 100644 --- a/slpkg/sbo/read.py +++ b/slpkg/sbo/read.py @@ -3,7 +3,7 @@ # read.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/sbo/remove.py b/slpkg/sbo/remove.py index d42476c3..1c604ffc 100644 --- a/slpkg/sbo/remove.py +++ b/slpkg/sbo/remove.py @@ -3,7 +3,7 @@ # remove.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/sbo/sbo_arch.py b/slpkg/sbo/sbo_arch.py index de9d345c..c20a1f3a 100644 --- a/slpkg/sbo/sbo_arch.py +++ b/slpkg/sbo/sbo_arch.py @@ -3,7 +3,7 @@ # sbo_arch.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/sbo/search.py b/slpkg/sbo/search.py index 9c6a62f6..0fed1e95 100644 --- a/slpkg/sbo/search.py +++ b/slpkg/sbo/search.py @@ -3,7 +3,7 @@ # search.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/sbo/slack_find.py b/slpkg/sbo/slack_find.py index 6d5e1db1..4b242063 100644 --- a/slpkg/sbo/slack_find.py +++ b/slpkg/sbo/slack_find.py @@ -3,7 +3,7 @@ # slack_find.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/sbo/slackbuild.py b/slpkg/sbo/slackbuild.py index e92abcd4..5c86bbde 100644 --- a/slpkg/sbo/slackbuild.py +++ b/slpkg/sbo/slackbuild.py @@ -3,7 +3,7 @@ # slackbuild.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/security.py b/slpkg/security.py index 6939858a..6ceee5b5 100644 --- a/slpkg/security.py +++ b/slpkg/security.py @@ -3,7 +3,7 @@ # security.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/sizes.py b/slpkg/sizes.py index 95fd718b..98dd0cd0 100644 --- a/slpkg/sizes.py +++ b/slpkg/sizes.py @@ -3,7 +3,7 @@ # sizes.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/slack/mirrors.py b/slpkg/slack/mirrors.py index a12bfb55..38956227 100644 --- a/slpkg/slack/mirrors.py +++ b/slpkg/slack/mirrors.py @@ -3,7 +3,7 @@ # mirrors.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/slack/patches.py b/slpkg/slack/patches.py index 628e09f7..a9c961cb 100644 --- a/slpkg/slack/patches.py +++ b/slpkg/slack/patches.py @@ -3,7 +3,7 @@ # patches.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations @@ -208,7 +208,8 @@ class Patches(object): Upgrade packages """ for pkg in self.upgrade_all: - check_md5(pkg_checksum(pkg, "slack_patches"), self.patch_path + pkg) + check_md5(pkg_checksum(pkg, "slack_patches"), + self.patch_path + pkg) pkg_ver = "{0}-{1}".format(split_package(pkg)[0], split_package(pkg)[1]) if find_package(split_package(pkg)[0] + self.meta.sp, @@ -239,19 +240,27 @@ class Patches(object): else: print("") self.msg.template(78) - print("| {0}*** HIGHLY recommended reinstall 'LILO' " + print("| {0}*** HIGHLY recommended reinstall boot loader " "***{1}".format(self.meta.color["RED"], self.meta.color["ENDC"])) + print("| L=lilo / E=elilo / G=grub") self.msg.template(78) try: answer = raw_input("\nThe kernel has been upgraded, " - "reinstall `LILO` [y/N]? ") + "reinstall boot loader [L/E/G]? ") except EOFError: print("") raise SystemExit() - if answer in ["y", "Y"]: + if answer in ["L"]: subprocess.call("lilo", shell=True) break + elif answer in ["E"]: + subprocess.call("eliloconfig", shell=True) + break + elif answer in ["G"]: + subprocess.call("grub-mkconfig -o /boot/grub/grub.cfg", + shell=True) + break def slackpkg_update(self): """This replace slackpkg ChangeLog.txt file with new diff --git a/slpkg/slack/slack_version.py b/slpkg/slack/slack_version.py index b2cb2fdb..26e456ea 100644 --- a/slpkg/slack/slack_version.py +++ b/slpkg/slack/slack_version.py @@ -3,7 +3,7 @@ # slack_version.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/slack/slackware_repo.py b/slpkg/slack/slackware_repo.py new file mode 100644 index 00000000..ae88b4fa --- /dev/null +++ b/slpkg/slack/slackware_repo.py @@ -0,0 +1,42 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +# slackware_repo.py file is part of slpkg. + +# Copyright 2014-2019 Dimitris Zlatanidis +# All rights reserved. + +# Slpkg is a user-friendly package manager for Slackware installations + +# https://gitlab.com/dslackw/slpkg + +# Slpkg is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +from slpkg.utils import Utils +from slpkg.binary.greps import repo_data +from slpkg.splitting import split_package +from slpkg.__metadata__ import MetaData as _meta_ + + +def slackware_repository(): + """Return all official Slackware packages + """ + slack_repo, packages, names, name = [], [], [], "" + slack_repo = repo_data( + Utils().read_file(_meta_.lib_path + "slack_repo/PACKAGES.TXT"), + "slack", "") + for pkg in slack_repo[0]: + name = split_package(pkg)[0] + names.append(name) + packages.append(pkg[:-4]) + return packages, names diff --git a/slpkg/slpkg_update.py b/slpkg/slpkg_update.py index d0a9c801..eca53406 100644 --- a/slpkg/slpkg_update.py +++ b/slpkg/slpkg_update.py @@ -3,7 +3,7 @@ # slpkg_update.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations @@ -35,7 +35,7 @@ from slpkg.__metadata__ import MetaData as _meta_ def it_self_update(): - """Check from GitHub slpkg repository if new version is available + """Check from GitLab slpkg repository if new version is available download and update itself """ __new_version__ = "" @@ -86,6 +86,6 @@ def it_self_update(): subprocess.call("chmod +x {0}".format("install.sh"), shell=True) subprocess.call("sh install.sh", shell=True) else: - print("\n{0}: There is no new version, already used the last !" + print("\n{0}: There is no new version, already used the last!" "\n".format(_meta_.__all__)) raise SystemExit() diff --git a/slpkg/splitting.py b/slpkg/splitting.py index bd86f9f1..50e28e1f 100644 --- a/slpkg/splitting.py +++ b/slpkg/splitting.py @@ -3,7 +3,7 @@ # splitting.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/status_deps.py b/slpkg/status_deps.py index 74c0b65e..bcc4cafc 100644 --- a/slpkg/status_deps.py +++ b/slpkg/status_deps.py @@ -3,7 +3,7 @@ # status_deps.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/superuser.py b/slpkg/superuser.py index 2731dc23..801789ec 100644 --- a/slpkg/superuser.py +++ b/slpkg/superuser.py @@ -3,7 +3,7 @@ # superuser.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/toolbar.py b/slpkg/toolbar.py index 2aa19da0..2b22b1ca 100644 --- a/slpkg/toolbar.py +++ b/slpkg/toolbar.py @@ -3,7 +3,7 @@ # toolbar.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/tracking.py b/slpkg/tracking.py index c7cd20e1..01817108 100644 --- a/slpkg/tracking.py +++ b/slpkg/tracking.py @@ -3,7 +3,7 @@ # tracking.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations @@ -93,7 +93,7 @@ class TrackingDeps(object): used = self.check_used(pkg) self.deps_used(pkg, used) used = "{0} {1}{2}{3}".format( - "is dependency -->", self.cyan, + "is dependence on -->", self.cyan, ", ".join(used), self.endc) else: used = "" diff --git a/slpkg/upgrade_checklist.py b/slpkg/upgrade_checklist.py index 21596d25..46673beb 100644 --- a/slpkg/upgrade_checklist.py +++ b/slpkg/upgrade_checklist.py @@ -3,7 +3,7 @@ # upgrade_checklist.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/url_read.py b/slpkg/url_read.py index 35d0079d..3ca19875 100644 --- a/slpkg/url_read.py +++ b/slpkg/url_read.py @@ -3,7 +3,7 @@ # url_read.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/utils.py b/slpkg/utils.py index 5ea51bbd..03cdeb10 100644 --- a/slpkg/utils.py +++ b/slpkg/utils.py @@ -3,7 +3,7 @@ # utils.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations diff --git a/slpkg/version.py b/slpkg/version.py index 34606224..33c18121 100644 --- a/slpkg/version.py +++ b/slpkg/version.py @@ -3,7 +3,7 @@ # version.py file is part of slpkg. -# Copyright 2014-2018 Dimitris Zlatanidis +# Copyright 2014-2019 Dimitris Zlatanidis # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations