update source

This commit is contained in:
Dimitris Zlatanidis 2014-08-30 07:54:11 +03:00
parent 676c73869f
commit 8ae8797cc8
4 changed files with 29 additions and 38 deletions

View file

@ -69,7 +69,7 @@ sbo_tag = "_SBo"
sbo_filetype = ".tgz"
''' Slackware architectures '''
slack_archs = (
slack_archs = [
"-noarch-",
"-x86_64-",
"-i386-",
@ -77,5 +77,5 @@ slack_archs = (
"-i686-",
"-x86-",
"-fw-"
)
]

View file

@ -22,32 +22,23 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
'''
_ _
___| |_ __ | | ____ _
/ __| | '_ \| |/ / _` |
\__ \ | |_) | < (_| |
|___/_| .__/|_|\_\__, |
|_| |___/
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 [...]]
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 [...]]
Utility for easy management packages in Slackware
optional arguments:
-h, --help show this help message and exit
-v, --verbose print version and exit
-a script [source ...]
-a script [sources ...]
auto build packages
-l all, sbo, slack, noarch, other [all, sbo, slack, noarch, other ...]
-l all, sbo, slack, noarch
list of installed packages
-c sbo, slack [sbo, slack ...]
-c sbo, slack [<upgrade> ...]
check if your packages is up to date
-s sbo, slack [sbo, slack ...]
-s sbo, slack [<package> ...]
download, build & install packages
-t packages tracking dependencies from SBo
-n view packages from SBo repository
@ -63,20 +54,20 @@ optional arguments:
import getpass
import argparse
from version import *
from functions import *
from colors import colors
from __metadata__ import path
from messages import ext_err_args, s_user
from messages import err1_args, err2_args
from functions import get_file
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.build import build_package
from sbo.slackbuild import *
from sbo.dependency import *
from sbo.check import sbo_check
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.install import install

View file

@ -145,10 +145,10 @@ def install(slack_pkg):
print("Packages removed")
else:
print("\nThere are packages in directory {0}\n".format(
tmp_path))
tmp_path))
else:
print("\nThere are packages in directory {0}\n".format(
tmp_path))
tmp_path))
else:
message = "No matching"
pkg_not_found("", slack_pkg, message, "\n")

View file

@ -45,12 +45,12 @@ def patches():
comp_sum, uncomp_sum = [], []
dwn_patches, comp_size, uncomp_size = [], [], []
upgrade_all, package_name, package_location = [], [], []
pch_path = slpkg_tmp + "patches/"
patch_path = slpkg_tmp + "patches/"
slack_arch = ""
if not os.path.exists(pch_path):
if not os.path.exists(patch_path):
if not os.path.exists(slpkg_tmp):
os.mkdir(slpkg_tmp)
os.mkdir(pch_path)
os.mkdir(patch_path)
sys.stdout.write ("Reading package lists ...")
sys.stdout.flush()
PACKAGE_TXT = url_read(mirrors(name="PACKAGES.TXT", location="patches/"))
@ -119,11 +119,11 @@ def patches():
if read == "Y" or read == "y":
for dwn in dwn_patches:
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:
print("{0}[ upgrading ] --> {1}{2}".format(
colors.GREEN, colors.ENDC, pkg[:-4]))
pkg_upgrade((pch_path + pkg).split())
pkg_upgrade((patch_path + pkg).split())
for kernel in upgrade_all:
if "kernel" in kernel:
print("The kernel has been upgraded, reinstall `lilo` ...")
@ -133,14 +133,14 @@ def patches():
read = raw_input("Removal downloaded packages [Y/n]? ")
if read == "Y" or read == "y":
for pkg in upgrade_all:
os.remove(pch_path + pkg)
os.remove(pch_path + pkg + ".asc")
if os.listdir(pch_path) == []:
os.remove(patch_path + pkg)
os.remove(patch_path + pkg + ".asc")
if os.listdir(patch_path) == []:
print("Packages removed")
else:
print("\nThere are packages in direcrory {0}\n".format(pch_path))
print("\nThere are packages in direcrory {0}\n".format(patch_path))
else:
print("\nThere are packages in directory {0}\n".format(pch_path))
print("\nThere are packages in directory {0}\n".format(patch_path))
else:
if os.uname()[4] == "x86_64":
slack_arch = 64