mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-11-17 07:48:18 +01:00
fix slacky repos
This commit is contained in:
parent
c90c2144a7
commit
574d75ae5e
4 changed files with 60 additions and 20 deletions
54
README.rst
54
README.rst
|
@ -120,6 +120,11 @@ Using Slackware command:
|
|||
|
||||
Download binary package from `SourceForge <https://sourceforge.net/projects/slpkg/>`_
|
||||
|
||||
Slackware Current
|
||||
-----------------
|
||||
|
||||
For Slackware 'current' users must change the VERSION in /etc/slpkg.conf file.
|
||||
|
||||
Command Line Tool Usage
|
||||
-----------------------
|
||||
|
||||
|
@ -130,15 +135,17 @@ Command Line Tool Usage
|
|||
Optional arguments:
|
||||
-h, --help show this help message and exit
|
||||
-v, --version print version and exit
|
||||
-a, script [source...] auto build packages
|
||||
-a, script.tar.gz [source...] auto build SBo packages
|
||||
-b, --list, [package...] --add, --remove add, remove packages in blacklist
|
||||
-q, --list, [package...] --add, --remove add, remove packages in queue
|
||||
--build, --install, --build-install build or install from queue
|
||||
-l, <repository>, all, noarch list of installed packages
|
||||
-c, <repository> --upgrade --current check for updated packages
|
||||
-s, <repository> <package> --current download, build & install
|
||||
-c, <repository> --upgrade check for updated packages
|
||||
-s, <repository> <package> download, build & install
|
||||
-t, <repository> <package> tracking dependencies
|
||||
-p, <repository> <package> --color= print package description
|
||||
red, green, yellow, cyan, grey colors support
|
||||
-f, <package> find installed packages
|
||||
-t, <package> tracking dependencies from SBo
|
||||
-n, <package> view packages from SBo
|
||||
-i, [package...] install binary packages
|
||||
-u, [package...] upgrade binary packages
|
||||
|
@ -149,12 +156,13 @@ Command Line Tool Usage
|
|||
Note: '-q' options is working only for SBo repository
|
||||
|
||||
Repositories:
|
||||
Slackware = slack '--current'
|
||||
Alien = alien '--current'
|
||||
Slackware = slack
|
||||
Alien = alien
|
||||
SlackBuilds = sbo
|
||||
Slacky = slacky
|
||||
Robby's = rlw
|
||||
|
||||
|
||||
Slpkg Examples
|
||||
--------------
|
||||
|
||||
|
@ -210,12 +218,11 @@ build and install with all dependencies :
|
|||
0 installed package and 4 uninstalled packages.
|
||||
|
||||
|
||||
Find packages from `Slackware official mirrors <http://mirrors.slackware.com/>`_
|
||||
download and install (use '--current' to switch in current repository):
|
||||
Install packages from `Slackware official mirrors <http://mirrors.slackware.com/>`_ :
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ slpkg -s slack mozilla (add '--current' to switch in current version)
|
||||
$ slpkg -s slack mozilla
|
||||
|
||||
Packages with name matching [ mozilla ]
|
||||
Reading package lists ..............................Done
|
||||
|
@ -242,7 +249,7 @@ and also displays installed packages:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ slpkg -t brasero
|
||||
$ slpkg -t sbo brasero
|
||||
Reading package lists ......Done
|
||||
|
||||
+=========================
|
||||
|
@ -261,7 +268,7 @@ and also displays installed packages:
|
|||
|
|
||||
+--5 libunique
|
||||
|
||||
Check if your packages is up to date from slackbuilds.org:
|
||||
Check if your packages is up to date:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
|
@ -290,11 +297,11 @@ Check if your packages is up to date from slackbuilds.org:
|
|||
Would you like to upgrade [Y/n]?
|
||||
|
||||
Check if your distribution is up to date from `Slackware official mirrors
|
||||
<http://mirrors.slackware.com/>`_ (use '--current' to switch in current repository):
|
||||
<http://mirrors.slackware.com/>`_ :
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ slpkg -c slack --upgrade (add '--current' to switch in current version)
|
||||
$ slpkg -c slack --upgrade
|
||||
Reading package lists .......Done
|
||||
|
||||
These packages need upgrading:
|
||||
|
@ -553,7 +560,7 @@ Remove packages:
|
|||
+==============================================================================
|
||||
|
||||
Remove packages with all dependencies:
|
||||
(presupposes facility with the option 'slpkg -s sbo <package>)
|
||||
(presupposes facility with the option 'slpkg -s <repository> <package>)
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
|
@ -652,6 +659,25 @@ Add packages in blacklist file manually from
|
|||
live555
|
||||
faac
|
||||
|
||||
|
||||
Print package description:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ slpkg -p alien vlc
|
||||
|
||||
vlc (multimedia player for various audio and video formats)
|
||||
|
||||
VLC media player is a highly portable multimedia player for various
|
||||
audio and video formats (MPEG-1, MPEG-2, MPEG-4, DivX, mp3, ogg, ...)
|
||||
as well as DVDs, VCDs, and various streaming protocols.
|
||||
It can also be used as a server to stream in unicast or multicast in
|
||||
IPv4 or IPv6 on a high-bandwidth network.
|
||||
|
||||
|
||||
vlc home: http://www.videolan.org/vlc/
|
||||
|
||||
|
||||
Man page it is available for full support:
|
||||
|
||||
.. code-block:: bash
|
||||
|
|
|
@ -37,6 +37,8 @@ from slack.slack_version import slack_ver
|
|||
class Initialization(object):
|
||||
|
||||
def __init__(self):
|
||||
if not os.path.exists("/etc/slpkg"):
|
||||
os.mkdir("/etc/slpkg")
|
||||
if not os.path.exists(log_path):
|
||||
os.mkdir(log_path)
|
||||
if not os.path.exists(lib_path):
|
||||
|
|
|
@ -107,7 +107,6 @@ def repo_requires(name, repo):
|
|||
'''
|
||||
Grap package requirements from repositories
|
||||
'''
|
||||
slacky_deps = []
|
||||
if repo in ["alien", "slacky"]:
|
||||
lib = {
|
||||
'alien': lib_path + "alien_repo/PACKAGES.TXT",
|
||||
|
@ -123,9 +122,7 @@ def repo_requires(name, repo):
|
|||
if line.startswith("PACKAGE REQUIRED: "):
|
||||
if pkg_name == name:
|
||||
if repo == "slacky":
|
||||
for dep in line[18:].strip().split(","):
|
||||
slacky_deps.append(dep.split()[0])
|
||||
return slacky_deps
|
||||
return slacky_req_fix(line)
|
||||
else:
|
||||
return line[18:].strip().split(",")
|
||||
elif repo == "rlw":
|
||||
|
@ -143,3 +140,19 @@ def repo_requires(name, repo):
|
|||
return dependencies[name].split()
|
||||
else:
|
||||
return ""
|
||||
|
||||
|
||||
def slacky_req_fix(line):
|
||||
'''
|
||||
Fix slacky requirements because more dependencies splitting
|
||||
with ',' and others with '|'
|
||||
'''
|
||||
slacky_deps = []
|
||||
for dep in line[18:].strip().split(","):
|
||||
dep = dep.split("|")
|
||||
if len(dep) > 1:
|
||||
for d in dep:
|
||||
slacky_deps.append(d.split()[0])
|
||||
dep = "".join(dep)
|
||||
slacky_deps.append(dep.split()[0])
|
||||
return slacky_deps
|
||||
|
|
|
@ -164,7 +164,6 @@ class OthersInstall(object):
|
|||
# location = data[1]
|
||||
# size = data[2]
|
||||
# unsize = data[3]
|
||||
print deps
|
||||
data = repo_data(self.PACKAGES_TXT, self.step, self.repo, self.version)
|
||||
if len(deps) > 1:
|
||||
for pkg in deps:
|
||||
|
@ -225,7 +224,7 @@ def views(install_all, comp_sum, repository, dependencies):
|
|||
" " * (8-len(pkg_split[2])), pkg_split[3],
|
||||
" " * (7-len(pkg_split[3])), repository,
|
||||
comp, " K"))
|
||||
if len(dependencies) > 1 and count == 0:
|
||||
if len(dependencies) > 1 and len(install_all) > 1 and count == 0:
|
||||
print("Installing for dependencies:")
|
||||
count += 1
|
||||
return [pkg_sum, upg_sum, uni_sum]
|
||||
|
|
Loading…
Reference in a new issue