mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-30 20:34:38 +01:00
add mirrors file
This commit is contained in:
parent
bb2860f942
commit
2f31b2eb6d
29 changed files with 305 additions and 49 deletions
183
conf/slackware-mirrors
Normal file
183
conf/slackware-mirrors
Normal file
|
@ -0,0 +1,183 @@
|
|||
# List of Slackware Mirrors copy from :
|
||||
# http://mirrors.slackware.com/mirrorlist/
|
||||
#
|
||||
# slackware-mirrors file is part of slpkg.
|
||||
#
|
||||
# Copyright 2014 Dimitris Zlatanidis <d.zlatanidis@gmail.com>
|
||||
# All rights reserved.
|
||||
#
|
||||
# Utility for easy management packages in Slackware
|
||||
#
|
||||
# https://github.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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# END OF LEGAL NOTICE
|
||||
#
|
||||
#
|
||||
# Slpkg uses the central mirror "http://mirrors.slackware.com/slackware/"
|
||||
# to find the nearest one. If however for some reason this troublesome
|
||||
# please uncomment (remove the '#' character) only one mirror from
|
||||
# the list available below. You can also add a new mirror in the list
|
||||
# below. Be careful is the template that the rest.
|
||||
#
|
||||
#
|
||||
# Last Updated: Wed Nov 19 05:47:02 UTC 2014
|
||||
#
|
||||
# Available http mirrors:
|
||||
#
|
||||
# au http://ftp.swin.edu.au/slackware/
|
||||
# au http://mirror.aarnet.edu.au/pub/slackware/
|
||||
# au http://mirror.internode.on.net/pub/slackware/
|
||||
# au http://syd.mirror.rackspace.com/slackware/
|
||||
# be http://ftp.belnet.be/ftp.slackware.com/
|
||||
# bg http://mirrors.unixsol.org/slackware/
|
||||
# bg http://slackware.telecoms.bg/slackware/
|
||||
# bg http://x.ultranet.biz/slackware/
|
||||
# br http://linorg.usp.br/slackware/
|
||||
# br http://mirror.ic.ufmt.br/slackware/
|
||||
# ca http://mirror.csclub.uwaterloo.ca/slackware/
|
||||
# ca http://mirror.its.dal.ca/slackware/
|
||||
# cn http://mirror.bjtu.edu.cn/slackware/
|
||||
# cz http://mirror.oss.maxcdn.com/slackware/
|
||||
# de http://ftp5.gwdg.de/pub/linux/slackware/
|
||||
# de http://mirror.netcologne.de/slackware/
|
||||
# ec http://mirror.cedia.org.ec/slackware/
|
||||
# fr http://slackware.mirrors.ovh.net/ftp.slackware.com/
|
||||
# gb http://lon.mirror.rackspace.com/slackware/
|
||||
# gb http://mirror.bytemark.co.uk/slackware/
|
||||
# gb http://slackware.org.uk/slackware/
|
||||
# gb http://www.mirrorservice.org/sites/ftp.slackware.com/pub/slackware/
|
||||
# gr http://ftp.cc.uoc.gr/mirrors/linux/slackware/
|
||||
# hk http://hkg.mirror.rackspace.com/slackware/
|
||||
# hr http://mirror.slackware.hr/slackware/
|
||||
# id http://iso.ukdw.ac.id/slackware/
|
||||
# id http://mirrors.gudangteknologi.com/slackware
|
||||
# id http://repo.ukdw.ac.id/slackware/
|
||||
# ie http://ftp.heanet.ie/mirrors/ftp.slackware.com/pub/slackware/
|
||||
# it http://slackware.muzzy.it/
|
||||
# jp http://ftp.nara.wide.ad.jp/pub/Linux/slackware/
|
||||
# lt http://atviras.lt/veidrodziai/slackware/
|
||||
# lt http://slackware.laukas.lt
|
||||
# mk http://slackware.blizoo.mk/slackware/
|
||||
# nc http://mirror.lagoon.nc/pub/slackware/
|
||||
# nl http://ftp.bit.nl/mirror/slackware/
|
||||
# nl http://mirror.nl.leaseweb.net/slackware/
|
||||
# nl http://slackware.bokxing-it.nl/mirror/
|
||||
# no http://ftp.slackware.no/slackware/
|
||||
# nz http://ftp.slackware.org.nz/slackware/
|
||||
# ph http://mirror.pregi.net/slackware/
|
||||
# pl http://ftp.slackware.pl/pub/slackware/
|
||||
# pl http://piotrkosoft.net/pub/mirrors/ftp.slackware.com/pub/slackware/
|
||||
# pl http://sunsite.icm.edu.pl/pub/Linux/slackware/
|
||||
# pt http://darkstar.ist.utl.pt/slackware/
|
||||
# pt http://ftp.rnl.tecnico.ulisboa.pt/pub/slackware/
|
||||
# ru http://mirror.corbina.net/slackware/
|
||||
# ru http://mirror.yandex.ru/slackware/
|
||||
# ru http://slackware.tsu.ru/slackware/
|
||||
# sk http://mirror.wheel.sk/slackware/
|
||||
# tr http://ftp.linux.org.tr/slackware/
|
||||
# tw http://ftp.yzu.edu.tw/Linux/Slackware/
|
||||
# ua http://ifconfig.com.ua/slackware/
|
||||
# ua http://mirror.linux.lg.ua/slackware/
|
||||
# ua http://mirrors.nix.org.ua/linux/slackware/
|
||||
# us http://carroll.cac.psu.edu/pub/linux/distributions/slackware
|
||||
# us http://dfw.mirror.rackspace.com/slackware/
|
||||
# us http://ftp.gtlib.gatech.edu/pub/slackware/
|
||||
# us http://ftp.slackware.com/pub/slackware/
|
||||
# us http://lug.mtu.edu/slackware/
|
||||
# us http://mirror.lug.udel.edu/pub/slackware/
|
||||
# us http://mirror.metrocast.net/slackware/
|
||||
# us http://mirror.nexcess.net/slackware/
|
||||
# us http://mirror.pw/slackware/
|
||||
# us http://mirror.quintex.com/slackware/
|
||||
# us http://mirrors.kingrst.com/slackware/
|
||||
# us http://mirrors.xmission.com/slackware/
|
||||
# us http://mirrors1.kernel.org/slackware/
|
||||
# us http://mirrors2.kernel.org/slackware/
|
||||
# us http://mirrors3.kernel.org/slackware/
|
||||
# us http://mirrors4.kernel.org/slackware/
|
||||
# us http://slackblog.com/slackware/
|
||||
# us http://slackbuilds.org/mirror/slackware/
|
||||
# us http://slackware.cs.utah.edu/
|
||||
# us http://slackware.mirrorcatalogs.com/
|
||||
# us http://slackware.mirrors.tds.net/pub/slackware/
|
||||
# us http://taper.alienbase.nl/mirrors/slackware/
|
||||
# za http://ftp.is.co.za/mirror/ftp.slackware.com/pub/
|
||||
# za http://ftp.wa.co.za/pub/slackware/
|
||||
# za http://slackware.mirror.ac.za/
|
||||
#
|
||||
# Available ftp mirrors:
|
||||
#
|
||||
# au ftp://ftp.swin.edu.au/slackware/
|
||||
# au ftp://mirror.aarnet.edu.au/pub/slackware/
|
||||
# au ftp://mirror.internode.on.net/pub/slackware/
|
||||
# au ftp://syd.mirror.rackspace.com/slackware/
|
||||
# be ftp://ftp.belnet.be/mirror/ftp.slackware.com/
|
||||
# bg ftp://mirrors.unixsol.org/slackware/
|
||||
# bg ftp://slackware.telecoms.bg/slackware/
|
||||
# br ftp://linorg.usp.br/slackware/
|
||||
# ca ftp://mirror.csclub.uwaterloo.ca/slackware/
|
||||
# ca ftp://mirror.its.dal.ca/slackware/
|
||||
# cz ftp://mirror.oss.maxcdn.com/slackware/
|
||||
# de ftp://ftp5.gwdg.de/pub/linux/slackware/
|
||||
# de ftp://mirror.netcologne.de/slackware/
|
||||
# ec ftp://mirror.cedia.org.ec/slackware/
|
||||
# fr ftp://slackware.mirrors.ovh.net/ftp.slackware.com/
|
||||
# gb ftp://ftp.mirrorservice.org/sites/ftp.slackware.com/pub/slackware/
|
||||
# gb ftp://ftp.slackware.org.uk/slackware
|
||||
# gb ftp://lon.mirror.rackspace.com/slackware/
|
||||
# gb ftp://mirror.bytemark.co.uk/slackware/
|
||||
# gr ftp://ftp.cc.uoc.gr/mirrors/linux/slackware/
|
||||
# hk ftp://hkg.mirror.rackspace.com/slackware/
|
||||
# hr ftp://mirror.slackware.hr/slackware/
|
||||
# ie ftp://ftp.heanet.ie/mirrors/ftp.slackware.com/pub/slackware/
|
||||
# it ftp://slackware.muzzy.it/slackware/
|
||||
# jp ftp://ftp.nara.wide.ad.jp/pub/Linux/slackware/
|
||||
# nc ftp://mirror.lagoon.nc/pub/slackware/
|
||||
# nl ftp://ftp.bit.nl/mirror/slackware/
|
||||
# nl ftp://mirror.nl.leaseweb.net/slackware/
|
||||
# no ftp://ftp.slackware.no/slackware/
|
||||
# nz ftp://ftp.slackware.org.nz/slackware/
|
||||
# ph ftp://mirror.pregi.net/slackware/
|
||||
# pl ftp://ftp.piotrkosoft.net/pub/mirrors/ftp.slackware.com/pub/slackware/
|
||||
# pl ftp://ftp.slackware.pl/pub/slackware/
|
||||
# pl ftp://sunsite.icm.edu.pl/pub/Linux/slackware/
|
||||
# pt ftp://darkstar.ist.utl.pt/pub/slackware/
|
||||
# pt ftp://ftp.rnl.tecnico.ulisboa.pt/pub/slackware/
|
||||
# ru ftp://mirror.corbina.net/slackware/
|
||||
# ru ftp://mirror.yandex.ru/slackware/
|
||||
# ru ftp://slackware.tsu.ru/slackware/
|
||||
# tr ftp://ftp.linux.org.tr/slackware/
|
||||
# tw ftp://ftp.yzu.edu.tw/Linux/Slackware/
|
||||
# ua ftp://ifconfig.com.ua/pub/Mirror/slackware/
|
||||
# ua ftp://mirrors.nix.org.ua/linux/slackware/
|
||||
# us ftp://carroll.cac.psu.edu/pub/linux/distributions/slackware
|
||||
# us ftp://dfw.mirror.rackspace.com/slackware/
|
||||
# us ftp://ftp.gtlib.gatech.edu/pub/slackware
|
||||
# us ftp://ftp.lug.udel.edu/pub/slackware/
|
||||
# us ftp://ftp.slackware.com/pub/slackware/
|
||||
# us ftp://lug.mtu.edu/slackware/
|
||||
# us ftp://mirror.nexcess.net/slackware/
|
||||
# us ftp://mirror.quintex.com/slackware/
|
||||
# us ftp://mirrors.xmission.com/slackware/
|
||||
# us ftp://mirrors1.kernel.org/slackware/
|
||||
# us ftp://mirrors2.kernel.org/slackware/
|
||||
# us ftp://mirrors3.kernel.org/slackware/
|
||||
# us ftp://mirrors4.kernel.org/slackware/
|
||||
# us ftp://slackware.cs.utah.edu/slackware/
|
||||
# us ftp://slackware.mirrorcatalogs.com/
|
||||
# us ftp://slackware.mirrors.tds.net/pub/slackware
|
||||
# us ftp://taper.alienbase.nl/
|
||||
# za ftp://ftp.is.co.za/mirror/ftp.slackware.com/pub/
|
||||
# za ftp://ftp.wa.co.za/pub/slackware/
|
||||
# za ftp://slackware.mirror.ac.za/
|
|
@ -46,3 +46,12 @@ DEL_BUILD=off
|
|||
|
||||
# Keep build log file if SBO_BUILD_LOG is 'on'.
|
||||
SBO_BUILD_LOG=on
|
||||
|
||||
# Define default answer to slpkg questions.
|
||||
# Choose 'y' if you do not want to questions.
|
||||
DEFAULT_ANSWER=n
|
||||
|
||||
# Define default answer for the removal of dependencies.
|
||||
# Choose 'y' if you do not want to question.
|
||||
REMOVE_DEPS_ANSWER=n
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ from messages import s_user
|
|||
|
||||
__all__ = "slpkg"
|
||||
__author__ = "dslackw"
|
||||
__version_info__ = (2, 0, 5)
|
||||
__version_info__ = (2, 0, 6)
|
||||
__version__ = "{0}.{1}.{2}".format(*__version_info__)
|
||||
__license__ = "GNU General Public License v3 (GPLv3)"
|
||||
__email__ = "d.zlatanidis@gmail.com"
|
||||
|
@ -61,6 +61,8 @@ del_all = "on"
|
|||
sbo_check_md5 = "on"
|
||||
del_build = "off"
|
||||
sbo_build_log = "on"
|
||||
default_answer = "n"
|
||||
remove_deps_answer = "n"
|
||||
|
||||
for line in conf.splitlines():
|
||||
line = line.lstrip()
|
||||
|
@ -82,6 +84,10 @@ for line in conf.splitlines():
|
|||
sbo_check_md5 = line[14:].strip()
|
||||
if line.startswith("SBO_BUILD_LOG"):
|
||||
sbo_build_log = line[14:].strip()
|
||||
if line.startswith("DEFAULT_ANSWER"):
|
||||
default_answer = line[15:].strip()
|
||||
if line.startswith("REMOVE_DEPS_ANSWER"):
|
||||
remove_deps_answer = line[19:].strip()
|
||||
|
||||
# repositories
|
||||
repositories = [
|
||||
|
|
|
@ -82,7 +82,15 @@ def config_file():
|
|||
"DEL_BUILD=off\n",
|
||||
"\n",
|
||||
"# Keep build log file if SBO_BUILD_LOG is 'on'.\n",
|
||||
"SBO_BUILD_LOG=on\n"
|
||||
"SBO_BUILD_LOG=on\n",
|
||||
"\n",
|
||||
"# Define default answer to slpkg questions.\n",
|
||||
"# Choose 'y' if you do not want to questions.\n",
|
||||
"DEFAULT_ANSWER=n\n",
|
||||
"\n",
|
||||
"# Define default answer for the removal of dependencies.\n",
|
||||
"# Choose 'y' if you do not want to question.\n",
|
||||
"REMOVE_DEPS_ANSWER=n\n"
|
||||
]
|
||||
|
||||
if not os.path.exists("/etc/slpkg"):
|
||||
|
@ -113,7 +121,8 @@ class Config(object):
|
|||
'PATCHES',
|
||||
'DEL_ALL',
|
||||
'DEL_BUILD',
|
||||
'SBO_BUILD_LOG'
|
||||
'SBO_BUILD_LOG',
|
||||
'DEFAULT_ANSWER'
|
||||
]
|
||||
f = open(self.config_file, "r")
|
||||
read_conf = f.read()
|
||||
|
@ -129,5 +138,4 @@ class Config(object):
|
|||
'''
|
||||
Edit configuration file
|
||||
'''
|
||||
subprocess.call("{0} {1}".format(editor, self.config_file),
|
||||
shell=True)
|
||||
subprocess.call("{0} {1}".format(editor, self.config_file), shell=True)
|
||||
|
|
32
slpkg/others/check.py
Executable file → Normal file
32
slpkg/others/check.py
Executable file → Normal file
|
@ -24,27 +24,28 @@
|
|||
import os
|
||||
import sys
|
||||
|
||||
from sizes import units
|
||||
from repositories import Repo
|
||||
from messages import template
|
||||
from blacklist import BlackList
|
||||
from init import Initialization
|
||||
from splitting import split_package
|
||||
from colors import (
|
||||
from slpkg.sizes import units
|
||||
from slpkg.repositories import Repo
|
||||
from slpkg.messages import template
|
||||
from slpkg.blacklist import BlackList
|
||||
from slpkg.init import Initialization
|
||||
from slpkg.splitting import split_package
|
||||
from slpkg.colors import (
|
||||
YELLOW,
|
||||
GREY,
|
||||
ENDC
|
||||
)
|
||||
from __metadata__ import (
|
||||
from slpkg.__metadata__ import (
|
||||
pkg_path,
|
||||
lib_path,
|
||||
slpkg_tmp_packages
|
||||
slpkg_tmp_packages,
|
||||
default_answer
|
||||
)
|
||||
|
||||
from pkg.manager import PackageManager
|
||||
from slpkg.pkg.manager import PackageManager
|
||||
|
||||
from slack.remove import delete
|
||||
from slack.slack_version import slack_ver
|
||||
from slpkg.slack.remove import delete
|
||||
from slpkg.slack.slack_version import slack_ver
|
||||
|
||||
from greps import repo_data
|
||||
from download import packages_dwn
|
||||
|
@ -122,8 +123,11 @@ class OthersUpgrade(object):
|
|||
unit[0]))
|
||||
print("After this process, {0} {1} of additional disk "
|
||||
"space will be used.{2}".format(size[1], unit[1], ENDC))
|
||||
read = raw_input("\nWould you like to upgrade [Y/n]? ")
|
||||
if read in ['Y', 'y']:
|
||||
if default_answer == "y":
|
||||
answer = default_answer
|
||||
else:
|
||||
answer = raw_input("\nWould you like to continue [Y/n]? ")
|
||||
if answer in ['y', 'Y']:
|
||||
upgrade_all.reverse()
|
||||
packages_dwn(self.tmp_path, dwn_links)
|
||||
upgrade(self.tmp_path, upgrade_all)
|
||||
|
|
0
slpkg/others/dependency.py
Executable file → Normal file
0
slpkg/others/dependency.py
Executable file → Normal file
0
slpkg/others/download.py
Executable file → Normal file
0
slpkg/others/download.py
Executable file → Normal file
9
slpkg/others/greps.py
Executable file → Normal file
9
slpkg/others/greps.py
Executable file → Normal file
|
@ -24,11 +24,12 @@
|
|||
import os
|
||||
|
||||
from toolbar import status
|
||||
from init import Initialization
|
||||
from __metadata__ import lib_path
|
||||
from splitting import split_package
|
||||
from slack.slack_version import slack_ver
|
||||
|
||||
len_deps = 0
|
||||
|
||||
|
||||
def repo_data(PACKAGES_TXT, step, repo, version):
|
||||
'''
|
||||
|
@ -108,8 +109,6 @@ class Requires(object):
|
|||
def __init__(self, name, repo):
|
||||
self.name = name
|
||||
self.repo = repo
|
||||
if not os.path.isfile(lib_path + "slack_repo/PACKAGES.TXT"):
|
||||
Initialization().slack()
|
||||
lib = lib_path + "slack_repo/PACKAGES.TXT"
|
||||
f = open(lib, "r")
|
||||
self.SLACK_PACKAGES_TXT = f.read()
|
||||
|
@ -177,8 +176,10 @@ class Requires(object):
|
|||
that exist in the distribution Slackware, this feature is intended
|
||||
to remove them and return only those needed.
|
||||
'''
|
||||
global len_deps
|
||||
len_deps += len(dependencies)
|
||||
name, slacky_deps = [], []
|
||||
index, toolbar_width, step = 0, 700, 1800
|
||||
index, toolbar_width, step = 0, 700, (len_deps * 500)
|
||||
for line in self.SLACK_PACKAGES_TXT.splitlines():
|
||||
index += 1
|
||||
toolbar_width = status(index, toolbar_width, step)
|
||||
|
|
15
slpkg/others/install.py
Executable file → Normal file
15
slpkg/others/install.py
Executable file → Normal file
|
@ -45,7 +45,8 @@ from __metadata__ import (
|
|||
pkg_path,
|
||||
lib_path,
|
||||
log_path,
|
||||
slpkg_tmp_packages
|
||||
slpkg_tmp_packages,
|
||||
default_answer
|
||||
)
|
||||
|
||||
from pkg.find import find_package
|
||||
|
@ -98,6 +99,10 @@ class OthersInstall(object):
|
|||
'''
|
||||
Initialization repository if only use
|
||||
'''
|
||||
# initialization Slackware repository needed to compare
|
||||
# slacky dependencies
|
||||
if not os.path.isfile(lib_path + "slack_repo/PACKAGES.TXT"):
|
||||
Initialization().slack()
|
||||
repository = {
|
||||
"rlw": Initialization().rlw,
|
||||
"alien": Initialization().alien,
|
||||
|
@ -142,8 +147,12 @@ class OthersInstall(object):
|
|||
print("After this process, {0} {1} of additional disk "
|
||||
"space will be used.{2}".format(size[1], unit[1],
|
||||
ENDC))
|
||||
read = raw_input("\nWould you like to install [Y/n]? ")
|
||||
if read in ['Y', 'y']:
|
||||
if default_answer == "y":
|
||||
answer = default_answer
|
||||
else:
|
||||
answer = raw_input("\nWould you like to continue " +
|
||||
"[Y/n]? ")
|
||||
if answer in ['y', 'Y']:
|
||||
install_all.reverse()
|
||||
packages_dwn(self.tmp_path, dwn_links)
|
||||
install(self.tmp_path, install_all)
|
||||
|
|
0
slpkg/others/search.py
Executable file → Normal file
0
slpkg/others/search.py
Executable file → Normal file
0
slpkg/pkg/build.py
Executable file → Normal file
0
slpkg/pkg/build.py
Executable file → Normal file
0
slpkg/pkg/find.py
Executable file → Normal file
0
slpkg/pkg/find.py
Executable file → Normal file
22
slpkg/pkg/manager.py
Executable file → Normal file
22
slpkg/pkg/manager.py
Executable file → Normal file
|
@ -39,7 +39,9 @@ from colors import (
|
|||
from __metadata__ import (
|
||||
pkg_path,
|
||||
sp,
|
||||
log_path
|
||||
log_path,
|
||||
default_answer,
|
||||
remove_deps_answer
|
||||
)
|
||||
|
||||
from find import find_package
|
||||
|
@ -111,9 +113,12 @@ class PackageManager(object):
|
|||
if len(removed) > 1:
|
||||
msg = msg + "s"
|
||||
try:
|
||||
remove_pkg = raw_input(
|
||||
"\nAre you sure to remove {0} {1} [Y/n]? ".format(
|
||||
str(len(removed)), msg))
|
||||
if default_answer == "y":
|
||||
remove_pkg = default_answer
|
||||
else:
|
||||
remove_pkg = raw_input(
|
||||
"\nAre you sure to remove {0} {1} [Y/n]? ".format(
|
||||
str(len(removed)), msg))
|
||||
except KeyboardInterrupt:
|
||||
print("") # new line at exit
|
||||
sys.exit()
|
||||
|
@ -125,9 +130,12 @@ class PackageManager(object):
|
|||
if os.path.isfile(dep_path + rmv):
|
||||
dependencies = self.view_deps(dep_path, rmv)
|
||||
try:
|
||||
remove_dep = raw_input(
|
||||
"\nRemove dependencies (maybe used by other "
|
||||
"packages) [Y/n]? ")
|
||||
if remove_deps_answer == "y":
|
||||
remove_dep = remove_deps_answer
|
||||
else:
|
||||
remove_dep = raw_input(
|
||||
"\nRemove dependencies (maybe used by "
|
||||
"other packages) [Y/n]? ")
|
||||
except KeyboardInterrupt:
|
||||
print("") # new line at exit
|
||||
sys.exit()
|
||||
|
|
|
@ -22,6 +22,9 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
import os
|
||||
|
||||
|
||||
class Repo(object):
|
||||
|
||||
def __init__(self):
|
||||
|
@ -31,7 +34,16 @@ class Repo(object):
|
|||
'''
|
||||
Official slackware repository
|
||||
'''
|
||||
return "http://mirrors.slackware.com/slackware/"
|
||||
default = "http://mirrors.slackware.com/slackware/"
|
||||
if os.path.isfile("/etc/slpkg/slackware-mirrors"):
|
||||
with open("/etc/slpkg/slackware-mirrors", "r") as slacks:
|
||||
mirrors = slacks.read()
|
||||
slacks.close()
|
||||
for line in mirrors.splitlines():
|
||||
line = line.rstrip()
|
||||
if not line.startswith("#") and line:
|
||||
default = line.split()[-1]
|
||||
return default
|
||||
|
||||
def sbo(self):
|
||||
'''
|
||||
|
|
8
slpkg/sbo/check.py
Executable file → Normal file
8
slpkg/sbo/check.py
Executable file → Normal file
|
@ -47,6 +47,7 @@ from __metadata__ import (
|
|||
tmp,
|
||||
pkg_path,
|
||||
build_path,
|
||||
default_answer,
|
||||
sp
|
||||
)
|
||||
|
||||
|
@ -97,8 +98,11 @@ class SBoCheck(object):
|
|||
# message install = msg[0]
|
||||
# message upgrade = msg[1]
|
||||
count, msg = view_packages(data[1], data[2], data[3])
|
||||
read = raw_input("Would you like to upgrade [Y/n]? ")
|
||||
if read in ['y', 'Y']:
|
||||
if default_answer == "y":
|
||||
answer = default_answer
|
||||
else:
|
||||
answer = raw_input("Would you like to continue [Y/n]? ")
|
||||
if answer in ['y', 'Y']:
|
||||
os.chdir(build_path)
|
||||
for name, version in zip(data[0], data[2]):
|
||||
prgnam = ("{0}-{1}".format(name, version))
|
||||
|
|
0
slpkg/sbo/dependency.py
Executable file → Normal file
0
slpkg/sbo/dependency.py
Executable file → Normal file
0
slpkg/sbo/greps.py
Executable file → Normal file
0
slpkg/sbo/greps.py
Executable file → Normal file
0
slpkg/sbo/read.py
Executable file → Normal file
0
slpkg/sbo/read.py
Executable file → Normal file
0
slpkg/sbo/remove.py
Executable file → Normal file
0
slpkg/sbo/remove.py
Executable file → Normal file
0
slpkg/sbo/search.py
Executable file → Normal file
0
slpkg/sbo/search.py
Executable file → Normal file
16
slpkg/sbo/slackbuild.py
Executable file → Normal file
16
slpkg/sbo/slackbuild.py
Executable file → Normal file
|
@ -34,6 +34,7 @@ from __metadata__ import (
|
|||
build_path,
|
||||
log_path,
|
||||
lib_path,
|
||||
default_answer,
|
||||
sp
|
||||
)
|
||||
from colors import (
|
||||
|
@ -118,8 +119,9 @@ class SBoInstall(object):
|
|||
"{3} {4}".format(count[1], msg[0], idata[2], count[0],
|
||||
msg[1]))
|
||||
print("will be upgraded.{0}\n".format(ENDC))
|
||||
read = arch_support(idata[3], self.UNST, idata[2], dependencies)
|
||||
if read in['y', 'Y']:
|
||||
answer = arch_support(idata[3], self.UNST, idata[2],
|
||||
dependencies)
|
||||
if answer in['y', 'Y']:
|
||||
# installs = b_ins[0]
|
||||
# upgraded = b_ins[1]
|
||||
# versions = b_ins[2]
|
||||
|
@ -293,12 +295,14 @@ def arch_support(source, support, package_sum, dependencies):
|
|||
'''
|
||||
if source in support:
|
||||
print("{0}The package {1}{2}\n".format(RED, source, ENDC))
|
||||
read = ""
|
||||
answer = ""
|
||||
elif package_sum == len(dependencies):
|
||||
read = ""
|
||||
answer = ""
|
||||
elif default_answer == "y":
|
||||
answer = default_answer
|
||||
else:
|
||||
read = raw_input("Do you want to continue [Y/n]? ")
|
||||
return read
|
||||
answer = raw_input("Do you want to continue [Y/n]? ")
|
||||
return answer
|
||||
|
||||
|
||||
def dwn_sources(sources):
|
||||
|
|
0
slpkg/sbo/views.py
Executable file → Normal file
0
slpkg/sbo/views.py
Executable file → Normal file
0
slpkg/slack/download.py
Executable file → Normal file
0
slpkg/slack/download.py
Executable file → Normal file
0
slpkg/slack/greps.py
Executable file → Normal file
0
slpkg/slack/greps.py
Executable file → Normal file
10
slpkg/slack/install.py
Executable file → Normal file
10
slpkg/slack/install.py
Executable file → Normal file
|
@ -43,7 +43,8 @@ from colors import (
|
|||
from __metadata__ import (
|
||||
pkg_path,
|
||||
lib_path,
|
||||
slpkg_tmp_packages
|
||||
slpkg_tmp_packages,
|
||||
default_answer
|
||||
)
|
||||
|
||||
from pkg.find import find_package
|
||||
|
@ -104,8 +105,11 @@ class Slack(object):
|
|||
unit[0]))
|
||||
print("After this process, {0} {1} of additional disk space "
|
||||
"will be used.{2}".format(size[1], unit[1], ENDC))
|
||||
read = raw_input("\nWould you like to install [Y/n]? ")
|
||||
if read in ['y', 'Y']:
|
||||
if default_answer == "y":
|
||||
answer = default_answer
|
||||
else:
|
||||
answer = raw_input("\nWould you like to continue [Y/n]? ")
|
||||
if answer in ['y', 'Y']:
|
||||
slack_dwn(self.tmp_path, dwn_links)
|
||||
install(self.tmp_path, install_all)
|
||||
delete(self.tmp_path, install_all)
|
||||
|
|
0
slpkg/slack/mirrors.py
Executable file → Normal file
0
slpkg/slack/mirrors.py
Executable file → Normal file
10
slpkg/slack/patches.py
Executable file → Normal file
10
slpkg/slack/patches.py
Executable file → Normal file
|
@ -37,7 +37,8 @@ from colors import (
|
|||
)
|
||||
from __metadata__ import (
|
||||
pkg_path,
|
||||
slpkg_tmp_patches
|
||||
slpkg_tmp_patches,
|
||||
default_answer
|
||||
)
|
||||
|
||||
from pkg.manager import PackageManager
|
||||
|
@ -94,8 +95,11 @@ class Patches(object):
|
|||
unit[0]))
|
||||
print("After this process, {0} {1} of additional disk space "
|
||||
"will be used.{2}".format(size[1], unit[1], ENDC))
|
||||
read = raw_input("\nWould you like to upgrade [Y/n]? ")
|
||||
if read in ['y', 'Y']:
|
||||
if default_answer == "y":
|
||||
answer = default_answer
|
||||
else:
|
||||
answer = raw_input("\nWould you like to continue [Y/n]? ")
|
||||
if answer in ['y', 'Y']:
|
||||
slack_dwn(self.patch_path, dwn_links)
|
||||
upgrade(self.patch_path, upgrade_all)
|
||||
kernel(upgrade_all)
|
||||
|
|
0
slpkg/slack/remove.py
Executable file → Normal file
0
slpkg/slack/remove.py
Executable file → Normal file
|
@ -37,7 +37,7 @@ class URL(object):
|
|||
try:
|
||||
f = urllib2.urlopen(self.link)
|
||||
return f.read()
|
||||
except urllib2.URLError:
|
||||
except (urllib2.URLError, ValueError):
|
||||
print("\nslpkg: error: connection refused\n")
|
||||
sys.exit()
|
||||
except KeyboardInterrupt:
|
||||
|
|
Loading…
Add table
Reference in a new issue