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