update repository slacky

This commit is contained in:
Dimitris Zlatanidis 2014-12-24 08:10:34 +02:00
parent a679e27f4b
commit 6047d9b234
6 changed files with 2 additions and 56 deletions

View file

@ -9,7 +9,7 @@ Version 2.1.5-dev
[Updated] - Fix Slackware current upgrade checksums. [Updated] - Fix Slackware current upgrade checksums.
- Fix ingore hiden files in /var/log/packages/ path. - Fix ingore hiden files in /var/log/packages/ path.
Version 2.1.4-dev Version 2.1.4
16-12-2014 16-12-2014
[Feature] - Added command 'update' and remove auto update package lists. [Feature] - Added command 'update' and remove auto update package lists.

View file

@ -6,12 +6,6 @@ SlackBuilds.org (sbo) FAQ(15):
Slackware current is not supported, but as a general rule, the scripts Slackware current is not supported, but as a general rule, the scripts
should work on it as well. should work on it as well.
Slacky.eu (slacky) repository only work with Slackware.com (slack) repository because
slacky repository highlights dependencies where include in Slackware distribution so
'slack' repository needed to distinguish dependencies not included in it.
(Each time you want to use this repository must be enable and the 'slack' repository in
file /etc/slpkg.conf).
Rworkman's (rlw) repository use dependencies where displayed in central site Rworkman's (rlw) repository use dependencies where displayed in central site
'http://rlworkman.net/pkgs/' and only those. Unfortunately there is no fixed reference 'http://rlworkman.net/pkgs/' and only those. Unfortunately there is no fixed reference
dependencies file PACKAGES.TXT. dependencies file PACKAGES.TXT.

View file

@ -76,12 +76,3 @@ def template(max_len):
Print template Print template
''' '''
print("+" + "=" * max_len) print("+" + "=" * max_len)
def slacky_error():
'''
Slacky repository error
'''
print("\nRepository slack working together with the slacky.")
print("Please add the repository slack from file " +
"'/etc/slpkg/slpkg.conf'\n")

View file

@ -31,8 +31,6 @@ from slpkg.__metadata__ import (
ktown_kde_repo ktown_kde_repo
) )
len_deps = 0
def repo_data(PACKAGES_TXT, step, repo, version): def repo_data(PACKAGES_TXT, step, repo, version):
''' '''
@ -160,10 +158,6 @@ class Requires(object):
def __init__(self, name, repo): def __init__(self, name, repo):
self.name = name self.name = name
self.repo = repo self.repo = repo
lib = lib_path + "slack_repo/PACKAGES.TXT"
f = open(lib, "r")
self.SLACK_PACKAGES_TXT = f.read()
f.close()
def get_deps(self): def get_deps(self):
''' '''
@ -224,25 +218,4 @@ class Requires(object):
slacky_deps.append(d.split()[0]) slacky_deps.append(d.split()[0])
dep = "".join(dep) dep = "".join(dep)
slacky_deps.append(dep.split()[0]) slacky_deps.append(dep.split()[0])
slacky_deps = self.remove_slack_deps(slacky_deps)
return slacky_deps
def remove_slack_deps(self, dependencies):
'''
Because the repository slacky mentioned packages and dependencies
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, (len_deps * 500)
for line in self.SLACK_PACKAGES_TXT.splitlines():
index += 1
toolbar_width = status(index, toolbar_width, step)
if line.startswith("PACKAGE NAME:"):
name.append("-".join(line[15:].split("-")[:-3]))
for deps in dependencies:
if deps not in name:
slacky_deps.append(deps)
return slacky_deps return slacky_deps

View file

@ -33,7 +33,6 @@ from slpkg.downloader import Download
from slpkg.grep_md5 import pkg_checksum from slpkg.grep_md5 import pkg_checksum
from slpkg.splitting import split_package from slpkg.splitting import split_package
from slpkg.messages import ( from slpkg.messages import (
slacky_error,
pkg_not_found, pkg_not_found,
template template
) )
@ -62,10 +61,6 @@ class OthersInstall(object):
self.repo = repo self.repo = repo
self.version = version self.version = version
self.tmp_path = slpkg_tmp_packages self.tmp_path = slpkg_tmp_packages
if (not os.path.isfile(lib_path + "slack_repo/PACKAGES.TXT") and
repo == "slacky"):
slacky_error()
sys.exit(0)
print("\nPackages with name matching [ {0}{1}{2} ]\n".format( print("\nPackages with name matching [ {0}{1}{2} ]\n".format(
color['CYAN'], self.package, color['ENDC'])) color['CYAN'], self.package, color['ENDC']))
sys.stdout.write("{0}Reading package lists ...{1}".format( sys.stdout.write("{0}Reading package lists ...{1}".format(

View file

@ -21,15 +21,12 @@
# 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 messages import ( from messages import (
template, template
slacky_error
) )
from __metadata__ import ( from __metadata__ import (
lib_path,
pkg_path, pkg_path,
color, color,
sp sp
@ -51,10 +48,6 @@ def track_dep(name, repo):
if allready installed and color red if allready installed and color red
if not installed. if not installed.
''' '''
if (not os.path.isfile(lib_path + "slack_repo/PACKAGES.TXT") and
repo == "slacky"):
slacky_error()
sys.exit(0)
sys.stdout.write("{0}Reading package lists ...{1}".format(color['GREY'], sys.stdout.write("{0}Reading package lists ...{1}".format(color['GREY'],
color['ENDC'])) color['ENDC']))
sys.stdout.flush() sys.stdout.flush()