updated for version 1.9.5

This commit is contained in:
Dimitris Zlatanidis 2014-10-04 01:44:18 +03:00
parent 62ebc153ab
commit 615258b989
14 changed files with 195 additions and 195 deletions

View file

@ -1,5 +1,5 @@
Version 1.9.5 Version 1.9.5
03-10.2014 04-10.2014
[Updated] - Added 'aaa_elflibs' in blacklist. [Updated] - Added 'aaa_elflibs' in blacklist.
- Fix current version upgrade only installed packages. - Fix current version upgrade only installed packages.

View file

@ -122,23 +122,21 @@ Command Line Tool Usage
Utility for easy management packages in Slackware Utility for easy management packages in Slackware
Optional arguments: Optional arguments:
-h, --help show this help message and exit -h, --help show this help message and exit
-v, --version print version and exit -v, --version print version and exit
-a, script [source...] auto build packages -a, script [source...] auto build packages
-l, all, sbo, slack, noarch list of installed packages -b, --list, [package...] --add, --remove add, remove packages in blacklist
-c, <repository> --upgrade --current check if your packages is up to date -l, all, sbo, slack, noarch list of installed packages
-s, <repository> <package> --current download, build & install packages -c, <repository> --upgrade --current check for updated packages
-f, <package> find installed packages -s, <repository> <package> --current download, build & install
-t, <package> packages tracking dependencies from SBo -f, <package> find installed packages
-n, <package> view packages from SBo repository -t, <package> tracking dependencies from SBo
-b, --list blacklisted packages -n, <package> view packages from SBo
-b [package...] --add --remove add, remove packages in blacklist -i, [package...] install binary packages
-i, [package...] install binary packages -u, [package...] upgrade binary packages
-u, [package...] upgrade binary packages -o, [package...] reinstall binary packages
-o, [package...] reinstall binary packages -r, [package...] remove binary packages
-r, [package...] remove binary packages -d, [package...] display the contents
-d, [package...] display the contents of the packages
Repositories: Repositories:
SlackBuilds = sbo SlackBuilds = sbo
Slackware = slack '--current' Slackware = slack '--current'
@ -446,7 +444,7 @@ Find installed packages:
$ slpkg -f apr $ slpkg -f apr
Installed packages with name matching [ apr ] Installed packages with name begin matching [ apr ]
[ installed ] - apr-1.5.0-x86_64-1_slack14.1 [ installed ] - apr-1.5.0-x86_64-1_slack14.1
[ installed ] - apr-util-1.5.3-x86_64-1_slack14.1 [ installed ] - apr-util-1.5.3-x86_64-1_slack14.1

View file

@ -16,11 +16,12 @@
slpkg - Utility for easy management packages in Slackware slpkg - Utility for easy management packages in Slackware
.SH SYNOPSIS .SH SYNOPSIS
\fBUsage: slpkg [-h] [-v] [-a script [sources...]] \fBUsage: slpkg [-h] [-v] [-a script [sources...]]
[-b --list, --add, --remove [...]]
[-l all, sbo, slack, noarch] [-l all, sbo, slack, noarch]
[-c <repository> --upgrade --current] [-c <repository> --upgrade --current]
[-s <repository> <package> --current] [-s <repository> <package> --current]
[-f] [-t] [-n] [-i [...]] [-f] [-t] [-n] [-i [...]] [-u [...]]
[-u [...]] [-o [...]] [-r [...]] [-d [...]]\fp [-o [...]] [-r [...]] [-d [...]]\fp
.SH DESCRIPTION .SH DESCRIPTION
\fBslpkg\fP is a terminal multitool in order to easy use Slackware packages. \fBslpkg\fP is a terminal multitool in order to easy use Slackware packages.
@ -30,22 +31,21 @@ It's a quick and easy way to manage your packages in slackware to a command.
\fBUtility for easy management packages in Slackware \fBUtility for easy management packages in Slackware
Optional arguments: Optional arguments:
-h, --help show this help message and exit -h, --help show this help message and exit
-v, --version print version and exit -v, --version print version and exit
-a, script [source...] auto build packages -a, script [source...] auto build packages
-l, all, sbo, slack, noarch list of installed packages -b, --list, [package...] --add, --remove add, remove packages in blacklist
-c, <repository> --upgrade --current check if your packages is up to date -l, all, sbo, slack, noarch list of installed packages
-s, <repository> <package> --current download, build & install packages -c, <repository> --upgrade --current check for updated packages
-f, <package> find installed packages -s, <repository> <package> --current download, build & install
-t, <package> packages tracking dependencies from SBo -f, <package> find installed packages
-n, <package> view packages from SBo repository -t, <package> tracking dependencies from SBo
-b, --list blacklisted packages -n, <package> view packages from SBo
-b [package...] --add --remove add, remove packages in blacklist -i, [package...] install binary packages
-i, [package...] install binary packages -u, [package...] upgrade binary packages
-u, [package...] upgrade binary packages -o, [package...] reinstall binary packages
-o, [package...] reinstall binary packages -r, [package...] remove binary packages
-r, [package...] remove binary packages -d, [package...] display the contents
-d, [package...] display the contents of the packages
Repositories: Repositories:
SlackBuilds = sbo SlackBuilds = sbo
@ -62,6 +62,11 @@ The following commands are available.
\fBslpkg\fP \fB-a\fP <\fIscript\fP> <\fIsources\fP> \fBslpkg\fP \fB-a\fP <\fIscript\fP> <\fIsources\fP>
.PP .PP
With this argument, build slackware package from source quickly and easy. With this argument, build slackware package from source quickly and easy.
.SS -b , --list <packages> -- add --remove
\fBslpkg\fP \fB-b\fP \fB--list\fP <\fIpackages\fP> \fB--add\fP \fB--remove\fP
.PP
Print, add or remove packages from blacklist file. The settings here affect
all repositories.
.SS -l all, sbo, slack, noarch .SS -l all, sbo, slack, noarch
\fBslpkg\fP \fB-l\fP \fIall\fP \fIsbo\fP \fIslack\fp \fInoarch\fp \fBslpkg\fP \fB-l\fP \fIall\fP \fIsbo\fP \fIslack\fp \fInoarch\fp
.PP .PP
@ -92,16 +97,6 @@ The sequence shown is that you must follow to correctly install package.
.PP .PP
With this method you can find the SBo script that interests you through With this method you can find the SBo script that interests you through
the network. (www.slackbuilds.org) the network. (www.slackbuilds.org)
.SS -b , --list blacklisted packages
\fBslpkg\fP \fB-b\fP \fB--list\fP
.PP
Print all blacklist packages. Each package listed here may not be
installed be upgraded be find or deleted.
.SS -b , <packages> -- add --remove
\fBslpkg\fP \fB-b\fP <\fIpackages\fP> \fB--add\fP \fB--remove\fP
.PP
Add or remove packages from blacklist. The settings here affect
all repositories.
.SS -i , install binary package .SS -i , install binary package
\fBslpkg\fP \fB-i\fP <\fIpackages.t?z\fP> \fBslpkg\fP \fB-i\fP <\fIpackages.t?z\fP>
.PP .PP

View file

@ -77,11 +77,13 @@ python setup.py install --root=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/etc/$PRGNAM # check if blacklist file if already exist in /etc/slpkg
if [ ! -f /etc/$PRGNAM/blacklist ]; then if [ ! -f "/etc/$PRGNAM/blacklist" ]; then
mkdir -p $PKG/etc/$PRGNAM
install -D -m0644 conf/blacklist $PKG/etc/$PRGNAM/blacklist install -D -m0644 conf/blacklist $PKG/etc/$PRGNAM/blacklist
fi fi
# install man page
mkdir -p $PKG/usr/man/man8 mkdir -p $PKG/usr/man/man8
gzip -9 man/$PRGNAM.8 gzip -9 man/$PRGNAM.8
install -D -m0644 man/$PRGNAM.8.gz $PKG/usr/man/man8/$PRGNAM.8.gz install -D -m0644 man/$PRGNAM.8.gz $PKG/usr/man/man8/$PRGNAM.8.gz

View file

@ -22,114 +22,119 @@
# 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 os
from __metadata__ import bls_path from __metadata__ import bls_path
# create blacklist configuration file in /etc/slpkg if not exist. class BlackList(object):
blacklist_conf = [ '''
"# This is the blacklist file. Each package listed here may not be\n", Blacklist class to add, remove or listed packages
"# installed be upgraded be find or deleted.\n", in blacklist file.
"# NOTE: The settings here affect all repositories.\n", '''
"#\n", def __init__(self):
"# An example syntax is as follows:\n", '''
"# add a package from SBo repository:\n", Initialization blacklist file if not exist in /etc/slpkg
"# brasero\n", create it by default.
"#\n", '''
"# Add package from slackware repository:\n", blacklist_conf = [
"# example add package 'wicd-1.7.2.4-x86_64-4.txz':\n", "# This is the blacklist file. Each package listed here may not be\n",
"# wicd\n", "# installed be upgraded be find or deleted.\n",
"#\n", "# NOTE: The settings here affect all repositories.\n",
"# Sometimes the automatic kernel update creates problems because you\n", "#\n",
"# may need to file intervention 'lilo'. The slpkg automatically detects\n", "# An example syntax is as follows:\n",
"# if the core has been upgraded and running 'lilo'. If you want to avoid\n", "# add a package from SBo repository:\n",
"# any problems uncomment the lines below.\n", "# brasero\n",
"#\n", "#\n",
"# kernel-firmware\n", "# Add package from slackware repository:\n",
"# kernel-generic\n", "# example add package 'wicd-1.7.2.4-x86_64-4.txz':\n",
"# kernel-generic-smp\n", "# wicd\n",
"# kernel-headers\n", "#\n",
"# kernel-huge\n", "# Sometimes the automatic kernel update creates problems because you\n",
"# kernel-huge-smp\n", "# may need to file intervention 'lilo'. The slpkg automatically detects\n",
"# kernel-modules\n", "# if the core has been upgraded and running 'lilo'. If you want to avoid\n",
"# kernel-modules-smp\n", "# any problems uncomment the lines below.\n",
"# kernel-source\n" "#\n",
"#\n", "# kernel-firmware\n",
"#\n", "# kernel-generic\n",
"# aaa_elflibs can't be updated.\n", "# kernel-generic-smp\n",
"aaa_elflibs\n" "# kernel-headers\n",
] "# kernel-huge\n",
black_conf = bls_path + "blacklist" "# kernel-huge-smp\n",
if not os.path.exists(bls_path): "# kernel-modules\n",
os.mkdir(bls_path) "# kernel-modules-smp\n",
if not os.path.isfile(bls_path + "blacklist"): "# kernel-source\n"
with open(black_conf, "w") as conf: "#\n",
for line in blacklist_conf: "#\n",
conf.write(line) "# aaa_elflibs can't be updated.\n",
conf.close() "aaa_elflibs\n"
]
self.blackfile = bls_path + "blacklist"
if not os.path.exists(bls_path):
os.mkdir(bls_path)
if not os.path.isfile(self.blackfile):
with open(black_conf, "w") as conf:
for line in blacklist_conf:
conf.write(line)
conf.close()
def black_packages(): def packages(self):
''' '''
Return blacklist packages from /etc/slpkg/blacklist Return blacklist packages from /etc/slpkg/blacklist
configuration file. configuration file.
''' '''
blacklist = [] blacklist = []
blackfile = bls_path + "blacklist" with open(self.blackfile, "r") as black_conf:
with open(blackfile, "r") as black_conf: for read in black_conf:
for read in black_conf: read = read.lstrip()
read = read.lstrip() if not read.startswith("#"):
if not read.startswith("#"): blacklist.append(read.replace("\n", ""))
blacklist.append(read.replace("\n", "")) black_conf.close()
black_conf.close() return blacklist
return blacklist
def blacklisted(): def listed(self):
''' '''
Print blacklist packages Print blacklist packages
''' '''
exit = 0 exit = 0
print("\nPackages in blacklist:\n") print("\nPackages in blacklist:\n")
for black in black_packages(): for black in self.packages():
if black: if black:
print(black) print(black)
exit = 1
if exit == 1:
print # new line at exit
def add_blacklist(pkgs):
'''
Add blacklist packages if not exist
'''
exit = 0
blackfile = bls_path + "blacklist"
blacklist = black_packages()
print("\nAdd packages in blacklist:\n")
with open(blackfile, "a") as black_conf:
for pkg in pkgs:
if pkg not in blacklist:
print(pkg)
black_conf.write(pkg + "\n")
exit = 1 exit = 1
black_conf.close() if exit == 1:
if exit == 1: print # new line at exit
print # new line at exit
def remove_blacklist(pkgs): def add(self, pkgs):
''' '''
Remove packages from blacklist Add blacklist packages if not exist
''' '''
exit = 0 exit = 0
blackfile = bls_path + "blacklist" blacklist = self.packages()
print("\nRemove packages from blacklist:\n") print("\nAdd packages in blacklist:\n")
with open(blackfile, "r") as read_black_conf: with open(self.blackfile, "a") as black_conf:
lines = read_black_conf.read() for pkg in pkgs:
read_black_conf.close() if pkg not in blacklist:
with open(blackfile, "w") as black_conf: print(pkg)
for line in lines.splitlines(): black_conf.write(pkg + "\n")
if line not in pkgs: exit = 1
black_conf.write(line + "\n") black_conf.close()
else: if exit == 1:
print(line) print # new line at exit
exit = 1
black_conf.close() def remove(self, pkgs):
if exit == 1: '''
print # new line at exit Remove packages from blacklist
'''
exit = 0
print("\nRemove packages from blacklist:\n")
with open(self.blackfile, "r") as read_black_conf:
lines = read_black_conf.read()
read_black_conf.close()
with open(self.blackfile, "w") as write_black_conf:
for line in lines.splitlines():
if line not in pkgs:
write_black_conf.write(line + "\n")
else:
print(line)
exit = 1
write_black_conf.close()
if exit == 1:
print # new line at exit

View file

@ -27,7 +27,7 @@ from colors import *
from messages import s_user from messages import s_user
from version import prog_version from version import prog_version
from __metadata__ import path, __version__ from __metadata__ import path, __version__
from blacklist import blacklisted, add_blacklist, remove_blacklist from blacklist import BlackList
from pkg.manager import * from pkg.manager import *
from pkg.build import build_package from pkg.build import build_package
@ -48,22 +48,21 @@ def main():
"slpkg - version {0}\n".format(__version__), "slpkg - version {0}\n".format(__version__),
"Utility for easy management packages in Slackware\n", "Utility for easy management packages in Slackware\n",
"Optional arguments:", "Optional arguments:",
" -h, --help show this help message and exit", " -h, --help show this help message and exit",
" -v, --version print version and exit", " -v, --version print version and exit",
" -a, script [source...] auto build packages", " -a, script [source...] auto build packages",
" -l, all, sbo, slack, noarch list of installed packages", " -b, --list, [package...] --add, --remove add, remove packages in blacklist",
" -c, <repository> --upgrade --current check if your packages is up to date", " -l, all, sbo, slack, noarch list of installed packages",
" -s, <repository> <package> --current download, build & install packages", " -c, <repository> --upgrade --current check for updated packages",
" -f, <package> find installed packages", " -s, <repository> <package> --current download, build & install",
" -t, <package> packages tracking dependencies from SBo", " -f, <package> find installed packages",
" -n, <package> view packages from SBo repository", " -t, <package> tracking dependencies from SBo",
" -b, --list blacklisted packages", " -n, <package> view packages from SBo",
" -b [package...] --add --remove add, remove packages in blacklist", " -i, [package...] install binary packages",
" -i, [package...] install binary packages", " -u, [package...] upgrade binary packages",
" -u, [package...] upgrade binary packages", " -o, [package...] reinstall binary packages",
" -o, [package...] reinstall binary packages", " -r, [package...] remove binary packages",
" -r, [package...] remove binary packages", " -d, [package...] display the contents\n",
" -d, [package...] display the contents of the packages\n",
"Repositories:", "Repositories:",
" SlackBuilds = sbo", " SlackBuilds = sbo",
" Slackware = slack '--current'\n", " Slackware = slack '--current'\n",
@ -71,12 +70,12 @@ def main():
usage = [ usage = [
"slpkg - version {0}\n".format(__version__), "slpkg - version {0}\n".format(__version__),
"Usage: slpkg [-h] [-v] [-a script [sources...]]", "Usage: slpkg [-h] [-v] [-a script [sources...]]",
" [-b --list, [...] --add, --remove]",
" [-l all, sbo, slack, noarch]", " [-l all, sbo, slack, noarch]",
" [-c <repository> --upgrade --current]", " [-c <repository> --upgrade --current]",
" [-s <repository> <package> --current]", " [-s <repository> <package> --current]",
" [-f] [-t] [-n] [-b --list]", " [-f] [-t] [-n] [-i [...]] [-u [...]]",
" [-b [...] --add --remove] [-i [...]]", " [-o [...]] [-r [...]] [-d [...]]\n",
" [-u [...]] [-o [...]] [-r [...]] [-d [...]]\n",
"For more information try 'slpkg --help'\n" "For more information try 'slpkg --help'\n"
] ]
args = sys.argv args = sys.argv
@ -127,11 +126,11 @@ def main():
elif len(args) == 2 and args[0] == "-n": elif len(args) == 2 and args[0] == "-n":
sbo_network(args[1]) sbo_network(args[1])
elif len(args) == 2 and args[0] == "-b" and args[1] == "--list": elif len(args) == 2 and args[0] == "-b" and args[1] == "--list":
blacklisted() BlackList().listed()
elif len(args) > 2 and args[0] == "-b" and args[-1] == "--add": elif len(args) > 2 and args[0] == "-b" and args[-1] == "--add":
add_blacklist(args[1:-1]) BlackList().add(args[1:-1])
elif len(args) > 2 and args[0] == "-b" and args[-1] == "--remove": elif len(args) > 2 and args[0] == "-b" and args[-1] == "--remove":
remove_blacklist(args[1:-1]) BlackList().remove(args[1:-1])
elif len(args) > 1 and args[0] == "-i": elif len(args) > 1 and args[0] == "-i":
pkg_install(args[1:]) pkg_install(args[1:])
elif len(args) > 1 and args[0] == "-u": elif len(args) > 1 and args[0] == "-u":

View file

@ -23,15 +23,17 @@
import os import os
from blacklist import black_packages from blacklist import BlackList
from slack.splitting import split_package
def find_package(find_pkg, directory): def find_package(find_pkg, directory):
''' '''
Find packages Find packages
''' '''
pkgs = [] pkgs = []
blacklist = black_packages() blacklist = BlackList().packages()
for pkg in sorted(os.listdir(directory)): for pkg in sorted(os.listdir(directory)):
if pkg.startswith(find_pkg) and find_pkg[:-1] not in blacklist: if pkg.startswith(find_pkg) and split_package(pkg + ".???")[0] not in blacklist:
pkgs.append(pkg) pkgs.append(pkg)
return pkgs return pkgs

View file

@ -26,7 +26,7 @@ import sys
import subprocess import subprocess
from colors import * from colors import *
from blacklist import black_packages from blacklist import BlackList
from messages import pkg_not_found, template from messages import pkg_not_found, template
from __metadata__ import pkg_path, sp, log_path from __metadata__ import pkg_path, sp, log_path
@ -172,7 +172,7 @@ def pkg_find(binary):
''' '''
binary = "".join(binary) binary = "".join(binary)
matching = size = int() matching = size = int()
print("\nInstalled packages with name matching [ {0}{1}{2} ]\n".format( print("\nInstalled packages with name begin matching [ {0}{1}{2} ]\n".format(
CYAN, binary, ENDC)) CYAN, binary, ENDC))
for match in find_package(binary, pkg_path): for match in find_package(binary, pkg_path):
if binary in match: if binary in match:
@ -230,7 +230,7 @@ def pkg_list(pattern):
elif "all" in pattern: elif "all" in pattern:
search = "" search = ""
index, page = 0, 50 index, page = 0, 50
for pkg in sorted(os.listdir(pkg_path)): for pkg in find_package("", pkg_path):
if search in pkg: if search in pkg:
index += 1 index += 1
print("{0}{1}:{2} {3}".format(GREY, index, ENDC, pkg)) print("{0}{1}:{2} {3}".format(GREY, index, ENDC, pkg))

View file

@ -25,7 +25,7 @@ import sys
from colors import * from colors import *
from init import initialization from init import initialization
from blacklist import black_packages from blacklist import BlackList
from __metadata__ import pkg_path, sp from __metadata__ import pkg_path, sp
from messages import pkg_not_found, template from messages import pkg_not_found, template
@ -42,7 +42,7 @@ def sbo_dependencies_pkg(name):
''' '''
try: try:
dependencies = [] dependencies = []
blacklist = black_packages() blacklist = BlackList().packages()
sbo_url = sbo_search_pkg(name) sbo_url = sbo_search_pkg(name)
if sbo_url: if sbo_url:
requires = sbo_requires_pkg(name) requires = sbo_requires_pkg(name)

View file

@ -26,7 +26,7 @@ import re
import sys import sys
from __metadata__ import lib_path from __metadata__ import lib_path
from blacklist import black_packages from blacklist import BlackList
from slack.slack_version import slack_ver from slack.slack_version import slack_ver
@ -35,7 +35,7 @@ def sbo_search_pkg(name):
Search for package path from SLACKBUILDS.TXT file Search for package path from SLACKBUILDS.TXT file
''' '''
try: try:
blacklist = black_packages() blacklist = BlackList().packages()
sbo_url = ("http://slackbuilds.org/slackbuilds/{0}/".format(slack_ver())) sbo_url = ("http://slackbuilds.org/slackbuilds/{0}/".format(slack_ver()))
with open(lib_path + "sbo_repo/SLACKBUILDS.TXT", "r") as SLACKBUILDS_TXT: with open(lib_path + "sbo_repo/SLACKBUILDS.TXT", "r") as SLACKBUILDS_TXT:
for line in SLACKBUILDS_TXT: for line in SLACKBUILDS_TXT:

View file

@ -29,7 +29,6 @@ from init import initialization
from downloader import download from downloader import download
from __metadata__ import (tmp, pkg_path, build_path, from __metadata__ import (tmp, pkg_path, build_path,
log_path, lib_path, sp) log_path, lib_path, sp)
from messages import (pkg_not_found, pkg_found, template, from messages import (pkg_not_found, pkg_found, template,
build_FAILED, sbo_packages_view) build_FAILED, sbo_packages_view)

View file

@ -28,7 +28,7 @@ import time
from colors import * from colors import *
from url_read import url_read from url_read import url_read
from downloader import download from downloader import download
from blacklist import black_packages from blacklist import BlackList
from messages import pkg_not_found, template from messages import pkg_not_found, template
from __metadata__ import slpkg_tmp, pkg_path, slack_archs from __metadata__ import slpkg_tmp, pkg_path, slack_archs
@ -60,7 +60,7 @@ def install(slack_pkg, version):
CYAN, slack_pkg, ENDC)) CYAN, slack_pkg, ENDC))
sys.stdout.write(reading_lists) sys.stdout.write(reading_lists)
sys.stdout.flush() sys.stdout.flush()
blacklist = black_packages() blacklist = BlackList().packages()
PACKAGES = url_read(mirrors("PACKAGES.TXT", "", version)) PACKAGES = url_read(mirrors("PACKAGES.TXT", "", version))
EXTRA = url_read(mirrors("PACKAGES.TXT", "extra/", version)) EXTRA = url_read(mirrors("PACKAGES.TXT", "extra/", version))
PASTURE = url_read(mirrors("PACKAGES.TXT", "pasture/", version)) PASTURE = url_read(mirrors("PACKAGES.TXT", "pasture/", version))

View file

@ -30,7 +30,7 @@ from colors import *
from url_read import url_read from url_read import url_read
from messages import template from messages import template
from downloader import download from downloader import download
from blacklist import black_packages from blacklist import BlackList
from __metadata__ import pkg_path, slpkg_tmp from __metadata__ import pkg_path, slpkg_tmp
from pkg.manager import pkg_upgrade from pkg.manager import pkg_upgrade
@ -56,7 +56,7 @@ def patches(version):
os.mkdir(patch_path) os.mkdir(patch_path)
sys.stdout.write (reading_lists) sys.stdout.write (reading_lists)
sys.stdout.flush() sys.stdout.flush()
blacklist = black_packages() blacklist = BlackList().packages()
if version == "stable": if version == "stable":
PACKAGE_TXT = url_read(mirrors("PACKAGES.TXT", "patches/", version)) PACKAGE_TXT = url_read(mirrors("PACKAGES.TXT", "patches/", version))
step = 100 step = 100
@ -92,7 +92,7 @@ def patches(version):
installed = [] installed = []
# get all installed packages and store the package name. # get all installed packages and store the package name.
for pkg in os.listdir(pkg_path): for pkg in os.listdir(pkg_path):
installed.append(split_package(pkg + ".txz")[0]) installed.append(split_package(pkg + ".???")[0])
for loc, name, comp, uncomp in zip(package_location, package_name, \ for loc, name, comp, uncomp in zip(package_location, package_name, \
comp_size, uncomp_size): comp_size, uncomp_size):
# If the package from the current repository is installed # If the package from the current repository is installed

View file

@ -27,7 +27,7 @@ from slack_version import slack_ver
def split_package(package): def split_package(package):
''' '''
Split package by name, version Split package in name, version
arch and build tag. arch and build tag.
''' '''
for archs in slack_archs: for archs in slack_archs: