mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-29 20:34:22 +01:00
update
This commit is contained in:
parent
c032848854
commit
73f3322d8b
13 changed files with 74 additions and 51 deletions
|
@ -1,5 +1,5 @@
|
|||
Version 2.1.5-dev
|
||||
26-12-2014
|
||||
27-12-2014
|
||||
|
||||
[Feature] - Added slacker.it, slackonly.com, Alien's ktown, Alien's multilib,
|
||||
Slacke E17 and E18, SalixOS and Slackel repositories.
|
||||
|
|
10
README.rst
10
README.rst
|
@ -89,10 +89,9 @@ The big advantages is resolving dependencies packages from repositories and moni
|
|||
upgraded packages.
|
||||
|
||||
Also you can install official packages of your favorite distribution directly from the
|
||||
official repositories
|
||||
of Slackware. Even you can check for the official updates and install them.
|
||||
official repositories of Slackware. Even you can check for the official updates and install them.
|
||||
|
||||
And as we say Slackers, Keep it Simple Stupid!
|
||||
More features come ...
|
||||
|
||||
.. image:: https://raw.githubusercontent.com/dslackw/images/master/slpkg/slpkg_package.png
|
||||
:target: https://github.com/dslackw/slpkg
|
||||
|
@ -273,6 +272,9 @@ and update the package lists:
|
|||
Update repository slonly ...Done
|
||||
Update repository ktown ...Done
|
||||
Update repository salix ..................Done
|
||||
Update repository slacke ...Done
|
||||
Update repository slackl ...Done
|
||||
Update repository multi ...Done
|
||||
|
||||
|
||||
Take information repositories with commands:
|
||||
|
@ -290,7 +292,7 @@ Take information repositories with commands:
|
|||
rlw http://rlworkman.net/pkgs/ enabled
|
||||
salix http://download.salixos.org/ enabled
|
||||
sbo http://slackbuilds.org/slackbuilds/ enabled
|
||||
slack http://ftp.cc.uoc.gr/mirrors/linux/slackware/ enabled
|
||||
slack http://mirrors.slackware.com/slackware/ enabled
|
||||
slacke http://ngc891.blogdns.net/pub/ enabled
|
||||
slackl http://www.slackel.gr/repo/ enabled
|
||||
slackr http://www.slackers.it/repository/ disabled
|
||||
|
|
4
THANKS
4
THANKS
|
@ -9,6 +9,10 @@ Willy Sudiarto Raharjo - https://github.com/willysr
|
|||
For the interesting and valuable advice around the systems of Slackware
|
||||
and SBo packages.
|
||||
|
||||
Kostas Nikiforakis - Tester
|
||||
|
||||
For the tests in his system.
|
||||
|
||||
LinuxQuestions.org - http://www.linuxquestions.org
|
||||
|
||||
In all members of the community of Slackware forum linuxquestions.org.
|
||||
|
|
|
@ -29,9 +29,9 @@
|
|||
# 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: Mon Dec 15 02:47:02 UTC 2014
|
||||
#
|
||||
#
|
||||
# Last Updated: Sat Dec 27 09:47:02 UTC 2014
|
||||
#
|
||||
# Available http mirrors:
|
||||
#
|
||||
|
@ -106,6 +106,7 @@
|
|||
# us http://mirrors2.kernel.org/slackware/
|
||||
# us http://mirrors3.kernel.org/slackware/
|
||||
# us http://mirrors4.kernel.org/slackware/
|
||||
# us http://reflect.cs.princeton.edu/slackware/
|
||||
# us http://slackblog.com/slackware/
|
||||
# us http://slackbuilds.org/mirror/slackware/
|
||||
# us http://slackware.cs.utah.edu/
|
||||
|
@ -182,4 +183,4 @@
|
|||
# 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/
|
||||
# za ftp://slackware.mirror.ac.za/
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
# Slackware version 'stable' or 'current'.
|
||||
VERSION=stable
|
||||
|
||||
# Choose repositories want to work. Read firts REPOSITORIES files.
|
||||
# Choose repositories want to work. Read first REPOSITORIES file.
|
||||
# Available repositories : slack,sbo,alien,rlw,slacky,studio,slackr,slonly,
|
||||
# ktown{latest},multi,slacke{18},salix,slackl
|
||||
# slackr (slackers.it) repository must used from Slackware64 current.
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
import sys
|
||||
|
||||
from repolist import RepoList
|
||||
from __metadata__ import (
|
||||
__version__,
|
||||
repositories
|
||||
|
@ -78,8 +79,14 @@ def options():
|
|||
def usage(repo):
|
||||
error_repo = ""
|
||||
if repo and repo not in repositories:
|
||||
error_repo = ("slpkg: error: repository '{0}' is not activated or "
|
||||
"does not exist\n".format(repo))
|
||||
all_repos = RepoList().all_repos
|
||||
del RepoList().all_repos
|
||||
if repo in all_repos:
|
||||
error_repo = ("slpkg: error: repository '{0}' is not activated"
|
||||
"\n".format(repo))
|
||||
else:
|
||||
error_repo = ("slpkg: error: repository '{0}' does not exist"
|
||||
"\n".format(repo))
|
||||
view = [
|
||||
"slpkg - version {0}\n".format(__version__),
|
||||
"Usage: slpkg [-h] [-v] [-a script.tar.gz [sources...]]",
|
||||
|
|
|
@ -536,7 +536,7 @@ class Initialization(object):
|
|||
class Update(object):
|
||||
|
||||
def __init__(self):
|
||||
self.repos = 'Initialization()'
|
||||
self._init = 'Initialization()'
|
||||
|
||||
def repository(self):
|
||||
'''
|
||||
|
@ -547,7 +547,7 @@ class Update(object):
|
|||
sys.stdout.write("{0}Update repository {1} ...{2}".format(
|
||||
color['GREY'], repo, color['ENDC']))
|
||||
sys.stdout.flush()
|
||||
exec('{0}.{1}()'.format(self.repos, repo))
|
||||
exec('{0}.{1}()'.format(self._init, repo))
|
||||
sys.stdout.write("{0}Done{1}\n".format(color['GREY'],
|
||||
color['ENDC']))
|
||||
print("") # new line at end
|
||||
|
|
|
@ -200,7 +200,7 @@ def main():
|
|||
PackageManager(args[1:]).reinstall()
|
||||
elif len(args) > 1 and args[0] == "-r":
|
||||
PackageManager(args[1:]).remove()
|
||||
elif len(args) > 1 and args[0] == "-f":
|
||||
elif len(args) == 2 and args[0] == "-f":
|
||||
PackageManager(args[1:]).find()
|
||||
elif len(args) == 3 and args[0] == "-p" and args[1] in repositories:
|
||||
PkgDesc(args[2], args[1], "").view()
|
||||
|
|
|
@ -174,7 +174,7 @@ def fix_slackers_pkg(name):
|
|||
# This trick fix spliting 'NoneType' packages
|
||||
# reference wrong name between PACKAGE.TXT and
|
||||
# FILELIST.TXT
|
||||
return "WRONG_FILE-0-noarch-0.txz"
|
||||
return ""
|
||||
|
||||
|
||||
class Requires(object):
|
||||
|
|
|
@ -228,12 +228,11 @@ class PackageManager(object):
|
|||
'''
|
||||
Find installed Slackware packages
|
||||
'''
|
||||
self.binary = "".join(self.binary)
|
||||
matching = size = 0
|
||||
print("\nPackages with matching name [ {0}{1}{2} ]\n".format(
|
||||
color['CYAN'], self.binary, color['ENDC']))
|
||||
for match in find_package(self.binary, pkg_path):
|
||||
if self.binary in match:
|
||||
color['CYAN'], ''.join(self.binary), color['ENDC']))
|
||||
for match in find_package(''.join(self.binary), pkg_path):
|
||||
if ''.join(self.binary) in match:
|
||||
matching += 1
|
||||
print("[ {0}installed{1} ] - {2}".format(
|
||||
color['GREEN'], color['ENDC'], match))
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
from sizes import units
|
||||
|
@ -37,7 +37,16 @@ from __metadata__ import (
|
|||
class RepoInfo(object):
|
||||
|
||||
def __init__(self):
|
||||
self.form = {}
|
||||
self.form = {
|
||||
'Last updated:': '',
|
||||
'Number of packages:': '',
|
||||
'Repo id:': '',
|
||||
'Repo url:': '',
|
||||
'Status:': '',
|
||||
'Total compressed packages:': '',
|
||||
'Total uncompressed packages:': ''
|
||||
}
|
||||
|
||||
self.all_repos = RepoList().all_repos
|
||||
del RepoList().all_repos
|
||||
|
||||
|
@ -46,34 +55,36 @@ class RepoInfo(object):
|
|||
View repository information
|
||||
'''
|
||||
status = '{0}disabled{1}'.format(color['RED'], color['ENDC'])
|
||||
if repo in repositories:
|
||||
self.form['Status:'] = status
|
||||
if (repo in repositories and
|
||||
os.path.isfile(log_path + '{0}/ChangeLog.txt'.format(repo))):
|
||||
status = '{0}enabled{1}'.format(color['GREEN'], color['ENDC'])
|
||||
if repo != 'sbo':
|
||||
data = self.repository_data(repo)
|
||||
size = units(data[1], data[2])
|
||||
self.form['Repo id:'] = repo
|
||||
self.form['Repo url:'] = self.all_repos[repo]
|
||||
self.form['Total compressed packages:'] = '{0} {1}'.format(
|
||||
str(size[1][0]), str(size[0][0]))
|
||||
self.form['Total uncompressed packages:'] = '{0} {1}'.format(
|
||||
str(size[1][1]), str(size[0][1]))
|
||||
self.form['Number of packages:'] = data[0]
|
||||
self.form['Status:'] = status
|
||||
self.form['Last updated:'] = data[3]
|
||||
elif repo == 'sbo':
|
||||
sum_sbo_pkgs = 0
|
||||
for line in open(lib_path + 'sbo_repo/SLACKBUILDS.TXT', 'r'):
|
||||
if line.startswith('SLACKBUILD NAME: '):
|
||||
sum_sbo_pkgs += 1
|
||||
with open(log_path + 'sbo/ChangeLog.txt', 'r') as changelog_txt:
|
||||
last_upd = changelog_txt.readline().replace('\n', '')
|
||||
self.form['Repo id:'] = repo
|
||||
self.form['Repo url:'] = self.all_repos[repo]
|
||||
self.form['Total compressed packages:'] = ''
|
||||
self.form['Total uncompressed packages:'] = ''
|
||||
self.form['Number of packages:'] = sum_sbo_pkgs
|
||||
self.form['Status:'] = status
|
||||
self.form['Last updated:'] = last_upd
|
||||
if repo != 'sbo':
|
||||
data = self.repository_data(repo)
|
||||
size = units(data[1], data[2])
|
||||
self.form['Repo id:'] = repo
|
||||
self.form['Repo url:'] = self.all_repos[repo]
|
||||
self.form['Total compressed packages:'] = '{0} {1}'.format(
|
||||
str(size[1][0]), str(size[0][0]))
|
||||
self.form['Total uncompressed packages:'] = '{0} {1}'.format(
|
||||
str(size[1][1]), str(size[0][1]))
|
||||
self.form['Number of packages:'] = data[0]
|
||||
self.form['Status:'] = status
|
||||
self.form['Last updated:'] = data[3]
|
||||
elif repo == 'sbo':
|
||||
sum_sbo_pkgs = 0
|
||||
for line in open(lib_path + 'sbo_repo/SLACKBUILDS.TXT', 'r'):
|
||||
if line.startswith('SLACKBUILD NAME: '):
|
||||
sum_sbo_pkgs += 1
|
||||
with open(log_path + 'sbo/ChangeLog.txt', 'r') as changelog_txt:
|
||||
last_upd = changelog_txt.readline().replace('\n', '')
|
||||
self.form['Repo id:'] = repo
|
||||
self.form['Repo url:'] = self.all_repos[repo]
|
||||
self.form['Total compressed packages:'] = ''
|
||||
self.form['Total uncompressed packages:'] = ''
|
||||
self.form['Number of packages:'] = sum_sbo_pkgs
|
||||
self.form['Status:'] = status
|
||||
self.form['Last updated:'] = last_upd
|
||||
print('')
|
||||
for key, value in sorted(self.form.iteritems()):
|
||||
print color['GREY'] + key + color['ENDC'], value
|
||||
|
|
|
@ -225,7 +225,7 @@ def order_list(upgrade_names):
|
|||
|
||||
def store(dependencies):
|
||||
'''
|
||||
In the end lest a check of the packages that are on the list
|
||||
In the end last a check of the packages that are on the list
|
||||
are already installed.
|
||||
'''
|
||||
(upgrade_name,
|
||||
|
|
|
@ -33,7 +33,6 @@ def split_package(package):
|
|||
build_a = build[:1]
|
||||
if build[1:2].isdigit():
|
||||
build_b = build[1:2]
|
||||
|
||||
build = build_a + build_b
|
||||
arch = split[-2]
|
||||
ver = split[-3]
|
||||
|
|
Loading…
Add table
Reference in a new issue