Skip to content
Commits on Source (23)
......@@ -71,3 +71,4 @@ f65b1525da801a7cc2e460cf1eb5d4be ./slpkg-2.8.8.tar.gz
1a311e132d3b7957f3ab3d128072a10f ./slpkg-2.8.9.tar.gz
737b6a59dcb103708c4aeab4a96b517d ./slpkg-2.9.0.tar.gz
2ba8c1f63d05f368d9c7a6f12f4df387 ./slpkg-2.9.1.tar.gz
8970a287eafc773bc87905204fea35f6 ./slpkg-2.9.2.tar.gz
2.9.2 - 21/08/2015
2.9.3 - 23/09/2015
Added:
- Default repositories file to allow editing urls
- Additional option "--case-ins" case insensitive in "--tracking" option
Fixed:
- Matching packages with case insensitive option
2.9.2 - 21/09/2015
Added:
- Clear screen in "--network" option
Updated:
......
......@@ -20,7 +20,7 @@
:target: https://github.com/dslackw/slpkg/issues
Slpkg v2.9.2
Slpkg v2.9.3
============
|
......@@ -65,6 +65,7 @@ Features
- Multiple options
- Multiple repositories
- Easy configuration
- Fully configurable
- Adaptability
- Powerful options
- Source builder
......@@ -81,8 +82,8 @@ Download latest release:
Required root privileges
$ tar xvf slpkg-2.9.2.tar.gz
$ cd slpkg-2.9.2
$ tar xvf slpkg-2.9.3.tar.gz
$ cd slpkg-2.9.3
$ ./install.sh
Installed as Slackware package
......@@ -113,9 +114,9 @@ Using pip:
Binary packages:
Slackware: `slpkg-2.9.2-i486-1_dsw.txz <https://github.com/dslackw/slpkg/releases/download/v2.9.2/slpkg-2.9.2-i486-1_dsw.txz>`_
Slackware: `slpkg-2.9.3-i486-1_dsw.txz <https://github.com/dslackw/slpkg/releases/download/v2.9.3/slpkg-2.9.3-i486-1_dsw.txz>`_
Slackware64: `slpkg-2.9.2-x86_64-1_dsw.txz <https://github.com/dslackw/slpkg/releases/download/v2.9.2/slpkg-2.9.2-x86_64-1_dsw.txz>`_
Slackware64: `slpkg-2.9.3-x86_64-1_dsw.txz <https://github.com/dslackw/slpkg/releases/download/v2.9.3/slpkg-2.9.3-x86_64-1_dsw.txz>`_
Optional dependencies
......@@ -362,6 +363,9 @@ Configuration Files
/etc/slpkg/slackware-mirrors
List of Slackware Mirrors
/etc/slpkg/default-repositories
List of default repositories
/etc/slpkg/custom-repositories
List of custom repositories
......@@ -441,8 +445,8 @@ Command Line Tool Usage
--resolve-off, --case-ins directly from remote repositories
with all dependencies.
-t, --tracking, [repository] [package], Tracking package dependencies and
--check-deps, --graph=[type] print package dependencies tree with
highlight if packages is installed.
--check-deps, --graph=[type], print package dependencies tree with
--case-ins highlight if packages is installed.
Also check if dependencies used or
drawing dependencies diagram.
-p, --desc, [repository] [package], Print description of a package
......
# List File Repositories:
#
# default-repositories file is part of slpkg.
#
# Copyright 2014-2015 Dimitris Zlatanidis <d.zlatanidis@gmail.com>
# All rights reserved.
#
# Slpkg is a user-friendly package manager for Slackware installations.
#
# 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
#
# Change only the url if necessary finishing with "/".
# Do NOT change the name of the repository.
# Default repositories names:
# sbo, rlw, alien, slacky, studio, slackr, slonly, ktown, multi, slacke, salix
# slackl, rested, msb
# ----------------------------------------------------------------------------
#
# NAME URL
sbo http://slackbuilds.org/slackbuilds/
rlw http://rlworkman.net/pkgs/
alien http://taper.alienbase.nl/mirrors/people/alien/sbrepos/
slacky http://repository.slacky.eu/
studio http://studioware.org/files/packages/
slackr http://ponce.cc/slackers/repository/
slonly https://slackonly.com/pub/packages/
ktown http://alien.slackbook.org/ktown/
multi http://www.slackware.com/~alien/multilib/
slacke http://ngc891.blogdns.net/pub/
salix http://download.salixos.org/
slackl http://www.slackel.gr/repo/
rested http://taper.alienbase.nl/mirrors/people/alien/restricted_slackbuilds/
msb http://slackware.org.uk/msb/
......@@ -35,6 +35,7 @@
#
# KEEP FILE CLEAN AND UNCOMMENT ONLY REPOSITORIES
# Uncomment (remove the '#' character) to choose repositories:
# Do NOT change the name of the repository.
# ----------------------------------------------------------------------------
[REPOSITORIES]
slack
......
......@@ -39,7 +39,8 @@ Usage: slpkg Commands:
[-c [repository], --upgrade, --skip=[...], --resolve-off,
--checklist]
[-s [repository] [package...], --resolve-off, --case-ins]
[-t [repository] [package], --check-deps, --graph=[type]]
[-t [repository] [package], --check-deps, --graph=[type],
--case-ins]
[-p [repository] [package], --color=[]]
[-n [SBo package], --checklist, --case-ins]
[-F [package...], --case-ins]
......@@ -221,7 +222,7 @@ Additional options:
\fB--case-ins\fP : Search package name in repository with case insensitive.
.SS -t, --tracking, tracking dependencies
\fBslpkg\fP \fB-t\fP <\fIrepository\fP> <\fIname of package\fP>, \fB--check-deps\fP, \fB--graph=[type]\fP
\fBslpkg\fP \fB-t\fP <\fIrepository\fP> <\fIname of package\fP>, \fB--check-deps\fP, \fB--graph=[type]\fP \fB--case-ins\fP
.PP
Tracking all dependencies of that package.
The sequence shown is that you must follow to correctly install package.
......@@ -232,6 +233,8 @@ Additional options:
\fB--check-deps\fP : Check if installed packages used by other packages.
.PP
\fB--graph=[type]\fP : Drawing dependencies graph. (example for type: ascii, image.x11, image.png etc. Require pygraphviz)
.PP
\fB--case-ins\fP : Search package name in repository with case insensitive.
.SS -p, --desk, print packages description
\fBslpkg\fP \fB-p\fP <\fIrepository\fP> <\fIname of package\fP>, \fB--color=[]\fP
......@@ -373,6 +376,9 @@ For example:
/etc/slpkg/slackware-mirrors
List of Slackware Mirrors
/etc/slpkg/default-repositories
List of default repositories
/etc/slpkg/custom-repositories
List of custom repositories
......
......@@ -118,7 +118,8 @@ if "install" in sys.argv:
"conf/repositories.conf",
"conf/blacklist",
"conf/slackware-mirrors",
"conf/custom-repositories",
"conf/default-repositories",
"conf/custom-repositories"
]
if not os.path.exists(_meta_.conf_path):
os.makedirs(_meta_.conf_path)
......
......@@ -8,7 +8,8 @@ config() {
fi
}
CONFIGS="slpkg.conf repositories.conf blacklist slackware-mirrors custom-repositories"
CONFIGS="slpkg.conf repositories.conf blacklist slackware-mirrors default-repositories \
custom-repositories"
for file in $CONFIGS; do
config etc/slpkg/${file}.new
done
......
......@@ -87,7 +87,8 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr
mkdir -p $PKG/etc/slpkg
# install configurations files
CONFIGS="slpkg.conf repositories.conf blacklist slackware-mirrors custom-repositories"
CONFIGS="slpkg.conf repositories.conf blacklist slackware-mirrors default-repositories \
custom-repositories"
for file in $CONFIGS; do
install -D -m0644 conf/$file $PKG/etc/slpkg/${file}.new
done
......
......@@ -31,7 +31,7 @@ def s_user(user):
Check for root user
"""
if user != "root":
print("\nslpkg: error: must have root privileges\n")
print("\nslpkg: Error: Must have root privileges\n")
raise SystemExit()
......@@ -87,7 +87,7 @@ class MetaData(object):
__all__ = "slpkg"
__author__ = "dslackw"
__version_info__ = (2, 9, 2)
__version_info__ = (2, 9, 3)
__version__ = "{0}.{1}.{2}".format(*__version_info__)
__license__ = "GNU General Public License v3 (GPLv3)"
__email__ = "d.zlatanidis@gmail.com"
......
......@@ -54,7 +54,7 @@ Commands:
repositories via dialog utility.
repo-list Print a list of all the
repositories.
repo-info [repository] Get information about a
lepo-info [repository] Get information about a
repository.
update slpkg Upgrade the program directly from
repository.
......@@ -95,8 +95,8 @@ Optional arguments:
--resolve-off, --case-ins directly from remote repositories
with all dependencies.
-t, --tracking, [repository] [package], Tracking package dependencies and
--check-deps, --graph=[type] print package dependencies tree with
highlight if packages is installed.
--check-deps, --graph=[type], print package dependencies tree with
--case-ins highlight if packages is installed.
Also check if dependencies used or
drawing dependencies diagram.
-p, --desc, [repository] [package], Print description of a package
......@@ -160,7 +160,8 @@ def usage(repo):
[-c [repository], --upgrade, --skip=[...], --resolve-off,
--checklist]
[-s [repository] [package...], --resolve-off, --case-ins]
[-t [repository] [package], --check-deps, --graph=[type]]
[-t [repository] [package], --check-deps, --graph=[type],
--case-ins]
[-p [repository] [package], --color=[]]
[-n [SBo package], --checklist, --case-ins]
[-F [package...], --case-ins]
......@@ -176,10 +177,10 @@ def usage(repo):
all_repos = RepoList().all_repos
del RepoList().all_repos
if repo in all_repos:
error_repo = ("slpkg: error: repository '{0}' is not activated"
error_repo = ("slpkg: Error: Repository '{0}' is not activated"
"\n".format(repo))
else:
error_repo = ("slpkg: error: repository '{0}' does not exist"
error_repo = ("slpkg: Error: Repository '{0}' does not exist"
"\n".format(repo))
header()
print(usage.__doc__)
......
......@@ -140,16 +140,13 @@ class BinaryInstall(object):
"""
if "--case-ins" in self.flag:
data = []
for name in self.data[0]:
data.append(split_package(name)[0])
data = Utils().package_name(self.PACKAGES_TXT)
data_dict = Utils().case_sensitive(data)
for pkg in self.packages:
index = self.packages.index(pkg)
for key, value in data_dict.iteritems():
if key == pkg.lower():
self.packages[index] = value
else:
self.packages[index] = pkg.lower()
def update_deps(self):
"""Update dependencies dictionary with all package
......
......@@ -38,6 +38,7 @@ class RepoInit(object):
def __init__(self, repo):
self.repo = repo
self.meta = _meta_
self.def_repo_dict = Repo().default_repository()
self.mirror = ""
def fetch(self):
......@@ -57,7 +58,7 @@ class RepoInit(object):
self.mirror = mirrors(name="", location="")
def _init_rlw(self):
self.mirror = "{0}{1}/".format(Repo().rlw(), slack_ver())
self.mirror = "{0}{1}/".format(self.def_repo_dict["rlw"], slack_ver())
def _init_alien(self):
ver = slack_ver()
......@@ -66,24 +67,25 @@ class RepoInit(object):
arch = "x86_64"
if self.meta.slack_rel == "current":
ver = self.meta.slack_rel
self.mirror = "{0}{1}/{2}/".format(Repo().alien(), ver, arch)
self.mirror = "{0}{1}/{2}/".format(self.def_repo_dict["alien"],
ver, arch)
def _init_slacky(self):
arch = ""
if self.meta.arch == "x86_64":
arch = "64"
self.mirror = "{0}slackware{1}-{2}/".format(Repo().slacky(), arch,
slack_ver())
self.mirror = "{0}slackware{1}-{2}/".format(
self.def_repo_dict["slacky"], arch, slack_ver())
def _init_studio(self):
arch = ""
if self.meta.arch == "x86_64":
arch = "64"
self.mirror = "{0}slackware{1}-{2}/".format(Repo().studioware(),
arch, slack_ver())
self.mirror = "{0}slackware{1}-{2}/".format(
self.def_repo_dict["studio"], arch, slack_ver())
def _init_slackr(self):
self.mirror = Repo().slackers()
self.mirror = self.def_repo_dict["slackr"]
def _init_slonly(self):
ver = slack_ver()
......@@ -92,42 +94,46 @@ class RepoInit(object):
arch = "{0}-x86_64".format(ver)
if self.meta.slack_rel == "current":
arch = "{0}-x86_64".format(self.meta.slack_rel)
self.mirror = "{0}{1}/".format(Repo().slackonly(), arch)
self.mirror = "{0}{1}/".format(self.def_repo_dict["slonly"], arch)
def _init_ktown(self):
self.mirror = Repo().ktown()
self.mirror = self.def_repo_dict["ktown"]
def _init_multi(self):
ver = slack_ver()
if self.meta.slack_rel == "current":
ver = self.meta.slack_rel
self.mirror = Repo().multi() + ver + "/"
self.mirror = self.def_repo_dict["multi"] + ver + "/"
def _init_slacke(self):
arch = ""
if self.meta.arch == "x86_64":
arch = "64"
self.mirror = "{0}slacke{1}/slackware{2}-{3}/".format(
Repo().slacke(), self.meta.slacke_sub_repo[1:-1], arch, slack_ver())
self.def_repo_dict["slacke"], self.meta.slacke_sub_repo[1:-1],
arch, slack_ver())
def _init_salix(self):
arch = "i486"
if self.meta.arch == "x86_64":
arch = "x86_64"
self.mirror = "{0}{1}/{2}/".format(Repo().salix(), arch, slack_ver())
self.mirror = "{0}{1}/{2}/".format(self.def_repo_dict["salix"],
arch, slack_ver())
def _init_slackl(self):
arch = "i486"
if self.meta.arch == "x86_64":
arch = "x86_64"
self.mirror = "{0}{1}/current/".format(Repo().slackel(), arch)
self.mirror = "{0}{1}/current/".format(self.def_repo_dict["slackl"],
arch)
def _init_rested(self):
self.mirror = Repo().restricted()
self.mirror = self.def_repo_dict["rested"]
def _init_msb(self):
arch = "x86"
if self.meta.arch == "x86_64":
arch = "x86_64"
self.mirror = "{0}{1}/{2}/{3}/".format(
Repo().msb(), slack_ver(), self.meta.msb_sub_repo[1:-1], arch)
self.def_repo_dict["msb"], slack_ver(),
self.meta.msb_sub_repo[1:-1], arch)
......@@ -31,7 +31,7 @@ from slpkg.__metadata__ import MetaData as _meta_
class Download(object):
"""Downloader manager. Slpkg use wget by default but support
curl and aria2.
curl, aria2 and http
"""
def __init__(self, path, url, repo):
self.path = path
......@@ -46,7 +46,8 @@ class Download(object):
def start(self):
"""Download files using wget or other downloader.
Optional curl and aria2c"""
Optional curl, aria2c and hhtp
"""
dwn_count = 1
self._directory_prefix()
for dwn in self.url:
......
......@@ -80,7 +80,7 @@ class Graph(object):
", ".join(self.file_format)))
raise SystemExit()
except IndexError:
print("slpkg: error: Image file suffix missing")
print("slpkg: Error: Image file suffix missing")
raise SystemExit()
def graph_easy(self):
......
......@@ -42,6 +42,7 @@ class Initialization(object):
def __init__(self, check):
self.check = check
self.meta = _meta_
self.def_repos_dict = Repo().default_repository()
self.conf_path = self.meta.conf_path
self.log_path = self.meta.log_path
self.lib_path = self.meta.lib_path
......@@ -139,7 +140,7 @@ class Initialization(object):
def sbo(self):
"""Creating sbo local library
"""
repo = Repo().sbo()
repo = self.def_repos_dict["sbo"]
log = self.log_path + "sbo/"
lib = self.lib_path + "sbo_repo/"
repo_name = log[:-1].split("/")[-1]
......@@ -165,7 +166,7 @@ class Initialization(object):
def rlw(self):
"""Creating rlw local library
"""
repo = Repo().rlw()
repo = self.def_repos_dict["rlw"]
log = self.log_path + "rlw/"
lib = self.lib_path + "rlw_repo/"
repo_name = log[:-1].split("/")[-1]
......@@ -195,7 +196,7 @@ class Initialization(object):
ar = "x86"
ver = slack_ver()
arch = self.meta.arch
repo = Repo().alien()
repo = self.def_repos_dict["alien"]
log = self.log_path + "alien/"
lib = self.lib_path + "alien_repo/"
repo_name = log[:-1].split("/")[-1]
......@@ -228,7 +229,7 @@ class Initialization(object):
"""
ar = ""
arch = self.meta.arch
repo = Repo().slacky()
repo = self.def_repos_dict["slacky"]
log = self.log_path + "slacky/"
lib = self.lib_path + "slacky_repo/"
repo_name = log[:-1].split("/")[-1]
......@@ -263,7 +264,7 @@ class Initialization(object):
"""
ar = ""
arch = self.meta.arch
repo = Repo().studioware()
repo = self.def_repos_dict["studio"]
log = self.log_path + "studio/"
lib = self.lib_path + "studio_repo/"
repo_name = log[:-1].split("/")[-1]
......@@ -295,7 +296,7 @@ class Initialization(object):
def slackr(self):
"""Creating slackers local library
"""
repo = Repo().slackers()
repo = self.def_repos_dict["slackr"]
log = self.log_path + "slackr/"
lib = self.lib_path + "slackr_repo/"
repo_name = log[:-1].split("/")[-1]
......@@ -325,7 +326,7 @@ class Initialization(object):
ver = slack_ver()
ar = "{0}-x86".format(ver)
arch = self.meta.arch
repo = Repo().slackonly()
repo = self.def_repos_dict["slonly"]
log = self.log_path + "slonly/"
lib = self.lib_path + "slonly_repo/"
repo_name = log[:-1].split("/")[-1]
......@@ -358,7 +359,7 @@ class Initialization(object):
def ktown(self):
"""Creating alien ktown local library
"""
repo = Repo().ktown()
repo = self.def_repos_dict["ktown"]
log = self.log_path + "ktown/"
lib = self.lib_path + "ktown_repo/"
repo_name = log[:-1].split("/")[-1]
......@@ -386,7 +387,7 @@ class Initialization(object):
"""Creating alien multilib local library
"""
ver = slack_ver()
repo = Repo().multi()
repo = self.def_repos_dict["multi"]
log = self.log_path + "multi/"
lib = self.lib_path + "multi_repo/"
repo_name = log[:-1].split("/")[-1]
......@@ -417,7 +418,7 @@ class Initialization(object):
"""
ar = ""
arch = self.meta.arch
repo = Repo().slacke()
repo = self.def_repos_dict["slacke"]
log = self.log_path + "slacke/"
lib = self.lib_path + "slacke_repo/"
repo_name = log[:-1].split("/")[-1]
......@@ -451,7 +452,7 @@ class Initialization(object):
"""
ar = "i486"
arch = self.meta.arch
repo = Repo().salix()
repo = self.def_repos_dict["salix"]
log = self.log_path + "salix/"
lib = self.lib_path + "salix_repo/"
repo_name = log[:-1].split("/")[-1]
......@@ -482,7 +483,7 @@ class Initialization(object):
"""
ar = "i486"
arch = self.meta.arch
repo = Repo().slackel()
repo = self.def_repos_dict["slackl"]
log = self.log_path + "slackl/"
lib = self.lib_path + "slackl_repo/"
repo_name = log[:-1].split("/")[-1]
......@@ -511,7 +512,7 @@ class Initialization(object):
def rested(self):
"""Creating alien restricted local library
"""
repo = Repo().restricted()
repo = self.def_repos_dict["rested"]
log = self.log_path + "rested/"
lib = self.lib_path + "rested_repo/"
repo_name = log[:-1].split("/")[-1]
......@@ -540,7 +541,7 @@ class Initialization(object):
"""
ar = "x86"
arch = self.meta.arch
repo = Repo().msb()
repo = self.def_repos_dict["msb"]
log = self.log_path + "msb/"
lib = self.lib_path + "msb_repo/"
repo_name = log[:-1].split("/")[-1]
......
......@@ -355,7 +355,8 @@ class ArgParse(object):
]
additional_options = [
"--check-deps",
"--graph="
"--graph=",
"--case-ins"
]
if (len(self.args) >= 3 and len(self.args) < 6 and
self.args[0] in options):
......@@ -363,8 +364,12 @@ class ArgParse(object):
for arg in self.args[3:]:
if arg.startswith(additional_options[1]):
flag.append(arg)
arg = ""
if arg in additional_options:
flag.append(arg)
if arg and arg not in additional_options:
usage("")
raise SystemExit()
TrackingDeps(self.args[2], self.args[1], flag).run()
else:
usage(self.args[1])
......
......@@ -26,9 +26,7 @@ import hashlib
def md5(source):
"""
Return MD5 Checksum
"""
"""Return MD5 Checksum"""
with open(source) as file_to_check:
data = file_to_check.read()
return hashlib.md5(data).hexdigest()
......@@ -53,7 +53,7 @@ class Msg(object):
"""Check for root user
"""
if user != "root":
print("\nslpkg: error: must have root privileges\n")
print("\nslpkg: Error: Must have root privileges\n")
raise SystemExit()
def build_FAILED(self, prgnam):
......
......@@ -41,10 +41,11 @@ from slpkg.sbo.greps import SBoGrep
class BuildPackage(object):
"""Build SBo packages from source
"""
def __init__(self, script, sources, path):
def __init__(self, script, sources, path, auto):
self.script = script
self.sources = sources
self.path = path
self.auto = auto
self.meta = _meta_
self.msg = Msg()
self.prgnam = self.script[:-7]
......@@ -135,14 +136,14 @@ class BuildPackage(object):
def _delete_sbo_tar_gz(self):
"""Delete slackbuild tar.gz file after untar
"""
if os.path.isfile(self.meta.build_path + self.script):
if not self.auto and os.path.isfile(self.meta.build_path + self.script):
os.remove(self.meta.build_path + self.script)
def _delete_dir(self):
"""Delete old folder if exists before start build
"""
if os.path.isdir(self.path + self.prgnam):
shutil.rmtree(self.path + self.prgnam)
if not self.auto and os.path.isdir(self.meta.build_path + self.prgnam):
shutil.rmtree(self.meta.build_path + self.prgnam)
def log_head(path, log_file, log_time):
......