update for release 1.7.5

This commit is contained in:
Dimitris Zlatanidis 2014-08-22 08:20:29 +03:00
parent 011ddf1daf
commit b9d94b6193
12 changed files with 117 additions and 62 deletions

View file

@ -1,10 +1,11 @@
18-08-2014 22-08-2014
Version 1.7.5.dev Version 1.7.5.dev
[Feature] - Added report of packages will be installed with options [Feature] - Added report of packages will be installed the options
`slpkg -s sbo <package>` `slpkg -s sbo <package>`
`slpkg -s slack <package>` `slpkg -s slack <package>`
`slpkg -c slack upgrade` `slpkg -c slack upgrade`
[Updated] - Fix mirrors for Slackware x86
17-08-2014 17-08-2014
Version 1.7.4 Version 1.7.4

View file

@ -107,8 +107,22 @@ build and install with all dependencies :
$ slpkg -s sbo brasero $ slpkg -s sbo brasero
Building dependency tree...... Done Building dependency tree...... Done
The following packages will be automatically installed or upgraded with new version: The following packages will be automatically installed or upgraded with new version:
+==============================================================================
| Package Version Arch Repository
+==============================================================================
Installing:
brasero 3.11.3 x86_64 SBo
Installing for dependencies:
orc 0.4.19 x86_64 SBo
gstreamer1 1.2.2 x86_64 SBo
gst1-plugins-base 1.2.2 x86_64 SBo
gst1-plugins-bad 1.2.2 x86_64 SBo
libunique 1.1.6 x86_64 SBo
orc gstreamer1 gst1-plugins-base gst1-plugins-bad libunique brasero Installing summary
===============================================================================
Total 6 packages.
0 packages will be installed, 6 allready installed.
Do you want to continue [Y/n]? y Do you want to continue [Y/n]? y
. .
@ -143,10 +157,19 @@ download and install:
Reading package lists.............................. Done Reading package lists.............................. Done
[ install ] --> mozilla-firefox-24.1.0esr-x86_64-1 +==============================================================================
[ install ] --> mozilla-nss-3.15.2-x86_64-2 | Package Arch Build Repos Size
[ install ] --> mozilla-thunderbird-24.1.0-x86_64-1 +==============================================================================
Installing:
mozilla-firefox-24.1.0esr x86_64 1 Slack 23524 K
mozilla-nss-3.15.2 x86_64 2 Slack 1592 K
mozilla-thunderbird-24.1.0 x86_64 1 Slack 24208 K
Installing summary
===============================================================================
Total 3 packages.
3 packages will be installed, 0 allready installed.
Need to get 6.02 Mb of archives. Need to get 6.02 Mb of archives.
After this process, 15.72 Mb of additional disk space will be used. After this process, 15.72 Mb of additional disk space will be used.
@ -176,9 +199,6 @@ and also displays installed packages:
| |
+--5 libunique +--5 libunique
NOTE: green installed, red not installed
Check if your packages is up to date from slackbuilds.org: Check if your packages is up to date from slackbuilds.org:
.. code-block:: bash .. code-block:: bash
@ -213,10 +233,17 @@ Check if your distribution is up to date from `Slackware official mirrors
These packages need upgrading: These packages need upgrading:
[ upgrade ] --> dhcpcd-6.0.5-x86_64-3_slack14.1.txz +==============================================================================
[ upgrade ] --> samba-4.1.11-x86_64-1_slack14.1.txz | Package Arch Build Repos Size
[ upgrade ] --> xscreensaver-5.29-x86_64-1_slack14.1.txz +==============================================================================
Upgrading:
dhcpcd-6.0.5 x86_64 3 Slack 92 K
samba-4.1.11 x86_64 1 Slack 9928 K
xscreensaver-5.29 x86_64 1 Slack 3896 K
Installing summary
===============================================================================
Total 3 package will be upgrading.
Need to get 1.70 Mb of archives. Need to get 1.70 Mb of archives.
After this process, 9.51 Mb of additional disk space will be used. After this process, 9.51 Mb of additional disk space will be used.
@ -243,7 +270,7 @@ Find packages from slackbuilds.org:
Download Download this package Download Download this package
Build Download and build this package Build Download and build this package
Install Download/Build/Install Install Download/Build/Install
Quit Quit
_ _
Auto tool to build package: Auto tool to build package:

View file

@ -81,7 +81,7 @@ slackbuilds.org is up to date.
Find package from slackbuild.org with all dependencies, Find package from slackbuild.org with all dependencies,
download, build and install them if not installed or new version is download, build and install them if not installed or new version is
available. Even download and install official packages from Slackware available. Even download and install official packages from Slackware
official mirrors and install. official mirrors and install or reinstall if already installed.
.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
@ -148,13 +148,25 @@ $ \fBslpkg -t brasero\fP
| |
--5: libunique --5: libunique
NOTE: green installed, red not installed
$ \fBslpkg -s sbo brasero\fP $ \fBslpkg -s sbo brasero\fP
Building dependency tree...... Done Building dependency tree...... Done
The following packages will be automatically installed or upgraded with new version: The following packages will be automatically installed or upgraded with new version:
+==============================================================================
| Package Version Arch Repository
+==============================================================================
Installing:
brasero 3.11.3 x86_64 SBo
Installing for dependencies:
orc 0.4.19 x86_64 SBo
gstreamer1 1.2.2 x86_64 SBo
gst1-plugins-base 1.2.2 x86_64 SBo
gst1-plugins-bad 1.2.2 x86_64 SBo
libunique 1.1.6 x86_64 SBo
orc gstreamer1 gst1-plugins-base gst1-plugins-bad libunique brasero Installing summary
===============================================================================
Total 6 packages.
0 packages will be installed, 6 allready installed.
Do you want to continue [Y/n]? y Do you want to continue [Y/n]? y
. .

View file

@ -34,4 +34,4 @@ def get_file(link, char):
results.append(link[i]) results.append(link[i])
if link[i] == char: if link[i] == char:
break break
return "".join(results[::-1]).replace("/", "").strip(" ") return "".join(results[::-1]).replace("/", "").strip()

View file

@ -136,7 +136,7 @@ def main():
else: else:
choices = ["upgrade"] choices = ["upgrade"]
ext_err_args() ext_err_args()
err1_args("".join(args.c), choices) err1_args("".join(args.c[1]), choices)
else: else:
choices = ["sbo", "slack"] choices = ["sbo", "slack"]
ext_err_args() ext_err_args()
@ -162,7 +162,7 @@ def main():
else: else:
choices = ["sbo", "slack"] choices = ["sbo", "slack"]
ext_err_args() ext_err_args()
err1_args("".join(args.s), choices) err1_args("".join(args.s[0]), choices)
elif len(args.s) < 2: elif len(args.s) < 2:
if "sbo" in args.s or "slack" in args.s: if "sbo" in args.s or "slack" in args.s:
ext_err_args() ext_err_args()

View file

@ -84,18 +84,20 @@ def template(max):
def view_sbo(pkg, sbo_url, sbo_dwn, source_dwn, extra_dwn, sbo_req): def view_sbo(pkg, sbo_url, sbo_dwn, source_dwn, extra_dwn, sbo_req):
print # new line at start print # new line at start
template(78) template(78)
print ("| {0}Package {1}{2}{3} --> {4}".format(colors.GREEN, print("| {0}Package {1}{2}{3} --> {4}".format(colors.GREEN,
colors.CYAN, pkg, colors.GREEN, colors.ENDC + sbo_url)) colors.CYAN, pkg, colors.GREEN, colors.ENDC + sbo_url))
template(78) template(78)
print ("| {0}SlackBuild : {1}{2}".format(colors.GREEN, colors.ENDC, sbo_dwn)) print("| {0}SlackBuild : {1}{2}".format(colors.GREEN, colors.ENDC, sbo_dwn))
print ("| {0}Source : {1}{2}".format(colors.GREEN, colors.ENDC, source_dwn)) print("| {0}Source : {1}{2}".format(colors.GREEN, colors.ENDC, source_dwn))
print ("| {0}Extra : {1}{2}".format(colors.GREEN, colors.ENDC, extra_dwn)) print("| {0}Extra : {1}{2}".format(colors.GREEN, colors.ENDC, extra_dwn))
print ("| {0}Requirements : {1}{2}".format(colors.YELLOW, colors.ENDC, print("| {0}Requirements : {1}{2}".format(colors.YELLOW, colors.ENDC,
", ".join(sbo_req.split()))) ", ".join(sbo_req.split())))
template(78) template(78)
print (" {0}R{1}EADME View the README file".format(colors.RED, colors.ENDC)) print(" {0}R{1}EADME View the README file".format(colors.RED, colors.ENDC))
print (" {0}S{1}lackBuild View the SlackBuild file".format(colors.RED, colors.ENDC)) print(" {0}S{1}lackBuild View the SlackBuild file".format(colors.RED, colors.ENDC))
print (" In{0}f{1}o View the Info file".format(colors.RED, colors.ENDC)) print(" In{0}f{1}o View the Info file".format(colors.RED, colors.ENDC))
print (" {0}D{1}ownload Download this package".format(colors.RED, colors.ENDC)) print(" {0}D{1}ownload Download this package".format(colors.RED, colors.ENDC))
print (" {0}B{1}uild Download and build".format(colors.RED, colors.ENDC)) print(" {0}B{1}uild Download and build".format(colors.RED, colors.ENDC))
print (" {0}I{1}nstall Download/Build/Install\n".format(colors.RED, colors.ENDC)) print(" {0}I{1}nstall Download/Build/Install".format(colors.RED, colors.ENDC))
print(" {0}Q{1}uit Quit\n".format(colors.RED, colors.ENDC))

View file

@ -98,4 +98,4 @@ def pkg_tracking(name):
else: else:
print(" |") print(" |")
print(" {0}{1}: {2}{3}{4}".format("+--", index, colors.RED, pkg, colors.ENDC)) print(" {0}{1}: {2}{3}{4}".format("+--", index, colors.RED, pkg, colors.ENDC))
print("\n NOTE: green installed, red not installed\n") print # new line at end

View file

@ -71,6 +71,6 @@ def sbo_version_pkg(name):
sbo_name.append(line[17:].strip()) sbo_name.append(line[17:].strip())
if line.startswith("SLACKBUILD VERSION: "): if line.startswith("SLACKBUILD VERSION: "):
sbo_ver.append(line[20:].strip()) sbo_ver.append(line[20:].strip())
for nam, ver in zip(sbo_name, sbo_ver): for sbo, ver in zip(sbo_name, sbo_ver):
if nam == name: if sbo == name:
return ver return ver

View file

@ -79,18 +79,18 @@ def sbo_build(name):
template(78) template(78)
print("Installing:") print("Installing:")
print " ", "".join(pkg_for_install), " "*(22-len(name)), sbo_ver, " "*( print " ", "".join(pkg_for_install), " "*(22-len(name)), sbo_ver, " "*(
12-len(sbo_ver)), arch, " "*5, "SBo" 12-len(sbo_ver)), arch, " "*(11-len(arch)), "SBo"
print("Installing for dependencies:") print("Installing for dependencies:")
for dep in dependencies[:-1]: for dep in dependencies[:-1]:
sbo_url = sbo_search_pkg(dep) sbo_url = sbo_search_pkg(dep)
sbo_ver = sbo_version_pkg(dep) sbo_ver = sbo_version_pkg(dep)
if find_package(dep + sp, pkg_path): if find_package(dep + sp, pkg_path):
print " ", colors.GREEN + dep + colors.ENDC, " "*(22-len(dep)), sbo_ver, " "*( print " ", colors.GREEN + dep + colors.ENDC, " "*(22-len(dep)), sbo_ver, " "*(
12-len(sbo_ver)), arch, " "*5, "SBo" 12-len(sbo_ver)), arch, " "*(11-len(arch)), "SBo"
pkg_sum += 1 pkg_sum += 1
else: else:
print " ", colors.RED + dep + colors.ENDC, " "*(22-len(dep)), sbo_ver, " "*( print " ", colors.RED + dep + colors.ENDC, " "*(22-len(dep)), sbo_ver, " "*(
12-len(sbo_ver)), arch, " "*5, "SBo" 12-len(sbo_ver)), arch, " "*(11-len(arch)), "SBo"
print("\nInstalling summary") print("\nInstalling summary")
print("="*79) print("="*79)
print("Total {0} packages.".format(len(dependencies))) print("Total {0} packages.".format(len(dependencies)))
@ -123,20 +123,20 @@ def sbo_build(name):
template(78) template(78)
pkg_found(pkg, sbo_file_version) pkg_found(pkg, sbo_file_version)
template(78) template(78)
''' '''
Write dependencies in a log file Write dependencies in a log file
into directory `/var/log/slpkg/dep/` into directory `/var/log/slpkg/dep/`
''' '''
dep_path = log_path + "dep/" dep_path = log_path + "dep/"
if not os.path.exists(dep_path): if not os.path.exists(dep_path):
os.mkdir(dep_path) os.mkdir(dep_path)
if os.path.isfile(dep_path + name): if os.path.isfile(dep_path + name):
os.remove(dep_path + name) os.remove(dep_path + name)
if len(dependencies) > 1: if len(dependencies) > 1:
f = open(dep_path + name, "w") f = open(dep_path + name, "w")
for dep in dependencies: for dep in dependencies:
f.write(dep + "\n") f.write(dep + "\n")
f.close() f.close()
except KeyboardInterrupt: except KeyboardInterrupt:
print # new line at exit print # new line at exit
sys.exit() sys.exit()

View file

@ -29,7 +29,7 @@ import subprocess
from colors import colors from colors import colors
from url_read import url_read from url_read import url_read
from messages import pkg_not_found, template from messages import pkg_not_found, template
from __metadata__ import slpkg_tmp, pkg_path, arch from __metadata__ import slpkg_tmp, pkg_path, arch, sp
from pkg.manager import pkg_upgrade, pkg_reinstall from pkg.manager import pkg_upgrade, pkg_reinstall
@ -96,8 +96,12 @@ def install(slack_pkg):
Kb = size.replace(pkg, "") Kb = size.replace(pkg, "")
if "-noarch-" in pkg: if "-noarch-" in pkg:
arch = "noarch" arch = "noarch"
elif "-"+os.uname()[4]+"-" in pkg: elif sp+os.uname()[4]+sp in pkg:
arch = os.uname()[4] arch = os.uname()[4]
elif "-i486-" in pkg:
arch = "i486"
elif "-i686-" in pkg:
arch = "i686"
elif "-x86-" in pkg: elif "-x86-" in pkg:
arch = "x86" arch = "x86"
elif "-fw-" in pkg: elif "-fw-" in pkg:
@ -109,9 +113,11 @@ def install(slack_pkg):
SC, EC = colors.GREEN, colors.ENDC SC, EC = colors.GREEN, colors.ENDC
else: else:
SC, EC = colors.RED, colors.ENDC SC, EC = colors.RED, colors.ENDC
print " ", SC + pkg[:-5].replace("-"+arch+"-", "") + EC, " "*( print " ", SC + pkg[:-5].replace(sp+arch+sp, "") + EC, " "*(
48-len(pkg[:-5])), arch, " ", pkg[-5:-4].replace( 40-len(pkg[:-5].replace(sp+arch+sp, ""))), arch, " "*(
"-"+arch+"-", ""), " "*5, "Slack", " ", Kb, " "*(3-len(Kb)), "K" 7-len(arch)), pkg[-5:-4].replace(sp+arch+sp, ""), " "*(
6-len(pkg[-5:-4].replace(sp+arch+sp, ""))), "Slack", " ", Kb, " "*(
3-len(Kb)), "K"
for install in install_all: for install in install_all:
for comp in comp_list: for comp in comp_list:
if install == comp[:-(len(comp)-len(install))]: if install == comp[:-(len(comp)-len(install))]:

View file

@ -33,6 +33,6 @@ def mirrors(name, location):
http = "http://mirrors.slackware.com/slackware/slackware64-{0}/{1}{2}".format( http = "http://mirrors.slackware.com/slackware/slackware64-{0}/{1}{2}".format(
slack_ver(), location, name) slack_ver(), location, name)
else: else:
http = "http://mirrors.slackware.com/slackware/slackware-{0}/{1}{3}".format( http = "http://mirrors.slackware.com/slackware/slackware-{0}/{1}{2}".format(
slack_ver(), location, name) slack_ver(), location, name)
return http return http

View file

@ -29,7 +29,7 @@ import subprocess
from colors import colors from colors import colors
from url_read import url_read from url_read import url_read
from messages import template from messages import template
from __metadata__ import pkg_path, slpkg_tmp from __metadata__ import pkg_path, slpkg_tmp, sp
from pkg.manager import pkg_upgrade from pkg.manager import pkg_upgrade
@ -84,14 +84,19 @@ def patches():
template(78) template(78)
print "| Package", " "*33, "Arch", " "*3, "Build", " ", "Repos", " ", "Size" print "| Package", " "*33, "Arch", " "*3, "Build", " ", "Repos", " ", "Size"
template(78) template(78)
print("Upgrading:")
for upgrade in upgrade_all: for upgrade in upgrade_all:
for size in comp_list: for size in comp_list:
if upgrade in size: if upgrade in size:
Kb = size.replace(upgrade, "") Kb = size.replace(upgrade, "")
if "-noarch-" in upgrade: if "-noarch-" in upgrade:
arch = "noarch" arch = "noarch"
elif "-"+os.uname()[4]+"-" in upgrade: elif sp+os.uname()[4]+sp in upgrade:
arch = os.uname()[4] arch = os.uname()[4]
elif "-i486-" in upgrade:
arch = "i486"
elif "-i686-" in upgrade:
arch = "i686"
elif "-x86-" in upgrade: elif "-x86-" in upgrade:
arch = "x86" arch = "x86"
elif "-fw-" in upgrade: elif "-fw-" in upgrade:
@ -103,9 +108,11 @@ def patches():
else: else:
slack = "" slack = ""
print " ", upgrade[:-(5+len(slack))].replace( print " ", upgrade[:-(5+len(slack))].replace(
"-"+arch+"-", ""), " "*(48-len(upgrade[:-( sp+arch+sp, ""), " "*(40-len(upgrade[:-(
5+len(slack))])), arch, " ", upgrade[-15:-14].replace( 5+len(slack))].replace(sp+arch+sp, ""))), arch, " "*(
"-"+arch+"-", ""), " "*5, "Slack", " ", Kb, " "*(3-len(Kb)), "K" 7-len(arch)), upgrade[-15:-14].replace(sp+arch+sp, ""), " "*(
6-len(upgrade[-15:-14].replace(sp+arch+sp, ""))), "Slack", " ", Kb, " "*(
3-len(Kb)), "K"
for dwn in dwn_list: for dwn in dwn_list:
if "/" + upgrade in dwn: if "/" + upgrade in dwn:
dwn_patches.append(dwn) dwn_patches.append(dwn)