From d7476265eaf9a99814bf4a23168d4552bede130a Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Thu, 2 Jun 2022 15:53:11 +0300 Subject: [PATCH 1/2] Removed license from each file --- clean.py | 20 -------------------- setup.py | 20 -------------------- slpkg/__metadata__.py | 20 -------------------- slpkg/arguments.py | 20 -------------------- slpkg/auto_pkg.py | 20 -------------------- slpkg/binaries/check.py | 20 -------------------- slpkg/binaries/dependency.py | 20 -------------------- slpkg/binaries/install.py | 20 -------------------- slpkg/binaries/queries.py | 20 -------------------- slpkg/binaries/repo_init.py | 20 -------------------- slpkg/binaries/search.py | 20 -------------------- slpkg/blacklist.py | 20 -------------------- slpkg/checks.py | 20 -------------------- slpkg/checksum.py | 20 -------------------- slpkg/clean.py | 20 -------------------- slpkg/config.py | 20 -------------------- slpkg/desc.py | 20 -------------------- slpkg/dialog_box.py | 20 -------------------- slpkg/downloader.py | 20 -------------------- slpkg/file_size.py | 20 -------------------- slpkg/graph.py | 20 -------------------- slpkg/grep_md5.py | 20 -------------------- slpkg/health.py | 20 -------------------- slpkg/init.py | 20 -------------------- slpkg/load.py | 20 -------------------- slpkg/log_deps.py | 20 -------------------- slpkg/main.py | 20 -------------------- slpkg/md5sum.py | 20 -------------------- slpkg/messages.py | 20 -------------------- slpkg/models/data.py | 20 -------------------- slpkg/models/models.py | 20 -------------------- slpkg/new_config.py | 20 -------------------- slpkg/pkg/build.py | 20 -------------------- slpkg/pkg/find.py | 20 -------------------- slpkg/pkg/installed.py | 20 -------------------- slpkg/pkg/manager.py | 20 -------------------- slpkg/pkg_find.py | 20 -------------------- slpkg/remove.py | 20 -------------------- slpkg/repoenable.py | 20 -------------------- slpkg/repoinfo.py | 20 -------------------- slpkg/repolist.py | 20 -------------------- slpkg/repositories.py | 20 -------------------- slpkg/sbo/build_num.py | 20 -------------------- slpkg/sbo/check.py | 20 -------------------- slpkg/sbo/compressed.py | 20 -------------------- slpkg/sbo/dependencies.py | 20 -------------------- slpkg/sbo/queries.py | 20 -------------------- slpkg/sbo/queue.py | 20 -------------------- slpkg/sbo/read.py | 20 -------------------- slpkg/sbo/sbo_arch.py | 20 -------------------- slpkg/sbo/search.py | 20 -------------------- slpkg/sbo/slack_find.py | 20 -------------------- slpkg/sbo/slackbuild.py | 20 -------------------- slpkg/security.py | 20 -------------------- slpkg/sizes.py | 20 -------------------- slpkg/slpkg_update.py | 20 -------------------- slpkg/splitting.py | 20 -------------------- slpkg/status_deps.py | 20 -------------------- slpkg/superuser.py | 20 -------------------- slpkg/tracking.py | 20 -------------------- slpkg/upgrade_checklist.py | 20 -------------------- slpkg/url_read.py | 20 -------------------- slpkg/utils.py | 20 -------------------- slpkg/version.py | 20 -------------------- 64 files changed, 1280 deletions(-) diff --git a/clean.py b/clean.py index 3f2f4f0c..21a1521d 100755 --- a/clean.py +++ b/clean.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# clean.py file is part of slpkg. - -# Copyright 2014-2022 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 . - import os import shutil diff --git a/setup.py b/setup.py index 3d2553cb..dd4965bf 100755 --- a/setup.py +++ b/setup.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# setup.py file is part of slpkg. - -# Copyright 2014-2022 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 . - import os import time diff --git a/slpkg/__metadata__.py b/slpkg/__metadata__.py index b012a9a2..63749ef4 100644 --- a/slpkg/__metadata__.py +++ b/slpkg/__metadata__.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# __metadata__.py file is part of slpkg. - -# Copyright 2014-2022 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 . - import os diff --git a/slpkg/arguments.py b/slpkg/arguments.py index 31ceb221..b7bae485 100644 --- a/slpkg/arguments.py +++ b/slpkg/arguments.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# arguments.py file is part of slpkg. - -# Copyright 2014-2022 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.repolist import RepoList from slpkg.__metadata__ import MetaData as _meta_ diff --git a/slpkg/auto_pkg.py b/slpkg/auto_pkg.py index 8c19bcd8..9f50bb64 100644 --- a/slpkg/auto_pkg.py +++ b/slpkg/auto_pkg.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# auto_pkg.py file is part of slpkg. - -# Copyright 2014-2022 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.messages import Msg from slpkg.__metadata__ import MetaData as _meta_ diff --git a/slpkg/binaries/check.py b/slpkg/binaries/check.py index 09b14f3f..579d279d 100644 --- a/slpkg/binaries/check.py +++ b/slpkg/binaries/check.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# check.py file is part of slpkg. - -# Copyright 2014-2022 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 pkg_resources import parse_version diff --git a/slpkg/binaries/dependency.py b/slpkg/binaries/dependency.py index d0159f61..7613f96e 100644 --- a/slpkg/binaries/dependency.py +++ b/slpkg/binaries/dependency.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# dependency.py file is part of slpkg. - -# Copyright 2014-2022 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 . - import sys from functools import lru_cache diff --git a/slpkg/binaries/install.py b/slpkg/binaries/install.py index 4ff06aea..e445e913 100644 --- a/slpkg/binaries/install.py +++ b/slpkg/binaries/install.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# install.py file is part of slpkg. - -# Copyright 2014-2022 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 . - import os from itertools import zip_longest diff --git a/slpkg/binaries/queries.py b/slpkg/binaries/queries.py index 2f431655..9939059b 100644 --- a/slpkg/binaries/queries.py +++ b/slpkg/binaries/queries.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# greps.py file is part of slpkg. - -# Copyright 2014-2022 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.splitting import split_package diff --git a/slpkg/binaries/repo_init.py b/slpkg/binaries/repo_init.py index 7885bc93..7f363862 100644 --- a/slpkg/binaries/repo_init.py +++ b/slpkg/binaries/repo_init.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# repo_init.py file is part of slpkg. - -# Copyright 2014-2022 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.repositories import Repo diff --git a/slpkg/binaries/search.py b/slpkg/binaries/search.py index 1b609a94..2e5d71ab 100644 --- a/slpkg/binaries/search.py +++ b/slpkg/binaries/search.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# search.py file is part of slpkg. - -# Copyright 2014-2022 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.blacklist import BlackList diff --git a/slpkg/blacklist.py b/slpkg/blacklist.py index a91dcd21..1d130b65 100644 --- a/slpkg/blacklist.py +++ b/slpkg/blacklist.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# blacklist.py file is part of slpkg. - -# Copyright 2014-2022 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 . - import os diff --git a/slpkg/checks.py b/slpkg/checks.py index c0cb4c2c..53e8bf58 100644 --- a/slpkg/checks.py +++ b/slpkg/checks.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# checks.py file is part of slpkg. - -# Copyright 2014-2022 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.messages import Msg from slpkg.arguments import usage diff --git a/slpkg/checksum.py b/slpkg/checksum.py index 948f1192..3a3c8d10 100644 --- a/slpkg/checksum.py +++ b/slpkg/checksum.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# checksum.py file is part of slpkg. - -# Copyright 2014-2022 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.md5sum import md5 from slpkg.messages import Msg diff --git a/slpkg/clean.py b/slpkg/clean.py index ab530912..69fdfef9 100644 --- a/slpkg/clean.py +++ b/slpkg/clean.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# clean.py file is part of slpkg. - -# Copyright 2014-2022 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 . - import os import shutil diff --git a/slpkg/config.py b/slpkg/config.py index 5a8241f1..e4ecffdf 100644 --- a/slpkg/config.py +++ b/slpkg/config.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# config.py file is part of slpkg. - -# Copyright 2014-2022 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 . - import shutil import filecmp diff --git a/slpkg/desc.py b/slpkg/desc.py index 91cd4ea9..7acd90a5 100644 --- a/slpkg/desc.py +++ b/slpkg/desc.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# desc.py file is part of slpkg. - -# Copyright 2014-2022 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.messages import Msg diff --git a/slpkg/dialog_box.py b/slpkg/dialog_box.py index fbaa397d..e0c3e943 100644 --- a/slpkg/dialog_box.py +++ b/slpkg/dialog_box.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# dialog_box.py file is part of slpkg. - -# Copyright 2014-2022 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 __future__ import unicode_literals diff --git a/slpkg/downloader.py b/slpkg/downloader.py index f693af84..0bd8df89 100644 --- a/slpkg/downloader.py +++ b/slpkg/downloader.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# downloader.py file is part of slpkg. - -# Copyright 2014-2022 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 . - import os import tarfile diff --git a/slpkg/file_size.py b/slpkg/file_size.py index 750f8698..2dfc0287 100644 --- a/slpkg/file_size.py +++ b/slpkg/file_size.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -* -# file_size.py file is part of slpkg. - -# Copyright 2014-2022 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 . - import os import urllib3 diff --git a/slpkg/graph.py b/slpkg/graph.py index 4fb28ad5..e6864478 100644 --- a/slpkg/graph.py +++ b/slpkg/graph.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# graph.py file is part of slpkg. - -# Copyright 2014-2022 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 . - import os import subprocess diff --git a/slpkg/grep_md5.py b/slpkg/grep_md5.py index 6a7870b1..ed423346 100644 --- a/slpkg/grep_md5.py +++ b/slpkg/grep_md5.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# grep_md5.py file is part of slpkg. - -# Copyright 2014-2022 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.slack.mirrors import mirrors diff --git a/slpkg/health.py b/slpkg/health.py index bdbdd4cd..74dd4d3a 100644 --- a/slpkg/health.py +++ b/slpkg/health.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# health.py file is part of slpkg. - -# Copyright 2014-2022 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 . - import os diff --git a/slpkg/init.py b/slpkg/init.py index a9311d70..a48b57e6 100644 --- a/slpkg/init.py +++ b/slpkg/init.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# init.py file is part of slpkg. - -# Copyright 2014-2022 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 . - import os import shutil diff --git a/slpkg/load.py b/slpkg/load.py index 15fa0122..96c58224 100644 --- a/slpkg/load.py +++ b/slpkg/load.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# load.py file is part of slpkg. - -# Copyright 2014-2022 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 . - import os diff --git a/slpkg/log_deps.py b/slpkg/log_deps.py index 7d0fb2ec..9f430085 100644 --- a/slpkg/log_deps.py +++ b/slpkg/log_deps.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# log_deps.py file is part of slpkg. - -# Copyright 2014-2022 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 . - import os diff --git a/slpkg/main.py b/slpkg/main.py index 3c35e93b..f2cb5755 100644 --- a/slpkg/main.py +++ b/slpkg/main.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# main.py file is part of slpkg. - -# Copyright 2014-2022 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 . - import os import sys diff --git a/slpkg/md5sum.py b/slpkg/md5sum.py index 49ec35f2..5cfa0d53 100644 --- a/slpkg/md5sum.py +++ b/slpkg/md5sum.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# md5sum.py file is part of slpkg. - -# Copyright 2014-2022 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 . - import hashlib diff --git a/slpkg/messages.py b/slpkg/messages.py index 486b750c..9ab98860 100644 --- a/slpkg/messages.py +++ b/slpkg/messages.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# messages.py file is part of slpkg. - -# Copyright 2014-2022 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 . - import itertools diff --git a/slpkg/models/data.py b/slpkg/models/data.py index 3f6c11bd..f9dcc5b5 100644 --- a/slpkg/models/data.py +++ b/slpkg/models/data.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# data.py file is part of slpkg. - -# Copyright 2014-2022 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 progress.bar import Bar from slpkg.__metadata__ import MetaData as _meta_ diff --git a/slpkg/models/models.py b/slpkg/models/models.py index a278b0d5..4d583a4b 100644 --- a/slpkg/models/models.py +++ b/slpkg/models/models.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# models.py file is part of slpkg. - -# Copyright 2014-2022 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 sqlalchemy.orm import sessionmaker from sqlalchemy.ext.declarative import declarative_base diff --git a/slpkg/new_config.py b/slpkg/new_config.py index dea9ddd9..dad4516c 100644 --- a/slpkg/new_config.py +++ b/slpkg/new_config.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# new_config.py file is part of slpkg. - -# Copyright 2014-2022 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 . - import os import shutil diff --git a/slpkg/pkg/build.py b/slpkg/pkg/build.py index 36fd7591..b13a3b07 100644 --- a/slpkg/pkg/build.py +++ b/slpkg/pkg/build.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# build.py file is part of slpkg. - -# Copyright 2014-2022 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 . - import os import re diff --git a/slpkg/pkg/find.py b/slpkg/pkg/find.py index 5448817f..cfd5be8a 100644 --- a/slpkg/pkg/find.py +++ b/slpkg/pkg/find.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# find.py file is part of slpkg. - -# Copyright 2014-2022 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 . - import os from slpkg.blacklist import BlackList diff --git a/slpkg/pkg/installed.py b/slpkg/pkg/installed.py index b3744047..46b33bdb 100644 --- a/slpkg/pkg/installed.py +++ b/slpkg/pkg/installed.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -* -# installed.py file is part of slpkg. - -# Copyright 2014-2022 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.pkg.find import find_package diff --git a/slpkg/pkg/manager.py b/slpkg/pkg/manager.py index e67ec6a3..7f5e2083 100644 --- a/slpkg/pkg/manager.py +++ b/slpkg/pkg/manager.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# manager.py file is part of slpkg. - -# Copyright 2014-2022 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 . - import os import re diff --git a/slpkg/pkg_find.py b/slpkg/pkg_find.py index e95124b9..7c4ffc8f 100644 --- a/slpkg/pkg_find.py +++ b/slpkg/pkg_find.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# pkg_find.py file is part of slpkg. - -# Copyright 2014-2022 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.messages import Msg from slpkg.sbo.queries import SboQuery diff --git a/slpkg/remove.py b/slpkg/remove.py index a20dc10d..8751fdad 100644 --- a/slpkg/remove.py +++ b/slpkg/remove.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# remove.py file is part of slpkg. - -# Copyright 2014-2022 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 . - import os import shutil diff --git a/slpkg/repoenable.py b/slpkg/repoenable.py index a3b9a6e5..1bf39c6a 100644 --- a/slpkg/repoenable.py +++ b/slpkg/repoenable.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# repoenable.py file is part of slpkg. - -# Copyright 2014-2022 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 . - import os diff --git a/slpkg/repoinfo.py b/slpkg/repoinfo.py index 33d61ef0..c177d83f 100644 --- a/slpkg/repoinfo.py +++ b/slpkg/repoinfo.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# repoinfo.py file is part of slpkg. - -# Copyright 2014-2022 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 . - import os diff --git a/slpkg/repolist.py b/slpkg/repolist.py index fca111db..aeb97fbb 100644 --- a/slpkg/repolist.py +++ b/slpkg/repolist.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# repolist.py file is part of slpkg. - -# Copyright 2014-2022 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.messages import Msg from slpkg.repositories import Repo diff --git a/slpkg/repositories.py b/slpkg/repositories.py index 738fca34..7fada755 100644 --- a/slpkg/repositories.py +++ b/slpkg/repositories.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# repositories.py file is part of slpkg. - -# Copyright 2014-2022 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 . - import os diff --git a/slpkg/sbo/build_num.py b/slpkg/sbo/build_num.py index 5765e4cf..2e3ddee5 100644 --- a/slpkg/sbo/build_num.py +++ b/slpkg/sbo/build_num.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# build_num.py file is part of slpkg. - -# Copyright 2014-2022 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 . - import re diff --git a/slpkg/sbo/check.py b/slpkg/sbo/check.py index f70adb9a..a5831eb1 100644 --- a/slpkg/sbo/check.py +++ b/slpkg/sbo/check.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# check.py file is part of slpkg. - -# Copyright 2014-2022 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 . - import os from pkg_resources import parse_version diff --git a/slpkg/sbo/compressed.py b/slpkg/sbo/compressed.py index a2ba6fd1..36cbc5c9 100644 --- a/slpkg/sbo/compressed.py +++ b/slpkg/sbo/compressed.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# download.py file is part of slpkg. - -# Copyright 2014-2022 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 . - class SBoLink: """Creates slackbuild tar.gz archive from url diff --git a/slpkg/sbo/dependencies.py b/slpkg/sbo/dependencies.py index b6423592..61562bc7 100644 --- a/slpkg/sbo/dependencies.py +++ b/slpkg/sbo/dependencies.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# dependencies.py file is part of slpkg. - -# Copyright 2014-2022 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.sbo.queries import SboQuery from slpkg.blacklist import BlackList diff --git a/slpkg/sbo/queries.py b/slpkg/sbo/queries.py index f090bc69..360c400e 100644 --- a/slpkg/sbo/queries.py +++ b/slpkg/sbo/queries.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# greps.py file is part of slpkg. - -# Copyright 2014-2022 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.__metadata__ import MetaData as _meta_ from slpkg.models.models import SBoTable, session diff --git a/slpkg/sbo/queue.py b/slpkg/sbo/queue.py index b13a1cb3..607038aa 100644 --- a/slpkg/sbo/queue.py +++ b/slpkg/sbo/queue.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# queue.py file is part of slpkg. - -# Copyright 2014-2022 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 . - import os from collections import OrderedDict diff --git a/slpkg/sbo/read.py b/slpkg/sbo/read.py index 9ca0e38e..649955e0 100644 --- a/slpkg/sbo/read.py +++ b/slpkg/sbo/read.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# read.py file is part of slpkg. - -# Copyright 2014-2022 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.url_read import URL diff --git a/slpkg/sbo/sbo_arch.py b/slpkg/sbo/sbo_arch.py index d7769d1e..514d15e4 100644 --- a/slpkg/sbo/sbo_arch.py +++ b/slpkg/sbo/sbo_arch.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# sbo_arch.py file is part of slpkg. - -# Copyright 2014-2022 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.__metadata__ import MetaData as _meta_ diff --git a/slpkg/sbo/search.py b/slpkg/sbo/search.py index b0add827..e5b23cbb 100644 --- a/slpkg/sbo/search.py +++ b/slpkg/sbo/search.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# search.py file is part of slpkg. - -# Copyright 2014-2022 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.repositories import Repo from slpkg.slack.slack_version import slack_ver diff --git a/slpkg/sbo/slack_find.py b/slpkg/sbo/slack_find.py index 244219f0..1977b41c 100644 --- a/slpkg/sbo/slack_find.py +++ b/slpkg/sbo/slack_find.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# slack_find.py file is part of slpkg. - -# Copyright 2014-2022 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 . - import os from pkg_resources import parse_version diff --git a/slpkg/sbo/slackbuild.py b/slpkg/sbo/slackbuild.py index 827c57b4..8fbaa873 100644 --- a/slpkg/sbo/slackbuild.py +++ b/slpkg/sbo/slackbuild.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# slackbuild.py file is part of slpkg. - -# Copyright 2014-2022 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 . - import os from pkg_resources import parse_version diff --git a/slpkg/security.py b/slpkg/security.py index 57cfb8b6..079e35bb 100644 --- a/slpkg/security.py +++ b/slpkg/security.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# security.py file is part of slpkg. - -# Copyright 2014-2022 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.messages import Msg diff --git a/slpkg/sizes.py b/slpkg/sizes.py index e193ef5f..62fc8803 100644 --- a/slpkg/sizes.py +++ b/slpkg/sizes.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# sizes.py file is part of slpkg. - -# Copyright 2014-2022 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 . - def units(comp_sum, uncomp_sum): """Calculates package size diff --git a/slpkg/slpkg_update.py b/slpkg/slpkg_update.py index a71d80c6..e24584f9 100644 --- a/slpkg/slpkg_update.py +++ b/slpkg/slpkg_update.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# slpkg_update.py file is part of slpkg. - -# Copyright 2014-2022 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 . - import os import re diff --git a/slpkg/splitting.py b/slpkg/splitting.py index 5c393b04..6842aaa2 100644 --- a/slpkg/splitting.py +++ b/slpkg/splitting.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# splitting.py file is part of slpkg. - -# Copyright 2014-2022 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 . - def split_package(package): """Splits package in name, version diff --git a/slpkg/status_deps.py b/slpkg/status_deps.py index 2e17fe96..8aef1be1 100644 --- a/slpkg/status_deps.py +++ b/slpkg/status_deps.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# status_deps.py file is part of slpkg. - -# Copyright 2014-2022 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 . - import os diff --git a/slpkg/superuser.py b/slpkg/superuser.py index 1e2da766..464793a2 100644 --- a/slpkg/superuser.py +++ b/slpkg/superuser.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# superuser.py file is part of slpkg. - -# Copyright 2014-2022 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 . - import os import getpass diff --git a/slpkg/tracking.py b/slpkg/tracking.py index 64e62728..a55ccc87 100644 --- a/slpkg/tracking.py +++ b/slpkg/tracking.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# tracking.py file is part of slpkg. - -# Copyright 2014-2022 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.graph import Graph from slpkg.messages import Msg diff --git a/slpkg/upgrade_checklist.py b/slpkg/upgrade_checklist.py index c421a99c..dbc0048d 100644 --- a/slpkg/upgrade_checklist.py +++ b/slpkg/upgrade_checklist.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# upgrade_checklist.py file is part of slpkg. - -# Copyright 2014-2022 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.dialog_box import DialogUtil from slpkg.splitting import split_package diff --git a/slpkg/url_read.py b/slpkg/url_read.py index 4ca4f420..d6898b6b 100644 --- a/slpkg/url_read.py +++ b/slpkg/url_read.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# url_read.py file is part of slpkg. - -# Copyright 2014-2022 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 . - import urllib3 diff --git a/slpkg/utils.py b/slpkg/utils.py index ba6b6ebe..527b27a0 100644 --- a/slpkg/utils.py +++ b/slpkg/utils.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# utils.py file is part of slpkg. - -# Copyright 2014-2022 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 . - import os diff --git a/slpkg/version.py b/slpkg/version.py index eed320f7..20cf95e4 100644 --- a/slpkg/version.py +++ b/slpkg/version.py @@ -1,26 +1,6 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -# version.py file is part of slpkg. - -# Copyright 2014-2022 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.__metadata__ import MetaData as m From 809b4e61b30ddf12b3c7db38a59a2451cea7e92b Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Mon, 13 Jun 2022 13:19:32 +0300 Subject: [PATCH 2/2] Downgrade to version 4.0.1 --- CHECKSUMS.md5 | 1 - ChangeLog.txt | 7 - EXAMPLES.md | 37 ++- README.rst | 16 +- REPOSITORIES.md | 14 +- clean.py | 20 ++ conf/default-repositories | 26 +- conf/repositories.conf | 14 +- conf/rlworkman.deps | 35 ++ conf/slpkg.bash-completion | 2 +- conf/slpkg.fish | 2 + man/slpkg.8 | 22 ++ man/slpkg.html | 34 ++ setup.py | 20 ++ slpkg/__metadata__.py | 38 ++- slpkg/arguments.py | 35 ++ slpkg/auto_pkg.py | 20 ++ slpkg/binaries/dependency.py | 50 --- slpkg/binaries/queries.py | 132 -------- slpkg/binaries/search.py | 23 -- slpkg/{binaries => binary}/__init__.py | 0 slpkg/{binaries => binary}/check.py | 24 +- slpkg/binary/dependency.py | 70 ++++ slpkg/binary/greps.py | 284 ++++++++++++++++ slpkg/{binaries => binary}/install.py | 68 ++-- slpkg/{binaries => binary}/repo_init.py | 60 ++++ slpkg/binary/search.py | 43 +++ slpkg/blacklist.py | 25 +- slpkg/checks.py | 27 ++ slpkg/checksum.py | 20 ++ slpkg/clean.py | 20 ++ slpkg/config.py | 20 ++ slpkg/desc.py | 24 +- slpkg/dialog_box.py | 20 ++ slpkg/downloader.py | 20 ++ slpkg/file_size.py | 20 ++ slpkg/graph.py | 20 ++ slpkg/grep_md5.py | 20 ++ slpkg/health.py | 20 ++ slpkg/init.py | 282 +++++++++++++++- slpkg/load.py | 20 ++ slpkg/log_deps.py | 20 ++ slpkg/main.py | 84 ++++- slpkg/md5sum.py | 20 ++ slpkg/messages.py | 20 ++ slpkg/models/data.py | 73 ++--- slpkg/models/models.py | 35 +- slpkg/new_config.py | 20 ++ slpkg/pkg/build.py | 24 +- slpkg/pkg/find.py | 22 +- slpkg/pkg/installed.py | 20 ++ slpkg/pkg/manager.py | 34 +- slpkg/pkg_find.py | 24 +- slpkg/remove.py | 20 ++ slpkg/repoenable.py | 20 ++ slpkg/repoinfo.py | 22 +- slpkg/repolist.py | 20 ++ slpkg/repositories.py | 20 ++ slpkg/sbo/autobuild.py | 76 +++++ slpkg/sbo/build_num.py | 20 ++ slpkg/sbo/check.py | 28 +- slpkg/sbo/compressed.py | 20 ++ slpkg/sbo/dependencies.py | 28 -- slpkg/sbo/dependency.py | 77 +++++ slpkg/sbo/{queries.py => greps.py} | 24 +- slpkg/sbo/network.py | 418 ++++++++++++++++++++++++ slpkg/sbo/queue.py | 28 +- slpkg/sbo/read.py | 20 ++ slpkg/sbo/sbo_arch.py | 20 ++ slpkg/sbo/search.py | 22 +- slpkg/sbo/slack_find.py | 20 ++ slpkg/sbo/slackbuild.py | 74 ++++- slpkg/security.py | 20 ++ slpkg/sizes.py | 20 ++ slpkg/slack/patches.py | 11 +- slpkg/slack/slackware_repo.py | 2 +- slpkg/slpkg_update.py | 20 ++ slpkg/splitting.py | 20 ++ slpkg/status_deps.py | 20 ++ slpkg/superuser.py | 20 ++ slpkg/tracking.py | 48 ++- slpkg/upgrade_checklist.py | 20 ++ slpkg/url_read.py | 20 ++ slpkg/utils.py | 26 ++ slpkg/version.py | 20 ++ 85 files changed, 2842 insertions(+), 453 deletions(-) create mode 100644 conf/rlworkman.deps delete mode 100644 slpkg/binaries/dependency.py delete mode 100644 slpkg/binaries/queries.py delete mode 100644 slpkg/binaries/search.py rename slpkg/{binaries => binary}/__init__.py (100%) rename slpkg/{binaries => binary}/check.py (59%) create mode 100644 slpkg/binary/dependency.py create mode 100644 slpkg/binary/greps.py rename slpkg/{binaries => binary}/install.py (86%) rename slpkg/{binaries => binary}/repo_init.py (58%) create mode 100644 slpkg/binary/search.py create mode 100644 slpkg/sbo/autobuild.py delete mode 100644 slpkg/sbo/dependencies.py create mode 100644 slpkg/sbo/dependency.py rename slpkg/sbo/{queries.py => greps.py} (72%) create mode 100644 slpkg/sbo/network.py diff --git a/CHECKSUMS.md5 b/CHECKSUMS.md5 index a4ca274e..ef1de62b 100644 --- a/CHECKSUMS.md5 +++ b/CHECKSUMS.md5 @@ -147,4 +147,3 @@ c23fcaeee005bdd7858f8269d7532f1f ./slpkg-3.9.0.tar.gz 41b3f4f0f8fb8270e3b03abd2c73be2c ./slpkg-3.9.8.tar.gz 9c0ac9e08ae39c56a17c0aaf63dd94bb ./slpkg-3.9.9.tar.gz 7ad1bee7fc1db400aeb925485ed76b76 ./slpkg-4.0.0.tar.gz -5b1f9eb4738b5b578fea41cde6dcdddc ./slpkg-4.0.1.tar.gz diff --git a/ChangeLog.txt b/ChangeLog.txt index b7d3ac55..afff4620 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,10 +1,3 @@ -4.0.2 - 30/05/2022 -Removed: -- Repositories rlw, mles, ktown, rested, slacke, slacky, slackl -- Option --directory-prefix -- Option --autobuild -- Option --network - 4.0.1 - 30/05/2022 Added: - SQLAlchemy Object Relational Mapper diff --git a/EXAMPLES.md b/EXAMPLES.md index 1c67a747..2c2858f2 100644 --- a/EXAMPLES.md +++ b/EXAMPLES.md @@ -21,9 +21,13 @@ $ slpkg update Update repository [slack] ... Done Update repository [sbo] ... Done Update repository [alien] ... Done +Update repository [slacky] ... Done Update repository [conrad] ... Done Update repository [slonly] ... Done +Update repository [ktown] ... Done Update repository [salix] ... Done +Update repository [slacke] ... Done +Update repository [slackl] ... Done Update repository [multi] ... Done Update repository [msb] ... Done @@ -31,7 +35,7 @@ Update repository [msb] ... Done Update specifically repositories: ``` -$ slpkg update --repositories=sbo,msb +$ slpkg update --repositories=sbo,msb,slacky ``` Also you can check ChangeLog.txt for changes, like: @@ -56,11 +60,13 @@ $ slpkg --check +============================================================================== slack No changes in ChangeLog.txt sbo News in ChangeLog.txt + slacky News in ChangeLog.txt alien No changes in ChangeLog.txt + rlw No changes in ChangeLog.txt Summary =============================================================================== -From 3 repositories need 2 updating. Run the command 'slpkg update'. +From 5 repositories need 2 updating. Run the command 'slpkg update'. ``` Add and remove custom repositories: @@ -89,18 +95,24 @@ $ slpkg repo-list | Repo id Repo URL Default Status +============================================================================== alien http://www.slackware.com/~alien/slackbuilds/ yes disabled + ktown http://alien.slackbook.org/ktown/ yes disabled msb http://slackware.org.uk/msb/ yes enabled multi http://www.slackware.com/~alien/multilib/ yes disabled ponce http://ponce.cc/slackware/slackware64-14.2/packa~ no enabled + rested http://taper.alienbase.nl/mirrors/people/alien/r~ yes disabled + rlw http://rlworkman.net/pkgs/ yes disabled salix http://download.salixos.org/ yes disabled sbo http://slackbuilds.org/slackbuilds/ yes enabled slack http://ftp.cc.uoc.gr/mirrors/linux/slackware/ yes enabled - conrad http://slack.conraid.net/repository/slackware64-~ yes disabled + slacke http://ngc891.blogdns.net/pub/ yes disabled + slackl http://www.slackel.gr/repo/ yes disabled + conrad http://slack.conraid.net/repository/slackware64-~ yes disabled + slacky http://repository.slacky.eu/ yes disabled slonly https://slackonly.com/pub/packages/ yes disabled Repositories summary =============================================================================== -3/9 enabled default repositories and 1 custom. +3/14 enabled default repositories and 1 custom. For enable or disable default repositories edit '/etc/slpkg/repositories.conf' file. @@ -465,7 +477,7 @@ will be upgraded. Would you like to continue [y/N]? -$ slpkg -c alien --upgrade +$ slpkg -c slacky --upgrade Checking... Done Reading package lists... Done Resolving dependencies... Done @@ -474,7 +486,7 @@ Resolving dependencies... Done | Package New version Arch Build Repos Size +============================================================================== Upgrading: - gstreamer1-1.4.1 1.4.4 x86_64 1 alien 1563 K + gstreamer1-1.4.1 1.4.4 x86_64 1 slacky 1563 K Installing summary =============================================================================== @@ -516,12 +528,13 @@ Would you like to continue [y/N]? Upgrade only distribution: ``` -$ slpkg -c slack --upgrade -Checking... Done - -Slackware64 'stable' v14.2 distribution is up to date - - +$ slpkg -c slack --upgrade --skip="multi:*multilib*,ktown:*" // This upgrade +Checking... Done // distribution + // and skip all +Slackware64 'stable' v14.2 distribution is up to date // packages from + // ktown repository + // and multilib + // from multi. ``` Skip packages when upgrading: diff --git a/README.rst b/README.rst index 5e91b8f9..d7ab5e55 100644 --- a/README.rst +++ b/README.rst @@ -1,5 +1,5 @@ *********** -slpkg 4.0.2 +slpkg 4.0.1 *********** Slpkg is a powerful software package manager that installs, updates, and removes packages on @@ -35,9 +35,9 @@ Install from the official third party `SBo repository +# 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 . + import os import shutil diff --git a/conf/default-repositories b/conf/default-repositories index a4a5c131..5457fb22 100644 --- a/conf/default-repositories +++ b/conf/default-repositories @@ -29,17 +29,25 @@ # repository. # # Default repositories names: -# sbo, slack, alien, conrad, slonly, multi, salix, msb, csb, connos +# sbo, slack, rlw, alien, slacky, conrad, slonly, ktown, multi, slacke, salix, +# slackl, rested, msb, csb, connos, mles # NOTE: Slackware repository (slack) served from file slackware-mirros # ----------------------------------------------------------------------------- # # NAME URL - sbo https://slackbuilds.org/slackbuilds/ - alien https://bear.alienbase.nl/mirrors/people/alien/sbrepos/ - conrad https://slack.conraid.net/repository/slackware64-current/ - slonly httpss://slackonly.com/pub/packages/ - multi https://bear.alienbase.nl/mirrors/people/alien/multilib/ - salix https://download.salixos.org/ - msb https://slackware.uk/msb/ - csb https://slackware.uk/csb/ + sbo http://slackbuilds.org/slackbuilds/ + rlw http://slackware.uk/people/rlworkman/ + alien http://bear.alienbase.nl/mirrors/people/alien/sbrepos/ + slacky http://repository.slacky.eu/ + conrad http://slack.conraid.net/repository/slackware64-current/ + slonly https://slackonly.com/pub/packages/ + ktown http://alien.slackbook.org/ktown/ + multi http://bear.alienbase.nl/mirrors/people/alien/multilib/ + slacke http://ngc891.blogdns.net/pub/ + salix http://download.salixos.org/ + slackl http://www.slackel.gr/repo/ + rested http://bear.alienbase.nl/mirrors/people/alien/restricted_slackbuilds/ + msb http://slackware.org.uk/msb/ + csb http://slackware.uk/csb/ connos https://connochaetos.org/slack-n-free/ + mles http://slackware.uk/microlinux/ diff --git a/conf/repositories.conf b/conf/repositories.conf index 6e98dc27..81c47fc0 100644 --- a/conf/repositories.conf +++ b/conf/repositories.conf @@ -24,7 +24,10 @@ # # ---------------------------------------------------------------------------- # conrad (Conraid's) repository must used from Slackware64 current. -# msb (Mate: 1,26, latest) repository. Default msb{1.26} +# ktown (Alien"s ktown: 4.14.3 and latest) repository. Default ktown{latest}. +# slacke (Enlightenment: E17 and E18) repository. Default slacke{18}. +# msb (Mate: 1.14, 1.16, 1,18, latest) repository. Default msb{1.18} +# mles (Microlinux: desktop, extras, server) repository. Default mles{desktop} # # Slackware ARM users will must use only two repositories at the moment slack and sbo. # @@ -40,10 +43,17 @@ slack sbo # alien +# rlw +# slacky # conrad # slonly +# ktown{latest} # multi +# slacke{18} # salix -# msb{1.26} +# slackl +# rested +# msb{1.18} # csb # connos +# mles{desktop} diff --git a/conf/rlworkman.deps b/conf/rlworkman.deps new file mode 100644 index 00000000..45f88cbe --- /dev/null +++ b/conf/rlworkman.deps @@ -0,0 +1,35 @@ +# Rworkman's dependencies: +# +# rlworkman.deps file is part of slpkg. +# +# Copyright 2014-2022 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 . +# +# END OF LEGAL NOTICE +# +# ---------------------------------------------------------------------------- +# Some notes about package dependencies (all deps are also found here): +# Rworkman's repository dependencies as shown in the central page +# http://rlworkman.net/pkgs/ +# ---------------------------------------------------------------------------- +# +# PACKAGE: DEPENDENCIES +abiword: wv +claws-mail: libetpan +inkscape: lxml numpy BeautifulSoup +xfburn: libburn libisofs diff --git a/conf/slpkg.bash-completion b/conf/slpkg.bash-completion index 63f36205..1ad16262 100644 --- a/conf/slpkg.bash-completion +++ b/conf/slpkg.bash-completion @@ -4,7 +4,7 @@ _slpkg() cur=${COMP_WORDS[COMP_CWORD]} if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W "--blacklist --queue --list --check --sync --tracking --print --FIND --find --installpkg --upgradepkg --removepkg --display" -- $cur )) + COMPREPLY=( $( compgen -W "--autobuild --blacklist --queue --list --check --sync --tracking --print --network --FIND --find --installpkg --upgradepkg --removepkg --display" -- $cur )) else _filedir diff --git a/conf/slpkg.fish b/conf/slpkg.fish index 6b80d70b..3bcaa55f 100644 --- a/conf/slpkg.fish +++ b/conf/slpkg.fish @@ -1,5 +1,6 @@ complete --command slpkg --long-option help --short-option h --description 'Print this help message and exit.' complete --command slpkg --long-option version --short-option v --description 'Print program version and exit.' +complete --command slpkg --long-option autobuild --short-option a --description 'Auto build SBo packages. If you already have downloaded the script and the source code you can build a new package with this command.' complete --command slpkg --long-option blacklist --short-option b --description 'Manage packages in the blacklist. Add or remove packages and print the list. Each package is added here will not be accessible by the program.' complete --command slpkg --long-option queue --short-option q --description 'Manage SBo packages in the queue. Add or remove and print the list build-install of packages. Build and then install the packages from the queue.' complete --command slpkg --long-option config --short-option g --description 'Configuration file management. Print the configuration file or edit.' @@ -8,6 +9,7 @@ complete --command slpkg --long-option check --short-option c --description 'Che complete --command slpkg --long-option sync --short-option s --description 'Sync packages. Install packages directly from remote repositories with all dependencies.' complete --command slpkg --long-option tracking --short-option t --description 'Tracking package dependencies and print package dependenies tree with highlight if packages is installed.' complete --command slpkg --long-option print --short-option p --description 'Print description of a package directly from the repository and change color text.' +complete --command slpkg --long-option network --short-option n --description 'View a standard of SBo page in terminal and manage multiple options like reading downloading building installation etc.' complete --command slpkg --long-option find --short-option f --description 'Find and print installed packages reporting the size and the sum.' complete --command slpkg --long-option FIND --short-option F --description 'Find packages from repositories and search at each enabled repository and prints results.' complete --command slpkg --long-option installpkg --short-option i --description 'Installs single or multiple Slackware binary packages.' diff --git a/man/slpkg.8 b/man/slpkg.8 index 2e1cefd1..be37a854 100644 --- a/man/slpkg.8 +++ b/man/slpkg.8 @@ -206,6 +206,8 @@ Additional options: .PP \fB--download-only\fP : Download packages without install. .PP +\fB--directory-prefix=[path/to/dir/]\fP : Download packages in specific directory. +.PP \fB--case-ins\fP : Search package name in repository with case insensitive. .PP \fB--patches\fP : Switch to patches\ directory, only for slack repository. @@ -257,6 +259,19 @@ Additional options: .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>, \fB--case-ins\fP +.PP +View complete slackbuilds.org site in your terminal. Read file, download, +build or install etc. Use "--checklist" additional option to load all repository, example: +"# slpkg -n --checklist". +.PP +Additional options: +.PP +\fB--checklist\fP : Enable dialog utility and checklist option. (Require python3-pythondialog) +.PP +\fB--case-ins\fP : Search package name in repository with case insensitive. + .SS -i, --installpkg, install Slackware binary packages \fBslpkg\fP \fB-i\fP \fB[--warn, --md5sum, --root /otherroot, --infobox, --menu, --terse, --ask, --priority ADD|REC|OPT|SKP, --tagfile /somedir/tagfile]\fP <\fIpackages.t?z\fP> @@ -309,13 +324,20 @@ For example: slackware.com = "slack" SlackBuilds.org = "sbo" Alien's = "alien" + slacky.eu = "slacky" + rworkman's = "rlw" Conraid's = "conrad" slackonly.com = "slonly" + Alien's ktown = "ktown{latest}" Alien's multilib = "multi" + Slacke E17 and E18 = "slacke{18}" SalixOS = "salix" + Slackel.gr = "slackel" + Alien's restricted = "rested" MATE Desktop Environment = "msb{1.18}" Cinnamon Desktop Environment = "csb" Connochaetos slack-n-free = "connos" + Microlinux mles = "mles" Default enable repository is "slack" and "sbo". Add or remove default repository in configuration file "/etc/slpkg/repositories.conf". diff --git a/man/slpkg.html b/man/slpkg.html index d6e624d0..57d26c63 100644 --- a/man/slpkg.html +++ b/man/slpkg.html @@ -379,6 +379,10 @@ options:

: Download packages without install.

+

--directory-prefix=[path/to/dir/] +: Download packages in specific directory.

+ +

--case-ins : Search package name in repository with case insensitive.

@@ -470,6 +474,29 @@ options:

--third-party : View all the third-party packages.

+

-n, +--network, view SBo packages
+slpkg -n
<name of package>, +<[pattern], --checklist>, --case-ins

+ +

View complete +slackbuilds.org site in your terminal. Read file, download, +build or install etc. Use "--checklist" additional +option to load all repository, example: "# slpkg -n +--checklist".

+ +

Additional +options:

+ + +

--checklist +: Enable dialog utility and checklist option. (Require +python3-pythondialog)

+ + +

--case-ins +: Search package name in repository with case +insensitive.

-i, --installpkg, install Slackware binary packages
@@ -565,13 +592,20 @@ slpkg −−help
- display help for slpkg

"slack"
SlackBuilds.org = "sbo"
Alien’s = "alien"
+slacky.eu = "slacky"
+rworkman’s = "rlw"
Conraid’s = "conrad"
slackonly.com = "slonly"
+Alien’s ktown = "ktown{latest}"
Alien’s multilib = "multi"
+Slacke E17 and E18 = "slacke{18}"
SalixOS = "salix"
+Slackel.gr = "slackel"
+Alien’s restricted = "rested"
MATE Desktop Environment = "msb{1.18}"
Cinnamon Desktop Environment = "csb"
Connochaetos slack-n-free = "connos"
+Microlinux mles = "mles"

Default enable repository is "slack" and "sbo".
diff --git a/setup.py b/setup.py index dd4965bf..3d2553cb 100755 --- a/setup.py +++ b/setup.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# setup.py file is part of slpkg. + +# Copyright 2014-2022 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 . + import os import time diff --git a/slpkg/__metadata__.py b/slpkg/__metadata__.py index 63749ef4..bf04d38c 100644 --- a/slpkg/__metadata__.py +++ b/slpkg/__metadata__.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# __metadata__.py file is part of slpkg. + +# Copyright 2014-2022 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 . + import os @@ -57,7 +77,7 @@ class MetaData: __all__ = "slpkg" __author__ = "dslackw" - __version_info__ = (4, 0, 2) + __version_info__ = (4, 0, 1) __version__ = "{0}.{1}.{2}".format(*__version_info__) __license__ = "GNU General Public License v3 (GPLv3)" __email__ = "d.zlatanidis@gmail.com" @@ -79,8 +99,11 @@ class MetaData: "RELEASE": STABLE, "SLACKWARE_VERSION": "off", "COMP_ARCH": "off", - "REPOSITORIES": ["slack", "sbo", "alien", "conrad", "slonly", - "multi", "salix", "msb{1.26}", "csb", "connos"], + "REPOSITORIES": ["slack", "sbo", "rlw", "alien", + "slacky", "conrad", "slonly", + "ktown{latest}", "multi", "slacke{18}", + "salix", "slackl", "rested", "msb{1.18}", + "csb", "connos", "mles{desktop}"], "BUILD_PATH": "/tmp/slpkg/build/", "SBOSRCARCH": "off", "SBOSRCARCH_LINK": "http://slackware.uk/sbosrcarch/by-name/", @@ -106,9 +129,9 @@ class MetaData: "HTTP_PROXY": "", } - default_repositories = ["slack", "sbo", "alien", "conrad", - "slonly", "multi", "salix", "msb", - "csb", "connos"] + default_repositories = ["slack", "sbo", "rlw", "alien", "slacky", "conrad", + "slonly", "ktown", "multi", "slacke", "salix", + "slackl", "rested", "msb", "csb", "connos", "mles"] # reads values from the configuration file repositories = [] @@ -163,7 +186,10 @@ class MetaData: slack_rel = select_slack_release(slack_rel) # Grabs sub repositories + ktown_kde_repo = grab_sub_repo(repositories, "ktown") + slacke_sub_repo = grab_sub_repo(repositories, "slacke") msb_sub_repo = grab_sub_repo(repositories, "msb") + mles_sub_repo = grab_sub_repo(repositories, "mles") # removes no default repositories repositories = list(remove_repositories(repositories, diff --git a/slpkg/arguments.py b/slpkg/arguments.py index b7bae485..3f5a5429 100644 --- a/slpkg/arguments.py +++ b/slpkg/arguments.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# arguments.py file is part of slpkg. + +# Copyright 2014-2022 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.repolist import RepoList from slpkg.__metadata__ import MetaData as _meta_ @@ -65,6 +85,12 @@ Optional arguments: -v | --version Print program version and exit. + -a | --autobuild, [script] [source...] Auto build SBo packages. + If you have already 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 @@ -93,6 +119,7 @@ Optional arguments: -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 @@ -106,6 +133,11 @@ Optional arguments: --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. @@ -158,6 +190,7 @@ def usage(repo, stderr): Optional arguments: [-h] [-v] + [-a [script] [sources...]] [-b [package...] --add, --remove, [list]] [-q [package...] --add, --remove, @@ -168,10 +201,12 @@ def usage(repo, stderr): --resolve-off, --checklist] [-s [repository] [package...], --rebuild, --reinstall, --resolve-off, --download-only, + --directory-prefix=[dir], --case-ins, --patches] [-t [repository] [package], --check-deps, --graph=[type], --case-ins] [-p [repository] [package], --color=[]] + [-n [SBo package], --checklist, --case-ins] [-F [package...], --case-ins] [-f [package...], --case-ins, --third-party] [-i [options] [package...]] diff --git a/slpkg/auto_pkg.py b/slpkg/auto_pkg.py index 9f50bb64..8c19bcd8 100644 --- a/slpkg/auto_pkg.py +++ b/slpkg/auto_pkg.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# auto_pkg.py file is part of slpkg. + +# Copyright 2014-2022 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.messages import Msg from slpkg.__metadata__ import MetaData as _meta_ diff --git a/slpkg/binaries/dependency.py b/slpkg/binaries/dependency.py deleted file mode 100644 index 7613f96e..00000000 --- a/slpkg/binaries/dependency.py +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/python3 -# -*- coding: utf-8 -*- - - -import sys -from functools import lru_cache - -from slpkg.__metadata__ import MetaData as _meta_ -from slpkg.blacklist import BlackList -from slpkg.binaries.queries import Requires - - -class Dependencies: - """Resolving binary dependencies - """ - def __init__(self, repo): - self.repo = repo - self.black = BlackList().get() - self.dep_results = [] - self.meta = _meta_ - - def binary(self, name): - """Builds all dependencies of a package - """ - if self.meta.rsl_deps in ["on", "ON"]: - sys.setrecursionlimit(10000) - dependencies = [] - requires = Requires(name, self.repo).get_deps() - - if requires: - - for req in requires: - - if req and req not in self.black: - dependencies.append(req) - - self.deep_check(tuple(dependencies)) - - return self.dep_results - - else: - return [] - - @lru_cache - def deep_check(self, dependencies): - """Checking if dependencies are finnished - """ - if dependencies: - self.dep_results.append(dependencies) - [self.binary(dep) for dep in dependencies] diff --git a/slpkg/binaries/queries.py b/slpkg/binaries/queries.py deleted file mode 100644 index 9939059b..00000000 --- a/slpkg/binaries/queries.py +++ /dev/null @@ -1,132 +0,0 @@ -#!/usr/bin/python3 -# -*- coding: utf-8 -*- - - -from slpkg.utils import Utils -from slpkg.splitting import split_package -from slpkg.__metadata__ import MetaData as _meta_ - -from slpkg.slack.slack_version import slack_ver -from slpkg.models.models import AlienTable, session - - -class PkgQuery: - - def __init__(self, name): - self.name = name - self.session = session - - def location(self): - - location = self.session.query(AlienTable).filter( - AlienTable.location == self.name).first() - - return location[0] - - -def repo_data(PACKAGES_TXT, repo, flag): - """Grabs data packages - """ - (name, location, size, unsize, - rname, rlocation, rsize, runsize) = ([] for i in range(8)) - - for line in PACKAGES_TXT.splitlines(): - if line.startswith("PACKAGE NAME:"): - name.append(line[15:].strip()) - - if line.startswith("PACKAGE LOCATION:"): - location.append(line[21:].strip()) - - if line.startswith("PACKAGE SIZE (compressed):"): - size.append(line[28:-2].strip()) - - if line.startswith("PACKAGE SIZE (uncompressed):"): - unsize.append(line[30:-2].strip()) - - if repo == "slack" and "--upgrade" not in flag: - (rname, - rlocation, - rsize, - runsize - ) = slack_filter(name, location, size, unsize, flag) - - elif repo == "alien": - (rname, - rlocation, - rsize, - runsize - ) = alien_filter(name, location, size, unsize) - - else: - rname, rlocation, rsize, runsize = name, location, size, unsize - - return [rname, rlocation, rsize, runsize] - - -def slack_filter(name, location, size, unsize, flag): - """Slackware filter seperate packages from patches/ directory - """ - (fname, flocation, fsize, funsize) = ([] for i in range(4)) - - if "--patches" not in flag: - - for n, l, s, u in zip(name, location, size, unsize): - - if f"_slack{slack_ver()}" not in n: - fname.append(n) - flocation.append(l) - fsize.append(s) - funsize.append(u) - - if "--patches" in flag: - - for n, l, s, u in zip(name, location, size, unsize): - - if f"_slack{slack_ver()}" in n: - fname.append(n) - flocation.append(l) - fsize.append(s) - funsize.append(u) - - return [fname, flocation, fsize, funsize] - - -def alien_filter(name, location, size, unsize): - """Fix to avoid packages include in slackbuilds folder - """ - (fname, flocation, fsize, funsize) = ([] for i in range(4)) - - for n, l, s, u in zip(name, location, size, unsize): - - if "slackbuilds" != l: - fname.append(n) - flocation.append(l) - fsize.append(s) - funsize.append(u) - - return [fname, flocation, fsize, funsize] - - -class Requires: - - def __init__(self, name, repo): - self.name = name - self.repo = repo - - def get_deps(self): - """Grabs package requirements from repositories - """ - PACKAGES_TXT = Utils().read_file(f"{_meta_.lib_path}" - f"{self.repo}_repo/PACKAGES.TXT") - - for line in PACKAGES_TXT.splitlines(): - - if line.startswith("PACKAGE NAME:"): - pkg_name = split_package(line[14:].strip())[0] - - if line.startswith("PACKAGE REQUIRED:"): - - if pkg_name == self.name: - - if line[18:].strip(): - return line.replace("PACKAGE REQUIRED:", "").split(",") diff --git a/slpkg/binaries/search.py b/slpkg/binaries/search.py deleted file mode 100644 index 2e5d71ab..00000000 --- a/slpkg/binaries/search.py +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/python3 -# -*- coding: utf-8 -*- - - -from slpkg.utils import Utils -from slpkg.blacklist import BlackList -from slpkg.__metadata__ import MetaData as _meta_ - - -def search_pkg(name, repo): - """Searching if the package exists in PACKAGES.TXT file - and return the name. - """ - utils = Utils() - black = BlackList() - - text = utils.read_file(_meta_.lib_path + f"{repo}_repo/PACKAGES.TXT") - - PACKAGES_TXT = list(utils.package_name(text)) - blacklist = black.get() - - if name in PACKAGES_TXT and name not in blacklist: - return name diff --git a/slpkg/binaries/__init__.py b/slpkg/binary/__init__.py similarity index 100% rename from slpkg/binaries/__init__.py rename to slpkg/binary/__init__.py diff --git a/slpkg/binaries/check.py b/slpkg/binary/check.py similarity index 59% rename from slpkg/binaries/check.py rename to slpkg/binary/check.py index 579d279d..2d64a64c 100644 --- a/slpkg/binaries/check.py +++ b/slpkg/binary/check.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# check.py file is part of slpkg. + +# Copyright 2014-2022 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 pkg_resources import parse_version @@ -11,8 +31,8 @@ from slpkg.__metadata__ import MetaData as _meta_ from slpkg.pkg.find import find_package -from slpkg.binaries.queries import repo_data -from slpkg.binaries.repo_init import RepoInit +from slpkg.binary.greps import repo_data +from slpkg.binary.repo_init import RepoInit def pkg_upgrade(repo, skip, flag): diff --git a/slpkg/binary/dependency.py b/slpkg/binary/dependency.py new file mode 100644 index 00000000..3045e208 --- /dev/null +++ b/slpkg/binary/dependency.py @@ -0,0 +1,70 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- + +# dependency.py file is part of slpkg. + +# Copyright 2014-2022 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 . + + +import sys +from functools import lru_cache + +from slpkg.__metadata__ import MetaData as _meta_ + +from slpkg.binary.greps import Requires + + +class Dependencies: + """Resolving binary dependencies + """ + def __init__(self, repo, black): + self.repo = repo + self.black = black + self.dep_results = [] + self.meta = _meta_ + + def binary(self, name, flag): + """Builds all dependencies of a package + """ + if self.meta.rsl_deps in ["on", "ON"] and "--resolve-off" not in flag: + sys.setrecursionlimit(10000) + dependencies = [] + requires = Requires(name, self.repo).get_deps() + + if requires: + + for req in requires: + + if req and req not in self.black: + dependencies.append(req) + + self.deep_check(tuple(dependencies), tuple(flag)) + + return self.dep_results + + else: + return [] + + @lru_cache + def deep_check(self, dependencies, flag): + """Checking if dependencies are finnished + """ + if dependencies: + self.dep_results.append(dependencies) + [self.binary(dep, flag) for dep in dependencies] diff --git a/slpkg/binary/greps.py b/slpkg/binary/greps.py new file mode 100644 index 00000000..125560a5 --- /dev/null +++ b/slpkg/binary/greps.py @@ -0,0 +1,284 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- + +# greps.py file is part of slpkg. + +# Copyright 2014-2022 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 functools import lru_cache +from slpkg.utils import Utils +from slpkg.splitting import split_package +from slpkg.__metadata__ import MetaData as _meta_ + +from slpkg.slack.slack_version import slack_ver + + +def repo_data(PACKAGES_TXT, repo, flag): + """Grabs data packages + """ + (name, location, size, unsize, + rname, rlocation, rsize, runsize) = ([] for i in range(8)) + + for line in PACKAGES_TXT.splitlines(): + + if line.startswith("PACKAGE NAME:"): + name.append(line[15:].strip()) + + if line.startswith("PACKAGE LOCATION:"): + location.append(line[21:].strip()) + + if line.startswith("PACKAGE SIZE (compressed):"): + size.append(line[28:-2].strip()) + + if line.startswith("PACKAGE SIZE (uncompressed):"): + unsize.append(line[30:-2].strip()) + + if repo == "slack" and "--upgrade" not in flag: + (rname, + rlocation, + rsize, + runsize + ) = slack_filter(name, location, size, unsize, flag) + + elif repo == "rlw": + (rname, + rlocation, + rsize, + runsize + ) = rlw_filter(name, location, size, unsize) + + elif repo == "alien": + (rname, + rlocation, + rsize, + runsize + ) = alien_filter(name, location, size, unsize) + + elif repo == "rested": + (rname, + rlocation, + rsize, + runsize + ) = rested_filter(name, location, size, unsize) + + elif repo == "ktown": + (rname, + rlocation, + rsize, + runsize + ) = ktown_filter(name, location, size, unsize) + + else: + rname, rlocation, rsize, runsize = name, location, size, unsize + + return [rname, rlocation, rsize, runsize] + + +def slack_filter(name, location, size, unsize, flag): + """Slackware filter seperate packages from patches/ directory + """ + (fname, flocation, fsize, funsize) = ([] for i in range(4)) + + if "--patches" not in flag: + + for n, l, s, u in zip(name, location, size, unsize): + + if f"_slack{slack_ver()}" not in n: + fname.append(n) + flocation.append(l) + fsize.append(s) + funsize.append(u) + + if "--patches" in flag: + + for n, l, s, u in zip(name, location, size, unsize): + + if f"_slack{slack_ver()}" in n: + fname.append(n) + flocation.append(l) + fsize.append(s) + funsize.append(u) + + return [fname, flocation, fsize, funsize] + + +def rlw_filter(name, location, size, unsize): + """Filter rlw repository data + """ + arch = _meta_.arch + + if arch.startswith("i") and arch.endswith("86"): + arch = "i486" + + (fname, flocation, fsize, funsize) = ([] for i in range(4)) + + for n, l, s, u in zip(name, location, size, unsize): + + loc = l.split("/") + + if arch == loc[-1]: + fname.append(n) + flocation.append(l) + fsize.append(s) + funsize.append(u) + + return [fname, flocation, fsize, funsize] + + +def alien_filter(name, location, size, unsize): + """Fix to avoid packages include in slackbuilds folder + """ + (fname, flocation, fsize, funsize) = ([] for i in range(4)) + + for n, l, s, u in zip(name, location, size, unsize): + + if "slackbuilds" != l: + fname.append(n) + flocation.append(l) + fsize.append(s) + funsize.append(u) + + return [fname, flocation, fsize, funsize] + + +def rested_filter(name, location, size, unsize): + """Filter Alien"s repository data + """ + ver = slack_ver() + if _meta_.slack_rel == "current": + ver = "current" + + path_pkg = "pkg" + + if _meta_.arch == "x86_64": + path_pkg = "pkg64" + + (fname, flocation, fsize, funsize) = ([] for i in range(4)) + + for n, l, s, u in zip(name, location, size, unsize): + + if path_pkg == l.split("/")[-2] and ver == l.split("/")[-1]: + fname.append(n) + flocation.append(l) + fsize.append(s) + funsize.append(u) + + return [fname, flocation, fsize, funsize] + + +def ktown_filter(name, location, size, unsize): + """Filter Alien"s ktown repository data + """ + ver = slack_ver() + + if _meta_.slack_rel == "current": + ver = "current" + + path_pkg = "x86" + + if _meta_.arch == "x86_64": + path_pkg = _meta_.arch + + (fname, flocation, fsize, funsize) = ([] for i in range(4)) + + for n, l, s, u in zip(name, location, size, unsize): + + if (path_pkg in l and _meta_.ktown_kde_repo[1:-1] in l and + l.startswith(ver)): + fname.append(n) + flocation.append(l) + fsize.append(s) + funsize.append(u) + + return [fname, flocation, fsize, funsize] + + +class Requires: + + def __init__(self, name, repo): + self.name = name + self.repo = repo + + def get_deps(self): + """Grabs package requirements from repositories + """ + if self.repo == "rlw": + + dependencies = {} + rlw_deps = Utils().read_file(_meta_.conf_path + "rlworkman.deps") + + for line in rlw_deps.splitlines(): + + if line and not line.startswith("#"): + pkgs = line.split(":") + dependencies[pkgs[0]] = pkgs[1] + + if self.name in dependencies.keys(): + return dependencies[self.name].split() + + else: + return "" + + else: + PACKAGES_TXT = Utils().read_file(f"{_meta_.lib_path}" + f"{self.repo}_repo/PACKAGES.TXT") + + for line in PACKAGES_TXT.splitlines(): + + if line.startswith("PACKAGE NAME:"): + pkg_name = split_package(line[14:].strip())[0] + + if line.startswith("PACKAGE REQUIRED:"): + + if pkg_name == self.name: + + if line[18:].strip(): + return self._req_fix(line) + + @lru_cache + def _req_fix(self, line): + """Fix slacky and salix requirements because many dependencies + splitting with "," and others with "|" + """ + deps = [] + + for dep in line[18:].strip().split(","): + dep = dep.split("|") + + if self.repo == "slacky": + + if len(dep) > 1: + + for d in dep: + deps.append(d.split()[0]) + + dep = "".join(dep) + deps.append(dep.split()[0]) + + else: + + if len(dep) > 1: + + for d in dep: + deps.append(d) + + deps.append(dep[0]) + + return deps diff --git a/slpkg/binaries/install.py b/slpkg/binary/install.py similarity index 86% rename from slpkg/binaries/install.py rename to slpkg/binary/install.py index e445e913..75b2f63d 100644 --- a/slpkg/binaries/install.py +++ b/slpkg/binary/install.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# install.py file is part of slpkg. + +# Copyright 2014-2022 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 . + import os from itertools import zip_longest @@ -23,12 +43,12 @@ from slpkg.pkg.find import find_package from slpkg.pkg.manager import PackageManager from slpkg.pkg.installed import GetFromInstalled -from slpkg.binaries.queries import repo_data -from slpkg.binaries.repo_init import RepoInit -from slpkg.binaries.dependency import Dependencies +from slpkg.binary.greps import repo_data +from slpkg.binary.repo_init import RepoInit +from slpkg.binary.dependency import Dependencies -class BinaryInstall(Utils): +class BinaryInstall(BlackList, Utils): """Installs binaries packages with all dependencies from repository """ @@ -47,6 +67,7 @@ class BinaryInstall(Utils): self.msg = Msg() self.version = self.meta.slack_rel self.tmp_path = self.meta.slpkg_tmp_packages + self.init_flags() self.dwn, self.dep_dwn = [], [] self.install, self.dep_install = [], [] self.comp_sum, self.dep_comp_sum = [], [] @@ -62,9 +83,20 @@ class BinaryInstall(Utils): for name in self.data[0]: self.repo_pkg_names.append(split_package(name)[0]) - self.blacklist = BlackList().get() + self.blacklist = list(self.get_black()) self.matching = False + def init_flags(self): + """Flags initiliazation + """ + for fl in self.flag: + + if fl.startswith("--directory-prefix="): + self.tmp_path = fl.split("=")[1] + + if not self.tmp_path.endswith("/"): + self.tmp_path += "/" + def start(self, is_upgrade): """Installs packages from official Slackware distribution """ @@ -73,7 +105,6 @@ class BinaryInstall(Utils): self.is_upgrade = is_upgrade mas_sum = dep_sum = sums = 0, 0, 0, 0 self.msg.done() - self.dependencies = self.resolving_deps() self.update_deps() @@ -206,11 +237,12 @@ class BinaryInstall(Utils): self.packages[index] = value def update_deps(self): - """Updates dependencies dictionary with all packages + """Updates dependencies dictionary with all package """ for dep in self.dependencies: deps = self.dimensional_list(Dependencies( - self.repo).binary(dep)) + self.repo, self.blacklist).binary( + dep, self.flag)) self.deps_dict[dep] = deps @@ -219,7 +251,7 @@ class BinaryInstall(Utils): or if added to install two or more times """ packages = [] - for mas in self.packages: + for mas in self.remove_dbs(self.packages): if mas not in self.dependencies: packages.append(mas) @@ -278,24 +310,18 @@ class BinaryInstall(Utils): """ requires = [] - if (self.meta.rsl_deps in ["off", "OFF"] and - "--resolve-off" not in self.flag): - return requires - - self.msg.resolving() + if (self.meta.rsl_deps in ["on", "ON"] and + self.flag != "--resolve-off"): + self.msg.resolving() for dep in self.packages: - dependencies = [] - dependencies = self.dimensional_list(Dependencies( - self.repo).binary(dep)) - + self.repo, self.blacklist).binary(dep, self.flag)) requires += list(self._fix_deps_repos(dependencies)) + self.deps_dict[dep] = self.remove_dbs(requires) - self.deps_dict[dep] = requires - - return requires + return self.remove_dbs(requires) def _fix_deps_repos(self, dependencies): """Fixes store deps include in the repository diff --git a/slpkg/binaries/repo_init.py b/slpkg/binary/repo_init.py similarity index 58% rename from slpkg/binaries/repo_init.py rename to slpkg/binary/repo_init.py index 7f363862..56a1d9cf 100644 --- a/slpkg/binaries/repo_init.py +++ b/slpkg/binary/repo_init.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# repo_init.py file is part of slpkg. + +# Copyright 2014-2022 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.repositories import Repo @@ -37,6 +57,9 @@ class RepoInit(Utils): def _init_slack(self): self.mirror = mirrors(name="", location="") + def _init_rlw(self): + self.mirror = f"{self.def_repo_dict}{slack_ver()}/" + def _init_alien(self): ver = slack_ver() arch = "x86" @@ -48,6 +71,13 @@ class RepoInit(Utils): self.mirror = f"{self.def_repo_dict['alien']}{ver}/{arch}/" + def _init_slacky(self): + arch = "" + if self.meta.arch == "x86_64": + arch = "64" + + self.mirror = f"{self.def_repo_dict}slackware{arch}-{slack_ver()}/" + def _init_conrad(self): self.mirror = self.def_repo_dict["conrad"] @@ -67,6 +97,9 @@ class RepoInit(Utils): self.mirror = f"{self.def_repo_dict['slonly']}{arch}/" + def _init_ktown(self): + self.mirror = self.def_repo_dict["ktown"] + def _init_multi(self): ver = slack_ver() if self.meta.slack_rel == "current": @@ -74,6 +107,15 @@ class RepoInit(Utils): self.mirror = self.def_repo_dict["multi"] + ver + "/" + def _init_slacke(self): + arch = "" + if self.meta.arch == "x86_64": + arch = "64" + + self.mirror = (f"{self.def_repo_dict['slacke']}" + f"slacke{self.meta.slacke_sub_repo[1:-1]}/slackware" + f"{arch}-{slack_ver()}/") + def _init_salix(self): arch = "i486" if self.meta.arch == "x86_64": @@ -81,6 +123,16 @@ class RepoInit(Utils): self.mirror = f"{self.def_repo_dict['salix']}{arch}/{slack_ver()}/" + def _init_slackl(self): + arch = "i486" + if self.meta.arch == "x86_64": + arch = "x86_64" + + self.mirror = f"{self.def_repo_dict['slackl']}{arch}/current/" + + def _init_rested(self): + self.mirror = self.def_repo_dict["rested"] + def _init_msb(self): arch = "x86" if self.meta.arch == "x86_64": @@ -101,3 +153,11 @@ class RepoInit(Utils): arch = "64" self.mirror = (f"{self.def_repo_dict['connos']}slack-n-free" f"{arch}-{slack_ver()}/") + + def _init_mles(self): + arch = "32" + if self.meta.arch == "x86_64": + arch = "64" + self.mirror = (f"{self.def_repo_dict['mles']}" + f"{self.meta.mles_sub_repo[1:-1]}-" + f"{slack_ver()}-{arch}bit/") diff --git a/slpkg/binary/search.py b/slpkg/binary/search.py new file mode 100644 index 00000000..31f24b2b --- /dev/null +++ b/slpkg/binary/search.py @@ -0,0 +1,43 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- + +# search.py file is part of slpkg. + +# Copyright 2014-2022 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.blacklist import BlackList +from slpkg.__metadata__ import MetaData as _meta_ + + +def search_pkg(name, repo): + """Searching if the package exists in PACKAGES.TXT file + and return the name. + """ + utils = Utils() + black = BlackList() + + text = utils.read_file(_meta_.lib_path + f"{repo}_repo/PACKAGES.TXT") + + PACKAGES_TXT = list(utils.package_name(text)) + blacklist = list(black.get_black()) + + if name in PACKAGES_TXT and name not in blacklist: + return name diff --git a/slpkg/blacklist.py b/slpkg/blacklist.py index 1d130b65..e22f2d13 100644 --- a/slpkg/blacklist.py +++ b/slpkg/blacklist.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# blacklist.py file is part of slpkg. + +# Copyright 2014-2022 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 . + import os @@ -23,10 +43,7 @@ class BlackList(Utils): if os.path.isfile(self.blackfile): self.black_conf = self.read_file(self.blackfile) - def get(self): - return list(self.black_list()) - - def black_list(self): + def get_black(self): """Return blacklist packages from /etc/slpkg/blacklist configuration file.""" blacklist = list(self.black_filter()) diff --git a/slpkg/checks.py b/slpkg/checks.py index 53e8bf58..aaa10025 100644 --- a/slpkg/checks.py +++ b/slpkg/checks.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# checks.py file is part of slpkg. + +# Copyright 2014-2022 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.messages import Msg from slpkg.arguments import usage @@ -26,14 +46,21 @@ class Updates: self.all_repos = { "slack": self._init.slack, "sbo": self._init.sbo, + "rlw": self._init.rlw, "alien": self._init.alien, + "slacky": self._init.slacky, "conrad": self._init.conrad, "slonly": self._init.slonly, + "ktown": self._init.ktown, "multi": self._init.multi, + "slacke": self._init.slacke, "salix": self._init.salix, + "slackl": self._init.slackl, + "rested": self._init.rested, "msb": self._init.msb, "csb": self._init.csb, "connos": self._init.msb, + "mles": self._init.mles } def status_bar(self): diff --git a/slpkg/checksum.py b/slpkg/checksum.py index 3a3c8d10..948f1192 100644 --- a/slpkg/checksum.py +++ b/slpkg/checksum.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# checksum.py file is part of slpkg. + +# Copyright 2014-2022 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.md5sum import md5 from slpkg.messages import Msg diff --git a/slpkg/clean.py b/slpkg/clean.py index 69fdfef9..ab530912 100644 --- a/slpkg/clean.py +++ b/slpkg/clean.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# clean.py file is part of slpkg. + +# Copyright 2014-2022 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 . + import os import shutil diff --git a/slpkg/config.py b/slpkg/config.py index e4ecffdf..5a8241f1 100644 --- a/slpkg/config.py +++ b/slpkg/config.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# config.py file is part of slpkg. + +# Copyright 2014-2022 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 . + import shutil import filecmp diff --git a/slpkg/desc.py b/slpkg/desc.py index 7acd90a5..97e4a6f8 100644 --- a/slpkg/desc.py +++ b/slpkg/desc.py @@ -1,12 +1,32 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# desc.py file is part of slpkg. + +# Copyright 2014-2022 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.messages import Msg from slpkg.__metadata__ import MetaData as _meta_ -from slpkg.sbo.queries import SboQuery +from slpkg.sbo.greps import SBoGrep class PkgDesc(Utils): @@ -37,7 +57,7 @@ class PkgDesc(Utils): description, count = "", 0 if self.repo == "sbo": - description = SboQuery(self.name).description() + description = SBoGrep(self.name).description() else: PACKAGES_TXT = self.read_file(self.lib) diff --git a/slpkg/dialog_box.py b/slpkg/dialog_box.py index e0c3e943..fbaa397d 100644 --- a/slpkg/dialog_box.py +++ b/slpkg/dialog_box.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# dialog_box.py file is part of slpkg. + +# Copyright 2014-2022 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 __future__ import unicode_literals diff --git a/slpkg/downloader.py b/slpkg/downloader.py index 0bd8df89..f693af84 100644 --- a/slpkg/downloader.py +++ b/slpkg/downloader.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# downloader.py file is part of slpkg. + +# Copyright 2014-2022 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 . + import os import tarfile diff --git a/slpkg/file_size.py b/slpkg/file_size.py index 2dfc0287..750f8698 100644 --- a/slpkg/file_size.py +++ b/slpkg/file_size.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -* +# file_size.py file is part of slpkg. + +# Copyright 2014-2022 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 . + import os import urllib3 diff --git a/slpkg/graph.py b/slpkg/graph.py index e6864478..4fb28ad5 100644 --- a/slpkg/graph.py +++ b/slpkg/graph.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# graph.py file is part of slpkg. + +# Copyright 2014-2022 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 . + import os import subprocess diff --git a/slpkg/grep_md5.py b/slpkg/grep_md5.py index ed423346..6a7870b1 100644 --- a/slpkg/grep_md5.py +++ b/slpkg/grep_md5.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# grep_md5.py file is part of slpkg. + +# Copyright 2014-2022 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.slack.mirrors import mirrors diff --git a/slpkg/health.py b/slpkg/health.py index 74dd4d3a..bdbdd4cd 100644 --- a/slpkg/health.py +++ b/slpkg/health.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# health.py file is part of slpkg. + +# Copyright 2014-2022 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 . + import os diff --git a/slpkg/init.py b/slpkg/init.py index a48b57e6..406913b3 100644 --- a/slpkg/init.py +++ b/slpkg/init.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# init.py file is part of slpkg. + +# Copyright 2014-2022 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 . + import os import shutil @@ -14,7 +34,7 @@ from slpkg.__metadata__ import MetaData as _meta_ from slpkg.slack.mirrors import mirrors from slpkg.slack.slack_version import slack_ver -from slpkg.models.models import SBoTable, AlienTable, session +from slpkg.models.models import SBoTable, session class Init(Utils): @@ -175,6 +195,36 @@ class Init(Utils): self.remote(log, ChangeLog_txt, lib, SLACKBUILDS_TXT, CHECKSUMS_MD5, FILELIST_TXT, repo_name) + def rlw(self): + """Creating rlw local library + """ + repo = self.def_repos_dict["rlw"] + log = self.log_path + "rlw/" + lib = self.lib_path + "rlw_repo/" + repo_name = Init.rlw.__name__ + + lib_file = "PACKAGES.TXT" + # lst_file = "" + md5_file = "CHECKSUMS.md5" + log_file = "ChangeLog.txt" + + self.make_dir([log, lib]) + + PACKAGES_TXT = f"{repo}{self.slack_ver}/{lib_file}" + FILELIST_TXT = "" + CHECKSUMS_MD5 = f"{repo}{self.slack_ver}/{md5_file}" + ChangeLog_txt = f"{repo}{self.slack_ver}/{log_file}" + + if self.check: + return self.checks_logs(log, ChangeLog_txt) + + self.down(lib, PACKAGES_TXT, repo_name) + self.down(lib, CHECKSUMS_MD5, repo_name) + self.down(log, ChangeLog_txt, repo_name) + + self.remote(log, ChangeLog_txt, lib, PACKAGES_TXT, CHECKSUMS_MD5, + FILELIST_TXT, repo_name) + def alien(self): """Creating alien local library """ @@ -213,8 +263,43 @@ class Init(Utils): self.remote(log, ChangeLog_txt, lib, PACKAGES_TXT, CHECKSUMS_MD5, FILELIST_TXT, repo_name) + def slacky(self): + """Creating slacky.eu local library + """ + ar = "" + repo = self.def_repos_dict["slacky"] + log = self.log_path + "slacky/" + lib = self.lib_path + "slacky_repo/" + repo_name = Init.slacky.__name__ + + lib_file = "PACKAGES.TXT" + # lst_file = "" + md5_file = "CHECKSUMS.md5" + log_file = "ChangeLog.txt" + + self.make_dir([log, lib]) + + if self.arch == "x86_64": + ar = "64" + + PACKAGES_TXT = f"{repo}slackware{ar}-{self.slack_ver}/{lib_file}" + FILELIST_TXT = "" + CHECKSUMS_MD5 = f"{repo}slackware{ar}-{self.slack_ver}/{md5_file}" + + ChangeLog_txt = f"{repo}slackware{ar}-{self.slack_ver}/{log_file}" + + if self.check: + return self.checks_logs(log, ChangeLog_txt) + + self.down(lib, PACKAGES_TXT, repo_name) + self.down(lib, CHECKSUMS_MD5, repo_name) + self.down(log, ChangeLog_txt, repo_name) + + self.remote(log, ChangeLog_txt, lib, PACKAGES_TXT, CHECKSUMS_MD5, + FILELIST_TXT, repo_name) + def conrad(self): - """Creating conrad local library + """Creating slackers local library """ repo = self.def_repos_dict["conrad"] log = self.log_path + "conrad/" @@ -243,7 +328,7 @@ class Init(Utils): FILELIST_TXT, repo_name) def slonly(self): - """Creating slonly local library + """Creating slackers local library """ ar = f"{self.slack_ver}-x86" repo = self.def_repos_dict["slonly"] @@ -282,6 +367,36 @@ class Init(Utils): self.remote(log, ChangeLog_txt, lib, PACKAGES_TXT, CHECKSUMS_MD5, FILELIST_TXT, repo_name) + def ktown(self): + """Creating alien ktown local library + """ + repo = self.def_repos_dict["ktown"] + log = self.log_path + "ktown/" + lib = self.lib_path + "ktown_repo/" + repo_name = Init.ktown.__name__ + + lib_file = "PACKAGES.TXT" + # lst_file = "" + md5_file = "CHECKSUMS.md5" + log_file = "ChangeLog.txt" + + self.make_dir([log, lib]) + + PACKAGES_TXT = f"{repo}{lib_file}" + FILELIST_TXT = "" + CHECKSUMS_MD5 = f"{repo}{md5_file}" + ChangeLog_txt = f"{repo}{log_file}" + + if self.check: + return self.checks_logs(log, ChangeLog_txt) + + self.down(lib, PACKAGES_TXT, repo_name) + self.down(lib, CHECKSUMS_MD5, repo_name) + self.down(log, ChangeLog_txt, repo_name) + + self.remote(log, ChangeLog_txt, lib, PACKAGES_TXT, CHECKSUMS_MD5, + FILELIST_TXT, repo_name) + def multi(self): """Creating alien multilib local library """ @@ -316,6 +431,44 @@ class Init(Utils): self.remote(log, ChangeLog_txt, lib, PACKAGES_TXT, CHECKSUMS_MD5, FILELIST_TXT, repo_name) + def slacke(self): + """Creating Slacke local library + """ + ar = "" + repo = self.def_repos_dict["slacke"] + log = self.log_path + "slacke/" + lib = self.lib_path + "slacke_repo/" + repo_name = Init.slacke.__name__ + + lib_file = "PACKAGES.TXT" + # lst_file = "" + md5_file = "CHECKSUMS.md5" + log_file = "ChangeLog.txt" + + self.make_dir([log, lib]) + + if self.arch == "x86_64": + ar = "64" + + version = self.meta.slacke_sub_repo[1:-1] + PACKAGES_TXT = (f"{repo}slacke{version}/slackware{ar}-" + f"{self.slack_ver}/{lib_file}") + FILELIST_TXT = "" + CHECKSUMS_MD5 = (f"{repo}slacke{version}/slackware{ar}-" + f"{self.slack_ver}/{md5_file}") + ChangeLog_txt = (f"{repo}slacke{version}/slackware{ar}-" + f"{self.slack_ver}/{log_file}") + + if self.check: + return self.checks_logs(log, ChangeLog_txt) + + self.down(lib, PACKAGES_TXT, repo_name) + self.down(lib, CHECKSUMS_MD5, repo_name) + self.down(log, ChangeLog_txt, repo_name) + + self.remote(log, ChangeLog_txt, lib, PACKAGES_TXT, CHECKSUMS_MD5, + FILELIST_TXT, repo_name) + def salix(self): """Creating SalixOS local library """ @@ -350,6 +503,70 @@ class Init(Utils): self.remote(log, ChangeLog_txt, lib, PACKAGES_TXT, CHECKSUMS_MD5, FILELIST_TXT, repo_name) + def slackl(self): + """Creating slackel.gr local library + """ + ar = "i486" + repo = self.def_repos_dict["slackl"] + log = self.log_path + "slackl/" + lib = self.lib_path + "slackl_repo/" + repo_name = Init.slackl.__name__ + + lib_file = "PACKAGES.TXT" + # lst_file = "" + md5_file = "CHECKSUMS.md5" + log_file = "ChangeLog.txt" + + self.make_dir([log, lib]) + + if self.arch == "x86_64": + ar = "x86_64" + + PACKAGES_TXT = f"{repo}{ar}/current/{lib_file}" + FILELIST_TXT = "" + CHECKSUMS_MD5 = f"{repo}{ar}/current/{md5_file}" + ChangeLog_txt = f"{repo}{ar}/current/{log_file}" + + if self.check: + return self.checks_logs(log, ChangeLog_txt) + + self.down(lib, PACKAGES_TXT, repo_name) + self.down(lib, CHECKSUMS_MD5, repo_name) + self.down(log, ChangeLog_txt, repo_name) + + self.remote(log, ChangeLog_txt, lib, PACKAGES_TXT, CHECKSUMS_MD5, + FILELIST_TXT, repo_name) + + def rested(self): + """Creating alien restricted local library + """ + repo = self.def_repos_dict["rested"] + log = self.log_path + "rested/" + lib = self.lib_path + "rested_repo/" + repo_name = Init.rested.__name__ + + lib_file = "PACKAGES.TXT" + # lst_file = "" + md5_file = "CHECKSUMS.md5" + log_file = "ChangeLog.txt" + + self.make_dir([log, lib]) + + PACKAGES_TXT = f"{repo}{lib_file}" + FILELIST_TXT = "" + CHECKSUMS_MD5 = f"{repo}{md5_file}" + ChangeLog_txt = f"{repo}{log_file}" + + if self.check: + return self.checks_logs(log, ChangeLog_txt) + + self.down(lib, PACKAGES_TXT, repo_name) + self.down(lib, CHECKSUMS_MD5, repo_name) + self.down(log, ChangeLog_txt, repo_name) + + self.remote(log, ChangeLog_txt, lib, PACKAGES_TXT, CHECKSUMS_MD5, + FILELIST_TXT, repo_name) + def msb(self): """Creating MATE local library """ @@ -462,6 +679,41 @@ class Init(Utils): self.remote(log, ChangeLog_txt, lib, PACKAGES_TXT, CHECKSUMS_MD5, FILELIST_TXT, repo_name) + def mles(self): + """Creating Microlinux local library + """ + ar = "32" + repo = self.def_repos_dict["mles"] + log = self.log_path + "mles/" + lib = self.lib_path + "mles_repo/" + repo_name = Init.mles.__name__ + + lib_file = "PACKAGES.TXT" + # lst_file = "" + md5_file = "CHECKSUMS.md5" + log_file = "ChangeLog.txt" + + self.make_dir([log, lib]) + + if self.arch == "x86_64": + ar = "64" + + version = self.meta.mles_sub_repo[1:-1] + PACKAGES_TXT = f"{repo}{version}-{self.slack_ver}-{ar}bit/{lib_file}" + FILELIST_TXT = "" + CHECKSUMS_MD5 = f"{repo}{version}-{self.slack_ver}-{ar}bit/{md5_file}" + ChangeLog_txt = f"{repo}{version}-{self.slack_ver}-{ar}bit/{log_file}" + + if self.check: + return self.checks_logs(log, ChangeLog_txt) + + self.down(lib, PACKAGES_TXT, repo_name) + self.down(lib, CHECKSUMS_MD5, repo_name) + self.down(log, ChangeLog_txt, repo_name) + + self.remote(log, ChangeLog_txt, lib, PACKAGES_TXT, CHECKSUMS_MD5, + FILELIST_TXT, repo_name) + def down(self, path, link, repo): """Downloads files """ @@ -479,6 +731,7 @@ class Init(Utils): CHECKSUMS_MD5 = args[4] FILELIST_TXT = args[5] repo = args[6] + if self.checks_logs(log_path, ChangeLog_txt): # remove old files self.file_remove(log_path, ChangeLog_txt.split("/")[-1]) @@ -507,7 +760,9 @@ class Init(Utils): self.down(lib_path, FILELIST_TXT, repo) self.down(log_path, ChangeLog_txt, repo) - delete_table_data(repo) + if repo == 'sbo': + self.session.query(SBoTable).delete() # delete all data + self.session.commit() def merge(self, path, outfile, infiles): """Merging files @@ -543,6 +798,7 @@ class Init(Utils): if os.path.isfile(log_path + filename): local = FileSize(log_path + filename).local() + if server != local: return True @@ -590,7 +846,10 @@ class Upgrade: update = Update() update.run(repos) - delete_table_data(repo) + def del_tables(self, repo): + if repo == 'sbo': + self.session.query(SBoTable).delete() # delete all data + self.session.commit() class Update: @@ -650,25 +909,12 @@ class Update: if self.session.query(SBoTable).first() is None: db.insert_sbo_table() - if self.session.query(AlienTable).first() is None: - db.insert_alien_table() - def done_msg(self, repo): print(f"{self.grey}Checking repository " f"[{self.cyan}{repo}{self.grey}] ... " f"{self.endc}", end="", flush=True) -def delete_table_data(repo): - if repo == 'sbo': - session.query(SBoTable).delete() - session.commit() - - if repo == 'alien': - session.query(AlienTable).delete() - session.commit() - - def check_exists_repositories(repo): """Checking if repositories exists by PACKAGES.TXT file """ diff --git a/slpkg/load.py b/slpkg/load.py index 96c58224..15fa0122 100644 --- a/slpkg/load.py +++ b/slpkg/load.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# load.py file is part of slpkg. + +# Copyright 2014-2022 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 . + import os diff --git a/slpkg/log_deps.py b/slpkg/log_deps.py index 9f430085..7d0fb2ec 100644 --- a/slpkg/log_deps.py +++ b/slpkg/log_deps.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# log_deps.py file is part of slpkg. + +# Copyright 2014-2022 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 . + import os diff --git a/slpkg/main.py b/slpkg/main.py index f2cb5755..a197928e 100644 --- a/slpkg/main.py +++ b/slpkg/main.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# main.py file is part of slpkg. + +# Copyright 2014-2022 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 . + import os import sys @@ -37,21 +57,22 @@ from slpkg.pkg.manager import PackageManager from slpkg.sbo.queue import QueuePkgs from slpkg.sbo.check import sbo_upgrade +from slpkg.sbo.network import SBoNetwork +from slpkg.sbo.autobuild import AutoBuild from slpkg.sbo.slackbuild import SBoInstall from slpkg.slack.patches import Patches -from slpkg.binaries.check import pkg_upgrade -from slpkg.binaries.install import BinaryInstall +from slpkg.binary.check import pkg_upgrade +from slpkg.binary.install import BinaryInstall -class ArgParse: +class ArgParse(BlackList): def __init__(self, args): super().__init__() self.args = args self.meta = _meta_ self.msg = Msg() - self.blacklist = BlackList().get() self.commands = [ "update", "upgrade", @@ -271,6 +292,20 @@ class ArgParse: else: usage("", 1) + def auto_build(self): + """Auto built tool + """ + options = [ + "-a", + "--autobuild" + ] + + if len(self.args) >= 3 and self.args[0] in options: + AutoBuild(self.args[1], self.args[2:], self.meta.path).run() + + else: + usage("", 1) + def pkg_list(self): """List of packages by repository """ @@ -402,6 +437,7 @@ class ArgParse: additional_options = [ "--resolve-off", "--download-only", + "--directory-prefix=", "--case-ins", "--rebuild", "--reinstall", @@ -488,6 +524,40 @@ class ArgParse: else: usage("", 1) + def sbo_network(self): + """Views slackbuilds packages + """ + flag = [] + options = [ + "-n", + "--network" + ] + additional_options = [ + "--checklist", + "--case-ins" + ] + + for add in additional_options: + + 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", 1) + def pkg_blacklist(self): """Manages blacklist packages """ @@ -514,7 +584,7 @@ class ArgParse: elif (len(self.args) == 2 and self.args[0] in options and flag[1] in self.args): self.args.remove(flag[1]) - self.black_remove(self.blacklist) + self.black_remove(list(self.get_black())) elif (len(self.args) > 2 and self.args[0] in options and flag[1] in self.args): @@ -928,6 +998,8 @@ def main(): "deps-status": argparse.command_deps_status, "new-config": argparse.command_new_config, "clean-tmp": argparse.command_clean_tmp, + "-a": argparse.auto_build, + "--autobuild": argparse.auto_build, "-l": argparse.pkg_list, "--list": argparse.pkg_list, "-c": argparse.pkg_upgrade, @@ -936,6 +1008,8 @@ def main(): "--sync": argparse.pkg_install, "-t": argparse.pkg_tracking, "--tracking": argparse.pkg_tracking, + "-n": argparse.sbo_network, + "--netwotk": argparse.sbo_network, "-b": argparse.pkg_blacklist, "--blacklist": argparse.pkg_blacklist, "-q": argparse.pkg_queue, diff --git a/slpkg/md5sum.py b/slpkg/md5sum.py index 5cfa0d53..49ec35f2 100644 --- a/slpkg/md5sum.py +++ b/slpkg/md5sum.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# md5sum.py file is part of slpkg. + +# Copyright 2014-2022 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 . + import hashlib diff --git a/slpkg/messages.py b/slpkg/messages.py index 9ab98860..486b750c 100644 --- a/slpkg/messages.py +++ b/slpkg/messages.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# messages.py file is part of slpkg. + +# Copyright 2014-2022 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 . + import itertools diff --git a/slpkg/models/data.py b/slpkg/models/data.py index f9dcc5b5..b406012b 100644 --- a/slpkg/models/data.py +++ b/slpkg/models/data.py @@ -1,10 +1,30 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# data.py file is part of slpkg. + +# Copyright 2014-2022 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 progress.bar import Bar from slpkg.__metadata__ import MetaData as _meta_ -from slpkg.models.models import SBoTable, AlienTable, session +from slpkg.models.models import SBoTable, session class Database: @@ -13,21 +33,6 @@ class Database: self.lib_path = _meta_.lib_path self.session = session - self.pkg_tags = [ - "PACKAGE NAME:", - "PACKAGE LOCATION:", - "PACKAGE SIZE (compressed):", - "PACKAGE SIZE (uncompressed):", - "PACKAGE REQUIRED:", - "PACKAGE CONFLICTS:", - "PACKAGE SUGGESTS:", - "PACKAGE DESCRIPTION:" - ] - - def open_file(self, file): - with open(file, "r", encoding="utf-8") as f: - return f.readlines() - def insert_sbo_table(self): """Grabbing data line by line and inserting them into the database """ @@ -60,8 +65,7 @@ class Database: cache.append(line) if (i % 11) == 0: - data = SBoTable(name=cache[0], - location=cache[1].split('/')[1:-1][0], + data = SBoTable(name=cache[0], location=cache[1], files=cache[2], version=cache[3], download=cache[4], download64=cache[5], md5sum=cache[6], md5sum64=cache[7], @@ -75,33 +79,6 @@ class Database: self.session.commit() - def insert_alien_table(self): - pkg_file = self.open_file(f"{self.lib_path}alien_repo/PACKAGES.TXT") - - bar = Bar("Creating alien database", max=len(pkg_file), - suffix="%(percent)d%% - %(eta)ds") - - cache = [] # init cache - - for i, line in enumerate(pkg_file, 1): - - for p in self.pkg_tags: - if line.startswith(p): - line = line.replace(p, "").strip() - cache.append(line) - - if (i % 20) == 0: - data = AlienTable(name=cache[0], - location=cache[1][2:], - comp_size=cache[2][:-2], - uncomp_size=cache[3][:-2], - required=cache[4], conflicts=cache[5], - suggests=cache[6], description=cache[7]) - self.session.add(data) - - cache = [] # reset cache after 11 lines - - bar.next() - bar.finish() - - self.session.commit() + def open_file(self, file): + with open(file, "r", encoding="utf-8") as f: + return f.readlines() diff --git a/slpkg/models/models.py b/slpkg/models/models.py index 4d583a4b..5dfd0958 100644 --- a/slpkg/models/models.py +++ b/slpkg/models/models.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# models.py file is part of slpkg. + +# Copyright 2014-2022 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 sqlalchemy.orm import sessionmaker from sqlalchemy.ext.declarative import declarative_base @@ -35,19 +55,4 @@ class SBoTable(Base): short_description = Column(Text) -class AlienTable(Base): - - __tablename__ = "alientable" - - id = Column(Integer, primary_key=True) - name = Column(Text) - location = Column(Text) - comp_size = Column(Integer) - uncomp_size = Column(Integer) - required = Column(Text) - conflicts = Column(Text) - suggests = Column(Text) - description = Column(Text) - - Base.metadata.create_all(engine) diff --git a/slpkg/new_config.py b/slpkg/new_config.py index dad4516c..dea9ddd9 100644 --- a/slpkg/new_config.py +++ b/slpkg/new_config.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# new_config.py file is part of slpkg. + +# Copyright 2014-2022 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 . + import os import shutil diff --git a/slpkg/pkg/build.py b/slpkg/pkg/build.py index b13a3b07..6bbfe032 100644 --- a/slpkg/pkg/build.py +++ b/slpkg/pkg/build.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# build.py file is part of slpkg. + +# Copyright 2014-2022 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 . + import os import re @@ -17,7 +37,7 @@ from slpkg.messages import Msg from slpkg.checksum import check_md5 from slpkg.__metadata__ import MetaData as _meta_ -from slpkg.sbo.queries import SboQuery +from slpkg.sbo.greps import SBoGrep class BuildPackage(Utils): @@ -126,7 +146,7 @@ class BuildPackage(Utils): """ self.sbo_md5 = {} - md5_lists = SboQuery(self.prgnam).checksum() + md5_lists = SBoGrep(self.prgnam).checksum() for src, md5 in itertools.zip_longest(self.sources, md5_lists): self.sbo_md5[src] = md5 diff --git a/slpkg/pkg/find.py b/slpkg/pkg/find.py index cfd5be8a..8c4bd149 100644 --- a/slpkg/pkg/find.py +++ b/slpkg/pkg/find.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# find.py file is part of slpkg. + +# Copyright 2014-2022 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 . + import os from slpkg.blacklist import BlackList @@ -14,7 +34,7 @@ def searching(find_pkg, directory): if os.path.isdir(directory): installed = os.listdir(directory) - blacklist = black.get() + blacklist = list(black.get_black()) if os.path.exists(directory): diff --git a/slpkg/pkg/installed.py b/slpkg/pkg/installed.py index 46b33bdb..b3744047 100644 --- a/slpkg/pkg/installed.py +++ b/slpkg/pkg/installed.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -* +# installed.py file is part of slpkg. + +# Copyright 2014-2022 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.pkg.find import find_package diff --git a/slpkg/pkg/manager.py b/slpkg/pkg/manager.py index 7f5e2083..0ddbefb0 100644 --- a/slpkg/pkg/manager.py +++ b/slpkg/pkg/manager.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# manager.py file is part of slpkg. + +# Copyright 2014-2022 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 . + import os import re @@ -15,7 +35,6 @@ from slpkg.messages import Msg from slpkg.dialog_box import DialogUtil from slpkg.splitting import split_package from slpkg.__metadata__ import MetaData as _meta_ -from slpkg.sbo.queries import SboQuery from slpkg.slack.slackware_repo import slackware_repository @@ -598,13 +617,15 @@ class PackageManager(Utils): """Grabs packages """ pkg_list, pkg_size = [], [] + for line in packages.splitlines(): - if repo == "sbo": - pkg_list = SboQuery(name="").names() + if repo == "sbo": - else: + if line.startswith("SLACKBUILD NAME: "): + pkg_list.append(line[17:].strip()) + pkg_size.append("0 K") - for line in packages.splitlines(): + else: if line.startswith("PACKAGE NAME: "): pkg_list.append(line[15:].strip()) @@ -612,7 +633,7 @@ class PackageManager(Utils): if line.startswith("PACKAGE SIZE (compressed): "): pkg_size.append(line[26:].strip()) - if repo == "alien": + if repo == "alien" or repo == "ktown": return alien_filter(pkg_list, pkg_size) return pkg_list, pkg_size @@ -628,6 +649,7 @@ class PackageManager(Utils): self.meta.lib_path + "sbo_repo/SLACKBUILDS.TXT")): packages = self.read_file(f"{self.meta.lib_path}" "sbo_repo/SLACKBUILDS.TXT") + else: if (os.path.isfile( diff --git a/slpkg/pkg_find.py b/slpkg/pkg_find.py index 7c4ffc8f..7b21d32a 100644 --- a/slpkg/pkg_find.py +++ b/slpkg/pkg_find.py @@ -1,9 +1,29 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# pkg_find.py file is part of slpkg. + +# Copyright 2014-2022 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.messages import Msg -from slpkg.sbo.queries import SboQuery +from slpkg.sbo.greps import SBoGrep from slpkg.pkg.manager import PackageManager from slpkg.__metadata__ import MetaData as _meta_ @@ -71,6 +91,6 @@ class FindFromRepos: ver = "" if repo == "sbo": - ver = f"-{SboQuery(find).version()}" + ver = f"-{SBoGrep(find).version()}" return ver diff --git a/slpkg/remove.py b/slpkg/remove.py index 8751fdad..a20dc10d 100644 --- a/slpkg/remove.py +++ b/slpkg/remove.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# remove.py file is part of slpkg. + +# Copyright 2014-2022 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 . + import os import shutil diff --git a/slpkg/repoenable.py b/slpkg/repoenable.py index 1bf39c6a..a3b9a6e5 100644 --- a/slpkg/repoenable.py +++ b/slpkg/repoenable.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# repoenable.py file is part of slpkg. + +# Copyright 2014-2022 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 . + import os diff --git a/slpkg/repoinfo.py b/slpkg/repoinfo.py index c177d83f..c1a17f5b 100644 --- a/slpkg/repoinfo.py +++ b/slpkg/repoinfo.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# repoinfo.py file is part of slpkg. + +# Copyright 2014-2022 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 . + import os @@ -112,7 +132,7 @@ class RepoInfo(Utils): if line.startswith("PACKAGE SIZE (uncompressed): "): unsize.append(line[30:-2].strip()) - if repo == "salix": + if repo in ["salix", "slackl"]: log = self.read_file( f"{self.meta.log_path}{repo}/ChangeLog.txt") diff --git a/slpkg/repolist.py b/slpkg/repolist.py index aeb97fbb..fca111db 100644 --- a/slpkg/repolist.py +++ b/slpkg/repolist.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# repolist.py file is part of slpkg. + +# Copyright 2014-2022 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.messages import Msg from slpkg.repositories import Repo diff --git a/slpkg/repositories.py b/slpkg/repositories.py index 7fada755..738fca34 100644 --- a/slpkg/repositories.py +++ b/slpkg/repositories.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# repositories.py file is part of slpkg. + +# Copyright 2014-2022 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 . + import os diff --git a/slpkg/sbo/autobuild.py b/slpkg/sbo/autobuild.py new file mode 100644 index 00000000..1eaba5e4 --- /dev/null +++ b/slpkg/sbo/autobuild.py @@ -0,0 +1,76 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- + +# autobuild.py file is part of slpkg. + +# Copyright 2014-2022 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 . + + +import os + +from slpkg.pkg.build import BuildPackage + +from slpkg.sbo.greps import SBoGrep + + +class AutoBuild: + """Autobuild package if sources and script is already + downloaded + """ + def __init__(self, script, sources, path): + self.script = script + self.sources = sources + self.prgnam = self.script[:-7] + self.path = path + self.sbo_sources = [] + + def run(self): + """Builds package and fix ordelist per checksum + """ + self.files_exist() + self.info_file() + sources = self.sources + + if len(sources) > 1 and self.sbo_sources != sources: + sources = self.sbo_sources + # If the list does not have the same order uses from .info + # order. + BuildPackage(self.script, sources, self.path, auto=True).build() + + raise SystemExit() + + def info_file(self): + """Grabs sources from .info file and stores filename + """ + sources = SBoGrep(self.prgnam).source().split() + for source in sources: + self.sbo_sources.append(source.split("/")[-1]) + + def files_exist(self): + """Check if SlackBuild archive.tar.gz and sources exist + """ + if not os.path.isfile(self.path + self.script): + raise SystemExit("\nslpkg: Error: SlackBuild archive.tar.gz " + "not found\n") + + for src in self.sources: + + if not os.path.isfile(self.path + src): + raise SystemExit(f"\nslpkg: Error: Source file '{src}' " + f"not found\n") diff --git a/slpkg/sbo/build_num.py b/slpkg/sbo/build_num.py index 2e3ddee5..5765e4cf 100644 --- a/slpkg/sbo/build_num.py +++ b/slpkg/sbo/build_num.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# build_num.py file is part of slpkg. + +# Copyright 2014-2022 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 . + import re diff --git a/slpkg/sbo/check.py b/slpkg/sbo/check.py index a5831eb1..3dd46c5e 100644 --- a/slpkg/sbo/check.py +++ b/slpkg/sbo/check.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# check.py file is part of slpkg. + +# Copyright 2014-2022 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 . + import os from pkg_resources import parse_version @@ -11,7 +31,7 @@ from slpkg.splitting import split_package from slpkg.upgrade_checklist import choose_upg from slpkg.__metadata__ import MetaData as _meta_ -from slpkg.sbo.queries import SboQuery +from slpkg.sbo.greps import SBoGrep def sbo_upgrade(skip, flag): @@ -21,15 +41,15 @@ def sbo_upgrade(skip, flag): black = BlackList() msg.checking() upgrade_names = [] - data = SboQuery(name="").names() - blacklist = black.get() + data = SBoGrep(name="").names() + blacklist = list(black.get_black()) for pkg in sbo_list(): name = split_package(pkg)[0] ver = split_package(pkg)[1] if (name in data and name not in skip and name not in blacklist): - sbo_package = f"{name}-{SboQuery(name).version()}" + sbo_package = f"{name}-{SBoGrep(name).version()}" package = f"{name}-{ver}" if parse_version(sbo_package) > parse_version(package): diff --git a/slpkg/sbo/compressed.py b/slpkg/sbo/compressed.py index 36cbc5c9..a2ba6fd1 100644 --- a/slpkg/sbo/compressed.py +++ b/slpkg/sbo/compressed.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# download.py file is part of slpkg. + +# Copyright 2014-2022 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 . + class SBoLink: """Creates slackbuild tar.gz archive from url diff --git a/slpkg/sbo/dependencies.py b/slpkg/sbo/dependencies.py deleted file mode 100644 index 61562bc7..00000000 --- a/slpkg/sbo/dependencies.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/python3 -# -*- coding: utf-8 -*- - - -from slpkg.sbo.queries import SboQuery -from slpkg.blacklist import BlackList - - -class Requires: - """Creates a list of dependencies with - the right order to install""" - - def __init__(self, name): - self.name = name - self.black = BlackList().get() - - def sbo(self): - requires = SboQuery(self.name).requires() - - for r in requires: - if r not in self.black and r != "%README%": - sub = SboQuery(r).requires() - for s in sub: - requires.append(s) - - requires.reverse() - - return list(dict.fromkeys(requires)) diff --git a/slpkg/sbo/dependency.py b/slpkg/sbo/dependency.py new file mode 100644 index 00000000..ed83b74c --- /dev/null +++ b/slpkg/sbo/dependency.py @@ -0,0 +1,77 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- + +# dependency.py file is part of slpkg. + +# Copyright 2014-2022 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 . + + +import sys +from functools import lru_cache + +from slpkg.blacklist import BlackList +from slpkg.__metadata__ import MetaData as _meta_ + +from slpkg.sbo.greps import SBoGrep + + +class Requires(BlackList): + """Resolving SBo dependencies + """ + def __init__(self, flag): + super().__init__() + self.flag = flag + self.meta = _meta_ + self.SLACKBUILDS_TXT = SBoGrep(name="").names() + self.blacklist = list(self.get_black()) + self.dep_results = [] + + @lru_cache + def sbo(self, name): + """Builds all dependencies of a package + """ + if (self.meta.rsl_deps in ["on", "ON"] and + "--resolve-off" not in self.flag): + sys.setrecursionlimit(10000) + dependencies = [] + requires = SBoGrep(name).requires() + + if requires: + + for req in requires: + + # avoids adding %README% as dependency and if + # requires in the blacklist + if "%README%" not in req and req not in self.blacklist: + dependencies.append(req) + + self.deep_check(tuple(dependencies)) + + return self.dep_results + + else: + return [] + + @lru_cache + def deep_check(self, dependencies): + """Checking if dependencies are finished + """ + if dependencies: + self.dep_results.append(dependencies) + [self.sbo(dep) for dep in dependencies] diff --git a/slpkg/sbo/queries.py b/slpkg/sbo/greps.py similarity index 72% rename from slpkg/sbo/queries.py rename to slpkg/sbo/greps.py index 360c400e..99d19e59 100644 --- a/slpkg/sbo/queries.py +++ b/slpkg/sbo/greps.py @@ -1,17 +1,39 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# greps.py file is part of slpkg. +# Copyright 2014-2022 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.__metadata__ import MetaData as _meta_ from slpkg.models.models import SBoTable, session -class SboQuery: +class SBoGrep(Utils): """Grabs data from sbo database """ def __init__(self, name): self.name = name self.meta = _meta_ + self.db = self.meta.db self.arch64 = "x86_64" self.session = session diff --git a/slpkg/sbo/network.py b/slpkg/sbo/network.py new file mode 100644 index 00000000..fced7556 --- /dev/null +++ b/slpkg/sbo/network.py @@ -0,0 +1,418 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- + +# network.py file is part of slpkg. + +# Copyright 2014-2022 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 . + + +import os +import pydoc + +from slpkg.utils import Utils +from slpkg.messages import Msg +from slpkg.blacklist import BlackList +from slpkg.downloader import Download +from slpkg.remove import delete_folder +from slpkg.dialog_box import DialogUtil +from slpkg.security import pkg_security +from slpkg.__metadata__ import MetaData as _meta_ + +from slpkg.pkg.find import find_package +from slpkg.pkg.build import BuildPackage +from slpkg.pkg.manager import PackageManager + +from slpkg.sbo.read import ReadSBo +from slpkg.sbo.greps import SBoGrep +from slpkg.sbo.sbo_arch import SBoArch +from slpkg.sbo.compressed import SBoLink +from slpkg.sbo.search import sbo_search_pkg +from slpkg.sbo.slack_find import slack_package + +from slpkg.slack.slack_version import slack_ver + + +class SBoNetwork(BlackList, Utils): + """View SBo site in the terminal and also read, build or + install packages + """ + def __init__(self, name, flag): + super().__init__() + self.name = name + self.flag = flag + self.meta = _meta_ + self.msg = Msg() + self.data = SBoGrep(name="").names() + self.check_pkg_exist() + self.arch = SBoArch().get() + self.comp_tar = ".tar.gz" + self.choice = "" + self.FAULT = "" + self.green = self.meta.color["GREEN"] + self.red = self.meta.color["RED"] + self.yellow = self.meta.color["YELLOW"] + self.cyan = self.meta.color["CYAN"] + self.grey = self.meta.color["GREY"] + self.endc = self.meta.color["ENDC"] + self.build_folder = self.meta.build_path + self._SOURCES = self.meta.SBo_SOURCES + self.msg.reading() + self.case_insensitive() + + if "--checklist" in self.flag: + self.with_checklist() + + grep = SBoGrep(self.name) + self.sbo_files = grep.files() + self.sbo_url = sbo_search_pkg(self.name) + + if self.sbo_url: + self.sbo_desc = grep.description()[len(self.name) + 2:-1] + self.source_dwn = grep.source().split() + self.sbo_req = grep.requires() + self.sbo_dwn = SBoLink(self.sbo_url).tar_gz() + self.sbo_version = grep.version() + self.dwn_srcs = self.sbo_dwn.split() + self.source_dwn + + if "--checklist" not in self.flag or not self.sbo_url and self.name: + self.msg.done() + + def check_pkg_exist(self): + if self.name not in self.data: + self.msg.pkg_not_found("\n", self.name, "can't find", "\n") + raise SystemExit(1) + + def view(self): + """View SlackBuild package, read or install them + from slackbuilds.org + """ + if self.sbo_url and self.name not in self.get_black(): + self.prgnam = f"{self.name}-{self.sbo_version}" + self.view_sbo() + + while True: + + self.read_choice() + + choice = { + "r": self.choice_README, + "R": self.choice_README, + "s": self.choice_SlackBuild, + "S": self.choice_SlackBuild, + "f": self.choice_info, + "F": self.choice_info, + "o": self.choice_doinst, + "O": self.choice_doinst, + "d": self.choice_download, + "D": self.choice_download, + "download": self.choice_download, + "b": self.choice_build, + "B": self.choice_build, + "build": self.choice_build, + "i": self.choice_install, + "I": self.choice_install, + "install": self.choice_install, + "c": self.choice_clear_screen, + "C": self.choice_clear_screen, + "clear": self.choice_clear_screen, + "q": self.choice_quit, + "quit": self.choice_quit, + "Q": self.choice_quit + } + + try: + choice[self.choice]() + except KeyError: + pass + + else: + self.msg.pkg_not_found("\n", self.name, "Can't view", "\n") + raise SystemExit(1) + + def case_insensitive(self): + """Matching packages distinguish between uppercase and + lowercase + """ + + if "--case-ins" in self.flag: + data_dict = self.case_sensitive(self.data) + + for key, value in data_dict.items(): + + if key == self.name.lower(): + self.name = value + + def read_choice(self): + """Return choice + """ + commands = { + "r": "README", + "R": "README", + "s": f"{self.name}.SlackBuild", + "S": f"{self.name}.SlackBuild", + "f": f"{self.name}.info", + "F": f"{self.name}.info", + "o": "doinst.sh", + "O": "doinst.sh", + "d": "download", + "D": "download", + "download": "download", + "b": "build", + "B": "build", + "build": "build", + "i": "install", + "I": "install", + "install": "install", + "c": "clear", + "C": "clear", + "clear": "clear", + "q": "quit", + "quit": "quit", + "Q": "quit" + } + + try: + message = " Choose an option > " + self.choice = input(f"{self.grey}{message}{self.endc}") + except EOFError: + raise SystemExit('\n') + + try: + print("{0}\x1b[1A{1}{2}{3}\n".format( + " " * len(message), self.cyan, commands[self.choice], + self.endc), end="") + print(end="", flush=True) + except KeyError: + pass + + def choice_README(self): + """View README file + """ + README = ReadSBo(self.sbo_url).readme("README") + fill = self.fill_pager(README) + self.pager(README + fill) + + def choice_SlackBuild(self): + """View .SlackBuild file + """ + SlackBuild = ReadSBo(self.sbo_url).slackbuild(self.name, ".SlackBuild") + fill = self.fill_pager(SlackBuild) + self.pager(SlackBuild + fill) + + def choice_info(self): + """View .info file + """ + info = ReadSBo(self.sbo_url).info(self.name, ".info") + fill = self.fill_pager(info) + self.pager(info + fill) + + def choice_doinst(self): + """View doinst.sh file + """ + if "doinst.sh" in self.sbo_files.split(): + doinst_sh = ReadSBo(self.sbo_url).doinst("doinst.sh") + fill = self.fill_pager(doinst_sh) + self.pager(doinst_sh + fill) + + def choice_download(self): + """Download script.tar.gz and sources + """ + Download(path="", url=self.dwn_srcs, repo="sbo").start() + raise SystemExit() + + def choice_build(self): + """Build package + """ + self.build() + delete_folder(self.build_folder) + raise SystemExit() + + def choice_install(self): + """Download, build and install the package + """ + pkg_security([self.name]) + + if not find_package(self.prgnam, self.meta.pkg_path): + self.build() + self.install() + delete_folder(self.build_folder) + + raise SystemExit() + + else: + self.msg.template(78) + self.msg.pkg_found(self.prgnam) + self.msg.template(78) + + raise SystemExit() + + def choice_clear_screen(self): + """Clear screen + """ + os.system("clear") + self.view() + + def choice_quit(self): + """Quit from choices + """ + raise SystemExit() + + def view_sbo(self): + """View slackbuild.org + """ + sbo_url = self.sbo_url.replace("/slackbuilds/", "/repository/") + br1, br2, fix_sp = "", "", " " + + if self.meta.use_colors in ["off", "OFF"]: + br1 = "(" + br2 = ")" + fix_sp = "" + + print() # new line at start + self.msg.template(78) + print(f"| {' ' * 28}{self.grey}SlackBuilds Repository{self.endc}") + self.msg.template(78) + print(f"| {slack_ver()} > {sbo_url.split('/')[-3].title()} > {self.cyan}{self.name}{self.endc}") + self.msg.template(78) + print(f"| {self.green}Package url{self.endc}: {sbo_url}") + self.msg.template(78) + print(f"| {self.green}Description: {self.endc}{self.sbo_desc}") + print(f"| {self.green}SlackBuild: {self.endc}{self.sbo_dwn.split('/')[-1]}") + print(f"| {self.green}Sources: {self.endc}{', '.join([src.split('/')[-1] for src in self.source_dwn])}") + print(f"| {self.yellow}Requirements: {self.endc}{', '.join(self.sbo_req)}") + self.msg.template(78) + print(f"| {self.red}R{self.endc}{br2}EADME View the README file") + print(f"| {self.red}S{self.endc}{br2}lackBuild View the .SlackBuild file") + print(f"| In{br1}{self.red}f{self.endc}{br2}o{fix_sp} View the .info file") + + if "doinst.sh" in self.sbo_files.split(): + print(f"| D{br1}{self.red}o{self.endc}{br2}inst.sh{fix_sp} View the doinst.sh file") + + print(f"| {self.red}D{self.endc}{br2}ownload Download this package") + print(f"| {self.red}B{self.endc}{br2}uild Download and build") + print(f"| {self.red}I{self.endc}{br2}nstall Download/Build/Install") + print(f"| {self.red}C{self.endc}{br2}lear Clear screen") + print(f"| {self.red}Q{self.endc}{br2}uit Quit") + self.msg.template(78) + + def with_checklist(self): + """Using dialog and checklist option + """ + data = [] + + if not self.name: + data = self.data + + else: + for name in self.data: + if self.name in name: + data.append(name) + + if data: + text = "Press 'spacebar' to choose SlackBuild for view" + title = " SlackBuilds.org " + backtitle = f"{_meta_.__all__} {_meta_.__version__}" + status = False + pkg = DialogUtil(data, text, title, backtitle, status).checklist() + + if pkg and len(pkg) > 1: + os.system("clear") + raise SystemExit("\nslpkg: Error: Choose only one package\n") + + if pkg is None: + raise SystemExit(1) + + self.name = "".join(pkg) + os.system("clear") + + def pager(self, text): + """Read text + """ + pydoc.pager(text) + + def fill_pager(self, page): + """Fixes pager spaces + """ + tty_size = os.popen("stty size", "r").read().split() + rows = int(tty_size[0]) - 1 + lines = sum(1 for line in page.splitlines()) + diff = rows - lines + fill = "\n" * diff + + if diff > 0: + return fill + + else: + return "" + + def error_uns(self): + """Checks if the package supported by an arch + before proceeding to install + """ + self.FAULT = "" + UNST = ["UNSUPPORTED", "UNTESTED"] + + if "".join(self.source_dwn) in UNST: + self.FAULT = "".join(self.source_dwn) + + def build(self): + """Builds slackware package + """ + pkg_security([self.name]) + self.error_uns() + + if self.FAULT: + print() + self.msg.template(78) + print(f"| Package {self.prgnam} {self.red} {self.FAULT} " + f"{self.endc}") + self.msg.template(78) + + else: + sources = [] + + if not os.path.exists(self.meta.build_path): + os.makedirs(self.meta.build_path) + + if not os.path.exists(self._SOURCES): + os.makedirs(self._SOURCES) + + os.chdir(self.meta.build_path) + + Download(self.meta.build_path, self.sbo_dwn.split(), + repo="sbo").start() + + Download(self._SOURCES, self.source_dwn, repo="sbo").start() + + script = self.sbo_dwn.split("/")[-1] + + for src in self.source_dwn: + sources.append(src.split("/")[-1]) + + BuildPackage(script, sources, self.meta.build_path, + auto=False).build() + + slack_package(self.prgnam) # check if build + + def install(self): + """Installs SBo package found in /tmp directory. + """ + binary = slack_package(self.prgnam) + print(f"[ {self.green}Installing{self.endc} ] --> {self.name}") + PackageManager(binary).upgrade(flag="--install-new") diff --git a/slpkg/sbo/queue.py b/slpkg/sbo/queue.py index 607038aa..dfb36dda 100644 --- a/slpkg/sbo/queue.py +++ b/slpkg/sbo/queue.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# queue.py file is part of slpkg. + +# Copyright 2014-2022 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 . + import os from collections import OrderedDict @@ -13,7 +33,7 @@ from slpkg.pkg.find import find_package from slpkg.pkg.build import BuildPackage from slpkg.pkg.manager import PackageManager -from slpkg.sbo.queries import SboQuery +from slpkg.sbo.greps import SBoGrep from slpkg.sbo.compressed import SBoLink from slpkg.sbo.search import sbo_search_pkg from slpkg.sbo.slack_find import slack_package @@ -125,7 +145,7 @@ class QueuePkgs(Utils): for pkg in packages: - if pkg not in SboQuery(pkg).names(): + if pkg not in SBoGrep(pkg).names(): raise SystemExit(f"\nPackage '{pkg}' was not found in " f"the SBo repository\n") @@ -137,7 +157,7 @@ class QueuePkgs(Utils): sbo_url = sbo_search_pkg(pkg) sbo_dwn = SBoLink(sbo_url).tar_gz() - source_dwn = SboQuery(pkg).source().split() + source_dwn = SBoGrep(pkg).source().split() os.chdir(self.meta.build_path) script = sbo_dwn.split("/")[-1] @@ -166,7 +186,7 @@ class QueuePkgs(Utils): for pkg in packages: - ver = SboQuery(pkg).version() + ver = SBoGrep(pkg).version() prgnam = f"{pkg}-{ver}" if find_package(prgnam, self.meta.output): diff --git a/slpkg/sbo/read.py b/slpkg/sbo/read.py index 649955e0..9ca0e38e 100644 --- a/slpkg/sbo/read.py +++ b/slpkg/sbo/read.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# read.py file is part of slpkg. + +# Copyright 2014-2022 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.url_read import URL diff --git a/slpkg/sbo/sbo_arch.py b/slpkg/sbo/sbo_arch.py index 514d15e4..d7769d1e 100644 --- a/slpkg/sbo/sbo_arch.py +++ b/slpkg/sbo/sbo_arch.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# sbo_arch.py file is part of slpkg. + +# Copyright 2014-2022 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.__metadata__ import MetaData as _meta_ diff --git a/slpkg/sbo/search.py b/slpkg/sbo/search.py index e5b23cbb..443cb3a5 100644 --- a/slpkg/sbo/search.py +++ b/slpkg/sbo/search.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# search.py file is part of slpkg. + +# Copyright 2014-2022 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.repositories import Repo from slpkg.slack.slack_version import slack_ver @@ -18,4 +38,4 @@ def sbo_search_pkg(name): sbo = repo.default_repository()["sbo"] sbo_url = f"{sbo}{slack_ver()}/" - return f"{sbo_url}{location[0]}/{name}/" + return f"{sbo_url}{location[0][2:]}/" diff --git a/slpkg/sbo/slack_find.py b/slpkg/sbo/slack_find.py index 1977b41c..244219f0 100644 --- a/slpkg/sbo/slack_find.py +++ b/slpkg/sbo/slack_find.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# slack_find.py file is part of slpkg. + +# Copyright 2014-2022 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 . + import os from pkg_resources import parse_version diff --git a/slpkg/sbo/slackbuild.py b/slpkg/sbo/slackbuild.py index 8fbaa873..924c687a 100644 --- a/slpkg/sbo/slackbuild.py +++ b/slpkg/sbo/slackbuild.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# slackbuild.py file is part of slpkg. + +# Copyright 2014-2022 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 . + import os from pkg_resources import parse_version @@ -19,15 +39,15 @@ from slpkg.pkg.build import BuildPackage from slpkg.pkg.manager import PackageManager from slpkg.pkg.installed import GetFromInstalled -from slpkg.sbo.queries import SboQuery +from slpkg.sbo.greps import SBoGrep from slpkg.sbo.sbo_arch import SBoArch from slpkg.sbo.compressed import SBoLink +from slpkg.sbo.dependency import Requires from slpkg.sbo.search import sbo_search_pkg -from slpkg.sbo.dependencies import Requires from slpkg.sbo.slack_find import slack_package -class SBoInstall(Utils): +class SBoInstall(BlackList, Utils): """Build and install SBo packages with all dependencies """ def __init__(self, slackbuilds, flag): @@ -45,6 +65,7 @@ class SBoInstall(Utils): self.arch = SBoArch().get() self.build_folder = self.meta.build_path self._SOURCES = self.meta.SBo_SOURCES + self.init_flags() self.unst = ["UNSUPPORTED", "UNTESTED"] self.master_packages = [] self.deps = [] @@ -58,8 +79,19 @@ class SBoInstall(Utils): self.count_upg = 0 self.count_uni = 0 self.msg.reading() - self.data = SboQuery(name="").names() - self.blacklist = BlackList().get() + self.data = SBoGrep(name="").names() + self.blacklist = list(self.get_black()) + + def init_flags(self): + """Flags initialization + """ + for fl in self.flag: + + if fl.startswith("--directory-prefix="): + self.build_folder = fl.split("=")[1] + + if not self.build_folder.endswith("/"): + self.build_folder += "/" def start(self, is_upgrade): """Start view, build and install SBo packages @@ -71,35 +103,33 @@ class SBoInstall(Utils): for _sbo in self.slackbuilds: if _sbo in self.data and _sbo not in self.blacklist: - sbo_deps = Requires(_sbo).sbo() + sbo_deps = Requires(self.flag).sbo(_sbo) self.deps += sbo_deps - - self.deps_dict[_sbo] = sbo_deps - + self.deps_dict[_sbo] = self.one_for_all(sbo_deps) self.package_found.append(_sbo) else: self.package_not_found.append(_sbo) + self.update_deps() + if not self.package_found: self.match = True self.matching() self.master_packages, mas_src = self.sbo_version_source( self.package_found) - self.msg.done() if (self.meta.rsl_deps in ["on", "ON"] and self.flag != "--resolve-off" and not self.match): self.msg.resolving() - - self.dependencies, dep_src = self.sbo_version_source(self.deps) + self.dependencies, dep_src = self.sbo_version_source( + self.one_for_all(self.deps)) if (self.meta.rsl_deps in ["on", "ON"] and self.flag != "--resolve-off" and not self.match): self.msg.done() - self.clear_masters() if self.package_found: @@ -168,6 +198,17 @@ class SBoInstall(Utils): if key == name.lower(): self.slackbuilds[index] = value + def update_deps(self): + """Update dependencies dictionary with all package + """ + onelist, dependencies = [], [] + onelist = self.dimensional_list(self.deps) + dependencies = self.remove_dbs(onelist) + + for dep in dependencies: + deps = Requires(self.flag).sbo(dep) + self.deps_dict[dep] = self.one_for_all(deps) + def continue_to_install(self): """Continue to install ? """ @@ -194,6 +235,7 @@ class SBoInstall(Utils): """Clear master slackbuilds if already exist in dependencies or if added to install two or more times """ + self.master_packages = self.remove_dbs(self.master_packages) for mas in self.master_packages: if mas in self.dependencies: @@ -215,9 +257,9 @@ class SBoInstall(Utils): sbo_versions, sources = [], [] for sbo in slackbuilds: - sbo_ver = f"{sbo}-{SboQuery(sbo).version()}" + sbo_ver = f"{sbo}-{SBoGrep(sbo).version()}" sbo_versions.append(sbo_ver) - sources.append(SboQuery(sbo).source()) + sources.append(SBoGrep(sbo).source()) return [sbo_versions, sources] @@ -334,7 +376,7 @@ class SBoInstall(Utils): pkg = "-".join(prgnam.split("-")[:-1]) installed = "".join(find_package(prgnam, self.meta.pkg_path)) - src_link = SboQuery(pkg).source().split() + src_link = SBoGrep(pkg).source().split() if (installed and "--download-only" not in self.flag and "--rebuild" not in self.flag): diff --git a/slpkg/security.py b/slpkg/security.py index 079e35bb..57cfb8b6 100644 --- a/slpkg/security.py +++ b/slpkg/security.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# security.py file is part of slpkg. + +# Copyright 2014-2022 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.messages import Msg diff --git a/slpkg/sizes.py b/slpkg/sizes.py index 62fc8803..e193ef5f 100644 --- a/slpkg/sizes.py +++ b/slpkg/sizes.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# sizes.py file is part of slpkg. + +# Copyright 2014-2022 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 . + def units(comp_sum, uncomp_sum): """Calculates package size diff --git a/slpkg/slack/patches.py b/slpkg/slack/patches.py index df8e1a80..f5dbaf59 100644 --- a/slpkg/slack/patches.py +++ b/slpkg/slack/patches.py @@ -46,13 +46,13 @@ from slpkg.pkg.find import find_package from slpkg.pkg.manager import PackageManager from slpkg.pkg.installed import GetFromInstalled -from slpkg.binaries.queries import repo_data +from slpkg.binary.greps import repo_data from slpkg.slack.mirrors import mirrors from slpkg.slack.slack_version import slack_ver -class Patches(Utils): +class Patches(BlackList, Utils): """Upgrades distribution from the official Slackware mirrors """ def __init__(self, skip, flag): @@ -78,7 +78,6 @@ class Patches(Utils): self.comp_sum = [] self.uncomp_sum = [] self.msg.checking() - self.blacklist = BlackList().get() if self.version == "stable": self.PACKAGES_TXT = URL(mirrors("PACKAGES.TXT", @@ -154,7 +153,7 @@ class Patches(Utils): """Stores and returns packages for upgrading """ data = repo_data(self.PACKAGES_TXT, "slack", self.flag) - + black = list(self.get_black()) for name, loc, comp, uncomp in zip(data[0], data[1], data[2], data[3]): repo_pkg_name = split_package(name)[0] @@ -163,7 +162,7 @@ class Patches(Utils): pkg_ver = split_package(name)[1] if (GetFromInstalled(pkg_name).name() and - repo_pkg_name not in self.blacklist and + repo_pkg_name not in black and repo_pkg_name not in self.skip and parse_version(pkg_ver) > parse_version( GetFromInstalled(pkg_name).version())): @@ -179,7 +178,7 @@ class Patches(Utils): self.count_upg -= 1 elif (not os.path.isfile(self.meta.pkg_path + name[:-4]) and - repo_pkg_name not in self.blacklist and + repo_pkg_name not in black and repo_pkg_name not in self.skip): self.dwn_links.append(f"{mirrors('', '')}{loc}/{name}") self.comp_sum.append(comp) diff --git a/slpkg/slack/slackware_repo.py b/slpkg/slack/slackware_repo.py index 1234e520..f8968db3 100644 --- a/slpkg/slack/slackware_repo.py +++ b/slpkg/slack/slackware_repo.py @@ -23,7 +23,7 @@ from slpkg.utils import Utils -from slpkg.binaries.queries import repo_data +from slpkg.binary.greps import repo_data from slpkg.splitting import split_package from slpkg.__metadata__ import MetaData as _meta_ diff --git a/slpkg/slpkg_update.py b/slpkg/slpkg_update.py index e24584f9..a71d80c6 100644 --- a/slpkg/slpkg_update.py +++ b/slpkg/slpkg_update.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# slpkg_update.py file is part of slpkg. + +# Copyright 2014-2022 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 . + import os import re diff --git a/slpkg/splitting.py b/slpkg/splitting.py index 6842aaa2..5c393b04 100644 --- a/slpkg/splitting.py +++ b/slpkg/splitting.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# splitting.py file is part of slpkg. + +# Copyright 2014-2022 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 . + def split_package(package): """Splits package in name, version diff --git a/slpkg/status_deps.py b/slpkg/status_deps.py index 8aef1be1..2e17fe96 100644 --- a/slpkg/status_deps.py +++ b/slpkg/status_deps.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# status_deps.py file is part of slpkg. + +# Copyright 2014-2022 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 . + import os diff --git a/slpkg/superuser.py b/slpkg/superuser.py index 464793a2..1e2da766 100644 --- a/slpkg/superuser.py +++ b/slpkg/superuser.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# superuser.py file is part of slpkg. + +# Copyright 2014-2022 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 . + import os import getpass diff --git a/slpkg/tracking.py b/slpkg/tracking.py index a55ccc87..38f2d2f1 100644 --- a/slpkg/tracking.py +++ b/slpkg/tracking.py @@ -1,7 +1,28 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# tracking.py file is part of slpkg. +# Copyright 2014-2022 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.graph import Graph from slpkg.messages import Msg from slpkg.blacklist import BlackList @@ -9,21 +30,20 @@ from slpkg.__metadata__ import MetaData as _meta_ from slpkg.pkg.find import find_package -from slpkg.sbo.queries import SboQuery -from slpkg.sbo.dependencies import Requires +from slpkg.sbo.greps import SBoGrep +from slpkg.sbo.dependency import Requires from slpkg.sbo.search import sbo_search_pkg -from slpkg.binaries.search import search_pkg -from slpkg.binaries.dependency import Dependencies +from slpkg.binary.search import search_pkg +from slpkg.binary.dependency import Dependencies -class TrackingDeps: +class TrackingDeps(BlackList, Utils): """Views tree of dependencies and also highlights packages with the colour green if already installed and the colour red if not installed. """ - def __init__(self, name, repo, flag): super().__init__() self.name = name @@ -37,8 +57,9 @@ class TrackingDeps: self.red = self.meta.color["RED"] self.endc = self.meta.color["ENDC"] self.requires = [] + self.dependencies = [] + self.dependencies_list = [] self.deps_dict = {} - self.blacklist = BlackList() self.init_flags() def init_flags(self): @@ -57,6 +78,9 @@ class TrackingDeps: self.repositories() if self.find_pkg: + self.dependencies_list.reverse() + self.requires = self.dimensional_list(self.dependencies_list) + self.dependencies = self.remove_dbs(self.requires) if self.dependencies == []: self.dependencies = ["No dependencies"] @@ -128,7 +152,7 @@ class TrackingDeps: self.find_pkg = sbo_search_pkg(self.name) if self.find_pkg: - self.dependencies = Requires(self.name).sbo() + self.dependencies_list = Requires(self.flag).sbo(self.name) else: PACKAGES_TXT = self.read_file( @@ -138,8 +162,8 @@ class TrackingDeps: self.find_pkg = search_pkg(self.name, self.repo) if self.find_pkg: - self.black = list(self.blacklist.get()) - self.dependencies = Dependencies( + self.black = list(self.get_black()) + self.dependencies_list = Dependencies( self.repo, self.black).binary(self.name, self.flag) def sbo_case_insensitive(self): @@ -147,7 +171,7 @@ class TrackingDeps: lowercase for sbo repository """ if "--case-ins" in self.flag: - data = SboQuery(name="").names() + data = SBoGrep(name="").names() data_dict = self.case_sensitive(data) for key, value in data_dict.items(): @@ -195,7 +219,7 @@ class TrackingDeps: if self.repo == "sbo": for dep in dependencies: - deps = Requires(dep).sbo() + deps = Requires(flag="").sbo(dep) if dep not in self.deps_dict.values(): self.deps_dict[dep] = self.dimensional_list(deps) diff --git a/slpkg/upgrade_checklist.py b/slpkg/upgrade_checklist.py index dbc0048d..c421a99c 100644 --- a/slpkg/upgrade_checklist.py +++ b/slpkg/upgrade_checklist.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# upgrade_checklist.py file is part of slpkg. + +# Copyright 2014-2022 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.dialog_box import DialogUtil from slpkg.splitting import split_package diff --git a/slpkg/url_read.py b/slpkg/url_read.py index d6898b6b..4ca4f420 100644 --- a/slpkg/url_read.py +++ b/slpkg/url_read.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# url_read.py file is part of slpkg. + +# Copyright 2014-2022 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 . + import urllib3 diff --git a/slpkg/utils.py b/slpkg/utils.py index 527b27a0..db348080 100644 --- a/slpkg/utils.py +++ b/slpkg/utils.py @@ -1,8 +1,29 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# utils.py file is part of slpkg. + +# Copyright 2014-2022 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 . + import os +from collections import OrderedDict from slpkg.splitting import split_package @@ -29,6 +50,11 @@ class Utils: return one_list + def remove_dbs(self, double): + """Removes double item from list + """ + return list(OrderedDict.fromkeys(double)) + def read_file(self, registry): """Returns reading file """ diff --git a/slpkg/version.py b/slpkg/version.py index 20cf95e4..eed320f7 100644 --- a/slpkg/version.py +++ b/slpkg/version.py @@ -1,6 +1,26 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# version.py file is part of slpkg. + +# Copyright 2014-2022 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.__metadata__ import MetaData as m