diff --git a/README.rst b/README.rst index 202510eb..72abf9f4 100644 --- a/README.rst +++ b/README.rst @@ -120,6 +120,11 @@ Using Slackware command: Download binary package from `SourceForge `_ +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, , all, noarch list of installed packages - -c, --upgrade --current check for updated packages - -s, --current download, build & install + -c, --upgrade check for updated packages + -s, download, build & install + -t, tracking dependencies + -p, --color= print package description + red, green, yellow, cyan, grey colors support -f, find installed packages - -t, tracking dependencies from SBo -n, view packages from SBo -i, [package...] install binary packages -u, [package...] upgrade binary packages @@ -149,11 +156,12 @@ 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 `_ -download and install (use '--current' to switch in current repository): +Install packages from `Slackware official mirrors `_ : .. 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 -`_ (use '--current' to switch in current repository): +`_ : .. 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 ) +(presupposes facility with the option 'slpkg -s ) .. 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 diff --git a/slpkg/init.py b/slpkg/init.py index 963af171..a960ce09 100755 --- a/slpkg/init.py +++ b/slpkg/init.py @@ -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): diff --git a/slpkg/others/greps.py b/slpkg/others/greps.py index e8dadb3d..89ad1c54 100755 --- a/slpkg/others/greps.py +++ b/slpkg/others/greps.py @@ -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 diff --git a/slpkg/others/install.py b/slpkg/others/install.py index a6778e67..e58b7bb5 100755 --- a/slpkg/others/install.py +++ b/slpkg/others/install.py @@ -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]