mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-30 20:34:38 +01:00
update source
This commit is contained in:
parent
676c73869f
commit
8ae8797cc8
4 changed files with 29 additions and 38 deletions
|
@ -69,7 +69,7 @@ sbo_tag = "_SBo"
|
||||||
sbo_filetype = ".tgz"
|
sbo_filetype = ".tgz"
|
||||||
|
|
||||||
''' Slackware architectures '''
|
''' Slackware architectures '''
|
||||||
slack_archs = (
|
slack_archs = [
|
||||||
"-noarch-",
|
"-noarch-",
|
||||||
"-x86_64-",
|
"-x86_64-",
|
||||||
"-i386-",
|
"-i386-",
|
||||||
|
@ -77,5 +77,5 @@ slack_archs = (
|
||||||
"-i686-",
|
"-i686-",
|
||||||
"-x86-",
|
"-x86-",
|
||||||
"-fw-"
|
"-fw-"
|
||||||
)
|
]
|
||||||
|
|
||||||
|
|
|
@ -22,32 +22,23 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
'''
|
'''
|
||||||
_ _
|
usage: slpkg [-h] [-v] [-a script [sources ...]]
|
||||||
___| |_ __ | | ____ _
|
[-l all, sbo, slack, noarch] [-c sbo, slack [<upgrade> ...]]
|
||||||
/ __| | '_ \| |/ / _` |
|
[-s sbo, slack [<package> ...]] [-t] [-n] [-i [...]]
|
||||||
\__ \ | |_) | < (_| |
|
[-u [...]] [-o [...]] [-r [...]] [-f [...]] [-d [...]]
|
||||||
|___/_| .__/|_|\_\__, |
|
|
||||||
|_| |___/
|
|
||||||
|
|
||||||
|
|
||||||
usage: slpkg [-h] [-v] [-a script [source ...]]
|
|
||||||
[-l all, sbo, slack, noarch, other]
|
|
||||||
[-c sbo, slack [sbo, slack ...]]
|
|
||||||
[-s sbo, slack [sbo, slack ...]] [-t] [-n] [-i [...]]
|
|
||||||
[-u [...]] [-o [...]] [-r [...]] [-f [...]] [-d [...]]
|
|
||||||
|
|
||||||
Utility for easy management packages in Slackware
|
Utility for easy management packages in Slackware
|
||||||
|
|
||||||
optional arguments:
|
optional arguments:
|
||||||
-h, --help show this help message and exit
|
-h, --help show this help message and exit
|
||||||
-v, --verbose print version and exit
|
-v, --verbose print version and exit
|
||||||
-a script [source ...]
|
-a script [sources ...]
|
||||||
auto build packages
|
auto build packages
|
||||||
-l all, sbo, slack, noarch, other [all, sbo, slack, noarch, other ...]
|
-l all, sbo, slack, noarch
|
||||||
list of installed packages
|
list of installed packages
|
||||||
-c sbo, slack [sbo, slack ...]
|
-c sbo, slack [<upgrade> ...]
|
||||||
check if your packages is up to date
|
check if your packages is up to date
|
||||||
-s sbo, slack [sbo, slack ...]
|
-s sbo, slack [<package> ...]
|
||||||
download, build & install packages
|
download, build & install packages
|
||||||
-t packages tracking dependencies from SBo
|
-t packages tracking dependencies from SBo
|
||||||
-n view packages from SBo repository
|
-n view packages from SBo repository
|
||||||
|
@ -63,20 +54,20 @@ optional arguments:
|
||||||
import getpass
|
import getpass
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
from version import *
|
|
||||||
from functions import *
|
|
||||||
from colors import colors
|
from colors import colors
|
||||||
from __metadata__ import path
|
from __metadata__ import path
|
||||||
from messages import ext_err_args, s_user
|
from functions import get_file
|
||||||
from messages import err1_args, err2_args
|
from version import prog_version
|
||||||
|
from messages import (ext_err_args, s_user,
|
||||||
|
err1_args, err2_args)
|
||||||
|
|
||||||
from pkg.build import build_package
|
|
||||||
from pkg.manager import *
|
from pkg.manager import *
|
||||||
|
from pkg.build import build_package
|
||||||
|
|
||||||
from sbo.slackbuild import *
|
|
||||||
from sbo.dependency import *
|
|
||||||
from sbo.check import sbo_check
|
from sbo.check import sbo_check
|
||||||
from sbo.views import sbo_network
|
from sbo.views import sbo_network
|
||||||
|
from sbo.slackbuild import sbo_build
|
||||||
|
from sbo.dependency import pkg_tracking
|
||||||
|
|
||||||
from slack.patches import patches
|
from slack.patches import patches
|
||||||
from slack.install import install
|
from slack.install import install
|
||||||
|
|
|
@ -145,10 +145,10 @@ def install(slack_pkg):
|
||||||
print("Packages removed")
|
print("Packages removed")
|
||||||
else:
|
else:
|
||||||
print("\nThere are packages in directory {0}\n".format(
|
print("\nThere are packages in directory {0}\n".format(
|
||||||
tmp_path))
|
tmp_path))
|
||||||
else:
|
else:
|
||||||
print("\nThere are packages in directory {0}\n".format(
|
print("\nThere are packages in directory {0}\n".format(
|
||||||
tmp_path))
|
tmp_path))
|
||||||
else:
|
else:
|
||||||
message = "No matching"
|
message = "No matching"
|
||||||
pkg_not_found("", slack_pkg, message, "\n")
|
pkg_not_found("", slack_pkg, message, "\n")
|
||||||
|
|
|
@ -45,12 +45,12 @@ def patches():
|
||||||
comp_sum, uncomp_sum = [], []
|
comp_sum, uncomp_sum = [], []
|
||||||
dwn_patches, comp_size, uncomp_size = [], [], []
|
dwn_patches, comp_size, uncomp_size = [], [], []
|
||||||
upgrade_all, package_name, package_location = [], [], []
|
upgrade_all, package_name, package_location = [], [], []
|
||||||
pch_path = slpkg_tmp + "patches/"
|
patch_path = slpkg_tmp + "patches/"
|
||||||
slack_arch = ""
|
slack_arch = ""
|
||||||
if not os.path.exists(pch_path):
|
if not os.path.exists(patch_path):
|
||||||
if not os.path.exists(slpkg_tmp):
|
if not os.path.exists(slpkg_tmp):
|
||||||
os.mkdir(slpkg_tmp)
|
os.mkdir(slpkg_tmp)
|
||||||
os.mkdir(pch_path)
|
os.mkdir(patch_path)
|
||||||
sys.stdout.write ("Reading package lists ...")
|
sys.stdout.write ("Reading package lists ...")
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
PACKAGE_TXT = url_read(mirrors(name="PACKAGES.TXT", location="patches/"))
|
PACKAGE_TXT = url_read(mirrors(name="PACKAGES.TXT", location="patches/"))
|
||||||
|
@ -119,11 +119,11 @@ def patches():
|
||||||
if read == "Y" or read == "y":
|
if read == "Y" or read == "y":
|
||||||
for dwn in dwn_patches:
|
for dwn in dwn_patches:
|
||||||
subprocess.call("wget -N --directory-prefix={0} {1} {2}.asc".format(
|
subprocess.call("wget -N --directory-prefix={0} {1} {2}.asc".format(
|
||||||
pch_path, dwn, dwn), shell=True)
|
patch_path, dwn, dwn), shell=True)
|
||||||
for pkg in upgrade_all:
|
for pkg in upgrade_all:
|
||||||
print("{0}[ upgrading ] --> {1}{2}".format(
|
print("{0}[ upgrading ] --> {1}{2}".format(
|
||||||
colors.GREEN, colors.ENDC, pkg[:-4]))
|
colors.GREEN, colors.ENDC, pkg[:-4]))
|
||||||
pkg_upgrade((pch_path + pkg).split())
|
pkg_upgrade((patch_path + pkg).split())
|
||||||
for kernel in upgrade_all:
|
for kernel in upgrade_all:
|
||||||
if "kernel" in kernel:
|
if "kernel" in kernel:
|
||||||
print("The kernel has been upgraded, reinstall `lilo` ...")
|
print("The kernel has been upgraded, reinstall `lilo` ...")
|
||||||
|
@ -133,14 +133,14 @@ def patches():
|
||||||
read = raw_input("Removal downloaded packages [Y/n]? ")
|
read = raw_input("Removal downloaded packages [Y/n]? ")
|
||||||
if read == "Y" or read == "y":
|
if read == "Y" or read == "y":
|
||||||
for pkg in upgrade_all:
|
for pkg in upgrade_all:
|
||||||
os.remove(pch_path + pkg)
|
os.remove(patch_path + pkg)
|
||||||
os.remove(pch_path + pkg + ".asc")
|
os.remove(patch_path + pkg + ".asc")
|
||||||
if os.listdir(pch_path) == []:
|
if os.listdir(patch_path) == []:
|
||||||
print("Packages removed")
|
print("Packages removed")
|
||||||
else:
|
else:
|
||||||
print("\nThere are packages in direcrory {0}\n".format(pch_path))
|
print("\nThere are packages in direcrory {0}\n".format(patch_path))
|
||||||
else:
|
else:
|
||||||
print("\nThere are packages in directory {0}\n".format(pch_path))
|
print("\nThere are packages in directory {0}\n".format(patch_path))
|
||||||
else:
|
else:
|
||||||
if os.uname()[4] == "x86_64":
|
if os.uname()[4] == "x86_64":
|
||||||
slack_arch = 64
|
slack_arch = 64
|
||||||
|
|
Loading…
Add table
Reference in a new issue