id int32 0 252k | repo stringlengths 7 55 | path stringlengths 4 127 | func_name stringlengths 1 88 | original_string stringlengths 75 19.8k | language stringclasses 1
value | code stringlengths 75 19.8k | code_tokens list | docstring stringlengths 3 17.3k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 87 242 |
|---|---|---|---|---|---|---|---|---|---|---|---|
43,300 | dslackw/slpkg | slpkg/utils.py | Utils.case_sensitive | def case_sensitive(self, lst):
"""Create dictionary from list with key in lower case
and value with default
"""
dictionary = {}
for pkg in lst:
dictionary[pkg.lower()] = pkg
return dictionary | python | def case_sensitive(self, lst):
"""Create dictionary from list with key in lower case
and value with default
"""
dictionary = {}
for pkg in lst:
dictionary[pkg.lower()] = pkg
return dictionary | [
"def",
"case_sensitive",
"(",
"self",
",",
"lst",
")",
":",
"dictionary",
"=",
"{",
"}",
"for",
"pkg",
"in",
"lst",
":",
"dictionary",
"[",
"pkg",
".",
"lower",
"(",
")",
"]",
"=",
"pkg",
"return",
"dictionary"
] | Create dictionary from list with key in lower case
and value with default | [
"Create",
"dictionary",
"from",
"list",
"with",
"key",
"in",
"lower",
"case",
"and",
"value",
"with",
"default"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/utils.py#L33-L40 |
43,301 | dslackw/slpkg | slpkg/utils.py | Utils.remove_dbs | def remove_dbs(self, double):
"""Remove double item from list
"""
one = []
for dup in double:
if dup not in one:
one.append(dup)
return one | python | def remove_dbs(self, double):
"""Remove double item from list
"""
one = []
for dup in double:
if dup not in one:
one.append(dup)
return one | [
"def",
"remove_dbs",
"(",
"self",
",",
"double",
")",
":",
"one",
"=",
"[",
"]",
"for",
"dup",
"in",
"double",
":",
"if",
"dup",
"not",
"in",
"one",
":",
"one",
".",
"append",
"(",
"dup",
")",
"return",
"one"
] | Remove double item from list | [
"Remove",
"double",
"item",
"from",
"list"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/utils.py#L50-L57 |
43,302 | dslackw/slpkg | slpkg/utils.py | Utils.read_file | def read_file(self, registry):
"""Returns reading file
"""
with open(registry, "r") as file_txt:
read_file = file_txt.read()
file_txt.close()
return read_file | python | def read_file(self, registry):
"""Returns reading file
"""
with open(registry, "r") as file_txt:
read_file = file_txt.read()
file_txt.close()
return read_file | [
"def",
"read_file",
"(",
"self",
",",
"registry",
")",
":",
"with",
"open",
"(",
"registry",
",",
"\"r\"",
")",
"as",
"file_txt",
":",
"read_file",
"=",
"file_txt",
".",
"read",
"(",
")",
"file_txt",
".",
"close",
"(",
")",
"return",
"read_file"
] | Returns reading file | [
"Returns",
"reading",
"file"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/utils.py#L59-L65 |
43,303 | dslackw/slpkg | slpkg/utils.py | Utils.package_name | def package_name(self, PACKAGES_TXT):
"""Returns list with all the names of packages repository
"""
packages = []
for line in PACKAGES_TXT.splitlines():
if line.startswith("PACKAGE NAME:"):
packages.append(split_package(line[14:].strip())[0])
return pa... | python | def package_name(self, PACKAGES_TXT):
"""Returns list with all the names of packages repository
"""
packages = []
for line in PACKAGES_TXT.splitlines():
if line.startswith("PACKAGE NAME:"):
packages.append(split_package(line[14:].strip())[0])
return pa... | [
"def",
"package_name",
"(",
"self",
",",
"PACKAGES_TXT",
")",
":",
"packages",
"=",
"[",
"]",
"for",
"line",
"in",
"PACKAGES_TXT",
".",
"splitlines",
"(",
")",
":",
"if",
"line",
".",
"startswith",
"(",
"\"PACKAGE NAME:\"",
")",
":",
"packages",
".",
"ap... | Returns list with all the names of packages repository | [
"Returns",
"list",
"with",
"all",
"the",
"names",
"of",
"packages",
"repository"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/utils.py#L67-L74 |
43,304 | dslackw/slpkg | slpkg/utils.py | Utils.check_downloaded | def check_downloaded(self, path, maybe_downloaded):
"""Check if files downloaded and return downloaded
packages
"""
downloaded = []
for pkg in maybe_downloaded:
if os.path.isfile(path + pkg):
downloaded.append(pkg)
return downloaded | python | def check_downloaded(self, path, maybe_downloaded):
"""Check if files downloaded and return downloaded
packages
"""
downloaded = []
for pkg in maybe_downloaded:
if os.path.isfile(path + pkg):
downloaded.append(pkg)
return downloaded | [
"def",
"check_downloaded",
"(",
"self",
",",
"path",
",",
"maybe_downloaded",
")",
":",
"downloaded",
"=",
"[",
"]",
"for",
"pkg",
"in",
"maybe_downloaded",
":",
"if",
"os",
".",
"path",
".",
"isfile",
"(",
"path",
"+",
"pkg",
")",
":",
"downloaded",
"... | Check if files downloaded and return downloaded
packages | [
"Check",
"if",
"files",
"downloaded",
"and",
"return",
"downloaded",
"packages"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/utils.py#L76-L84 |
43,305 | dslackw/slpkg | slpkg/graph.py | Graph.dependencies | def dependencies(self, deps_dict):
"""Generate graph file with depenndencies map tree
"""
try:
import pygraphviz as pgv
except ImportError:
graph_easy, comma = "", ""
if (self.image == "ascii" and
not os.path.isfile("/usr/bin/graph-... | python | def dependencies(self, deps_dict):
"""Generate graph file with depenndencies map tree
"""
try:
import pygraphviz as pgv
except ImportError:
graph_easy, comma = "", ""
if (self.image == "ascii" and
not os.path.isfile("/usr/bin/graph-... | [
"def",
"dependencies",
"(",
"self",
",",
"deps_dict",
")",
":",
"try",
":",
"import",
"pygraphviz",
"as",
"pgv",
"except",
"ImportError",
":",
"graph_easy",
",",
"comma",
"=",
"\"\"",
",",
"\"\"",
"if",
"(",
"self",
".",
"image",
"==",
"\"ascii\"",
"and"... | Generate graph file with depenndencies map tree | [
"Generate",
"graph",
"file",
"with",
"depenndencies",
"map",
"tree"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/graph.py#L43-L70 |
43,306 | dslackw/slpkg | slpkg/graph.py | Graph.check_file | def check_file(self):
"""Check for file format and type
"""
try:
image_type = ".{0}".format(self.image.split(".")[1])
if image_type not in self.file_format:
print("Format: '{0}' not recognized. Use one of "
"them:\n{1}".format(self.im... | python | def check_file(self):
"""Check for file format and type
"""
try:
image_type = ".{0}".format(self.image.split(".")[1])
if image_type not in self.file_format:
print("Format: '{0}' not recognized. Use one of "
"them:\n{1}".format(self.im... | [
"def",
"check_file",
"(",
"self",
")",
":",
"try",
":",
"image_type",
"=",
"\".{0}\"",
".",
"format",
"(",
"self",
".",
"image",
".",
"split",
"(",
"\".\"",
")",
"[",
"1",
"]",
")",
"if",
"image_type",
"not",
"in",
"self",
".",
"file_format",
":",
... | Check for file format and type | [
"Check",
"for",
"file",
"format",
"and",
"type"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/graph.py#L72-L84 |
43,307 | dslackw/slpkg | slpkg/graph.py | Graph.graph_easy | def graph_easy(self):
"""Draw ascii diagram. graph-easy perl module require
"""
if not os.path.isfile("/usr/bin/graph-easy"):
print("Require 'graph-easy': Install with 'slpkg -s sbo "
"graph-easy'")
self.remove_dot()
raise SystemExit()
... | python | def graph_easy(self):
"""Draw ascii diagram. graph-easy perl module require
"""
if not os.path.isfile("/usr/bin/graph-easy"):
print("Require 'graph-easy': Install with 'slpkg -s sbo "
"graph-easy'")
self.remove_dot()
raise SystemExit()
... | [
"def",
"graph_easy",
"(",
"self",
")",
":",
"if",
"not",
"os",
".",
"path",
".",
"isfile",
"(",
"\"/usr/bin/graph-easy\"",
")",
":",
"print",
"(",
"\"Require 'graph-easy': Install with 'slpkg -s sbo \"",
"\"graph-easy'\"",
")",
"self",
".",
"remove_dot",
"(",
")",... | Draw ascii diagram. graph-easy perl module require | [
"Draw",
"ascii",
"diagram",
".",
"graph",
"-",
"easy",
"perl",
"module",
"require"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/graph.py#L86-L96 |
43,308 | dslackw/slpkg | slpkg/graph.py | Graph.remove_dot | def remove_dot(self):
"""Remove .dot files
"""
if os.path.isfile("{0}.dot".format(self.image)):
os.remove("{0}.dot".format(self.image)) | python | def remove_dot(self):
"""Remove .dot files
"""
if os.path.isfile("{0}.dot".format(self.image)):
os.remove("{0}.dot".format(self.image)) | [
"def",
"remove_dot",
"(",
"self",
")",
":",
"if",
"os",
".",
"path",
".",
"isfile",
"(",
"\"{0}.dot\"",
".",
"format",
"(",
"self",
".",
"image",
")",
")",
":",
"os",
".",
"remove",
"(",
"\"{0}.dot\"",
".",
"format",
"(",
"self",
".",
"image",
")",... | Remove .dot files | [
"Remove",
".",
"dot",
"files"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/graph.py#L98-L102 |
43,309 | dslackw/slpkg | slpkg/pkg/manager.py | alien_filter | def alien_filter(packages, sizes):
"""This filter avoid list double packages from
alien repository
"""
cache, npkg, nsize = [], [], []
for p, s in zip(packages, sizes):
name = split_package(p)[0]
if name not in cache:
cache.append(name)
npkg.append(p)
... | python | def alien_filter(packages, sizes):
"""This filter avoid list double packages from
alien repository
"""
cache, npkg, nsize = [], [], []
for p, s in zip(packages, sizes):
name = split_package(p)[0]
if name not in cache:
cache.append(name)
npkg.append(p)
... | [
"def",
"alien_filter",
"(",
"packages",
",",
"sizes",
")",
":",
"cache",
",",
"npkg",
",",
"nsize",
"=",
"[",
"]",
",",
"[",
"]",
",",
"[",
"]",
"for",
"p",
",",
"s",
"in",
"zip",
"(",
"packages",
",",
"sizes",
")",
":",
"name",
"=",
"split_pac... | This filter avoid list double packages from
alien repository | [
"This",
"filter",
"avoid",
"list",
"double",
"packages",
"from",
"alien",
"repository"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/pkg/manager.py#L570-L581 |
43,310 | dslackw/slpkg | slpkg/pkg/manager.py | PackageManager.upgrade | def upgrade(self, flag):
"""Upgrade Slackware binary packages with new
"""
for pkg in self.binary:
try:
subprocess.call("upgradepkg {0} {1}".format(flag, pkg),
shell=True)
check = pkg[:-4].split("/")[-1]
... | python | def upgrade(self, flag):
"""Upgrade Slackware binary packages with new
"""
for pkg in self.binary:
try:
subprocess.call("upgradepkg {0} {1}".format(flag, pkg),
shell=True)
check = pkg[:-4].split("/")[-1]
... | [
"def",
"upgrade",
"(",
"self",
",",
"flag",
")",
":",
"for",
"pkg",
"in",
"self",
".",
"binary",
":",
"try",
":",
"subprocess",
".",
"call",
"(",
"\"upgradepkg {0} {1}\"",
".",
"format",
"(",
"flag",
",",
"pkg",
")",
",",
"shell",
"=",
"True",
")",
... | Upgrade Slackware binary packages with new | [
"Upgrade",
"Slackware",
"binary",
"packages",
"with",
"new"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/pkg/manager.py#L68-L82 |
43,311 | dslackw/slpkg | slpkg/pkg/manager.py | PackageManager.remove | def remove(self, flag, extra):
"""Remove Slackware binary packages
"""
self.flag = flag
self.extra = extra
self.dep_path = self.meta.log_path + "dep/"
dependencies, rmv_list = [], []
self.removed = self._view_removed()
if not self.removed:
prin... | python | def remove(self, flag, extra):
"""Remove Slackware binary packages
"""
self.flag = flag
self.extra = extra
self.dep_path = self.meta.log_path + "dep/"
dependencies, rmv_list = [], []
self.removed = self._view_removed()
if not self.removed:
prin... | [
"def",
"remove",
"(",
"self",
",",
"flag",
",",
"extra",
")",
":",
"self",
".",
"flag",
"=",
"flag",
"self",
".",
"extra",
"=",
"extra",
"self",
".",
"dep_path",
"=",
"self",
".",
"meta",
".",
"log_path",
"+",
"\"dep/\"",
"dependencies",
",",
"rmv_li... | Remove Slackware binary packages | [
"Remove",
"Slackware",
"binary",
"packages"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/pkg/manager.py#L91-L134 |
43,312 | dslackw/slpkg | slpkg/pkg/manager.py | PackageManager._rmv_deps_answer | def _rmv_deps_answer(self):
"""Remove dependencies answer
"""
if self.meta.remove_deps_answer in ["y", "Y"]:
remove_dep = self.meta.remove_deps_answer
else:
try:
remove_dep = raw_input(
"\nRemove dependencies (maybe used by "
... | python | def _rmv_deps_answer(self):
"""Remove dependencies answer
"""
if self.meta.remove_deps_answer in ["y", "Y"]:
remove_dep = self.meta.remove_deps_answer
else:
try:
remove_dep = raw_input(
"\nRemove dependencies (maybe used by "
... | [
"def",
"_rmv_deps_answer",
"(",
"self",
")",
":",
"if",
"self",
".",
"meta",
".",
"remove_deps_answer",
"in",
"[",
"\"y\"",
",",
"\"Y\"",
"]",
":",
"remove_dep",
"=",
"self",
".",
"meta",
".",
"remove_deps_answer",
"else",
":",
"try",
":",
"remove_dep",
... | Remove dependencies answer | [
"Remove",
"dependencies",
"answer"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/pkg/manager.py#L136-L150 |
43,313 | dslackw/slpkg | slpkg/pkg/manager.py | PackageManager._get_removed | def _get_removed(self):
"""Manage removed packages by extra options
"""
removed, packages = [], []
if "--tag" in self.extra:
for pkg in find_package("", self.meta.pkg_path):
for tag in self.binary:
if pkg.endswith(tag):
... | python | def _get_removed(self):
"""Manage removed packages by extra options
"""
removed, packages = [], []
if "--tag" in self.extra:
for pkg in find_package("", self.meta.pkg_path):
for tag in self.binary:
if pkg.endswith(tag):
... | [
"def",
"_get_removed",
"(",
"self",
")",
":",
"removed",
",",
"packages",
"=",
"[",
"]",
",",
"[",
"]",
"if",
"\"--tag\"",
"in",
"self",
".",
"extra",
":",
"for",
"pkg",
"in",
"find_package",
"(",
"\"\"",
",",
"self",
".",
"meta",
".",
"pkg_path",
... | Manage removed packages by extra options | [
"Manage",
"removed",
"packages",
"by",
"extra",
"options"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/pkg/manager.py#L152-L177 |
43,314 | dslackw/slpkg | slpkg/pkg/manager.py | PackageManager._view_removed | def _view_removed(self):
"""View packages before removed
"""
print("\nPackages with name matching [ {0}{1}{2} ]\n".format(
self.meta.color["CYAN"], ", ".join(self.binary),
self.meta.color["ENDC"]))
removed, packages = self._get_removed()
if packages and "-... | python | def _view_removed(self):
"""View packages before removed
"""
print("\nPackages with name matching [ {0}{1}{2} ]\n".format(
self.meta.color["CYAN"], ", ".join(self.binary),
self.meta.color["ENDC"]))
removed, packages = self._get_removed()
if packages and "-... | [
"def",
"_view_removed",
"(",
"self",
")",
":",
"print",
"(",
"\"\\nPackages with name matching [ {0}{1}{2} ]\\n\"",
".",
"format",
"(",
"self",
".",
"meta",
".",
"color",
"[",
"\"CYAN\"",
"]",
",",
"\", \"",
".",
"join",
"(",
"self",
".",
"binary",
")",
",",... | View packages before removed | [
"View",
"packages",
"before",
"removed"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/pkg/manager.py#L179-L205 |
43,315 | dslackw/slpkg | slpkg/pkg/manager.py | PackageManager._calc_sizes | def _calc_sizes(self):
"""Package size calculation
"""
if self.size > 1024:
self.unit = "Mb"
self.size = (self.size / 1024)
if self.size > 1024:
self.unit = "Gb"
self.size = (self.size / 1024) | python | def _calc_sizes(self):
"""Package size calculation
"""
if self.size > 1024:
self.unit = "Mb"
self.size = (self.size / 1024)
if self.size > 1024:
self.unit = "Gb"
self.size = (self.size / 1024) | [
"def",
"_calc_sizes",
"(",
"self",
")",
":",
"if",
"self",
".",
"size",
">",
"1024",
":",
"self",
".",
"unit",
"=",
"\"Mb\"",
"self",
".",
"size",
"=",
"(",
"self",
".",
"size",
"/",
"1024",
")",
"if",
"self",
".",
"size",
">",
"1024",
":",
"se... | Package size calculation | [
"Package",
"size",
"calculation"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/pkg/manager.py#L207-L215 |
43,316 | dslackw/slpkg | slpkg/pkg/manager.py | PackageManager._remove_summary | def _remove_summary(self):
"""Removed packge size summary
"""
if self.size > 0:
print("\nRemoved summary")
print("=" * 79)
print("{0}Size of removed packages {1} {2}.{3}".format(
self.meta.color["GREY"], round(self.size, 2), self.unit,
... | python | def _remove_summary(self):
"""Removed packge size summary
"""
if self.size > 0:
print("\nRemoved summary")
print("=" * 79)
print("{0}Size of removed packages {1} {2}.{3}".format(
self.meta.color["GREY"], round(self.size, 2), self.unit,
... | [
"def",
"_remove_summary",
"(",
"self",
")",
":",
"if",
"self",
".",
"size",
">",
"0",
":",
"print",
"(",
"\"\\nRemoved summary\"",
")",
"print",
"(",
"\"=\"",
"*",
"79",
")",
"print",
"(",
"\"{0}Size of removed packages {1} {2}.{3}\"",
".",
"format",
"(",
"s... | Removed packge size summary | [
"Removed",
"packge",
"size",
"summary"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/pkg/manager.py#L217-L225 |
43,317 | dslackw/slpkg | slpkg/pkg/manager.py | PackageManager._view_deps | def _view_deps(self, path, package):
"""View dependencies before remove
"""
self.size = 0
packages = []
dependencies = (Utils().read_file(path + package)).splitlines()
for dep in dependencies:
if GetFromInstalled(dep).name():
ver = GetFromInsta... | python | def _view_deps(self, path, package):
"""View dependencies before remove
"""
self.size = 0
packages = []
dependencies = (Utils().read_file(path + package)).splitlines()
for dep in dependencies:
if GetFromInstalled(dep).name():
ver = GetFromInsta... | [
"def",
"_view_deps",
"(",
"self",
",",
"path",
",",
"package",
")",
":",
"self",
".",
"size",
"=",
"0",
"packages",
"=",
"[",
"]",
"dependencies",
"=",
"(",
"Utils",
"(",
")",
".",
"read_file",
"(",
"path",
"+",
"package",
")",
")",
".",
"splitline... | View dependencies before remove | [
"View",
"dependencies",
"before",
"remove"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/pkg/manager.py#L227-L268 |
43,318 | dslackw/slpkg | slpkg/pkg/manager.py | PackageManager._removepkg | def _removepkg(self, package):
"""removepkg Slackware command
"""
try:
subprocess.call("removepkg {0} {1}".format(self.flag, package),
shell=True)
if os.path.isfile(self.dep_path + package):
os.remove(self.dep_path + package) #... | python | def _removepkg(self, package):
"""removepkg Slackware command
"""
try:
subprocess.call("removepkg {0} {1}".format(self.flag, package),
shell=True)
if os.path.isfile(self.dep_path + package):
os.remove(self.dep_path + package) #... | [
"def",
"_removepkg",
"(",
"self",
",",
"package",
")",
":",
"try",
":",
"subprocess",
".",
"call",
"(",
"\"removepkg {0} {1}\"",
".",
"format",
"(",
"self",
".",
"flag",
",",
"package",
")",
",",
"shell",
"=",
"True",
")",
"if",
"os",
".",
"path",
".... | removepkg Slackware command | [
"removepkg",
"Slackware",
"command"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/pkg/manager.py#L270-L280 |
43,319 | dslackw/slpkg | slpkg/pkg/manager.py | PackageManager._rmv_pkg | def _rmv_pkg(self, package):
"""Remove one signle package
"""
removes = []
if GetFromInstalled(package).name() and package not in self.skip:
ver = GetFromInstalled(package).version()
removes.append(package + ver)
self._removepkg(package)
return... | python | def _rmv_pkg(self, package):
"""Remove one signle package
"""
removes = []
if GetFromInstalled(package).name() and package not in self.skip:
ver = GetFromInstalled(package).version()
removes.append(package + ver)
self._removepkg(package)
return... | [
"def",
"_rmv_pkg",
"(",
"self",
",",
"package",
")",
":",
"removes",
"=",
"[",
"]",
"if",
"GetFromInstalled",
"(",
"package",
")",
".",
"name",
"(",
")",
"and",
"package",
"not",
"in",
"self",
".",
"skip",
":",
"ver",
"=",
"GetFromInstalled",
"(",
"p... | Remove one signle package | [
"Remove",
"one",
"signle",
"package"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/pkg/manager.py#L295-L303 |
43,320 | dslackw/slpkg | slpkg/pkg/manager.py | PackageManager._skip_remove | def _skip_remove(self):
"""Skip packages from remove
"""
if "--checklist" not in self.extra:
self.msg.template(78)
print("| Insert packages to exception remove:")
self.msg.template(78)
try:
self.skip = raw_input(" > ").split()
... | python | def _skip_remove(self):
"""Skip packages from remove
"""
if "--checklist" not in self.extra:
self.msg.template(78)
print("| Insert packages to exception remove:")
self.msg.template(78)
try:
self.skip = raw_input(" > ").split()
... | [
"def",
"_skip_remove",
"(",
"self",
")",
":",
"if",
"\"--checklist\"",
"not",
"in",
"self",
".",
"extra",
":",
"self",
".",
"msg",
".",
"template",
"(",
"78",
")",
"print",
"(",
"\"| Insert packages to exception remove:\"",
")",
"self",
".",
"msg",
".",
"t... | Skip packages from remove | [
"Skip",
"packages",
"from",
"remove"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/pkg/manager.py#L305-L319 |
43,321 | dslackw/slpkg | slpkg/pkg/manager.py | PackageManager._check_if_used | def _check_if_used(self, removes):
"""Check package if dependencies for another package
before removed"""
if "--check-deps" in self.extra:
package, dependency, pkg_dep = [], [], []
for pkg in find_package("", self.dep_path):
deps = Utils().read_file(self.d... | python | def _check_if_used(self, removes):
"""Check package if dependencies for another package
before removed"""
if "--check-deps" in self.extra:
package, dependency, pkg_dep = [], [], []
for pkg in find_package("", self.dep_path):
deps = Utils().read_file(self.d... | [
"def",
"_check_if_used",
"(",
"self",
",",
"removes",
")",
":",
"if",
"\"--check-deps\"",
"in",
"self",
".",
"extra",
":",
"package",
",",
"dependency",
",",
"pkg_dep",
"=",
"[",
"]",
",",
"[",
"]",
",",
"[",
"]",
"for",
"pkg",
"in",
"find_package",
... | Check package if dependencies for another package
before removed | [
"Check",
"package",
"if",
"dependencies",
"for",
"another",
"package",
"before",
"removed"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/pkg/manager.py#L321-L359 |
43,322 | dslackw/slpkg | slpkg/pkg/manager.py | PackageManager._reference_rmvs | def _reference_rmvs(self, removes):
"""Prints all removed packages
"""
print("")
self.msg.template(78)
msg_pkg = "package"
if len(removes) > 1:
msg_pkg = "packages"
print("| Total {0} {1} removed".format(len(removes), msg_pkg))
self.msg.templat... | python | def _reference_rmvs(self, removes):
"""Prints all removed packages
"""
print("")
self.msg.template(78)
msg_pkg = "package"
if len(removes) > 1:
msg_pkg = "packages"
print("| Total {0} {1} removed".format(len(removes), msg_pkg))
self.msg.templat... | [
"def",
"_reference_rmvs",
"(",
"self",
",",
"removes",
")",
":",
"print",
"(",
"\"\"",
")",
"self",
".",
"msg",
".",
"template",
"(",
"78",
")",
"msg_pkg",
"=",
"\"package\"",
"if",
"len",
"(",
"removes",
")",
">",
"1",
":",
"msg_pkg",
"=",
"\"packag... | Prints all removed packages | [
"Prints",
"all",
"removed",
"packages"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/pkg/manager.py#L361-L377 |
43,323 | dslackw/slpkg | slpkg/pkg/manager.py | PackageManager.find | def find(self, flag):
"""Find installed Slackware packages
"""
matching, pkg_cache, match_cache = 0, "", ""
print("\nPackages with matching name [ {0}{1}{2} ]\n".format(
self.meta.color["CYAN"], ", ".join(self.binary),
self.meta.color["ENDC"]))
for pkg in ... | python | def find(self, flag):
"""Find installed Slackware packages
"""
matching, pkg_cache, match_cache = 0, "", ""
print("\nPackages with matching name [ {0}{1}{2} ]\n".format(
self.meta.color["CYAN"], ", ".join(self.binary),
self.meta.color["ENDC"]))
for pkg in ... | [
"def",
"find",
"(",
"self",
",",
"flag",
")",
":",
"matching",
",",
"pkg_cache",
",",
"match_cache",
"=",
"0",
",",
"\"\"",
",",
"\"\"",
"print",
"(",
"\"\\nPackages with matching name [ {0}{1}{2} ]\\n\"",
".",
"format",
"(",
"self",
".",
"meta",
".",
"color... | Find installed Slackware packages | [
"Find",
"installed",
"Slackware",
"packages"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/pkg/manager.py#L379-L412 |
43,324 | dslackw/slpkg | slpkg/pkg/manager.py | PackageManager._sizes | def _sizes(self, package):
"""Package size summary
"""
data = Utils().read_file(self.meta.pkg_path + package)
for line in data.splitlines():
if line.startswith("UNCOMPRESSED PACKAGE SIZE:"):
digit = float((''.join(re.findall(
"[-+]?\d+[\.]?... | python | def _sizes(self, package):
"""Package size summary
"""
data = Utils().read_file(self.meta.pkg_path + package)
for line in data.splitlines():
if line.startswith("UNCOMPRESSED PACKAGE SIZE:"):
digit = float((''.join(re.findall(
"[-+]?\d+[\.]?... | [
"def",
"_sizes",
"(",
"self",
",",
"package",
")",
":",
"data",
"=",
"Utils",
"(",
")",
".",
"read_file",
"(",
"self",
".",
"meta",
".",
"pkg_path",
"+",
"package",
")",
"for",
"line",
"in",
"data",
".",
"splitlines",
"(",
")",
":",
"if",
"line",
... | Package size summary | [
"Package",
"size",
"summary"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/pkg/manager.py#L414-L427 |
43,325 | dslackw/slpkg | slpkg/pkg/manager.py | PackageManager.display | def display(self):
"""Print the Slackware packages contents
"""
for pkg in self.binary:
name = GetFromInstalled(pkg).name()
ver = GetFromInstalled(pkg).version()
find = find_package("{0}{1}{2}".format(name, ver, self.meta.sp),
s... | python | def display(self):
"""Print the Slackware packages contents
"""
for pkg in self.binary:
name = GetFromInstalled(pkg).name()
ver = GetFromInstalled(pkg).version()
find = find_package("{0}{1}{2}".format(name, ver, self.meta.sp),
s... | [
"def",
"display",
"(",
"self",
")",
":",
"for",
"pkg",
"in",
"self",
".",
"binary",
":",
"name",
"=",
"GetFromInstalled",
"(",
"pkg",
")",
".",
"name",
"(",
")",
"ver",
"=",
"GetFromInstalled",
"(",
"pkg",
")",
".",
"version",
"(",
")",
"find",
"="... | Print the Slackware packages contents | [
"Print",
"the",
"Slackware",
"packages",
"contents"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/pkg/manager.py#L429-L448 |
43,326 | dslackw/slpkg | slpkg/pkg/manager.py | PackageManager.package_list | def package_list(self, repo, name, INDEX, installed):
"""List with the installed packages
"""
tty_size = os.popen("stty size", "r").read().split()
row = int(tty_size[0]) - 2
try:
all_installed_names = []
index, page, pkg_list = 0, row, []
r = s... | python | def package_list(self, repo, name, INDEX, installed):
"""List with the installed packages
"""
tty_size = os.popen("stty size", "r").read().split()
row = int(tty_size[0]) - 2
try:
all_installed_names = []
index, page, pkg_list = 0, row, []
r = s... | [
"def",
"package_list",
"(",
"self",
",",
"repo",
",",
"name",
",",
"INDEX",
",",
"installed",
")",
":",
"tty_size",
"=",
"os",
".",
"popen",
"(",
"\"stty size\"",
",",
"\"r\"",
")",
".",
"read",
"(",
")",
".",
"split",
"(",
")",
"row",
"=",
"int",
... | List with the installed packages | [
"List",
"with",
"the",
"installed",
"packages"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/pkg/manager.py#L450-L495 |
43,327 | dslackw/slpkg | slpkg/pkg/manager.py | PackageManager._splitting_packages | def _splitting_packages(self, pkg, repo, name):
"""Return package name from repositories
"""
if name and repo != "sbo":
pkg = split_package(pkg)[0]
elif not name and repo != "sbo":
pkg = pkg[:-4]
return pkg | python | def _splitting_packages(self, pkg, repo, name):
"""Return package name from repositories
"""
if name and repo != "sbo":
pkg = split_package(pkg)[0]
elif not name and repo != "sbo":
pkg = pkg[:-4]
return pkg | [
"def",
"_splitting_packages",
"(",
"self",
",",
"pkg",
",",
"repo",
",",
"name",
")",
":",
"if",
"name",
"and",
"repo",
"!=",
"\"sbo\"",
":",
"pkg",
"=",
"split_package",
"(",
"pkg",
")",
"[",
"0",
"]",
"elif",
"not",
"name",
"and",
"repo",
"!=",
"... | Return package name from repositories | [
"Return",
"package",
"name",
"from",
"repositories"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/pkg/manager.py#L497-L504 |
43,328 | dslackw/slpkg | slpkg/pkg/manager.py | PackageManager.list_lib | def list_lib(self, repo):
"""Return package lists
"""
packages = ""
if repo == "sbo":
if (os.path.isfile(
self.meta.lib_path + "{0}_repo/SLACKBUILDS.TXT".format(
repo))):
packages = Utils().read_file(self.meta.lib_pa... | python | def list_lib(self, repo):
"""Return package lists
"""
packages = ""
if repo == "sbo":
if (os.path.isfile(
self.meta.lib_path + "{0}_repo/SLACKBUILDS.TXT".format(
repo))):
packages = Utils().read_file(self.meta.lib_pa... | [
"def",
"list_lib",
"(",
"self",
",",
"repo",
")",
":",
"packages",
"=",
"\"\"",
"if",
"repo",
"==",
"\"sbo\"",
":",
"if",
"(",
"os",
".",
"path",
".",
"isfile",
"(",
"self",
".",
"meta",
".",
"lib_path",
"+",
"\"{0}_repo/SLACKBUILDS.TXT\"",
".",
"forma... | Return package lists | [
"Return",
"package",
"lists"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/pkg/manager.py#L524-L539 |
43,329 | dslackw/slpkg | slpkg/pkg/manager.py | PackageManager.list_color_tag | def list_color_tag(self, pkg):
"""Tag with color installed packages
"""
name = GetFromInstalled(pkg).name()
find = name + self.meta.sp
if pkg.endswith(".txz") or pkg.endswith(".tgz"):
find = pkg[:-4]
if find_package(find, self.meta.pkg_path):
pkg =... | python | def list_color_tag(self, pkg):
"""Tag with color installed packages
"""
name = GetFromInstalled(pkg).name()
find = name + self.meta.sp
if pkg.endswith(".txz") or pkg.endswith(".tgz"):
find = pkg[:-4]
if find_package(find, self.meta.pkg_path):
pkg =... | [
"def",
"list_color_tag",
"(",
"self",
",",
"pkg",
")",
":",
"name",
"=",
"GetFromInstalled",
"(",
"pkg",
")",
".",
"name",
"(",
")",
"find",
"=",
"name",
"+",
"self",
".",
"meta",
".",
"sp",
"if",
"pkg",
".",
"endswith",
"(",
"\".txz\"",
")",
"or",... | Tag with color installed packages | [
"Tag",
"with",
"color",
"installed",
"packages"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/pkg/manager.py#L541-L551 |
43,330 | dslackw/slpkg | slpkg/pkg/manager.py | PackageManager.list_of_installed | def list_of_installed(self, repo, name):
"""Return installed packages
"""
all_installed_names = []
all_installed_packages = find_package("", self.meta.pkg_path)
for inst in all_installed_packages:
if repo == "sbo" and inst.endswith("_SBo"):
name = spli... | python | def list_of_installed(self, repo, name):
"""Return installed packages
"""
all_installed_names = []
all_installed_packages = find_package("", self.meta.pkg_path)
for inst in all_installed_packages:
if repo == "sbo" and inst.endswith("_SBo"):
name = spli... | [
"def",
"list_of_installed",
"(",
"self",
",",
"repo",
",",
"name",
")",
":",
"all_installed_names",
"=",
"[",
"]",
"all_installed_packages",
"=",
"find_package",
"(",
"\"\"",
",",
"self",
".",
"meta",
".",
"pkg_path",
")",
"for",
"inst",
"in",
"all_installed... | Return installed packages | [
"Return",
"installed",
"packages"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/pkg/manager.py#L553-L567 |
43,331 | dslackw/slpkg | slpkg/binary/greps.py | rlw_filter | def rlw_filter(name, location, size, unsize):
"""Filter rlw repository data
"""
arch = _meta_.arch
if arch.startswith("i") and arch.endswith("86"):
arch = "i486"
(fname, flocation, fsize, funsize) = ([] for i in range(4))
for n, l, s, u in zip(name, location, size, unsize):
loc =... | python | def rlw_filter(name, location, size, unsize):
"""Filter rlw repository data
"""
arch = _meta_.arch
if arch.startswith("i") and arch.endswith("86"):
arch = "i486"
(fname, flocation, fsize, funsize) = ([] for i in range(4))
for n, l, s, u in zip(name, location, size, unsize):
loc =... | [
"def",
"rlw_filter",
"(",
"name",
",",
"location",
",",
"size",
",",
"unsize",
")",
":",
"arch",
"=",
"_meta_",
".",
"arch",
"if",
"arch",
".",
"startswith",
"(",
"\"i\"",
")",
"and",
"arch",
".",
"endswith",
"(",
"\"86\"",
")",
":",
"arch",
"=",
"... | Filter rlw repository data | [
"Filter",
"rlw",
"repository",
"data"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/binary/greps.py#L78-L92 |
43,332 | dslackw/slpkg | slpkg/binary/greps.py | alien_filter | def alien_filter(name, location, size, unsize):
"""Fix to avoid packages include in slackbuilds folder
"""
(fname, flocation, fsize, funsize) = ([] for i in range(4))
for n, l, s, u in zip(name, location, size, unsize):
if "slackbuilds" != l:
fname.append(n)
flocation.app... | python | def alien_filter(name, location, size, unsize):
"""Fix to avoid packages include in slackbuilds folder
"""
(fname, flocation, fsize, funsize) = ([] for i in range(4))
for n, l, s, u in zip(name, location, size, unsize):
if "slackbuilds" != l:
fname.append(n)
flocation.app... | [
"def",
"alien_filter",
"(",
"name",
",",
"location",
",",
"size",
",",
"unsize",
")",
":",
"(",
"fname",
",",
"flocation",
",",
"fsize",
",",
"funsize",
")",
"=",
"(",
"[",
"]",
"for",
"i",
"in",
"range",
"(",
"4",
")",
")",
"for",
"n",
",",
"l... | Fix to avoid packages include in slackbuilds folder | [
"Fix",
"to",
"avoid",
"packages",
"include",
"in",
"slackbuilds",
"folder"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/binary/greps.py#L95-L105 |
43,333 | dslackw/slpkg | slpkg/binary/greps.py | rested_filter | def rested_filter(name, location, size, unsize):
"""Filter Alien"s repository data
"""
ver = slack_ver()
if _meta_.slack_rel == "current":
ver = "current"
path_pkg = "pkg"
if _meta_.arch == "x86_64":
path_pkg = "pkg64"
(fname, flocation, fsize, funsize) = ([] for i in range(4... | python | def rested_filter(name, location, size, unsize):
"""Filter Alien"s repository data
"""
ver = slack_ver()
if _meta_.slack_rel == "current":
ver = "current"
path_pkg = "pkg"
if _meta_.arch == "x86_64":
path_pkg = "pkg64"
(fname, flocation, fsize, funsize) = ([] for i in range(4... | [
"def",
"rested_filter",
"(",
"name",
",",
"location",
",",
"size",
",",
"unsize",
")",
":",
"ver",
"=",
"slack_ver",
"(",
")",
"if",
"_meta_",
".",
"slack_rel",
"==",
"\"current\"",
":",
"ver",
"=",
"\"current\"",
"path_pkg",
"=",
"\"pkg\"",
"if",
"_meta... | Filter Alien"s repository data | [
"Filter",
"Alien",
"s",
"repository",
"data"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/binary/greps.py#L108-L124 |
43,334 | dslackw/slpkg | slpkg/binary/greps.py | Requires.get_deps | def get_deps(self):
"""Grap package requirements from repositories
"""
if self.repo == "rlw":
dependencies = {}
rlw_deps = Utils().read_file(_meta_.conf_path + "rlworkman.deps")
for line in rlw_deps.splitlines():
if line and not line.startswith... | python | def get_deps(self):
"""Grap package requirements from repositories
"""
if self.repo == "rlw":
dependencies = {}
rlw_deps = Utils().read_file(_meta_.conf_path + "rlworkman.deps")
for line in rlw_deps.splitlines():
if line and not line.startswith... | [
"def",
"get_deps",
"(",
"self",
")",
":",
"if",
"self",
".",
"repo",
"==",
"\"rlw\"",
":",
"dependencies",
"=",
"{",
"}",
"rlw_deps",
"=",
"Utils",
"(",
")",
".",
"read_file",
"(",
"_meta_",
".",
"conf_path",
"+",
"\"rlworkman.deps\"",
")",
"for",
"lin... | Grap package requirements from repositories | [
"Grap",
"package",
"requirements",
"from",
"repositories"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/binary/greps.py#L153-L176 |
43,335 | dslackw/slpkg | slpkg/binary/greps.py | Requires._req_fix | def _req_fix(self, line):
"""Fix slacky and salix requirements because many dependencies splitting
with "," and others with "|"
"""
deps = []
for dep in line[18:].strip().split(","):
dep = dep.split("|")
if self.repo == "slacky":
if len(dep... | python | def _req_fix(self, line):
"""Fix slacky and salix requirements because many dependencies splitting
with "," and others with "|"
"""
deps = []
for dep in line[18:].strip().split(","):
dep = dep.split("|")
if self.repo == "slacky":
if len(dep... | [
"def",
"_req_fix",
"(",
"self",
",",
"line",
")",
":",
"deps",
"=",
"[",
"]",
"for",
"dep",
"in",
"line",
"[",
"18",
":",
"]",
".",
"strip",
"(",
")",
".",
"split",
"(",
"\",\"",
")",
":",
"dep",
"=",
"dep",
".",
"split",
"(",
"\"|\"",
")",
... | Fix slacky and salix requirements because many dependencies splitting
with "," and others with "|" | [
"Fix",
"slacky",
"and",
"salix",
"requirements",
"because",
"many",
"dependencies",
"splitting",
"with",
"and",
"others",
"with",
"|"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/binary/greps.py#L178-L196 |
43,336 | dslackw/slpkg | slpkg/new_config.py | NewConfig.run | def run(self):
"""print .new configuration files
"""
self.find_new()
for n in self.news:
print("{0}".format(n))
print("")
self.msg.template(78)
print("| Installed {0} new configuration files:".format(
len(self.news)))
self.msg.templ... | python | def run(self):
"""print .new configuration files
"""
self.find_new()
for n in self.news:
print("{0}".format(n))
print("")
self.msg.template(78)
print("| Installed {0} new configuration files:".format(
len(self.news)))
self.msg.templ... | [
"def",
"run",
"(",
"self",
")",
":",
"self",
".",
"find_new",
"(",
")",
"for",
"n",
"in",
"self",
".",
"news",
":",
"print",
"(",
"\"{0}\"",
".",
"format",
"(",
"n",
")",
")",
"print",
"(",
"\"\"",
")",
"self",
".",
"msg",
".",
"template",
"(",... | print .new configuration files | [
"print",
".",
"new",
"configuration",
"files"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/new_config.py#L49-L60 |
43,337 | dslackw/slpkg | slpkg/new_config.py | NewConfig.choices | def choices(self):
"""Menu options for new configuration files
"""
print("| {0}K{1}{2}eep the old and .new files, no changes".format(
self.red, self.endc, self.br))
print("| {0}O{1}{2}verwrite all old configuration files with new "
"ones".format(self.red, self.e... | python | def choices(self):
"""Menu options for new configuration files
"""
print("| {0}K{1}{2}eep the old and .new files, no changes".format(
self.red, self.endc, self.br))
print("| {0}O{1}{2}verwrite all old configuration files with new "
"ones".format(self.red, self.e... | [
"def",
"choices",
"(",
"self",
")",
":",
"print",
"(",
"\"| {0}K{1}{2}eep the old and .new files, no changes\"",
".",
"format",
"(",
"self",
".",
"red",
",",
"self",
".",
"endc",
",",
"self",
".",
"br",
")",
")",
"print",
"(",
"\"| {0}O{1}{2}verwrite all old con... | Menu options for new configuration files | [
"Menu",
"options",
"for",
"new",
"configuration",
"files"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/new_config.py#L76-L103 |
43,338 | dslackw/slpkg | slpkg/new_config.py | NewConfig.question | def question(self, n):
"""Choose what do to file by file
"""
print("")
prompt_ask = raw_input("{0} [K/O/R/D/M/Q]? ".format(n))
print("")
if prompt_ask in ("K", "k"):
self.keep()
elif prompt_ask in ("O", "o"):
self._overwrite(n)
elif... | python | def question(self, n):
"""Choose what do to file by file
"""
print("")
prompt_ask = raw_input("{0} [K/O/R/D/M/Q]? ".format(n))
print("")
if prompt_ask in ("K", "k"):
self.keep()
elif prompt_ask in ("O", "o"):
self._overwrite(n)
elif... | [
"def",
"question",
"(",
"self",
",",
"n",
")",
":",
"print",
"(",
"\"\"",
")",
"prompt_ask",
"=",
"raw_input",
"(",
"\"{0} [K/O/R/D/M/Q]? \"",
".",
"format",
"(",
"n",
")",
")",
"print",
"(",
"\"\"",
")",
"if",
"prompt_ask",
"in",
"(",
"\"K\"",
",",
... | Choose what do to file by file | [
"Choose",
"what",
"do",
"to",
"file",
"by",
"file"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/new_config.py#L140-L158 |
43,339 | dslackw/slpkg | slpkg/new_config.py | NewConfig._remove | def _remove(self, n):
"""Remove one single file
"""
if os.path.isfile(n):
os.remove(n)
if not os.path.isfile(n):
print("File '{0}' removed".format(n)) | python | def _remove(self, n):
"""Remove one single file
"""
if os.path.isfile(n):
os.remove(n)
if not os.path.isfile(n):
print("File '{0}' removed".format(n)) | [
"def",
"_remove",
"(",
"self",
",",
"n",
")",
":",
"if",
"os",
".",
"path",
".",
"isfile",
"(",
"n",
")",
":",
"os",
".",
"remove",
"(",
"n",
")",
"if",
"not",
"os",
".",
"path",
".",
"isfile",
"(",
"n",
")",
":",
"print",
"(",
"\"File '{0}' ... | Remove one single file | [
"Remove",
"one",
"single",
"file"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/new_config.py#L160-L166 |
43,340 | dslackw/slpkg | slpkg/new_config.py | NewConfig._overwrite | def _overwrite(self, n):
"""Overwrite old file with new and keep file with suffix .old
"""
if os.path.isfile(n[:-4]):
shutil.copy2(n[:-4], n[:-4] + ".old")
print("Old file {0} saved as {1}.old".format(
n[:-4].split("/")[-1], n[:-4].split("/")[-1]))
... | python | def _overwrite(self, n):
"""Overwrite old file with new and keep file with suffix .old
"""
if os.path.isfile(n[:-4]):
shutil.copy2(n[:-4], n[:-4] + ".old")
print("Old file {0} saved as {1}.old".format(
n[:-4].split("/")[-1], n[:-4].split("/")[-1]))
... | [
"def",
"_overwrite",
"(",
"self",
",",
"n",
")",
":",
"if",
"os",
".",
"path",
".",
"isfile",
"(",
"n",
"[",
":",
"-",
"4",
"]",
")",
":",
"shutil",
".",
"copy2",
"(",
"n",
"[",
":",
"-",
"4",
"]",
",",
"n",
"[",
":",
"-",
"4",
"]",
"+"... | Overwrite old file with new and keep file with suffix .old | [
"Overwrite",
"old",
"file",
"with",
"new",
"and",
"keep",
"file",
"with",
"suffix",
".",
"old"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/new_config.py#L168-L178 |
43,341 | dslackw/slpkg | slpkg/new_config.py | NewConfig.diff | def diff(self, n):
"""Print the differences between the two files
"""
if os.path.isfile(n[:-4]):
diff1 = Utils().read_file(n[:-4]).splitlines()
if os.path.isfile(n):
diff2 = Utils().read_file(n).splitlines()
lines, l, c = [], 0, 0
for a, b in itert... | python | def diff(self, n):
"""Print the differences between the two files
"""
if os.path.isfile(n[:-4]):
diff1 = Utils().read_file(n[:-4]).splitlines()
if os.path.isfile(n):
diff2 = Utils().read_file(n).splitlines()
lines, l, c = [], 0, 0
for a, b in itert... | [
"def",
"diff",
"(",
"self",
",",
"n",
")",
":",
"if",
"os",
".",
"path",
".",
"isfile",
"(",
"n",
"[",
":",
"-",
"4",
"]",
")",
":",
"diff1",
"=",
"Utils",
"(",
")",
".",
"read_file",
"(",
"n",
"[",
":",
"-",
"4",
"]",
")",
".",
"splitlin... | Print the differences between the two files | [
"Print",
"the",
"differences",
"between",
"the",
"two",
"files"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/new_config.py#L183-L210 |
43,342 | dslackw/slpkg | slpkg/new_config.py | NewConfig.merge | def merge(self, n):
"""Merge new file into old
"""
if os.path.isfile(n[:-4]):
old = Utils().read_file(n[:-4]).splitlines()
if os.path.isfile(n):
new = Utils().read_file(n).splitlines()
with open(n[:-4], "w") as out:
for l1, l2 in itertools.izip... | python | def merge(self, n):
"""Merge new file into old
"""
if os.path.isfile(n[:-4]):
old = Utils().read_file(n[:-4]).splitlines()
if os.path.isfile(n):
new = Utils().read_file(n).splitlines()
with open(n[:-4], "w") as out:
for l1, l2 in itertools.izip... | [
"def",
"merge",
"(",
"self",
",",
"n",
")",
":",
"if",
"os",
".",
"path",
".",
"isfile",
"(",
"n",
"[",
":",
"-",
"4",
"]",
")",
":",
"old",
"=",
"Utils",
"(",
")",
".",
"read_file",
"(",
"n",
"[",
":",
"-",
"4",
"]",
")",
".",
"splitline... | Merge new file into old | [
"Merge",
"new",
"file",
"into",
"old"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/new_config.py#L212-L230 |
43,343 | dslackw/slpkg | slpkg/checks.py | Updates.status_bar | def status_bar(self):
"""Top view bar status
"""
print("")
self.msg.template(78)
print("| Repository Status")
self.msg.template(78) | python | def status_bar(self):
"""Top view bar status
"""
print("")
self.msg.template(78)
print("| Repository Status")
self.msg.template(78) | [
"def",
"status_bar",
"(",
"self",
")",
":",
"print",
"(",
"\"\"",
")",
"self",
".",
"msg",
".",
"template",
"(",
"78",
")",
"print",
"(",
"\"| Repository Status\"",
")",
"self",
".",
"msg",
".",
"template",
"(",
"78",
")"
] | Top view bar status | [
"Top",
"view",
"bar",
"status"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/checks.py#L63-L69 |
43,344 | dslackw/slpkg | slpkg/checks.py | Updates.run | def run(self):
"""Run and check if new in ChangeLog.txt
"""
if (self.repo in self.meta.default_repositories and
self.repo in self.meta.repositories):
try:
self.check = self.all_repos[self.repo]()
except OSError:
usage(self.r... | python | def run(self):
"""Run and check if new in ChangeLog.txt
"""
if (self.repo in self.meta.default_repositories and
self.repo in self.meta.repositories):
try:
self.check = self.all_repos[self.repo]()
except OSError:
usage(self.r... | [
"def",
"run",
"(",
"self",
")",
":",
"if",
"(",
"self",
".",
"repo",
"in",
"self",
".",
"meta",
".",
"default_repositories",
"and",
"self",
".",
"repo",
"in",
"self",
".",
"meta",
".",
"repositories",
")",
":",
"try",
":",
"self",
".",
"check",
"="... | Run and check if new in ChangeLog.txt | [
"Run",
"and",
"check",
"if",
"new",
"in",
"ChangeLog",
".",
"txt"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/checks.py#L71-L89 |
43,345 | dslackw/slpkg | slpkg/md5sum.py | md5 | def md5(source):
"""Return MD5 Checksum
"""
# fix passing char '+' from source
source = source.replace("%2B", "+")
with open(source) as file_to_check:
data = file_to_check.read()
return hashlib.md5(data).hexdigest() | python | def md5(source):
"""Return MD5 Checksum
"""
# fix passing char '+' from source
source = source.replace("%2B", "+")
with open(source) as file_to_check:
data = file_to_check.read()
return hashlib.md5(data).hexdigest() | [
"def",
"md5",
"(",
"source",
")",
":",
"# fix passing char '+' from source",
"source",
"=",
"source",
".",
"replace",
"(",
"\"%2B\"",
",",
"\"+\"",
")",
"with",
"open",
"(",
"source",
")",
"as",
"file_to_check",
":",
"data",
"=",
"file_to_check",
".",
"read"... | Return MD5 Checksum | [
"Return",
"MD5",
"Checksum"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/md5sum.py#L28-L35 |
43,346 | dslackw/slpkg | slpkg/tracking.py | TrackingDeps.run | def run(self):
"""Run tracking dependencies
"""
self.msg.resolving()
self.repositories()
if self.find_pkg:
self.dependencies_list.reverse()
self.requires = Utils().dimensional_list(self.dependencies_list)
self.dependencies = Utils().remove_dbs(... | python | def run(self):
"""Run tracking dependencies
"""
self.msg.resolving()
self.repositories()
if self.find_pkg:
self.dependencies_list.reverse()
self.requires = Utils().dimensional_list(self.dependencies_list)
self.dependencies = Utils().remove_dbs(... | [
"def",
"run",
"(",
"self",
")",
":",
"self",
".",
"msg",
".",
"resolving",
"(",
")",
"self",
".",
"repositories",
"(",
")",
"if",
"self",
".",
"find_pkg",
":",
"self",
".",
"dependencies_list",
".",
"reverse",
"(",
")",
"self",
".",
"requires",
"=",
... | Run tracking dependencies | [
"Run",
"tracking",
"dependencies"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/tracking.py#L67-L123 |
43,347 | dslackw/slpkg | slpkg/tracking.py | TrackingDeps.repositories | def repositories(self):
"""Get dependencies by repositories
"""
if self.repo == "sbo":
self.sbo_case_insensitive()
self.find_pkg = sbo_search_pkg(self.name)
if self.find_pkg:
self.dependencies_list = Requires(self.flag).sbo(self.name)
e... | python | def repositories(self):
"""Get dependencies by repositories
"""
if self.repo == "sbo":
self.sbo_case_insensitive()
self.find_pkg = sbo_search_pkg(self.name)
if self.find_pkg:
self.dependencies_list = Requires(self.flag).sbo(self.name)
e... | [
"def",
"repositories",
"(",
"self",
")",
":",
"if",
"self",
".",
"repo",
"==",
"\"sbo\"",
":",
"self",
".",
"sbo_case_insensitive",
"(",
")",
"self",
".",
"find_pkg",
"=",
"sbo_search_pkg",
"(",
"self",
".",
"name",
")",
"if",
"self",
".",
"find_pkg",
... | Get dependencies by repositories | [
"Get",
"dependencies",
"by",
"repositories"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/tracking.py#L125-L142 |
43,348 | dslackw/slpkg | slpkg/tracking.py | TrackingDeps.sbo_case_insensitive | def sbo_case_insensitive(self):
"""Matching packages distinguish between uppercase and
lowercase for sbo repository
"""
if "--case-ins" in self.flag:
data = SBoGrep(name="").names()
data_dict = Utils().case_sensitive(data)
for key, value in data_dict.i... | python | def sbo_case_insensitive(self):
"""Matching packages distinguish between uppercase and
lowercase for sbo repository
"""
if "--case-ins" in self.flag:
data = SBoGrep(name="").names()
data_dict = Utils().case_sensitive(data)
for key, value in data_dict.i... | [
"def",
"sbo_case_insensitive",
"(",
"self",
")",
":",
"if",
"\"--case-ins\"",
"in",
"self",
".",
"flag",
":",
"data",
"=",
"SBoGrep",
"(",
"name",
"=",
"\"\"",
")",
".",
"names",
"(",
")",
"data_dict",
"=",
"Utils",
"(",
")",
".",
"case_sensitive",
"("... | Matching packages distinguish between uppercase and
lowercase for sbo repository | [
"Matching",
"packages",
"distinguish",
"between",
"uppercase",
"and",
"lowercase",
"for",
"sbo",
"repository"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/tracking.py#L144-L153 |
43,349 | dslackw/slpkg | slpkg/tracking.py | TrackingDeps.check_used | def check_used(self, pkg):
"""Check if dependencies used
"""
used = []
dep_path = self.meta.log_path + "dep/"
logs = find_package("", dep_path)
for log in logs:
deps = Utils().read_file(dep_path + log)
for dep in deps.splitlines():
... | python | def check_used(self, pkg):
"""Check if dependencies used
"""
used = []
dep_path = self.meta.log_path + "dep/"
logs = find_package("", dep_path)
for log in logs:
deps = Utils().read_file(dep_path + log)
for dep in deps.splitlines():
... | [
"def",
"check_used",
"(",
"self",
",",
"pkg",
")",
":",
"used",
"=",
"[",
"]",
"dep_path",
"=",
"self",
".",
"meta",
".",
"log_path",
"+",
"\"dep/\"",
"logs",
"=",
"find_package",
"(",
"\"\"",
",",
"dep_path",
")",
"for",
"log",
"in",
"logs",
":",
... | Check if dependencies used | [
"Check",
"if",
"dependencies",
"used"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/tracking.py#L170-L181 |
43,350 | dslackw/slpkg | slpkg/tracking.py | TrackingDeps.deps_tree | def deps_tree(self):
"""Package dependencies image map file
"""
dependencies = self.dependencies + [self.name]
if self.repo == "sbo":
for dep in dependencies:
deps = Requires(flag="").sbo(dep)
if dep not in self.deps_dict.values():
... | python | def deps_tree(self):
"""Package dependencies image map file
"""
dependencies = self.dependencies + [self.name]
if self.repo == "sbo":
for dep in dependencies:
deps = Requires(flag="").sbo(dep)
if dep not in self.deps_dict.values():
... | [
"def",
"deps_tree",
"(",
"self",
")",
":",
"dependencies",
"=",
"self",
".",
"dependencies",
"+",
"[",
"self",
".",
"name",
"]",
"if",
"self",
".",
"repo",
"==",
"\"sbo\"",
":",
"for",
"dep",
"in",
"dependencies",
":",
"deps",
"=",
"Requires",
"(",
"... | Package dependencies image map file | [
"Package",
"dependencies",
"image",
"map",
"file"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/tracking.py#L183-L196 |
43,351 | dslackw/slpkg | slpkg/tracking.py | TrackingDeps.deps_used | def deps_used(self, pkg, used):
"""Create dependencies dictionary
"""
if find_package(pkg + self.meta.sp, self.meta.pkg_path):
if pkg not in self.deps_dict.values():
self.deps_dict[pkg] = used
else:
self.deps_dict[pkg] += used | python | def deps_used(self, pkg, used):
"""Create dependencies dictionary
"""
if find_package(pkg + self.meta.sp, self.meta.pkg_path):
if pkg not in self.deps_dict.values():
self.deps_dict[pkg] = used
else:
self.deps_dict[pkg] += used | [
"def",
"deps_used",
"(",
"self",
",",
"pkg",
",",
"used",
")",
":",
"if",
"find_package",
"(",
"pkg",
"+",
"self",
".",
"meta",
".",
"sp",
",",
"self",
".",
"meta",
".",
"pkg_path",
")",
":",
"if",
"pkg",
"not",
"in",
"self",
".",
"deps_dict",
".... | Create dependencies dictionary | [
"Create",
"dependencies",
"dictionary"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/tracking.py#L198-L205 |
43,352 | dslackw/slpkg | slpkg/pkg/installed.py | GetFromInstalled.version | def version(self):
"""Return version from installed packages
"""
if self.find:
return self.meta.sp + split_package(self.find)[1]
return "" | python | def version(self):
"""Return version from installed packages
"""
if self.find:
return self.meta.sp + split_package(self.find)[1]
return "" | [
"def",
"version",
"(",
"self",
")",
":",
"if",
"self",
".",
"find",
":",
"return",
"self",
".",
"meta",
".",
"sp",
"+",
"split_package",
"(",
"self",
".",
"find",
")",
"[",
"1",
"]",
"return",
"\"\""
] | Return version from installed packages | [
"Return",
"version",
"from",
"installed",
"packages"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/pkg/installed.py#L45-L50 |
43,353 | dslackw/slpkg | slpkg/slpkg_update.py | it_self_update | def it_self_update():
"""Check from GitHub slpkg repository if new version is available
download and update itself
"""
__new_version__ = ""
repository = "gitlab"
branch = "master"
ver_link = ("https://raw.{0}usercontent.com/{1}/{2}/"
"{3}/{4}/__metadata__.py".format(repositor... | python | def it_self_update():
"""Check from GitHub slpkg repository if new version is available
download and update itself
"""
__new_version__ = ""
repository = "gitlab"
branch = "master"
ver_link = ("https://raw.{0}usercontent.com/{1}/{2}/"
"{3}/{4}/__metadata__.py".format(repositor... | [
"def",
"it_self_update",
"(",
")",
":",
"__new_version__",
"=",
"\"\"",
"repository",
"=",
"\"gitlab\"",
"branch",
"=",
"\"master\"",
"ver_link",
"=",
"(",
"\"https://raw.{0}usercontent.com/{1}/{2}/\"",
"\"{3}/{4}/__metadata__.py\"",
".",
"format",
"(",
"repository",
",... | Check from GitHub slpkg repository if new version is available
download and update itself | [
"Check",
"from",
"GitHub",
"slpkg",
"repository",
"if",
"new",
"version",
"is",
"available",
"download",
"and",
"update",
"itself"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/slpkg_update.py#L37-L91 |
43,354 | dslackw/slpkg | slpkg/binary/install.py | BinaryInstall.if_all_installed | def if_all_installed(self):
"""Check if all packages is already installed
"""
count_inst = 0
for inst in (self.dep_install + self.install):
if (os.path.isfile(self.meta.pkg_path + inst[:-4]) and
"--download-only" not in self.flag):
count_in... | python | def if_all_installed(self):
"""Check if all packages is already installed
"""
count_inst = 0
for inst in (self.dep_install + self.install):
if (os.path.isfile(self.meta.pkg_path + inst[:-4]) and
"--download-only" not in self.flag):
count_in... | [
"def",
"if_all_installed",
"(",
"self",
")",
":",
"count_inst",
"=",
"0",
"for",
"inst",
"in",
"(",
"self",
".",
"dep_install",
"+",
"self",
".",
"install",
")",
":",
"if",
"(",
"os",
".",
"path",
".",
"isfile",
"(",
"self",
".",
"meta",
".",
"pkg_... | Check if all packages is already installed | [
"Check",
"if",
"all",
"packages",
"is",
"already",
"installed"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/binary/install.py#L173-L183 |
43,355 | dslackw/slpkg | slpkg/binary/install.py | BinaryInstall.clear_masters | def clear_masters(self):
"""Clear master packages if already exist in dependencies
or if added to install two or more times
"""
packages = []
for mas in Utils().remove_dbs(self.packages):
if mas not in self.dependencies:
packages.append(mas)
se... | python | def clear_masters(self):
"""Clear master packages if already exist in dependencies
or if added to install two or more times
"""
packages = []
for mas in Utils().remove_dbs(self.packages):
if mas not in self.dependencies:
packages.append(mas)
se... | [
"def",
"clear_masters",
"(",
"self",
")",
":",
"packages",
"=",
"[",
"]",
"for",
"mas",
"in",
"Utils",
"(",
")",
".",
"remove_dbs",
"(",
"self",
".",
"packages",
")",
":",
"if",
"mas",
"not",
"in",
"self",
".",
"dependencies",
":",
"packages",
".",
... | Clear master packages if already exist in dependencies
or if added to install two or more times | [
"Clear",
"master",
"packages",
"if",
"already",
"exist",
"in",
"dependencies",
"or",
"if",
"added",
"to",
"install",
"two",
"or",
"more",
"times"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/binary/install.py#L208-L216 |
43,356 | dslackw/slpkg | slpkg/binary/install.py | BinaryInstall.install_packages | def install_packages(self):
"""Install or upgrade packages
"""
installs, upgraded = [], []
for inst in (self.dep_install + self.install):
package = (self.tmp_path + inst).split()
pkg_ver = "{0}-{1}".format(split_package(inst)[0],
... | python | def install_packages(self):
"""Install or upgrade packages
"""
installs, upgraded = [], []
for inst in (self.dep_install + self.install):
package = (self.tmp_path + inst).split()
pkg_ver = "{0}-{1}".format(split_package(inst)[0],
... | [
"def",
"install_packages",
"(",
"self",
")",
":",
"installs",
",",
"upgraded",
"=",
"[",
"]",
",",
"[",
"]",
"for",
"inst",
"in",
"(",
"self",
".",
"dep_install",
"+",
"self",
".",
"install",
")",
":",
"package",
"=",
"(",
"self",
".",
"tmp_path",
... | Install or upgrade packages | [
"Install",
"or",
"upgrade",
"packages"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/binary/install.py#L218-L240 |
43,357 | dslackw/slpkg | slpkg/binary/install.py | BinaryInstall.not_downgrade | def not_downgrade(self, package):
"""Don't downgrade packages if repository version is lower than
installed"""
name = split_package(package)[0]
rep_ver = split_package(package)[1]
ins_ver = GetFromInstalled(name).version()[1:]
if not ins_ver:
ins_ver = "0"
... | python | def not_downgrade(self, package):
"""Don't downgrade packages if repository version is lower than
installed"""
name = split_package(package)[0]
rep_ver = split_package(package)[1]
ins_ver = GetFromInstalled(name).version()[1:]
if not ins_ver:
ins_ver = "0"
... | [
"def",
"not_downgrade",
"(",
"self",
",",
"package",
")",
":",
"name",
"=",
"split_package",
"(",
"package",
")",
"[",
"0",
"]",
"rep_ver",
"=",
"split_package",
"(",
"package",
")",
"[",
"1",
"]",
"ins_ver",
"=",
"GetFromInstalled",
"(",
"name",
")",
... | Don't downgrade packages if repository version is lower than
installed | [
"Don",
"t",
"downgrade",
"packages",
"if",
"repository",
"version",
"is",
"lower",
"than",
"installed"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/binary/install.py#L242-L255 |
43,358 | dslackw/slpkg | slpkg/binary/install.py | BinaryInstall.checksums | def checksums(self, install):
"""Checksums before install
"""
check_md5(pkg_checksum(install, self.repo), self.tmp_path + install) | python | def checksums(self, install):
"""Checksums before install
"""
check_md5(pkg_checksum(install, self.repo), self.tmp_path + install) | [
"def",
"checksums",
"(",
"self",
",",
"install",
")",
":",
"check_md5",
"(",
"pkg_checksum",
"(",
"install",
",",
"self",
".",
"repo",
")",
",",
"self",
".",
"tmp_path",
"+",
"install",
")"
] | Checksums before install | [
"Checksums",
"before",
"install"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/binary/install.py#L257-L260 |
43,359 | dslackw/slpkg | slpkg/binary/install.py | BinaryInstall.resolving_deps | def resolving_deps(self):
"""Return package dependencies
"""
requires = []
if (self.meta.rsl_deps in ["on", "ON"] and
self.flag != "--resolve-off"):
self.msg.resolving()
for dep in self.packages:
status(0.05)
dependencies = []
... | python | def resolving_deps(self):
"""Return package dependencies
"""
requires = []
if (self.meta.rsl_deps in ["on", "ON"] and
self.flag != "--resolve-off"):
self.msg.resolving()
for dep in self.packages:
status(0.05)
dependencies = []
... | [
"def",
"resolving_deps",
"(",
"self",
")",
":",
"requires",
"=",
"[",
"]",
"if",
"(",
"self",
".",
"meta",
".",
"rsl_deps",
"in",
"[",
"\"on\"",
",",
"\"ON\"",
"]",
"and",
"self",
".",
"flag",
"!=",
"\"--resolve-off\"",
")",
":",
"self",
".",
"msg",
... | Return package dependencies | [
"Return",
"package",
"dependencies"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/binary/install.py#L262-L276 |
43,360 | dslackw/slpkg | slpkg/binary/install.py | BinaryInstall._fix_deps_repos | def _fix_deps_repos(self, dependencies):
"""Fix store deps include in repository
"""
requires = []
for dep in dependencies:
if dep in self.repo_pkg_names:
requires.append(dep)
return requires | python | def _fix_deps_repos(self, dependencies):
"""Fix store deps include in repository
"""
requires = []
for dep in dependencies:
if dep in self.repo_pkg_names:
requires.append(dep)
return requires | [
"def",
"_fix_deps_repos",
"(",
"self",
",",
"dependencies",
")",
":",
"requires",
"=",
"[",
"]",
"for",
"dep",
"in",
"dependencies",
":",
"if",
"dep",
"in",
"self",
".",
"repo_pkg_names",
":",
"requires",
".",
"append",
"(",
"dep",
")",
"return",
"requir... | Fix store deps include in repository | [
"Fix",
"store",
"deps",
"include",
"in",
"repository"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/binary/install.py#L278-L285 |
43,361 | dslackw/slpkg | slpkg/binary/install.py | BinaryInstall.top_view | def top_view(self):
"""Print packages status bar
"""
self.msg.template(78)
print("{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}".format(
"| Package", " " * 17,
"New Version", " " * 8,
"Arch", " " * 4,
"Build", " " * 2,
"Repos", " " * 10,
... | python | def top_view(self):
"""Print packages status bar
"""
self.msg.template(78)
print("{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}".format(
"| Package", " " * 17,
"New Version", " " * 8,
"Arch", " " * 4,
"Build", " " * 2,
"Repos", " " * 10,
... | [
"def",
"top_view",
"(",
"self",
")",
":",
"self",
".",
"msg",
".",
"template",
"(",
"78",
")",
"print",
"(",
"\"{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}\"",
".",
"format",
"(",
"\"| Package\"",
",",
"\" \"",
"*",
"17",
",",
"\"New Version\"",
",",
"\" \"",
"*",
... | Print packages status bar | [
"Print",
"packages",
"status",
"bar"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/binary/install.py#L314-L325 |
43,362 | dslackw/slpkg | slpkg/binary/install.py | BinaryInstall.store | def store(self, packages):
"""Store and return packages for install
"""
dwn, install, comp_sum, uncomp_sum = ([] for i in range(4))
# name = data[0]
# location = data[1]
# size = data[2]
# unsize = data[3]
for pkg in packages:
for pk, loc, comp... | python | def store(self, packages):
"""Store and return packages for install
"""
dwn, install, comp_sum, uncomp_sum = ([] for i in range(4))
# name = data[0]
# location = data[1]
# size = data[2]
# unsize = data[3]
for pkg in packages:
for pk, loc, comp... | [
"def",
"store",
"(",
"self",
",",
"packages",
")",
":",
"dwn",
",",
"install",
",",
"comp_sum",
",",
"uncomp_sum",
"=",
"(",
"[",
"]",
"for",
"i",
"in",
"range",
"(",
"4",
")",
")",
"# name = data[0]",
"# location = data[1]",
"# size = data[2]",
"# unsize ... | Store and return packages for install | [
"Store",
"and",
"return",
"packages",
"for",
"install"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/binary/install.py#L327-L364 |
43,363 | dslackw/slpkg | slpkg/grep_md5.py | pkg_checksum | def pkg_checksum(binary, repo):
"""Return checksum from CHECKSUMS.md5 file by repository
"""
md5 = "None"
if repo == "slack_patches" and _meta_.slack_rel == "stable":
CHECKSUMS_md5 = URL(mirrors("CHECKSUMS.md5", "patches/")).reading()
elif repo == "slack_patches" and _meta_.slack_rel == "cur... | python | def pkg_checksum(binary, repo):
"""Return checksum from CHECKSUMS.md5 file by repository
"""
md5 = "None"
if repo == "slack_patches" and _meta_.slack_rel == "stable":
CHECKSUMS_md5 = URL(mirrors("CHECKSUMS.md5", "patches/")).reading()
elif repo == "slack_patches" and _meta_.slack_rel == "cur... | [
"def",
"pkg_checksum",
"(",
"binary",
",",
"repo",
")",
":",
"md5",
"=",
"\"None\"",
"if",
"repo",
"==",
"\"slack_patches\"",
"and",
"_meta_",
".",
"slack_rel",
"==",
"\"stable\"",
":",
"CHECKSUMS_md5",
"=",
"URL",
"(",
"mirrors",
"(",
"\"CHECKSUMS.md5\"",
"... | Return checksum from CHECKSUMS.md5 file by repository | [
"Return",
"checksum",
"from",
"CHECKSUMS",
".",
"md5",
"file",
"by",
"repository"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/grep_md5.py#L31-L49 |
43,364 | dslackw/slpkg | slpkg/load.py | library | def library(repo):
"""Load packages from slpkg library and from local
"""
pkg_list, packages = [], ""
if repo == "sbo":
if (os.path.isfile(
_meta_.lib_path + "{0}_repo/SLACKBUILDS.TXT".format(repo))):
packages = Utils().read_file(_meta_.lib_path + "{0}_repo/"
... | python | def library(repo):
"""Load packages from slpkg library and from local
"""
pkg_list, packages = [], ""
if repo == "sbo":
if (os.path.isfile(
_meta_.lib_path + "{0}_repo/SLACKBUILDS.TXT".format(repo))):
packages = Utils().read_file(_meta_.lib_path + "{0}_repo/"
... | [
"def",
"library",
"(",
"repo",
")",
":",
"pkg_list",
",",
"packages",
"=",
"[",
"]",
",",
"\"\"",
"if",
"repo",
"==",
"\"sbo\"",
":",
"if",
"(",
"os",
".",
"path",
".",
"isfile",
"(",
"_meta_",
".",
"lib_path",
"+",
"\"{0}_repo/SLACKBUILDS.TXT\"",
".",... | Load packages from slpkg library and from local | [
"Load",
"packages",
"from",
"slpkg",
"library",
"and",
"from",
"local"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/load.py#L34-L57 |
43,365 | dslackw/slpkg | slpkg/sbo/read.py | ReadSBo.info | def info(self, name, sbo_file):
"""Read info file
"""
return URL(self.sbo_url + name + sbo_file).reading() | python | def info(self, name, sbo_file):
"""Read info file
"""
return URL(self.sbo_url + name + sbo_file).reading() | [
"def",
"info",
"(",
"self",
",",
"name",
",",
"sbo_file",
")",
":",
"return",
"URL",
"(",
"self",
".",
"sbo_url",
"+",
"name",
"+",
"sbo_file",
")",
".",
"reading",
"(",
")"
] | Read info file | [
"Read",
"info",
"file"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/read.py#L39-L42 |
43,366 | dslackw/slpkg | slpkg/sbo/read.py | ReadSBo.slackbuild | def slackbuild(self, name, sbo_file):
"""Read SlackBuild file
"""
return URL(self.sbo_url + name + sbo_file).reading() | python | def slackbuild(self, name, sbo_file):
"""Read SlackBuild file
"""
return URL(self.sbo_url + name + sbo_file).reading() | [
"def",
"slackbuild",
"(",
"self",
",",
"name",
",",
"sbo_file",
")",
":",
"return",
"URL",
"(",
"self",
".",
"sbo_url",
"+",
"name",
"+",
"sbo_file",
")",
".",
"reading",
"(",
")"
] | Read SlackBuild file | [
"Read",
"SlackBuild",
"file"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/read.py#L44-L47 |
43,367 | dslackw/slpkg | slpkg/sbo/autobuild.py | AutoBuild.run | def run(self):
"""Build package and fix ordelist per checksum
"""
self.files_exist()
self.info_file()
sources = self.sources
if len(sources) > 1 and self.sbo_sources != sources:
sources = self.sbo_sources
# If the list does not have the same order use ... | python | def run(self):
"""Build package and fix ordelist per checksum
"""
self.files_exist()
self.info_file()
sources = self.sources
if len(sources) > 1 and self.sbo_sources != sources:
sources = self.sbo_sources
# If the list does not have the same order use ... | [
"def",
"run",
"(",
"self",
")",
":",
"self",
".",
"files_exist",
"(",
")",
"self",
".",
"info_file",
"(",
")",
"sources",
"=",
"self",
".",
"sources",
"if",
"len",
"(",
"sources",
")",
">",
"1",
"and",
"self",
".",
"sbo_sources",
"!=",
"sources",
"... | Build package and fix ordelist per checksum | [
"Build",
"package",
"and",
"fix",
"ordelist",
"per",
"checksum"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/autobuild.py#L43-L54 |
43,368 | dslackw/slpkg | slpkg/sbo/autobuild.py | AutoBuild.info_file | def info_file(self):
"""Grab sources from .info file and store filename
"""
sources = SBoGrep(self.prgnam).source().split()
for source in sources:
self.sbo_sources.append(source.split("/")[-1]) | python | def info_file(self):
"""Grab sources from .info file and store filename
"""
sources = SBoGrep(self.prgnam).source().split()
for source in sources:
self.sbo_sources.append(source.split("/")[-1]) | [
"def",
"info_file",
"(",
"self",
")",
":",
"sources",
"=",
"SBoGrep",
"(",
"self",
".",
"prgnam",
")",
".",
"source",
"(",
")",
".",
"split",
"(",
")",
"for",
"source",
"in",
"sources",
":",
"self",
".",
"sbo_sources",
".",
"append",
"(",
"source",
... | Grab sources from .info file and store filename | [
"Grab",
"sources",
"from",
".",
"info",
"file",
"and",
"store",
"filename"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/autobuild.py#L56-L61 |
43,369 | dslackw/slpkg | slpkg/sbo/autobuild.py | AutoBuild.files_exist | def files_exist(self):
"""Check if SlackBuild archive.tar.gz and sources exist
"""
if not os.path.isfile(self.path + self.script):
print("\nslpkg: Error: SlackBuild archive.tar.gz not found\n")
raise SystemExit()
for src in self.sources:
if not os.path... | python | def files_exist(self):
"""Check if SlackBuild archive.tar.gz and sources exist
"""
if not os.path.isfile(self.path + self.script):
print("\nslpkg: Error: SlackBuild archive.tar.gz not found\n")
raise SystemExit()
for src in self.sources:
if not os.path... | [
"def",
"files_exist",
"(",
"self",
")",
":",
"if",
"not",
"os",
".",
"path",
".",
"isfile",
"(",
"self",
".",
"path",
"+",
"self",
".",
"script",
")",
":",
"print",
"(",
"\"\\nslpkg: Error: SlackBuild archive.tar.gz not found\\n\"",
")",
"raise",
"SystemExit",... | Check if SlackBuild archive.tar.gz and sources exist | [
"Check",
"if",
"SlackBuild",
"archive",
".",
"tar",
".",
"gz",
"and",
"sources",
"exist"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/autobuild.py#L63-L73 |
43,370 | dslackw/slpkg | slpkg/main.py | ArgParse.help_version | def help_version(self):
"""Help and version info
"""
if (len(self.args) == 1 and self.args[0] in ["-h", "--help"] and
self.args[1:] == []):
options()
elif (len(self.args) == 1 and self.args[0] in ["-v", "--version"] and
self.args[1:] == []):
... | python | def help_version(self):
"""Help and version info
"""
if (len(self.args) == 1 and self.args[0] in ["-h", "--help"] and
self.args[1:] == []):
options()
elif (len(self.args) == 1 and self.args[0] in ["-v", "--version"] and
self.args[1:] == []):
... | [
"def",
"help_version",
"(",
"self",
")",
":",
"if",
"(",
"len",
"(",
"self",
".",
"args",
")",
"==",
"1",
"and",
"self",
".",
"args",
"[",
"0",
"]",
"in",
"[",
"\"-h\"",
",",
"\"--help\"",
"]",
"and",
"self",
".",
"args",
"[",
"1",
":",
"]",
... | Help and version info | [
"Help",
"and",
"version",
"info"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/main.py#L107-L117 |
43,371 | dslackw/slpkg | slpkg/main.py | ArgParse.command_update | def command_update(self):
"""Update package lists repositories
"""
if len(self.args) == 1 and self.args[0] == "update":
Update().repository(only="")
elif (len(self.args) == 2 and self.args[0] == "update" and
self.args[1].startswith("--only=")):
rep... | python | def command_update(self):
"""Update package lists repositories
"""
if len(self.args) == 1 and self.args[0] == "update":
Update().repository(only="")
elif (len(self.args) == 2 and self.args[0] == "update" and
self.args[1].startswith("--only=")):
rep... | [
"def",
"command_update",
"(",
"self",
")",
":",
"if",
"len",
"(",
"self",
".",
"args",
")",
"==",
"1",
"and",
"self",
".",
"args",
"[",
"0",
"]",
"==",
"\"update\"",
":",
"Update",
"(",
")",
".",
"repository",
"(",
"only",
"=",
"\"\"",
")",
"elif... | Update package lists repositories | [
"Update",
"package",
"lists",
"repositories"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/main.py#L119-L132 |
43,372 | dslackw/slpkg | slpkg/main.py | ArgParse.command_repo_add | def command_repo_add(self):
"""Add custom repositories
"""
if len(self.args) == 3 and self.args[0] == "repo-add":
Repo().add(self.args[1], self.args[2])
else:
usage("") | python | def command_repo_add(self):
"""Add custom repositories
"""
if len(self.args) == 3 and self.args[0] == "repo-add":
Repo().add(self.args[1], self.args[2])
else:
usage("") | [
"def",
"command_repo_add",
"(",
"self",
")",
":",
"if",
"len",
"(",
"self",
".",
"args",
")",
"==",
"3",
"and",
"self",
".",
"args",
"[",
"0",
"]",
"==",
"\"repo-add\"",
":",
"Repo",
"(",
")",
".",
"add",
"(",
"self",
".",
"args",
"[",
"1",
"]"... | Add custom repositories | [
"Add",
"custom",
"repositories"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/main.py#L158-L164 |
43,373 | dslackw/slpkg | slpkg/main.py | ArgParse.command_repo_remove | def command_repo_remove(self):
"""Remove custom repositories
"""
if len(self.args) == 2 and self.args[0] == "repo-remove":
Repo().remove(self.args[1])
else:
usage("") | python | def command_repo_remove(self):
"""Remove custom repositories
"""
if len(self.args) == 2 and self.args[0] == "repo-remove":
Repo().remove(self.args[1])
else:
usage("") | [
"def",
"command_repo_remove",
"(",
"self",
")",
":",
"if",
"len",
"(",
"self",
".",
"args",
")",
"==",
"2",
"and",
"self",
".",
"args",
"[",
"0",
"]",
"==",
"\"repo-remove\"",
":",
"Repo",
"(",
")",
".",
"remove",
"(",
"self",
".",
"args",
"[",
"... | Remove custom repositories | [
"Remove",
"custom",
"repositories"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/main.py#L166-L172 |
43,374 | dslackw/slpkg | slpkg/main.py | ArgParse.command_upgrade | def command_upgrade(self):
"""Recreate repositories package lists
"""
if len(self.args) == 1 and self.args[0] == "upgrade":
Initialization(False).upgrade(only="")
elif (len(self.args) == 2 and self.args[0] == "upgrade" and
self.args[1].startswith("--only=")):
... | python | def command_upgrade(self):
"""Recreate repositories package lists
"""
if len(self.args) == 1 and self.args[0] == "upgrade":
Initialization(False).upgrade(only="")
elif (len(self.args) == 2 and self.args[0] == "upgrade" and
self.args[1].startswith("--only=")):
... | [
"def",
"command_upgrade",
"(",
"self",
")",
":",
"if",
"len",
"(",
"self",
".",
"args",
")",
"==",
"1",
"and",
"self",
".",
"args",
"[",
"0",
"]",
"==",
"\"upgrade\"",
":",
"Initialization",
"(",
"False",
")",
".",
"upgrade",
"(",
"only",
"=",
"\"\... | Recreate repositories package lists | [
"Recreate",
"repositories",
"package",
"lists"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/main.py#L174-L187 |
43,375 | dslackw/slpkg | slpkg/main.py | ArgParse.command_health | def command_health(self):
"""Check package health
"""
if len(self.args) == 1 and self.args[0] == "health":
PackageHealth(mode="").test()
elif (len(self.args) == 2 and self.args[0] == "health" and
self.args[1] == "--silent"):
PackageHealth(mode=self... | python | def command_health(self):
"""Check package health
"""
if len(self.args) == 1 and self.args[0] == "health":
PackageHealth(mode="").test()
elif (len(self.args) == 2 and self.args[0] == "health" and
self.args[1] == "--silent"):
PackageHealth(mode=self... | [
"def",
"command_health",
"(",
"self",
")",
":",
"if",
"len",
"(",
"self",
".",
"args",
")",
"==",
"1",
"and",
"self",
".",
"args",
"[",
"0",
"]",
"==",
"\"health\"",
":",
"PackageHealth",
"(",
"mode",
"=",
"\"\"",
")",
".",
"test",
"(",
")",
"eli... | Check package health | [
"Check",
"package",
"health"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/main.py#L202-L211 |
43,376 | dslackw/slpkg | slpkg/main.py | ArgParse.command_deps_status | def command_deps_status(self):
"""Print dependencies status
"""
image = ""
for arg in self.args:
if arg.startswith("--graph="):
image = arg.split("=")[1]
if len(self.args) == 1 and self.args[0] == "deps-status":
DependenciesStatus(image).sh... | python | def command_deps_status(self):
"""Print dependencies status
"""
image = ""
for arg in self.args:
if arg.startswith("--graph="):
image = arg.split("=")[1]
if len(self.args) == 1 and self.args[0] == "deps-status":
DependenciesStatus(image).sh... | [
"def",
"command_deps_status",
"(",
"self",
")",
":",
"image",
"=",
"\"\"",
"for",
"arg",
"in",
"self",
".",
"args",
":",
"if",
"arg",
".",
"startswith",
"(",
"\"--graph=\"",
")",
":",
"image",
"=",
"arg",
".",
"split",
"(",
"\"=\"",
")",
"[",
"1",
... | Print dependencies status | [
"Print",
"dependencies",
"status"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/main.py#L213-L231 |
43,377 | dslackw/slpkg | slpkg/main.py | ArgParse.command_new_config | def command_new_config(self):
"""Manage .new configuration files
"""
if len(self.args) == 1 and self.args[0] == "new-config":
NewConfig().run()
else:
usage("") | python | def command_new_config(self):
"""Manage .new configuration files
"""
if len(self.args) == 1 and self.args[0] == "new-config":
NewConfig().run()
else:
usage("") | [
"def",
"command_new_config",
"(",
"self",
")",
":",
"if",
"len",
"(",
"self",
".",
"args",
")",
"==",
"1",
"and",
"self",
".",
"args",
"[",
"0",
"]",
"==",
"\"new-config\"",
":",
"NewConfig",
"(",
")",
".",
"run",
"(",
")",
"else",
":",
"usage",
... | Manage .new configuration files | [
"Manage",
".",
"new",
"configuration",
"files"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/main.py#L233-L239 |
43,378 | dslackw/slpkg | slpkg/main.py | ArgParse.auto_build | def auto_build(self):
"""Auto built tool
"""
options = [
"-a",
"--autobuild"
]
if len(self.args) >= 3 and self.args[0] in options:
AutoBuild(self.args[1], self.args[2:], self.meta.path).run()
else:
usage("") | python | def auto_build(self):
"""Auto built tool
"""
options = [
"-a",
"--autobuild"
]
if len(self.args) >= 3 and self.args[0] in options:
AutoBuild(self.args[1], self.args[2:], self.meta.path).run()
else:
usage("") | [
"def",
"auto_build",
"(",
"self",
")",
":",
"options",
"=",
"[",
"\"-a\"",
",",
"\"--autobuild\"",
"]",
"if",
"len",
"(",
"self",
".",
"args",
")",
">=",
"3",
"and",
"self",
".",
"args",
"[",
"0",
"]",
"in",
"options",
":",
"AutoBuild",
"(",
"self"... | Auto built tool | [
"Auto",
"built",
"tool"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/main.py#L241-L251 |
43,379 | dslackw/slpkg | slpkg/main.py | ArgParse.pkg_list | def pkg_list(self):
"""List of packages by repository
"""
options = [
"-l",
"--list"
]
flag = ["--index", "--installed", "--name"]
name = INDEX = installed = False
for arg in self.args[2:]:
if flag[0] == arg:
IND... | python | def pkg_list(self):
"""List of packages by repository
"""
options = [
"-l",
"--list"
]
flag = ["--index", "--installed", "--name"]
name = INDEX = installed = False
for arg in self.args[2:]:
if flag[0] == arg:
IND... | [
"def",
"pkg_list",
"(",
"self",
")",
":",
"options",
"=",
"[",
"\"-l\"",
",",
"\"--list\"",
"]",
"flag",
"=",
"[",
"\"--index\"",
",",
"\"--installed\"",
",",
"\"--name\"",
"]",
"name",
"=",
"INDEX",
"=",
"installed",
"=",
"False",
"for",
"arg",
"in",
... | List of packages by repository | [
"List",
"of",
"packages",
"by",
"repository"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/main.py#L253-L282 |
43,380 | dslackw/slpkg | slpkg/main.py | ArgParse.pkg_upgrade | def pkg_upgrade(self):
"""Check and upgrade packages by repository
"""
options = [
"-c",
"--check"
]
flags = [
"--upgrade",
"--skip=",
"--resolve-off",
"--checklist",
"--rebuild"
]
... | python | def pkg_upgrade(self):
"""Check and upgrade packages by repository
"""
options = [
"-c",
"--check"
]
flags = [
"--upgrade",
"--skip=",
"--resolve-off",
"--checklist",
"--rebuild"
]
... | [
"def",
"pkg_upgrade",
"(",
"self",
")",
":",
"options",
"=",
"[",
"\"-c\"",
",",
"\"--check\"",
"]",
"flags",
"=",
"[",
"\"--upgrade\"",
",",
"\"--skip=\"",
",",
"\"--resolve-off\"",
",",
"\"--checklist\"",
",",
"\"--rebuild\"",
"]",
"flag",
",",
"skip",
"="... | Check and upgrade packages by repository | [
"Check",
"and",
"upgrade",
"packages",
"by",
"repository"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/main.py#L284-L324 |
43,381 | dslackw/slpkg | slpkg/main.py | ArgParse.__pkg_upgrade_flags | def __pkg_upgrade_flags(self, flags):
"""Manage flags for package upgrade option
"""
flag, skip = [], ""
if flags[0] in self.args:
for arg in self.args[3:]:
if arg.startswith(flags[1]):
skip = Regex(arg.split("=")[1]).get()
... | python | def __pkg_upgrade_flags(self, flags):
"""Manage flags for package upgrade option
"""
flag, skip = [], ""
if flags[0] in self.args:
for arg in self.args[3:]:
if arg.startswith(flags[1]):
skip = Regex(arg.split("=")[1]).get()
... | [
"def",
"__pkg_upgrade_flags",
"(",
"self",
",",
"flags",
")",
":",
"flag",
",",
"skip",
"=",
"[",
"]",
",",
"\"\"",
"if",
"flags",
"[",
"0",
"]",
"in",
"self",
".",
"args",
":",
"for",
"arg",
"in",
"self",
".",
"args",
"[",
"3",
":",
"]",
":",
... | Manage flags for package upgrade option | [
"Manage",
"flags",
"for",
"package",
"upgrade",
"option"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/main.py#L326-L339 |
43,382 | dslackw/slpkg | slpkg/main.py | ArgParse.pkg_install | def pkg_install(self):
"""Install packages by repository
"""
flag = []
options = [
"-s",
"--sync"
]
additional_options = [
"--resolve-off",
"--download-only",
"--directory-prefix=",
"--case-ins",
... | python | def pkg_install(self):
"""Install packages by repository
"""
flag = []
options = [
"-s",
"--sync"
]
additional_options = [
"--resolve-off",
"--download-only",
"--directory-prefix=",
"--case-ins",
... | [
"def",
"pkg_install",
"(",
"self",
")",
":",
"flag",
"=",
"[",
"]",
"options",
"=",
"[",
"\"-s\"",
",",
"\"--sync\"",
"]",
"additional_options",
"=",
"[",
"\"--resolve-off\"",
",",
"\"--download-only\"",
",",
"\"--directory-prefix=\"",
",",
"\"--case-ins\"",
","... | Install packages by repository | [
"Install",
"packages",
"by",
"repository"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/main.py#L341-L379 |
43,383 | dslackw/slpkg | slpkg/main.py | ArgParse.pkg_tracking | def pkg_tracking(self):
"""Tracking package dependencies
"""
flag = []
options = [
"-t",
"--tracking"
]
additional_options = [
"--check-deps",
"--graph=",
"--case-ins"
]
for arg in self.args[2:]:
... | python | def pkg_tracking(self):
"""Tracking package dependencies
"""
flag = []
options = [
"-t",
"--tracking"
]
additional_options = [
"--check-deps",
"--graph=",
"--case-ins"
]
for arg in self.args[2:]:
... | [
"def",
"pkg_tracking",
"(",
"self",
")",
":",
"flag",
"=",
"[",
"]",
"options",
"=",
"[",
"\"-t\"",
",",
"\"--tracking\"",
"]",
"additional_options",
"=",
"[",
"\"--check-deps\"",
",",
"\"--graph=\"",
",",
"\"--case-ins\"",
"]",
"for",
"arg",
"in",
"self",
... | Tracking package dependencies | [
"Tracking",
"package",
"dependencies"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/main.py#L381-L418 |
43,384 | dslackw/slpkg | slpkg/main.py | ArgParse.sbo_network | def sbo_network(self):
"""View slackbuilds packages
"""
flag = []
options = [
"-n",
"--network"
]
additional_options = [
"--checklist",
"--case-ins"
]
for add in additional_options:
if add in self... | python | def sbo_network(self):
"""View slackbuilds packages
"""
flag = []
options = [
"-n",
"--network"
]
additional_options = [
"--checklist",
"--case-ins"
]
for add in additional_options:
if add in self... | [
"def",
"sbo_network",
"(",
"self",
")",
":",
"flag",
"=",
"[",
"]",
"options",
"=",
"[",
"\"-n\"",
",",
"\"--network\"",
"]",
"additional_options",
"=",
"[",
"\"--checklist\"",
",",
"\"--case-ins\"",
"]",
"for",
"add",
"in",
"additional_options",
":",
"if",
... | View slackbuilds packages | [
"View",
"slackbuilds",
"packages"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/main.py#L420-L440 |
43,385 | dslackw/slpkg | slpkg/main.py | ArgParse.pkg_blacklist | def pkg_blacklist(self):
"""Manage blacklist packages
"""
blacklist = BlackList()
options = [
"-b",
"--blacklist"
]
flag = [
"--add",
"--remove"
]
command = ["list"]
if (len(self.args) == 2 and self.a... | python | def pkg_blacklist(self):
"""Manage blacklist packages
"""
blacklist = BlackList()
options = [
"-b",
"--blacklist"
]
flag = [
"--add",
"--remove"
]
command = ["list"]
if (len(self.args) == 2 and self.a... | [
"def",
"pkg_blacklist",
"(",
"self",
")",
":",
"blacklist",
"=",
"BlackList",
"(",
")",
"options",
"=",
"[",
"\"-b\"",
",",
"\"--blacklist\"",
"]",
"flag",
"=",
"[",
"\"--add\"",
",",
"\"--remove\"",
"]",
"command",
"=",
"[",
"\"list\"",
"]",
"if",
"(",
... | Manage blacklist packages | [
"Manage",
"blacklist",
"packages"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/main.py#L442-L471 |
43,386 | dslackw/slpkg | slpkg/main.py | ArgParse.pkg_queue | def pkg_queue(self):
"""Manage packages in queue
"""
queue = QueuePkgs()
options = [
"-q",
"--queue"
]
flag = [
"--add",
"--remove"
]
command = [
"list",
"build",
"install"... | python | def pkg_queue(self):
"""Manage packages in queue
"""
queue = QueuePkgs()
options = [
"-q",
"--queue"
]
flag = [
"--add",
"--remove"
]
command = [
"list",
"build",
"install"... | [
"def",
"pkg_queue",
"(",
"self",
")",
":",
"queue",
"=",
"QueuePkgs",
"(",
")",
"options",
"=",
"[",
"\"-q\"",
",",
"\"--queue\"",
"]",
"flag",
"=",
"[",
"\"--add\"",
",",
"\"--remove\"",
"]",
"command",
"=",
"[",
"\"list\"",
",",
"\"build\"",
",",
"\"... | Manage packages in queue | [
"Manage",
"packages",
"in",
"queue"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/main.py#L473-L517 |
43,387 | dslackw/slpkg | slpkg/main.py | ArgParse.bin_install | def bin_install(self):
"""Install Slackware binary packages
"""
packages = self.args[1:]
options = [
"-i",
"--installpkg"
]
flag = ""
flags = [
"--warn",
"--md5sum",
"--root",
"--infobox",
... | python | def bin_install(self):
"""Install Slackware binary packages
"""
packages = self.args[1:]
options = [
"-i",
"--installpkg"
]
flag = ""
flags = [
"--warn",
"--md5sum",
"--root",
"--infobox",
... | [
"def",
"bin_install",
"(",
"self",
")",
":",
"packages",
"=",
"self",
".",
"args",
"[",
"1",
":",
"]",
"options",
"=",
"[",
"\"-i\"",
",",
"\"--installpkg\"",
"]",
"flag",
"=",
"\"\"",
"flags",
"=",
"[",
"\"--warn\"",
",",
"\"--md5sum\"",
",",
"\"--roo... | Install Slackware binary packages | [
"Install",
"Slackware",
"binary",
"packages"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/main.py#L519-L545 |
43,388 | dslackw/slpkg | slpkg/main.py | ArgParse.bin_upgrade | def bin_upgrade(self):
"""Install-upgrade Slackware binary packages
"""
packages = self.args[1:]
options = [
"-u",
"--upgradepkg"
]
flag = ""
flags = [
"--dry-run",
"--install-new",
"--reinstall",
... | python | def bin_upgrade(self):
"""Install-upgrade Slackware binary packages
"""
packages = self.args[1:]
options = [
"-u",
"--upgradepkg"
]
flag = ""
flags = [
"--dry-run",
"--install-new",
"--reinstall",
... | [
"def",
"bin_upgrade",
"(",
"self",
")",
":",
"packages",
"=",
"self",
".",
"args",
"[",
"1",
":",
"]",
"options",
"=",
"[",
"\"-u\"",
",",
"\"--upgradepkg\"",
"]",
"flag",
"=",
"\"\"",
"flags",
"=",
"[",
"\"--dry-run\"",
",",
"\"--install-new\"",
",",
... | Install-upgrade Slackware binary packages | [
"Install",
"-",
"upgrade",
"Slackware",
"binary",
"packages"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/main.py#L547-L568 |
43,389 | dslackw/slpkg | slpkg/main.py | ArgParse.bin_remove | def bin_remove(self):
"""Remove Slackware packages
"""
packages = self.args[1:]
options = [
"-r",
"--removepkg"
]
additional_options = [
"--deps",
"--check-deps",
"--tag",
"--checklist"
]
... | python | def bin_remove(self):
"""Remove Slackware packages
"""
packages = self.args[1:]
options = [
"-r",
"--removepkg"
]
additional_options = [
"--deps",
"--check-deps",
"--tag",
"--checklist"
]
... | [
"def",
"bin_remove",
"(",
"self",
")",
":",
"packages",
"=",
"self",
".",
"args",
"[",
"1",
":",
"]",
"options",
"=",
"[",
"\"-r\"",
",",
"\"--removepkg\"",
"]",
"additional_options",
"=",
"[",
"\"--deps\"",
",",
"\"--check-deps\"",
",",
"\"--tag\"",
",",
... | Remove Slackware packages | [
"Remove",
"Slackware",
"packages"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/main.py#L570-L607 |
43,390 | dslackw/slpkg | slpkg/main.py | ArgParse.bin_find | def bin_find(self):
"""Find installed packages
"""
flag = []
options = [
"-f",
"--find"
]
additional_options = ["--case-ins"]
for arg in self.args:
if arg in additional_options:
flag.append(arg)
s... | python | def bin_find(self):
"""Find installed packages
"""
flag = []
options = [
"-f",
"--find"
]
additional_options = ["--case-ins"]
for arg in self.args:
if arg in additional_options:
flag.append(arg)
s... | [
"def",
"bin_find",
"(",
"self",
")",
":",
"flag",
"=",
"[",
"]",
"options",
"=",
"[",
"\"-f\"",
",",
"\"--find\"",
"]",
"additional_options",
"=",
"[",
"\"--case-ins\"",
"]",
"for",
"arg",
"in",
"self",
".",
"args",
":",
"if",
"arg",
"in",
"additional_... | Find installed packages | [
"Find",
"installed",
"packages"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/main.py#L609-L626 |
43,391 | dslackw/slpkg | slpkg/main.py | ArgParse.pkg_desc | def pkg_desc(self):
"""Print slack-desc by repository
"""
options = [
"-p",
"--desc"
]
flag = ["--color="]
colors = [
"red",
"green",
"yellow",
"cyan",
"grey"
]
tag = ""
... | python | def pkg_desc(self):
"""Print slack-desc by repository
"""
options = [
"-p",
"--desc"
]
flag = ["--color="]
colors = [
"red",
"green",
"yellow",
"cyan",
"grey"
]
tag = ""
... | [
"def",
"pkg_desc",
"(",
"self",
")",
":",
"options",
"=",
"[",
"\"-p\"",
",",
"\"--desc\"",
"]",
"flag",
"=",
"[",
"\"--color=\"",
"]",
"colors",
"=",
"[",
"\"red\"",
",",
"\"green\"",
",",
"\"yellow\"",
",",
"\"cyan\"",
",",
"\"grey\"",
"]",
"tag",
"=... | Print slack-desc by repository | [
"Print",
"slack",
"-",
"desc",
"by",
"repository"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/main.py#L628-L663 |
43,392 | dslackw/slpkg | slpkg/main.py | ArgParse.pkg_find | def pkg_find(self):
"""Find packages from all enabled repositories
"""
flag = []
options = [
"-F",
"--FIND"
]
additional_options = ["--case-ins"]
for arg in self.args:
if arg in additional_options:
flag.append(ar... | python | def pkg_find(self):
"""Find packages from all enabled repositories
"""
flag = []
options = [
"-F",
"--FIND"
]
additional_options = ["--case-ins"]
for arg in self.args:
if arg in additional_options:
flag.append(ar... | [
"def",
"pkg_find",
"(",
"self",
")",
":",
"flag",
"=",
"[",
"]",
"options",
"=",
"[",
"\"-F\"",
",",
"\"--FIND\"",
"]",
"additional_options",
"=",
"[",
"\"--case-ins\"",
"]",
"for",
"arg",
"in",
"self",
".",
"args",
":",
"if",
"arg",
"in",
"additional_... | Find packages from all enabled repositories | [
"Find",
"packages",
"from",
"all",
"enabled",
"repositories"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/main.py#L665-L682 |
43,393 | dslackw/slpkg | slpkg/main.py | ArgParse.pkg_contents | def pkg_contents(self):
"""Print packages contents
"""
packages = self.args[1:]
options = [
"-d",
"--display"
]
if len(self.args) > 1 and self.args[0] in options:
PackageManager(packages).display()
else:
usage("") | python | def pkg_contents(self):
"""Print packages contents
"""
packages = self.args[1:]
options = [
"-d",
"--display"
]
if len(self.args) > 1 and self.args[0] in options:
PackageManager(packages).display()
else:
usage("") | [
"def",
"pkg_contents",
"(",
"self",
")",
":",
"packages",
"=",
"self",
".",
"args",
"[",
"1",
":",
"]",
"options",
"=",
"[",
"\"-d\"",
",",
"\"--display\"",
"]",
"if",
"len",
"(",
"self",
".",
"args",
")",
">",
"1",
"and",
"self",
".",
"args",
"[... | Print packages contents | [
"Print",
"packages",
"contents"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/main.py#L684-L695 |
43,394 | dslackw/slpkg | slpkg/main.py | ArgParse.congiguration | def congiguration(self):
"""Manage slpkg configuration file
"""
options = [
"-g",
"--config"
]
command = [
"print",
"edit",
"reset"
]
conf = Config()
if (len(self.args) == 2 and self.args[0] in op... | python | def congiguration(self):
"""Manage slpkg configuration file
"""
options = [
"-g",
"--config"
]
command = [
"print",
"edit",
"reset"
]
conf = Config()
if (len(self.args) == 2 and self.args[0] in op... | [
"def",
"congiguration",
"(",
"self",
")",
":",
"options",
"=",
"[",
"\"-g\"",
",",
"\"--config\"",
"]",
"command",
"=",
"[",
"\"print\"",
",",
"\"edit\"",
",",
"\"reset\"",
"]",
"conf",
"=",
"Config",
"(",
")",
"if",
"(",
"len",
"(",
"self",
".",
"ar... | Manage slpkg configuration file | [
"Manage",
"slpkg",
"configuration",
"file"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/main.py#L697-L720 |
43,395 | dslackw/slpkg | slpkg/main.py | ArgParse.auto_detect | def auto_detect(self, args):
"""Check for already Slackware binary packages exist
"""
suffixes = [
".tgz",
".txz",
".tbz",
".tlz"
]
if (not args[0].startswith("-") and args[0] not in self.commands and
args[0].endswit... | python | def auto_detect(self, args):
"""Check for already Slackware binary packages exist
"""
suffixes = [
".tgz",
".txz",
".tbz",
".tlz"
]
if (not args[0].startswith("-") and args[0] not in self.commands and
args[0].endswit... | [
"def",
"auto_detect",
"(",
"self",
",",
"args",
")",
":",
"suffixes",
"=",
"[",
"\".tgz\"",
",",
"\".txz\"",
",",
"\".tbz\"",
",",
"\".tlz\"",
"]",
"if",
"(",
"not",
"args",
"[",
"0",
"]",
".",
"startswith",
"(",
"\"-\"",
")",
"and",
"args",
"[",
"... | Check for already Slackware binary packages exist | [
"Check",
"for",
"already",
"Slackware",
"binary",
"packages",
"exist"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/main.py#L722-L745 |
43,396 | dslackw/slpkg | slpkg/binary/search.py | search_pkg | def search_pkg(name, repo):
"""Search if package exists in PACKAGES.TXT file
and return the name.
"""
PACKAGES_TXT = Utils().read_file(_meta_.lib_path + "{0}_repo/"
"PACKAGES.TXT".format(repo))
names = Utils().package_name(PACKAGES_TXT)
blacklist = BlackList(... | python | def search_pkg(name, repo):
"""Search if package exists in PACKAGES.TXT file
and return the name.
"""
PACKAGES_TXT = Utils().read_file(_meta_.lib_path + "{0}_repo/"
"PACKAGES.TXT".format(repo))
names = Utils().package_name(PACKAGES_TXT)
blacklist = BlackList(... | [
"def",
"search_pkg",
"(",
"name",
",",
"repo",
")",
":",
"PACKAGES_TXT",
"=",
"Utils",
"(",
")",
".",
"read_file",
"(",
"_meta_",
".",
"lib_path",
"+",
"\"{0}_repo/\"",
"\"PACKAGES.TXT\"",
".",
"format",
"(",
"repo",
")",
")",
"names",
"=",
"Utils",
"(",... | Search if package exists in PACKAGES.TXT file
and return the name. | [
"Search",
"if",
"package",
"exists",
"in",
"PACKAGES",
".",
"TXT",
"file",
"and",
"return",
"the",
"name",
"."
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/binary/search.py#L32-L45 |
43,397 | dslackw/slpkg | slpkg/status_deps.py | DependenciesStatus.data | def data(self):
"""Check all installed packages and create
dictionary database
"""
for pkg in self.installed:
if os.path.isfile(self.meta.pkg_path + pkg):
name = split_package(pkg)[0]
for log in self.logs:
deps = Utils().rea... | python | def data(self):
"""Check all installed packages and create
dictionary database
"""
for pkg in self.installed:
if os.path.isfile(self.meta.pkg_path + pkg):
name = split_package(pkg)[0]
for log in self.logs:
deps = Utils().rea... | [
"def",
"data",
"(",
"self",
")",
":",
"for",
"pkg",
"in",
"self",
".",
"installed",
":",
"if",
"os",
".",
"path",
".",
"isfile",
"(",
"self",
".",
"meta",
".",
"pkg_path",
"+",
"pkg",
")",
":",
"name",
"=",
"split_package",
"(",
"pkg",
")",
"[",
... | Check all installed packages and create
dictionary database | [
"Check",
"all",
"installed",
"packages",
"and",
"create",
"dictionary",
"database"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/status_deps.py#L56-L73 |
43,398 | dslackw/slpkg | slpkg/status_deps.py | DependenciesStatus.count_packages | def count_packages(self):
"""Count dependencies and packages
"""
packages = []
for pkg in self.dmap.values():
packages += pkg
self.count_dep += 1
self.count_pkg = len(set(packages)) | python | def count_packages(self):
"""Count dependencies and packages
"""
packages = []
for pkg in self.dmap.values():
packages += pkg
self.count_dep += 1
self.count_pkg = len(set(packages)) | [
"def",
"count_packages",
"(",
"self",
")",
":",
"packages",
"=",
"[",
"]",
"for",
"pkg",
"in",
"self",
".",
"dmap",
".",
"values",
"(",
")",
":",
"packages",
"+=",
"pkg",
"self",
".",
"count_dep",
"+=",
"1",
"self",
".",
"count_pkg",
"=",
"len",
"(... | Count dependencies and packages | [
"Count",
"dependencies",
"and",
"packages"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/status_deps.py#L75-L82 |
43,399 | dslackw/slpkg | slpkg/status_deps.py | DependenciesStatus.show | def show(self):
"""Show dependencies status
"""
self.data()
print("")
self.msg.template(78)
print("| {0}{1}{2}".format("Dependencies", " " * 20, "Packages"))
self.msg.template(78)
for key, value in self.dmap.iteritems():
print(" {0}{1}{2}{3}{4... | python | def show(self):
"""Show dependencies status
"""
self.data()
print("")
self.msg.template(78)
print("| {0}{1}{2}".format("Dependencies", " " * 20, "Packages"))
self.msg.template(78)
for key, value in self.dmap.iteritems():
print(" {0}{1}{2}{3}{4... | [
"def",
"show",
"(",
"self",
")",
":",
"self",
".",
"data",
"(",
")",
"print",
"(",
"\"\"",
")",
"self",
".",
"msg",
".",
"template",
"(",
"78",
")",
"print",
"(",
"\"| {0}{1}{2}\"",
".",
"format",
"(",
"\"Dependencies\"",
",",
"\" \"",
"*",
"20",
"... | Show dependencies status | [
"Show",
"dependencies",
"status"
] | dd2e08a80e944d337d157b992167ba631a4343de | https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/status_deps.py#L84-L98 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.