mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-29 20:34:22 +01:00
updated 1682014
This commit is contained in:
parent
cea6787181
commit
fcc56bceb3
9 changed files with 15 additions and 19 deletions
|
@ -10,7 +10,6 @@
|
|||
Slpkg is a terminal multitool in order to easy use `Slackware <http://www.slackware.com/>`_
|
||||
packages.
|
||||
|
||||
|
||||
Features
|
||||
========
|
||||
|
||||
|
|
|
@ -61,6 +61,8 @@ optional arguments:
|
|||
'''
|
||||
|
||||
import argparse
|
||||
import getpass
|
||||
|
||||
from version import *
|
||||
from functions import *
|
||||
from colors import colors
|
||||
|
@ -113,14 +115,17 @@ def main():
|
|||
if args.verbose:
|
||||
prog_version()
|
||||
if args.a:
|
||||
s_user(getpass.getuser())
|
||||
build_package(args.a[0], args.a[1], args.a[2:], path)
|
||||
if args.l:
|
||||
pkg_list(args.l)
|
||||
if args.t:
|
||||
pkg_tracking(args.t)
|
||||
if args.n:
|
||||
s_user(getpass.getuser())
|
||||
sbo_network(args.n)
|
||||
if args.c:
|
||||
s_user(getpass.getuser())
|
||||
if len(args.c) == 2:
|
||||
if "sbo" in args.c:
|
||||
sbo_check("".join(args.c[1]))
|
||||
|
@ -147,6 +152,7 @@ def main():
|
|||
ext_err_args()
|
||||
err2_args()
|
||||
if args.s:
|
||||
s_user(getpass.getuser())
|
||||
if len(args.s) == 2:
|
||||
if "sbo" in args.s:
|
||||
sbo_build("".join(args.s[1]))
|
||||
|
@ -168,12 +174,16 @@ def main():
|
|||
ext_err_args()
|
||||
err2_args()
|
||||
if args.i:
|
||||
s_user(getpass.getuser())
|
||||
pkg_install(args.i)
|
||||
if args.u:
|
||||
s_user(getpass.getuser())
|
||||
pkg_upgrade(args.u)
|
||||
if args.o:
|
||||
s_user(getpass.getuser())
|
||||
pkg_reinstall(args.o)
|
||||
if args.r:
|
||||
s_user(getpass.getuser())
|
||||
pkg_remove(args.r)
|
||||
if args.f:
|
||||
pkg_find(args.f)
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
import os
|
||||
import sys
|
||||
import shutil
|
||||
import getpass
|
||||
import tarfile
|
||||
import subprocess
|
||||
|
||||
|
@ -34,7 +33,6 @@ def build_package(script, source, extra, path):
|
|||
'''
|
||||
Build package from source
|
||||
'''
|
||||
s_user(getpass.getuser())
|
||||
pkg_name = script.replace(".tar.gz", "")
|
||||
try:
|
||||
tar = tarfile.open(script)
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
|
||||
import os
|
||||
import sys
|
||||
import getpass
|
||||
import subprocess
|
||||
|
||||
from collections import OrderedDict
|
||||
|
@ -38,7 +37,6 @@ def pkg_install(binary):
|
|||
'''
|
||||
Install Slackware binary packages
|
||||
'''
|
||||
s_user(getpass.getuser())
|
||||
for pkg in binary:
|
||||
try:
|
||||
print subprocess.check_output('installpkg {0}'.format(pkg), shell=True)
|
||||
|
@ -54,7 +52,6 @@ def pkg_upgrade(binary):
|
|||
'''
|
||||
Upgrade Slackware binary packages
|
||||
'''
|
||||
s_user(getpass.getuser())
|
||||
for pkg in binary:
|
||||
try:
|
||||
print subprocess.check_output('upgradepkg --install-new {0}'.format(pkg),
|
||||
|
@ -71,7 +68,6 @@ def pkg_reinstall(binary):
|
|||
'''
|
||||
Reinstall Slackware binary packages
|
||||
'''
|
||||
s_user(getpass.getuser())
|
||||
for pkg in binary:
|
||||
try:
|
||||
print subprocess.check_output('upgradepkg --reinstall {0}'.format(pkg),
|
||||
|
@ -88,7 +84,6 @@ def pkg_remove(binary):
|
|||
'''
|
||||
Remove Slackware binary packages
|
||||
'''
|
||||
s_user(getpass.getuser())
|
||||
dep_path = log_path + "dep/"
|
||||
removed, not_found, dependencies, rmv_dependencies = [], [], [], []
|
||||
print("\nPackages with name matching [ {0}{1}{2} ]\n".format(
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import sys
|
||||
import getpass
|
||||
|
||||
from colors import colors
|
||||
from __metadata__ import pkg_path, sp
|
||||
|
@ -66,7 +65,6 @@ def pkg_tracking(name):
|
|||
'''
|
||||
Print tree of dependencies
|
||||
'''
|
||||
s_user(getpass.getuser())
|
||||
sys.stdout.write("Reading package lists ...")
|
||||
dependencies_list = sbo_dependencies_pkg(name)
|
||||
if dependencies_list is None:
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import os
|
||||
import getpass
|
||||
|
||||
from messages import s_user
|
||||
from url_read import url_read
|
||||
|
@ -39,7 +38,6 @@ def read_readme(sbo_url, name, site):
|
|||
'''
|
||||
Read SlackBuild README file
|
||||
'''
|
||||
s_user(getpass.getuser())
|
||||
readme = url_read(sbo_url + site)
|
||||
f = open("{0}{1}.{2}".format(rdm_path, name, site), "w")
|
||||
f.write(readme)
|
||||
|
@ -49,7 +47,6 @@ def read_info_slackbuild(sbo_url, name, site):
|
|||
'''
|
||||
Read info SlackBuild file
|
||||
'''
|
||||
s_user(getpass.getuser())
|
||||
info = url_read(sbo_url + name + site)
|
||||
f = open("{0}{1}{2}".format(rdm_path, name, site), "w")
|
||||
f.write(info)
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
|
||||
import os
|
||||
import sys
|
||||
import getpass
|
||||
import subprocess
|
||||
|
||||
from colors import colors
|
||||
|
@ -47,7 +46,6 @@ def sbo_build(name):
|
|||
Download, build and upgrade packages with all
|
||||
dependencies
|
||||
'''
|
||||
s_user(getpass.getuser())
|
||||
sys.stdout.write("Building dependency tree ...")
|
||||
dependencies_list = sbo_dependencies_pkg(name)
|
||||
if dependencies_list == None:
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
import os
|
||||
import sys
|
||||
import time
|
||||
import getpass
|
||||
import subprocess
|
||||
|
||||
from colors import colors
|
||||
|
@ -42,7 +41,6 @@ def install(slack_pkg):
|
|||
Install packages from official Slackware distribution
|
||||
'''
|
||||
try:
|
||||
s_user(getpass.getuser())
|
||||
dwn_list, dwn_packages = [], []
|
||||
install_all, package_name, package_location = [], [], []
|
||||
pkg_path = slpkg_tmp + "packages/"
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
import os
|
||||
import sys
|
||||
import time
|
||||
import getpass
|
||||
import subprocess
|
||||
|
||||
from colors import colors
|
||||
|
@ -43,7 +42,6 @@ def patches():
|
|||
Install new patches from official Slackware mirrors
|
||||
'''
|
||||
try:
|
||||
s_user(getpass.getuser())
|
||||
dwn_list, dwn_patches = [], []
|
||||
upgrade_all, package_name, package_location = [], [], []
|
||||
pch_path = slpkg_tmp + "patches/"
|
||||
|
@ -90,6 +88,11 @@ def patches():
|
|||
print("{0}[ upgrading ] --> {1}{2}".format(
|
||||
colors.GREEN, colors.ENDC, pkg))
|
||||
pkg_upgrade((pch_path + pkg).split())
|
||||
for kernel in upgrade_all:
|
||||
if "kernel" in kernel:
|
||||
print("kernel updating run automatacaly lilo as recomanded")
|
||||
subprocess.call("lilo", shell=True)
|
||||
break
|
||||
read = raw_input("Removal downloaded packages [Y/n]? ")
|
||||
if read == "Y" or read == "y":
|
||||
for pkg in upgrade_all:
|
||||
|
|
Loading…
Add table
Reference in a new issue