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,400
dslackw/slpkg
slpkg/status_deps.py
DependenciesStatus.tree
def tree(self): """Like tree view mode """ self.msg.template(78) print("| Dependencies\n" "| -- Packages") self.msg.template(78) self.data() for pkg, dep in self.dmap.iteritems(): print("+ {0}{1}{2}".format(self.green, pkg, self.endc)) ...
python
def tree(self): """Like tree view mode """ self.msg.template(78) print("| Dependencies\n" "| -- Packages") self.msg.template(78) self.data() for pkg, dep in self.dmap.iteritems(): print("+ {0}{1}{2}".format(self.green, pkg, self.endc)) ...
[ "def", "tree", "(", "self", ")", ":", "self", ".", "msg", ".", "template", "(", "78", ")", "print", "(", "\"| Dependencies\\n\"", "\"| -- Packages\"", ")", "self", ".", "msg", ".", "template", "(", "78", ")", "self", ".", "data", "(", ")", "for", "pk...
Like tree view mode
[ "Like", "tree", "view", "mode" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/status_deps.py#L100-L118
43,401
dslackw/slpkg
slpkg/status_deps.py
DependenciesStatus.summary
def summary(self): """Summary by packages and dependencies """ print("\nStatus summary") print("=" * 79) print("{0}found {1} dependencies in {2} packages.{3}\n".format( self.grey, self.count_dep, self.count_pkg, self.endc))
python
def summary(self): """Summary by packages and dependencies """ print("\nStatus summary") print("=" * 79) print("{0}found {1} dependencies in {2} packages.{3}\n".format( self.grey, self.count_dep, self.count_pkg, self.endc))
[ "def", "summary", "(", "self", ")", ":", "print", "(", "\"\\nStatus summary\"", ")", "print", "(", "\"=\"", "*", "79", ")", "print", "(", "\"{0}found {1} dependencies in {2} packages.{3}\\n\"", ".", "format", "(", "self", ".", "grey", ",", "self", ".", "count_...
Summary by packages and dependencies
[ "Summary", "by", "packages", "and", "dependencies" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/status_deps.py#L128-L134
43,402
dslackw/slpkg
slpkg/pkg_find.py
FindFromRepos.find
def find(self, pkg, flag): """Start to find packages and print """ print("\nPackages with name matching [ {0}{1}{2} ]\n".format( self.cyan, ", ".join(pkg), self.endc)) Msg().template(78) print("| {0} {1}{2}{3}".format("Repository", "Package", " " * 54, ...
python
def find(self, pkg, flag): """Start to find packages and print """ print("\nPackages with name matching [ {0}{1}{2} ]\n".format( self.cyan, ", ".join(pkg), self.endc)) Msg().template(78) print("| {0} {1}{2}{3}".format("Repository", "Package", " " * 54, ...
[ "def", "find", "(", "self", ",", "pkg", ",", "flag", ")", ":", "print", "(", "\"\\nPackages with name matching [ {0}{1}{2} ]\\n\"", ".", "format", "(", "self", ".", "cyan", ",", "\", \"", ".", "join", "(", "pkg", ")", ",", "self", ".", "endc", ")", ")", ...
Start to find packages and print
[ "Start", "to", "find", "packages", "and", "print" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/pkg_find.py#L45-L80
43,403
dslackw/slpkg
slpkg/pkg_find.py
FindFromRepos.sbo_version
def sbo_version(self, repo, find): """ Add version to SBo packages """ ver = "" if repo == "sbo": ver = "-" + SBoGrep(find).version() return ver
python
def sbo_version(self, repo, find): """ Add version to SBo packages """ ver = "" if repo == "sbo": ver = "-" + SBoGrep(find).version() return ver
[ "def", "sbo_version", "(", "self", ",", "repo", ",", "find", ")", ":", "ver", "=", "\"\"", "if", "repo", "==", "\"sbo\"", ":", "ver", "=", "\"-\"", "+", "SBoGrep", "(", "find", ")", ".", "version", "(", ")", "return", "ver" ]
Add version to SBo packages
[ "Add", "version", "to", "SBo", "packages" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/pkg_find.py#L82-L89
43,404
dslackw/slpkg
slpkg/repositories.py
Repo.add
def add(self, repo, url): """Write custom repository name and url in a file """ repo_name = [] if not url.endswith("/"): url = url + "/" for line in self.custom_repositories_list.splitlines(): line = line.lstrip() if line and not line.startswit...
python
def add(self, repo, url): """Write custom repository name and url in a file """ repo_name = [] if not url.endswith("/"): url = url + "/" for line in self.custom_repositories_list.splitlines(): line = line.lstrip() if line and not line.startswit...
[ "def", "add", "(", "self", ",", "repo", ",", "url", ")", ":", "repo_name", "=", "[", "]", "if", "not", "url", ".", "endswith", "(", "\"/\"", ")", ":", "url", "=", "url", "+", "\"/\"", "for", "line", "in", "self", ".", "custom_repositories_list", "....
Write custom repository name and url in a file
[ "Write", "custom", "repository", "name", "and", "url", "in", "a", "file" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/repositories.py#L44-L69
43,405
dslackw/slpkg
slpkg/repositories.py
Repo.remove
def remove(self, repo): """Remove custom repository """ rem_repo = False with open(self.custom_repo_file, "w") as repos: for line in self.custom_repositories_list.splitlines(): repo_name = line.split()[0] if repo_name != repo: ...
python
def remove(self, repo): """Remove custom repository """ rem_repo = False with open(self.custom_repo_file, "w") as repos: for line in self.custom_repositories_list.splitlines(): repo_name = line.split()[0] if repo_name != repo: ...
[ "def", "remove", "(", "self", ",", "repo", ")", ":", "rem_repo", "=", "False", "with", "open", "(", "self", ".", "custom_repo_file", ",", "\"w\"", ")", "as", "repos", ":", "for", "line", "in", "self", ".", "custom_repositories_list", ".", "splitlines", "...
Remove custom repository
[ "Remove", "custom", "repository" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/repositories.py#L71-L87
43,406
dslackw/slpkg
slpkg/repositories.py
Repo.default_repository
def default_repository(self): """Return dictionary with default repo name and url """ default_dict_repo = {} for line in self.default_repositories_list.splitlines(): line = line.lstrip() if not line.startswith("#"): if line.split()[0] in self.DEFAU...
python
def default_repository(self): """Return dictionary with default repo name and url """ default_dict_repo = {} for line in self.default_repositories_list.splitlines(): line = line.lstrip() if not line.startswith("#"): if line.split()[0] in self.DEFAU...
[ "def", "default_repository", "(", "self", ")", ":", "default_dict_repo", "=", "{", "}", "for", "line", "in", "self", ".", "default_repositories_list", ".", "splitlines", "(", ")", ":", "line", "=", "line", ".", "lstrip", "(", ")", "if", "not", "line", "....
Return dictionary with default repo name and url
[ "Return", "dictionary", "with", "default", "repo", "name", "and", "url" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/repositories.py#L99-L114
43,407
dslackw/slpkg
slpkg/repositories.py
Repo.slack
def slack(self): """Official slackware repository """ default = "http://mirrors.slackware.com/slackware/" if self.meta.arch.startswith("arm"): default = "http://ftp.arm.slackware.com/slackwarearm/" if os.path.isfile("/etc/slpkg/slackware-mirrors"): mirrors...
python
def slack(self): """Official slackware repository """ default = "http://mirrors.slackware.com/slackware/" if self.meta.arch.startswith("arm"): default = "http://ftp.arm.slackware.com/slackwarearm/" if os.path.isfile("/etc/slpkg/slackware-mirrors"): mirrors...
[ "def", "slack", "(", "self", ")", ":", "default", "=", "\"http://mirrors.slackware.com/slackware/\"", "if", "self", ".", "meta", ".", "arch", ".", "startswith", "(", "\"arm\"", ")", ":", "default", "=", "\"http://ftp.arm.slackware.com/slackwarearm/\"", "if", "os", ...
Official slackware repository
[ "Official", "slackware", "repository" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/repositories.py#L116-L131
43,408
dslackw/slpkg
slpkg/sbo/network.py
SBoNetwork.view
def view(self): """View SlackBuild package, read or install them from slackbuilds.org """ if self.sbo_url and self.name not in self.blacklist: self.prgnam = ("{0}-{1}".format(self.name, self.sbo_version)) self.view_sbo() while True: sel...
python
def view(self): """View SlackBuild package, read or install them from slackbuilds.org """ if self.sbo_url and self.name not in self.blacklist: self.prgnam = ("{0}-{1}".format(self.name, self.sbo_version)) self.view_sbo() while True: sel...
[ "def", "view", "(", "self", ")", ":", "if", "self", ".", "sbo_url", "and", "self", ".", "name", "not", "in", "self", ".", "blacklist", ":", "self", ".", "prgnam", "=", "(", "\"{0}-{1}\"", ".", "format", "(", "self", ".", "name", ",", "self", ".", ...
View SlackBuild package, read or install them from slackbuilds.org
[ "View", "SlackBuild", "package", "read", "or", "install", "them", "from", "slackbuilds", ".", "org" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/network.py#L92-L132
43,409
dslackw/slpkg
slpkg/sbo/network.py
SBoNetwork.choice_README
def choice_README(self): """View README file """ README = ReadSBo(self.sbo_url).readme("README") fill = self.fill_pager(README) self.pager(README + fill)
python
def choice_README(self): """View README file """ README = ReadSBo(self.sbo_url).readme("README") fill = self.fill_pager(README) self.pager(README + fill)
[ "def", "choice_README", "(", "self", ")", ":", "README", "=", "ReadSBo", "(", "self", ".", "sbo_url", ")", ".", "readme", "(", "\"README\"", ")", "fill", "=", "self", ".", "fill_pager", "(", "README", ")", "self", ".", "pager", "(", "README", "+", "f...
View README file
[ "View", "README", "file" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/network.py#L187-L192
43,410
dslackw/slpkg
slpkg/sbo/network.py
SBoNetwork.choice_SlackBuild
def choice_SlackBuild(self): """View .SlackBuild file """ SlackBuild = ReadSBo(self.sbo_url).slackbuild(self.name, ".SlackBuild") fill = self.fill_pager(SlackBuild) self.pager(SlackBuild + fill)
python
def choice_SlackBuild(self): """View .SlackBuild file """ SlackBuild = ReadSBo(self.sbo_url).slackbuild(self.name, ".SlackBuild") fill = self.fill_pager(SlackBuild) self.pager(SlackBuild + fill)
[ "def", "choice_SlackBuild", "(", "self", ")", ":", "SlackBuild", "=", "ReadSBo", "(", "self", ".", "sbo_url", ")", ".", "slackbuild", "(", "self", ".", "name", ",", "\".SlackBuild\"", ")", "fill", "=", "self", ".", "fill_pager", "(", "SlackBuild", ")", "...
View .SlackBuild file
[ "View", ".", "SlackBuild", "file" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/network.py#L194-L199
43,411
dslackw/slpkg
slpkg/sbo/network.py
SBoNetwork.choice_info
def choice_info(self): """View .info file """ info = ReadSBo(self.sbo_url).info(self.name, ".info") fill = self.fill_pager(info) self.pager(info + fill)
python
def choice_info(self): """View .info file """ info = ReadSBo(self.sbo_url).info(self.name, ".info") fill = self.fill_pager(info) self.pager(info + fill)
[ "def", "choice_info", "(", "self", ")", ":", "info", "=", "ReadSBo", "(", "self", ".", "sbo_url", ")", ".", "info", "(", "self", ".", "name", ",", "\".info\"", ")", "fill", "=", "self", ".", "fill_pager", "(", "info", ")", "self", ".", "pager", "("...
View .info file
[ "View", ".", "info", "file" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/network.py#L201-L206
43,412
dslackw/slpkg
slpkg/sbo/network.py
SBoNetwork.choice_doinst
def choice_doinst(self): """View doinst.sh file """ if "doinst.sh" in self.sbo_files.split(): doinst_sh = ReadSBo(self.sbo_url).doinst("doinst.sh") fill = self.fill_pager(doinst_sh) self.pager(doinst_sh + fill)
python
def choice_doinst(self): """View doinst.sh file """ if "doinst.sh" in self.sbo_files.split(): doinst_sh = ReadSBo(self.sbo_url).doinst("doinst.sh") fill = self.fill_pager(doinst_sh) self.pager(doinst_sh + fill)
[ "def", "choice_doinst", "(", "self", ")", ":", "if", "\"doinst.sh\"", "in", "self", ".", "sbo_files", ".", "split", "(", ")", ":", "doinst_sh", "=", "ReadSBo", "(", "self", ".", "sbo_url", ")", ".", "doinst", "(", "\"doinst.sh\"", ")", "fill", "=", "se...
View doinst.sh file
[ "View", "doinst", ".", "sh", "file" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/network.py#L208-L214
43,413
dslackw/slpkg
slpkg/sbo/network.py
SBoNetwork.choice_download
def choice_download(self): """Download script.tar.gz and sources """ Download(path="", url=self.dwn_srcs, repo="sbo").start() raise SystemExit()
python
def choice_download(self): """Download script.tar.gz and sources """ Download(path="", url=self.dwn_srcs, repo="sbo").start() raise SystemExit()
[ "def", "choice_download", "(", "self", ")", ":", "Download", "(", "path", "=", "\"\"", ",", "url", "=", "self", ".", "dwn_srcs", ",", "repo", "=", "\"sbo\"", ")", ".", "start", "(", ")", "raise", "SystemExit", "(", ")" ]
Download script.tar.gz and sources
[ "Download", "script", ".", "tar", ".", "gz", "and", "sources" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/network.py#L216-L220
43,414
dslackw/slpkg
slpkg/sbo/network.py
SBoNetwork.choice_install
def choice_install(self): """Download, build and install package """ pkg_security([self.name]) if not find_package(self.prgnam, self.meta.pkg_path): self.build() self.install() delete(self.build_folder) raise SystemExit() else: ...
python
def choice_install(self): """Download, build and install package """ pkg_security([self.name]) if not find_package(self.prgnam, self.meta.pkg_path): self.build() self.install() delete(self.build_folder) raise SystemExit() else: ...
[ "def", "choice_install", "(", "self", ")", ":", "pkg_security", "(", "[", "self", ".", "name", "]", ")", "if", "not", "find_package", "(", "self", ".", "prgnam", ",", "self", ".", "meta", ".", "pkg_path", ")", ":", "self", ".", "build", "(", ")", "...
Download, build and install package
[ "Download", "build", "and", "install", "package" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/network.py#L229-L242
43,415
dslackw/slpkg
slpkg/sbo/network.py
SBoNetwork.with_checklist
def with_checklist(self): """Using dialog and checklist option """ data = [] if self.name == "ALL": data = self.data else: for name in self.data: if self.name in name: data.append(name) if data: text ...
python
def with_checklist(self): """Using dialog and checklist option """ data = [] if self.name == "ALL": data = self.data else: for name in self.data: if self.name in name: data.append(name) if data: text ...
[ "def", "with_checklist", "(", "self", ")", ":", "data", "=", "[", "]", "if", "self", ".", "name", "==", "\"ALL\"", ":", "data", "=", "self", ".", "data", "else", ":", "for", "name", "in", "self", ".", "data", ":", "if", "self", ".", "name", "in",...
Using dialog and checklist option
[ "Using", "dialog", "and", "checklist", "option" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/network.py#L309-L331
43,416
dslackw/slpkg
slpkg/sbo/network.py
SBoNetwork.fill_pager
def fill_pager(self, page): """Fix pager spaces """ tty_size = os.popen("stty size", "r").read().split() rows = int(tty_size[0]) - 1 lines = sum(1 for line in page.splitlines()) diff = rows - lines fill = "\n" * diff if diff > 0: return fill ...
python
def fill_pager(self, page): """Fix pager spaces """ tty_size = os.popen("stty size", "r").read().split() rows = int(tty_size[0]) - 1 lines = sum(1 for line in page.splitlines()) diff = rows - lines fill = "\n" * diff if diff > 0: return fill ...
[ "def", "fill_pager", "(", "self", ",", "page", ")", ":", "tty_size", "=", "os", ".", "popen", "(", "\"stty size\"", ",", "\"r\"", ")", ".", "read", "(", ")", ".", "split", "(", ")", "rows", "=", "int", "(", "tty_size", "[", "0", "]", ")", "-", ...
Fix pager spaces
[ "Fix", "pager", "spaces" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/network.py#L338-L349
43,417
dslackw/slpkg
slpkg/sbo/network.py
SBoNetwork.error_uns
def error_uns(self): """Check if package supported by arch before proceed to install """ self.FAULT = "" UNST = ["UNSUPPORTED", "UNTESTED"] if "".join(self.source_dwn) in UNST: self.FAULT = "".join(self.source_dwn)
python
def error_uns(self): """Check if package supported by arch before proceed to install """ self.FAULT = "" UNST = ["UNSUPPORTED", "UNTESTED"] if "".join(self.source_dwn) in UNST: self.FAULT = "".join(self.source_dwn)
[ "def", "error_uns", "(", "self", ")", ":", "self", ".", "FAULT", "=", "\"\"", "UNST", "=", "[", "\"UNSUPPORTED\"", ",", "\"UNTESTED\"", "]", "if", "\"\"", ".", "join", "(", "self", ".", "source_dwn", ")", "in", "UNST", ":", "self", ".", "FAULT", "=",...
Check if package supported by arch before proceed to install
[ "Check", "if", "package", "supported", "by", "arch", "before", "proceed", "to", "install" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/network.py#L351-L358
43,418
dslackw/slpkg
slpkg/sbo/network.py
SBoNetwork.build
def build(self): """Only build and create Slackware package """ pkg_security([self.name]) self.error_uns() if self.FAULT: print("") self.msg.template(78) print("| Package {0} {1} {2} {3}".format(self.prgnam, self.red, ...
python
def build(self): """Only build and create Slackware package """ pkg_security([self.name]) self.error_uns() if self.FAULT: print("") self.msg.template(78) print("| Package {0} {1} {2} {3}".format(self.prgnam, self.red, ...
[ "def", "build", "(", "self", ")", ":", "pkg_security", "(", "[", "self", ".", "name", "]", ")", "self", ".", "error_uns", "(", ")", "if", "self", ".", "FAULT", ":", "print", "(", "\"\"", ")", "self", ".", "msg", ".", "template", "(", "78", ")", ...
Only build and create Slackware package
[ "Only", "build", "and", "create", "Slackware", "package" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/network.py#L360-L386
43,419
dslackw/slpkg
slpkg/sbo/queue.py
QueuePkgs.listed
def listed(self): """Print packages from queue """ print("\nPackages in the queue:\n") for pkg in self.packages(): if pkg: print("{0}{1}{2}".format(self.meta.color["GREEN"], pkg, self.meta.color["ENDC"])) ...
python
def listed(self): """Print packages from queue """ print("\nPackages in the queue:\n") for pkg in self.packages(): if pkg: print("{0}{1}{2}".format(self.meta.color["GREEN"], pkg, self.meta.color["ENDC"])) ...
[ "def", "listed", "(", "self", ")", ":", "print", "(", "\"\\nPackages in the queue:\\n\"", ")", "for", "pkg", "in", "self", ".", "packages", "(", ")", ":", "if", "pkg", ":", "print", "(", "\"{0}{1}{2}\"", ".", "format", "(", "self", ".", "meta", ".", "c...
Print packages from queue
[ "Print", "packages", "from", "queue" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/queue.py#L79-L89
43,420
dslackw/slpkg
slpkg/sbo/queue.py
QueuePkgs.add
def add(self, pkgs): """Add packages in queue if not exist """ queue_list = self.packages() pkgs = list(OrderedDict.fromkeys(pkgs)) print("\nAdd packages in the queue:\n") with open(self.queue_list, "a") as queue: for pkg in pkgs: find = sbo_se...
python
def add(self, pkgs): """Add packages in queue if not exist """ queue_list = self.packages() pkgs = list(OrderedDict.fromkeys(pkgs)) print("\nAdd packages in the queue:\n") with open(self.queue_list, "a") as queue: for pkg in pkgs: find = sbo_se...
[ "def", "add", "(", "self", ",", "pkgs", ")", ":", "queue_list", "=", "self", ".", "packages", "(", ")", "pkgs", "=", "list", "(", "OrderedDict", ".", "fromkeys", "(", "pkgs", ")", ")", "print", "(", "\"\\nAdd packages in the queue:\\n\"", ")", "with", "o...
Add packages in queue if not exist
[ "Add", "packages", "in", "queue", "if", "not", "exist" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/queue.py#L91-L111
43,421
dslackw/slpkg
slpkg/sbo/queue.py
QueuePkgs.remove
def remove(self, pkgs): """Remove packages from queue """ print("\nRemove packages from the queue:\n") with open(self.queue_list, "w") as queue: for line in self.queued.splitlines(): if line not in pkgs: queue.write(line + "\n") ...
python
def remove(self, pkgs): """Remove packages from queue """ print("\nRemove packages from the queue:\n") with open(self.queue_list, "w") as queue: for line in self.queued.splitlines(): if line not in pkgs: queue.write(line + "\n") ...
[ "def", "remove", "(", "self", ",", "pkgs", ")", ":", "print", "(", "\"\\nRemove packages from the queue:\\n\"", ")", "with", "open", "(", "self", ".", "queue_list", ",", "\"w\"", ")", "as", "queue", ":", "for", "line", "in", "self", ".", "queued", ".", "...
Remove packages from queue
[ "Remove", "packages", "from", "queue" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/queue.py#L113-L127
43,422
dslackw/slpkg
slpkg/sbo/queue.py
QueuePkgs.build
def build(self): """Build packages from queue """ packages = self.packages() if packages: for pkg in packages: if not os.path.exists(self.meta.build_path): os.mkdir(self.meta.build_path) if not os.path.exists(self._SOURCES):...
python
def build(self): """Build packages from queue """ packages = self.packages() if packages: for pkg in packages: if not os.path.exists(self.meta.build_path): os.mkdir(self.meta.build_path) if not os.path.exists(self._SOURCES):...
[ "def", "build", "(", "self", ")", ":", "packages", "=", "self", ".", "packages", "(", ")", "if", "packages", ":", "for", "pkg", "in", "packages", ":", "if", "not", "os", ".", "path", ".", "exists", "(", "self", ".", "meta", ".", "build_path", ")", ...
Build packages from queue
[ "Build", "packages", "from", "queue" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/queue.py#L129-L154
43,423
dslackw/slpkg
slpkg/sbo/queue.py
QueuePkgs.install
def install(self): """Install packages from queue """ packages = self.packages() if packages: print("") # new line at start for pkg in packages: ver = SBoGrep(pkg).version() prgnam = "{0}-{1}".format(pkg, ver) if f...
python
def install(self): """Install packages from queue """ packages = self.packages() if packages: print("") # new line at start for pkg in packages: ver = SBoGrep(pkg).version() prgnam = "{0}-{1}".format(pkg, ver) if f...
[ "def", "install", "(", "self", ")", ":", "packages", "=", "self", ".", "packages", "(", ")", "if", "packages", ":", "print", "(", "\"\"", ")", "# new line at start", "for", "pkg", "in", "packages", ":", "ver", "=", "SBoGrep", "(", "pkg", ")", ".", "v...
Install packages from queue
[ "Install", "packages", "from", "queue" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/queue.py#L156-L173
43,424
dslackw/slpkg
slpkg/binary/check.py
pkg_upgrade
def pkg_upgrade(repo, skip, flag): """Checking packages for upgrade """ Msg().checking() PACKAGES_TXT = RepoInit(repo).fetch()[0] pkgs_for_upgrade = [] # name = data[0] # location = data[1] # size = data[2] # unsize = data[3] data = repo_data(PACKAGES_TXT, repo, flag="") for ...
python
def pkg_upgrade(repo, skip, flag): """Checking packages for upgrade """ Msg().checking() PACKAGES_TXT = RepoInit(repo).fetch()[0] pkgs_for_upgrade = [] # name = data[0] # location = data[1] # size = data[2] # unsize = data[3] data = repo_data(PACKAGES_TXT, repo, flag="") for ...
[ "def", "pkg_upgrade", "(", "repo", ",", "skip", ",", "flag", ")", ":", "Msg", "(", ")", ".", "checking", "(", ")", "PACKAGES_TXT", "=", "RepoInit", "(", "repo", ")", ".", "fetch", "(", ")", "[", "0", "]", "pkgs_for_upgrade", "=", "[", "]", "# name ...
Checking packages for upgrade
[ "Checking", "packages", "for", "upgrade" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/binary/check.py#L39-L65
43,425
dslackw/slpkg
slpkg/splitting.py
split_package
def split_package(package): """ Split package in name, version arch and build tag. """ name = ver = arch = build = [] split = package.split("-") if len(split) > 2: build = split[-1] build_a, build_b = "", "" build_a = build[:1] if build[1:2].isdigit(): ...
python
def split_package(package): """ Split package in name, version arch and build tag. """ name = ver = arch = build = [] split = package.split("-") if len(split) > 2: build = split[-1] build_a, build_b = "", "" build_a = build[:1] if build[1:2].isdigit(): ...
[ "def", "split_package", "(", "package", ")", ":", "name", "=", "ver", "=", "arch", "=", "build", "=", "[", "]", "split", "=", "package", ".", "split", "(", "\"-\"", ")", "if", "len", "(", "split", ")", ">", "2", ":", "build", "=", "split", "[", ...
Split package in name, version arch and build tag.
[ "Split", "package", "in", "name", "version", "arch", "and", "build", "tag", "." ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/splitting.py#L25-L42
43,426
dslackw/slpkg
slpkg/__metadata__.py
remove_repositories
def remove_repositories(repositories, default_repositories): """ Remove no default repositories """ repos = [] for repo in repositories: if repo in default_repositories: repos.append(repo) return repos
python
def remove_repositories(repositories, default_repositories): """ Remove no default repositories """ repos = [] for repo in repositories: if repo in default_repositories: repos.append(repo) return repos
[ "def", "remove_repositories", "(", "repositories", ",", "default_repositories", ")", ":", "repos", "=", "[", "]", "for", "repo", "in", "repositories", ":", "if", "repo", "in", "default_repositories", ":", "repos", ".", "append", "(", "repo", ")", "return", "...
Remove no default repositories
[ "Remove", "no", "default", "repositories" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/__metadata__.py#L28-L36
43,427
dslackw/slpkg
slpkg/__metadata__.py
update_repositories
def update_repositories(repositories, conf_path): """ Upadate with user custom repositories """ repo_file = "{0}custom-repositories".format(conf_path) if os.path.isfile(repo_file): f = open(repo_file, "r") repositories_list = f.read() f.close() for line in repositorie...
python
def update_repositories(repositories, conf_path): """ Upadate with user custom repositories """ repo_file = "{0}custom-repositories".format(conf_path) if os.path.isfile(repo_file): f = open(repo_file, "r") repositories_list = f.read() f.close() for line in repositorie...
[ "def", "update_repositories", "(", "repositories", ",", "conf_path", ")", ":", "repo_file", "=", "\"{0}custom-repositories\"", ".", "format", "(", "conf_path", ")", "if", "os", ".", "path", ".", "isfile", "(", "repo_file", ")", ":", "f", "=", "open", "(", ...
Upadate with user custom repositories
[ "Upadate", "with", "user", "custom", "repositories" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/__metadata__.py#L39-L52
43,428
dslackw/slpkg
slpkg/sbo/greps.py
SBoGrep.names
def names(self): """Grab all packages name """ pkg_names = [] for line in self.SLACKBUILDS_TXT.splitlines(): if line.startswith(self.line_name): pkg_names.append(line[17:].strip()) return pkg_names
python
def names(self): """Grab all packages name """ pkg_names = [] for line in self.SLACKBUILDS_TXT.splitlines(): if line.startswith(self.line_name): pkg_names.append(line[17:].strip()) return pkg_names
[ "def", "names", "(", "self", ")", ":", "pkg_names", "=", "[", "]", "for", "line", "in", "self", ".", "SLACKBUILDS_TXT", ".", "splitlines", "(", ")", ":", "if", "line", ".", "startswith", "(", "self", ".", "line_name", ")", ":", "pkg_names", ".", "app...
Grab all packages name
[ "Grab", "all", "packages", "name" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/greps.py#L50-L57
43,429
dslackw/slpkg
slpkg/sbo/greps.py
SBoGrep.source
def source(self): """Grab sources downloads links """ source, source64, = "", "" for line in self.SLACKBUILDS_TXT.splitlines(): if line.startswith(self.line_name): sbo_name = line[17:].strip() if line.startswith(self.line_down): if ...
python
def source(self): """Grab sources downloads links """ source, source64, = "", "" for line in self.SLACKBUILDS_TXT.splitlines(): if line.startswith(self.line_name): sbo_name = line[17:].strip() if line.startswith(self.line_down): if ...
[ "def", "source", "(", "self", ")", ":", "source", ",", "source64", ",", "=", "\"\"", ",", "\"\"", "for", "line", "in", "self", ".", "SLACKBUILDS_TXT", ".", "splitlines", "(", ")", ":", "if", "line", ".", "startswith", "(", "self", ".", "line_name", "...
Grab sources downloads links
[ "Grab", "sources", "downloads", "links" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/greps.py#L59-L72
43,430
dslackw/slpkg
slpkg/sbo/greps.py
SBoGrep._select_source_arch
def _select_source_arch(self, source, source64): """Return sources by arch """ src = "" if self.meta.arch == "x86_64": if source64: src = source64 else: src = source if self.meta.skip_unst in self.answer and source64 in ...
python
def _select_source_arch(self, source, source64): """Return sources by arch """ src = "" if self.meta.arch == "x86_64": if source64: src = source64 else: src = source if self.meta.skip_unst in self.answer and source64 in ...
[ "def", "_select_source_arch", "(", "self", ",", "source", ",", "source64", ")", ":", "src", "=", "\"\"", "if", "self", ".", "meta", ".", "arch", "==", "\"x86_64\"", ":", "if", "source64", ":", "src", "=", "source64", "else", ":", "src", "=", "source", ...
Return sources by arch
[ "Return", "sources", "by", "arch" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/greps.py#L74-L90
43,431
dslackw/slpkg
slpkg/sbo/greps.py
SBoGrep.requires
def requires(self): """Grab package requirements """ for line in self.SLACKBUILDS_TXT.splitlines(): if line.startswith(self.line_name): sbo_name = line[17:].strip() if line.startswith(self.line_req): if sbo_name == self.name: ...
python
def requires(self): """Grab package requirements """ for line in self.SLACKBUILDS_TXT.splitlines(): if line.startswith(self.line_name): sbo_name = line[17:].strip() if line.startswith(self.line_req): if sbo_name == self.name: ...
[ "def", "requires", "(", "self", ")", ":", "for", "line", "in", "self", ".", "SLACKBUILDS_TXT", ".", "splitlines", "(", ")", ":", "if", "line", ".", "startswith", "(", "self", ".", "line_name", ")", ":", "sbo_name", "=", "line", "[", "17", ":", "]", ...
Grab package requirements
[ "Grab", "package", "requirements" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/greps.py#L92-L100
43,432
dslackw/slpkg
slpkg/sbo/greps.py
SBoGrep.version
def version(self): """Grab package version """ for line in self.SLACKBUILDS_TXT.splitlines(): if line.startswith(self.line_name): sbo_name = line[17:].strip() if line.startswith(self.line_ver): if sbo_name == self.name: ...
python
def version(self): """Grab package version """ for line in self.SLACKBUILDS_TXT.splitlines(): if line.startswith(self.line_name): sbo_name = line[17:].strip() if line.startswith(self.line_ver): if sbo_name == self.name: ...
[ "def", "version", "(", "self", ")", ":", "for", "line", "in", "self", ".", "SLACKBUILDS_TXT", ".", "splitlines", "(", ")", ":", "if", "line", ".", "startswith", "(", "self", ".", "line_name", ")", ":", "sbo_name", "=", "line", "[", "17", ":", "]", ...
Grab package version
[ "Grab", "package", "version" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/greps.py#L102-L110
43,433
dslackw/slpkg
slpkg/sbo/greps.py
SBoGrep.checksum
def checksum(self): """Grab checksum string """ md5sum, md5sum64, = [], [] for line in self.SLACKBUILDS_TXT.splitlines(): if line.startswith(self.line_name): sbo_name = line[17:].strip() if line.startswith(self.line_md5_64): if sbo_...
python
def checksum(self): """Grab checksum string """ md5sum, md5sum64, = [], [] for line in self.SLACKBUILDS_TXT.splitlines(): if line.startswith(self.line_name): sbo_name = line[17:].strip() if line.startswith(self.line_md5_64): if sbo_...
[ "def", "checksum", "(", "self", ")", ":", "md5sum", ",", "md5sum64", ",", "=", "[", "]", ",", "[", "]", "for", "line", "in", "self", ".", "SLACKBUILDS_TXT", ".", "splitlines", "(", ")", ":", "if", "line", ".", "startswith", "(", "self", ".", "line_...
Grab checksum string
[ "Grab", "checksum", "string" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/greps.py#L112-L125
43,434
dslackw/slpkg
slpkg/sbo/greps.py
SBoGrep._select_md5sum_arch
def _select_md5sum_arch(self, md5sum, md5sum64): """Return checksums by arch """ if md5sum and md5sum64: if self.meta.arch == "x86_64": return md5sum64 else: return md5sum if md5sum: return md5sum else: ...
python
def _select_md5sum_arch(self, md5sum, md5sum64): """Return checksums by arch """ if md5sum and md5sum64: if self.meta.arch == "x86_64": return md5sum64 else: return md5sum if md5sum: return md5sum else: ...
[ "def", "_select_md5sum_arch", "(", "self", ",", "md5sum", ",", "md5sum64", ")", ":", "if", "md5sum", "and", "md5sum64", ":", "if", "self", ".", "meta", ".", "arch", "==", "\"x86_64\"", ":", "return", "md5sum64", "else", ":", "return", "md5sum", "if", "md...
Return checksums by arch
[ "Return", "checksums", "by", "arch" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/greps.py#L127-L138
43,435
dslackw/slpkg
slpkg/sbo/greps.py
SBoGrep.description
def description(self): """Grab package verion """ for line in self.SLACKBUILDS_TXT.splitlines(): if line.startswith(self.line_name): sbo_name = line[17:].strip() if line.startswith(self.line_des): if sbo_name == self.name: ...
python
def description(self): """Grab package verion """ for line in self.SLACKBUILDS_TXT.splitlines(): if line.startswith(self.line_name): sbo_name = line[17:].strip() if line.startswith(self.line_des): if sbo_name == self.name: ...
[ "def", "description", "(", "self", ")", ":", "for", "line", "in", "self", ".", "SLACKBUILDS_TXT", ".", "splitlines", "(", ")", ":", "if", "line", ".", "startswith", "(", "self", ".", "line_name", ")", ":", "sbo_name", "=", "line", "[", "17", ":", "]"...
Grab package verion
[ "Grab", "package", "verion" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/greps.py#L140-L148
43,436
dslackw/slpkg
slpkg/init.py
check_exists_repositories
def check_exists_repositories(repo): """Checking if repositories exists by PACKAGES.TXT file """ pkg_list = "PACKAGES.TXT" if repo == "sbo": pkg_list = "SLACKBUILDS.TXT" if check_for_local_repos(repo) is True: pkg_list = "PACKAGES.TXT" return "" if not os.path.isfile("{0}...
python
def check_exists_repositories(repo): """Checking if repositories exists by PACKAGES.TXT file """ pkg_list = "PACKAGES.TXT" if repo == "sbo": pkg_list = "SLACKBUILDS.TXT" if check_for_local_repos(repo) is True: pkg_list = "PACKAGES.TXT" return "" if not os.path.isfile("{0}...
[ "def", "check_exists_repositories", "(", "repo", ")", ":", "pkg_list", "=", "\"PACKAGES.TXT\"", "if", "repo", "==", "\"sbo\"", ":", "pkg_list", "=", "\"SLACKBUILDS.TXT\"", "if", "check_for_local_repos", "(", "repo", ")", "is", "True", ":", "pkg_list", "=", "\"PA...
Checking if repositories exists by PACKAGES.TXT file
[ "Checking", "if", "repositories", "exists", "by", "PACKAGES", ".", "TXT", "file" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/init.py#L792-L804
43,437
dslackw/slpkg
slpkg/init.py
check_for_local_repos
def check_for_local_repos(repo): """Check if repository is local """ repos_dict = Repo().default_repository() if repo in repos_dict: repo_url = repos_dict[repo] if repo_url.startswith("file:///"): return True
python
def check_for_local_repos(repo): """Check if repository is local """ repos_dict = Repo().default_repository() if repo in repos_dict: repo_url = repos_dict[repo] if repo_url.startswith("file:///"): return True
[ "def", "check_for_local_repos", "(", "repo", ")", ":", "repos_dict", "=", "Repo", "(", ")", ".", "default_repository", "(", ")", "if", "repo", "in", "repos_dict", ":", "repo_url", "=", "repos_dict", "[", "repo", "]", "if", "repo_url", ".", "startswith", "(...
Check if repository is local
[ "Check", "if", "repository", "is", "local" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/init.py#L807-L814
43,438
dslackw/slpkg
slpkg/init.py
Initialization.slack
def slack(self): """Creating slack local libraries """ log = self.log_path + "slack/" lib = self.lib_path + "slack_repo/" repo_name = log[:-1].split("/")[-1] lib_file = "PACKAGES.TXT" # lst_file = "" md5_file = "CHECKSUMS.md5" log_file = "ChangeLog...
python
def slack(self): """Creating slack local libraries """ log = self.log_path + "slack/" lib = self.lib_path + "slack_repo/" repo_name = log[:-1].split("/")[-1] lib_file = "PACKAGES.TXT" # lst_file = "" md5_file = "CHECKSUMS.md5" log_file = "ChangeLog...
[ "def", "slack", "(", "self", ")", ":", "log", "=", "self", ".", "log_path", "+", "\"slack/\"", "lib", "=", "self", ".", "lib_path", "+", "\"slack_repo/\"", "repo_name", "=", "log", "[", ":", "-", "1", "]", ".", "split", "(", "\"/\"", ")", "[", "-",...
Creating slack local libraries
[ "Creating", "slack", "local", "libraries" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/init.py#L98-L147
43,439
dslackw/slpkg
slpkg/init.py
Initialization.conrad
def conrad(self): """Creating slackers local library """ repo = self.def_repos_dict["conrad"] log = self.log_path + "conrad/" lib = self.lib_path + "conrad_repo/" repo_name = log[:-1].split("/")[-1] lib_file = "PACKAGES.TXT" # lst_file = "" md5_fil...
python
def conrad(self): """Creating slackers local library """ repo = self.def_repos_dict["conrad"] log = self.log_path + "conrad/" lib = self.lib_path + "conrad_repo/" repo_name = log[:-1].split("/")[-1] lib_file = "PACKAGES.TXT" # lst_file = "" md5_fil...
[ "def", "conrad", "(", "self", ")", ":", "repo", "=", "self", ".", "def_repos_dict", "[", "\"conrad\"", "]", "log", "=", "self", ".", "log_path", "+", "\"conrad/\"", "lib", "=", "self", ".", "lib_path", "+", "\"conrad_repo/\"", "repo_name", "=", "log", "[...
Creating slackers local library
[ "Creating", "slackers", "local", "library" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/init.py#L271-L296
43,440
dslackw/slpkg
slpkg/init.py
Initialization.remote
def remote(self, *args): """Remove and recreate files """ log_path = args[0] ChangeLog_txt = args[1] lib_path = args[2] PACKAGES_TXT = args[3] CHECKSUMS_MD5 = args[4] FILELIST_TXT = args[5] repo = args[6] if self.checks_logs(log_path, Chan...
python
def remote(self, *args): """Remove and recreate files """ log_path = args[0] ChangeLog_txt = args[1] lib_path = args[2] PACKAGES_TXT = args[3] CHECKSUMS_MD5 = args[4] FILELIST_TXT = args[5] repo = args[6] if self.checks_logs(log_path, Chan...
[ "def", "remote", "(", "self", ",", "*", "args", ")", ":", "log_path", "=", "args", "[", "0", "]", "ChangeLog_txt", "=", "args", "[", "1", "]", "lib_path", "=", "args", "[", "2", "]", "PACKAGES_TXT", "=", "args", "[", "3", "]", "CHECKSUMS_MD5", "=",...
Remove and recreate files
[ "Remove", "and", "recreate", "files" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/init.py#L666-L700
43,441
dslackw/slpkg
slpkg/init.py
Initialization.file_remove
def file_remove(self, path, filename): """Check if filename exists and remove """ if os.path.isfile(path + filename): os.remove(path + filename)
python
def file_remove(self, path, filename): """Check if filename exists and remove """ if os.path.isfile(path + filename): os.remove(path + filename)
[ "def", "file_remove", "(", "self", ",", "path", ",", "filename", ")", ":", "if", "os", ".", "path", ".", "isfile", "(", "path", "+", "filename", ")", ":", "os", ".", "remove", "(", "path", "+", "filename", ")" ]
Check if filename exists and remove
[ "Check", "if", "filename", "exists", "and", "remove" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/init.py#L712-L716
43,442
dslackw/slpkg
slpkg/init.py
Initialization.checks_logs
def checks_logs(self, log_path, url): """Checks ChangeLog.txt for changes """ local = "" filename = url.split("/")[-1] server = FileSize(url).server() if os.path.isfile(log_path + filename): local = FileSize(log_path + filename).local() if server != lo...
python
def checks_logs(self, log_path, url): """Checks ChangeLog.txt for changes """ local = "" filename = url.split("/")[-1] server = FileSize(url).server() if os.path.isfile(log_path + filename): local = FileSize(log_path + filename).local() if server != lo...
[ "def", "checks_logs", "(", "self", ",", "log_path", ",", "url", ")", ":", "local", "=", "\"\"", "filename", "=", "url", ".", "split", "(", "\"/\"", ")", "[", "-", "1", "]", "server", "=", "FileSize", "(", "url", ")", ".", "server", "(", ")", "if"...
Checks ChangeLog.txt for changes
[ "Checks", "ChangeLog", ".", "txt", "for", "changes" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/init.py#L718-L728
43,443
dslackw/slpkg
slpkg/init.py
Initialization.upgrade
def upgrade(self, only): """Remove all package lists with changelog and checksums files and create lists again""" repositories = self.meta.repositories if only: repositories = only for repo in repositories: changelogs = "{0}{1}{2}".format(self.log_path, re...
python
def upgrade(self, only): """Remove all package lists with changelog and checksums files and create lists again""" repositories = self.meta.repositories if only: repositories = only for repo in repositories: changelogs = "{0}{1}{2}".format(self.log_path, re...
[ "def", "upgrade", "(", "self", ",", "only", ")", ":", "repositories", "=", "self", ".", "meta", ".", "repositories", "if", "only", ":", "repositories", "=", "only", "for", "repo", "in", "repositories", ":", "changelogs", "=", "\"{0}{1}{2}\"", ".", "format"...
Remove all package lists with changelog and checksums files and create lists again
[ "Remove", "all", "package", "lists", "with", "changelog", "and", "checksums", "files", "and", "create", "lists", "again" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/init.py#L730-L749
43,444
dslackw/slpkg
slpkg/init.py
Update.repository
def repository(self, only): """Update repositories lists """ print("\nCheck and update repositories:\n") default = self.meta.default_repositories enabled = self.meta.repositories if only: enabled = only for repo in enabled: if check_for_loc...
python
def repository(self, only): """Update repositories lists """ print("\nCheck and update repositories:\n") default = self.meta.default_repositories enabled = self.meta.repositories if only: enabled = only for repo in enabled: if check_for_loc...
[ "def", "repository", "(", "self", ",", "only", ")", ":", "print", "(", "\"\\nCheck and update repositories:\\n\"", ")", "default", "=", "self", ".", "meta", ".", "default_repositories", "enabled", "=", "self", ".", "meta", ".", "repositories", "if", "only", ":...
Update repositories lists
[ "Update", "repositories", "lists" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/init.py#L762-L789
43,445
dslackw/slpkg
slpkg/dialog_box.py
DialogUtil.checklist
def checklist(self): """Run dialog checklist """ choice = [] for item in self.data: choice.append((item, "", self.status)) code, self.tags = self.d.checklist( text=self.text, height=20, width=65, list_height=13, choices=choice, title=self.title...
python
def checklist(self): """Run dialog checklist """ choice = [] for item in self.data: choice.append((item, "", self.status)) code, self.tags = self.d.checklist( text=self.text, height=20, width=65, list_height=13, choices=choice, title=self.title...
[ "def", "checklist", "(", "self", ")", ":", "choice", "=", "[", "]", "for", "item", "in", "self", ".", "data", ":", "choice", ".", "append", "(", "(", "item", ",", "\"\"", ",", "self", ".", "status", ")", ")", "code", ",", "self", ".", "tags", "...
Run dialog checklist
[ "Run", "dialog", "checklist" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/dialog_box.py#L49-L62
43,446
dslackw/slpkg
slpkg/dialog_box.py
DialogUtil.buildlist
def buildlist(self, enabled): """Run dialog buildlist """ choice = [] for item in self.data: choice.append((item, False)) for item in enabled: choice.append((item, True)) items = [(tag, tag, sta) for (tag, sta) in choice] code, self.tags = ...
python
def buildlist(self, enabled): """Run dialog buildlist """ choice = [] for item in self.data: choice.append((item, False)) for item in enabled: choice.append((item, True)) items = [(tag, tag, sta) for (tag, sta) in choice] code, self.tags = ...
[ "def", "buildlist", "(", "self", ",", "enabled", ")", ":", "choice", "=", "[", "]", "for", "item", "in", "self", ".", "data", ":", "choice", ".", "append", "(", "(", "item", ",", "False", ")", ")", "for", "item", "in", "enabled", ":", "choice", "...
Run dialog buildlist
[ "Run", "dialog", "buildlist" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/dialog_box.py#L64-L80
43,447
dslackw/slpkg
slpkg/dialog_box.py
DialogUtil.unicode_to_string
def unicode_to_string(self): """Convert unicode in string """ for tag in self.tags: self.ununicode.append(str(tag))
python
def unicode_to_string(self): """Convert unicode in string """ for tag in self.tags: self.ununicode.append(str(tag))
[ "def", "unicode_to_string", "(", "self", ")", ":", "for", "tag", "in", "self", ".", "tags", ":", "self", ".", "ununicode", ".", "append", "(", "str", "(", "tag", ")", ")" ]
Convert unicode in string
[ "Convert", "unicode", "in", "string" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/dialog_box.py#L93-L97
43,448
dslackw/slpkg
slpkg/sbo/check.py
sbo_upgrade
def sbo_upgrade(skip, flag): """Return packages for upgrade """ Msg().checking() upgrade_names = [] data = SBoGrep(name="").names() blacklist = BlackList().packages(pkgs=data, repo="sbo") for pkg in sbo_list(): status(0.02) name = split_package(pkg)[0] ver = split_pac...
python
def sbo_upgrade(skip, flag): """Return packages for upgrade """ Msg().checking() upgrade_names = [] data = SBoGrep(name="").names() blacklist = BlackList().packages(pkgs=data, repo="sbo") for pkg in sbo_list(): status(0.02) name = split_package(pkg)[0] ver = split_pac...
[ "def", "sbo_upgrade", "(", "skip", ",", "flag", ")", ":", "Msg", "(", ")", ".", "checking", "(", ")", "upgrade_names", "=", "[", "]", "data", "=", "SBoGrep", "(", "name", "=", "\"\"", ")", ".", "names", "(", ")", "blacklist", "=", "BlackList", "(",...
Return packages for upgrade
[ "Return", "packages", "for", "upgrade" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/check.py#L38-L57
43,449
dslackw/slpkg
slpkg/sbo/check.py
sbo_list
def sbo_list(): """Return all SBo packages """ sbo_packages = [] for pkg in os.listdir(_meta_.pkg_path): if pkg.endswith("_SBo"): sbo_packages.append(pkg) return sbo_packages
python
def sbo_list(): """Return all SBo packages """ sbo_packages = [] for pkg in os.listdir(_meta_.pkg_path): if pkg.endswith("_SBo"): sbo_packages.append(pkg) return sbo_packages
[ "def", "sbo_list", "(", ")", ":", "sbo_packages", "=", "[", "]", "for", "pkg", "in", "os", ".", "listdir", "(", "_meta_", ".", "pkg_path", ")", ":", "if", "pkg", ".", "endswith", "(", "\"_SBo\"", ")", ":", "sbo_packages", ".", "append", "(", "pkg", ...
Return all SBo packages
[ "Return", "all", "SBo", "packages" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/check.py#L60-L67
43,450
dslackw/slpkg
slpkg/remove.py
delete_package
def delete_package(path, packages): """Remove downloaded packages """ if _meta_.del_all in ["on", "ON"]: for pkg in packages: os.remove(path + pkg)
python
def delete_package(path, packages): """Remove downloaded packages """ if _meta_.del_all in ["on", "ON"]: for pkg in packages: os.remove(path + pkg)
[ "def", "delete_package", "(", "path", ",", "packages", ")", ":", "if", "_meta_", ".", "del_all", "in", "[", "\"on\"", ",", "\"ON\"", "]", ":", "for", "pkg", "in", "packages", ":", "os", ".", "remove", "(", "path", "+", "pkg", ")" ]
Remove downloaded packages
[ "Remove", "downloaded", "packages" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/remove.py#L30-L35
43,451
dslackw/slpkg
slpkg/sbo/remove.py
delete
def delete(build_folder): """Delete build directory and all its contents. """ if _meta_.del_build in ["on", "ON"] and os.path.exists(build_folder): shutil.rmtree(build_folder)
python
def delete(build_folder): """Delete build directory and all its contents. """ if _meta_.del_build in ["on", "ON"] and os.path.exists(build_folder): shutil.rmtree(build_folder)
[ "def", "delete", "(", "build_folder", ")", ":", "if", "_meta_", ".", "del_build", "in", "[", "\"on\"", ",", "\"ON\"", "]", "and", "os", ".", "path", ".", "exists", "(", "build_folder", ")", ":", "shutil", ".", "rmtree", "(", "build_folder", ")" ]
Delete build directory and all its contents.
[ "Delete", "build", "directory", "and", "all", "its", "contents", "." ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/remove.py#L31-L35
43,452
dslackw/slpkg
slpkg/slack/patches.py
Patches.start
def start(self): """ Install new patches from official Slackware mirrors """ self.store() self.msg.done() if self.upgrade_all: if "--checklist" in self.flag: self.dialog_checklist() print("\nThese packages need upgrading:\n") ...
python
def start(self): """ Install new patches from official Slackware mirrors """ self.store() self.msg.done() if self.upgrade_all: if "--checklist" in self.flag: self.dialog_checklist() print("\nThese packages need upgrading:\n") ...
[ "def", "start", "(", "self", ")", ":", "self", ".", "store", "(", ")", "self", ".", "msg", ".", "done", "(", ")", "if", "self", ".", "upgrade_all", ":", "if", "\"--checklist\"", "in", "self", ".", "flag", ":", "self", ".", "dialog_checklist", "(", ...
Install new patches from official Slackware mirrors
[ "Install", "new", "patches", "from", "official", "Slackware", "mirrors" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/slack/patches.py#L81-L133
43,453
dslackw/slpkg
slpkg/slack/patches.py
Patches.store
def store(self): """ Store and return packages for upgrading """ data = repo_data(self.PACKAGES_TXT, "slack", self.flag) black = BlackList().packages(pkgs=data[0], repo="slack") for name, loc, comp, uncomp in zip(data[0], data[1], data[2], data[3]): status(0.0...
python
def store(self): """ Store and return packages for upgrading """ data = repo_data(self.PACKAGES_TXT, "slack", self.flag) black = BlackList().packages(pkgs=data[0], repo="slack") for name, loc, comp, uncomp in zip(data[0], data[1], data[2], data[3]): status(0.0...
[ "def", "store", "(", "self", ")", ":", "data", "=", "repo_data", "(", "self", ".", "PACKAGES_TXT", ",", "\"slack\"", ",", "self", ".", "flag", ")", "black", "=", "BlackList", "(", ")", ".", "packages", "(", "pkgs", "=", "data", "[", "0", "]", ",", ...
Store and return packages for upgrading
[ "Store", "and", "return", "packages", "for", "upgrading" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/slack/patches.py#L135-L157
43,454
dslackw/slpkg
slpkg/slack/patches.py
Patches.kernel
def kernel(self): """ Check if kernel upgraded if true then reinstall "lilo" """ for core in self.upgrade_all: if "kernel" in core: if self.meta.default_answer in ["y", "Y"]: answer = self.meta.default_answer else: ...
python
def kernel(self): """ Check if kernel upgraded if true then reinstall "lilo" """ for core in self.upgrade_all: if "kernel" in core: if self.meta.default_answer in ["y", "Y"]: answer = self.meta.default_answer else: ...
[ "def", "kernel", "(", "self", ")", ":", "for", "core", "in", "self", ".", "upgrade_all", ":", "if", "\"kernel\"", "in", "core", ":", "if", "self", ".", "meta", ".", "default_answer", "in", "[", "\"y\"", ",", "\"Y\"", "]", ":", "answer", "=", "self", ...
Check if kernel upgraded if true then reinstall "lilo"
[ "Check", "if", "kernel", "upgraded", "if", "true", "then", "reinstall", "lilo" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/slack/patches.py#L230-L254
43,455
dslackw/slpkg
slpkg/slack/patches.py
Patches.slackpkg_update
def slackpkg_update(self): """This replace slackpkg ChangeLog.txt file with new from Slackware official mirrors after update distribution. """ NEW_ChangeLog_txt = URL(mirrors("ChangeLog.txt", "")).reading() if os.path.isfile(self.meta.slackpkg_lib_path + "ChangeLog.txt.old"): ...
python
def slackpkg_update(self): """This replace slackpkg ChangeLog.txt file with new from Slackware official mirrors after update distribution. """ NEW_ChangeLog_txt = URL(mirrors("ChangeLog.txt", "")).reading() if os.path.isfile(self.meta.slackpkg_lib_path + "ChangeLog.txt.old"): ...
[ "def", "slackpkg_update", "(", "self", ")", ":", "NEW_ChangeLog_txt", "=", "URL", "(", "mirrors", "(", "\"ChangeLog.txt\"", ",", "\"\"", ")", ")", ".", "reading", "(", ")", "if", "os", ".", "path", ".", "isfile", "(", "self", ".", "meta", ".", "slackpk...
This replace slackpkg ChangeLog.txt file with new from Slackware official mirrors after update distribution.
[ "This", "replace", "slackpkg", "ChangeLog", ".", "txt", "file", "with", "new", "from", "Slackware", "official", "mirrors", "after", "update", "distribution", "." ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/slack/patches.py#L256-L269
43,456
dslackw/slpkg
slpkg/slack/patches.py
Patches.update_lists
def update_lists(self): """Update packages list and ChangeLog.txt file after upgrade distribution """ print("{0}Update the package lists ?{1}".format( self.meta.color["GREEN"], self.meta.color["ENDC"])) print("=" * 79) if self.msg.answer() in ["y", "Y"]: ...
python
def update_lists(self): """Update packages list and ChangeLog.txt file after upgrade distribution """ print("{0}Update the package lists ?{1}".format( self.meta.color["GREEN"], self.meta.color["ENDC"])) print("=" * 79) if self.msg.answer() in ["y", "Y"]: ...
[ "def", "update_lists", "(", "self", ")", ":", "print", "(", "\"{0}Update the package lists ?{1}\"", ".", "format", "(", "self", ".", "meta", ".", "color", "[", "\"GREEN\"", "]", ",", "self", ".", "meta", ".", "color", "[", "\"ENDC\"", "]", ")", ")", "pri...
Update packages list and ChangeLog.txt file after upgrade distribution
[ "Update", "packages", "list", "and", "ChangeLog", ".", "txt", "file", "after", "upgrade", "distribution" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/slack/patches.py#L271-L279
43,457
dslackw/slpkg
slpkg/pkg/build.py
log_head
def log_head(path, log_file, log_time): """ write headers to log file """ with open(path + log_file, "w") as log: log.write("#" * 79 + "\n\n") log.write("File : " + log_file + "\n") log.write("Path : " + path + "\n") log.write("Date : " + time.strftime("%d/%m/%Y") + "\n")...
python
def log_head(path, log_file, log_time): """ write headers to log file """ with open(path + log_file, "w") as log: log.write("#" * 79 + "\n\n") log.write("File : " + log_file + "\n") log.write("Path : " + path + "\n") log.write("Date : " + time.strftime("%d/%m/%Y") + "\n")...
[ "def", "log_head", "(", "path", ",", "log_file", ",", "log_time", ")", ":", "with", "open", "(", "path", "+", "log_file", ",", "\"w\"", ")", "as", "log", ":", "log", ".", "write", "(", "\"#\"", "*", "79", "+", "\"\\n\\n\"", ")", "log", ".", "write"...
write headers to log file
[ "write", "headers", "to", "log", "file" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/pkg/build.py#L159-L170
43,458
dslackw/slpkg
slpkg/pkg/build.py
log_end
def log_end(path, log_file, sum_time): """ append END tag to a log file """ with open(path + log_file, "a") as log: log.seek(2) log.write("#" * 79 + "\n\n") log.write("Time : " + time.strftime("%H:%M:%S") + "\n") log.write("Total build time : {0}\n".format(sum_time)) ...
python
def log_end(path, log_file, sum_time): """ append END tag to a log file """ with open(path + log_file, "a") as log: log.seek(2) log.write("#" * 79 + "\n\n") log.write("Time : " + time.strftime("%H:%M:%S") + "\n") log.write("Total build time : {0}\n".format(sum_time)) ...
[ "def", "log_end", "(", "path", ",", "log_file", ",", "sum_time", ")", ":", "with", "open", "(", "path", "+", "log_file", ",", "\"a\"", ")", "as", "log", ":", "log", ".", "seek", "(", "2", ")", "log", ".", "write", "(", "\"#\"", "*", "79", "+", ...
append END tag to a log file
[ "append", "END", "tag", "to", "a", "log", "file" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/pkg/build.py#L173-L184
43,459
dslackw/slpkg
slpkg/pkg/build.py
build_time
def build_time(start_time): """ Calculate build time per package """ diff_time = round(time.time() - start_time, 2) if diff_time <= 59.99: sum_time = str(diff_time) + " Sec" elif diff_time > 59.99 and diff_time <= 3599.99: sum_time = round(diff_time / 60, 2) sum_time_list...
python
def build_time(start_time): """ Calculate build time per package """ diff_time = round(time.time() - start_time, 2) if diff_time <= 59.99: sum_time = str(diff_time) + " Sec" elif diff_time > 59.99 and diff_time <= 3599.99: sum_time = round(diff_time / 60, 2) sum_time_list...
[ "def", "build_time", "(", "start_time", ")", ":", "diff_time", "=", "round", "(", "time", ".", "time", "(", ")", "-", "start_time", ",", "2", ")", "if", "diff_time", "<=", "59.99", ":", "sum_time", "=", "str", "(", "diff_time", ")", "+", "\" Sec\"", ...
Calculate build time per package
[ "Calculate", "build", "time", "per", "package" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/pkg/build.py#L187-L204
43,460
dslackw/slpkg
slpkg/pkg/build.py
BuildPackage._create_md5_dict
def _create_md5_dict(self): """Create md5 dictionary per source """ self.sbo_md5 = {} md5_lists = SBoGrep(self.prgnam).checksum() for src, md5 in zip(self.sources, md5_lists): self.sbo_md5[src] = md5
python
def _create_md5_dict(self): """Create md5 dictionary per source """ self.sbo_md5 = {} md5_lists = SBoGrep(self.prgnam).checksum() for src, md5 in zip(self.sources, md5_lists): self.sbo_md5[src] = md5
[ "def", "_create_md5_dict", "(", "self", ")", ":", "self", ".", "sbo_md5", "=", "{", "}", "md5_lists", "=", "SBoGrep", "(", "self", ".", "prgnam", ")", ".", "checksum", "(", ")", "for", "src", ",", "md5", "in", "zip", "(", "self", ".", "sources", ",...
Create md5 dictionary per source
[ "Create", "md5", "dictionary", "per", "source" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/pkg/build.py#L120-L126
43,461
dslackw/slpkg
slpkg/pkg/build.py
BuildPackage._makeflags
def _makeflags(self): """Set variable MAKEFLAGS with the numbers of processors """ if self.meta.makeflags in ["on", "ON"]: cpus = multiprocessing.cpu_count() os.environ["MAKEFLAGS"] = "-j{0}".format(cpus)
python
def _makeflags(self): """Set variable MAKEFLAGS with the numbers of processors """ if self.meta.makeflags in ["on", "ON"]: cpus = multiprocessing.cpu_count() os.environ["MAKEFLAGS"] = "-j{0}".format(cpus)
[ "def", "_makeflags", "(", "self", ")", ":", "if", "self", ".", "meta", ".", "makeflags", "in", "[", "\"on\"", ",", "\"ON\"", "]", ":", "cpus", "=", "multiprocessing", ".", "cpu_count", "(", ")", "os", ".", "environ", "[", "\"MAKEFLAGS\"", "]", "=", "...
Set variable MAKEFLAGS with the numbers of processors
[ "Set", "variable", "MAKEFLAGS", "with", "the", "numbers", "of", "processors" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/pkg/build.py#L128-L134
43,462
dslackw/slpkg
slpkg/pkg/build.py
BuildPackage._pass_variable
def _pass_variable(self): """Return enviroment variables """ pass_var = [] for var in os.environ.keys(): expVAR = var.split("_") if expVAR[0] == self.prgnam.upper() and expVAR[1] != "PATH": pass_var.append("{0}={1}".format(expVAR[1], os.environ[var...
python
def _pass_variable(self): """Return enviroment variables """ pass_var = [] for var in os.environ.keys(): expVAR = var.split("_") if expVAR[0] == self.prgnam.upper() and expVAR[1] != "PATH": pass_var.append("{0}={1}".format(expVAR[1], os.environ[var...
[ "def", "_pass_variable", "(", "self", ")", ":", "pass_var", "=", "[", "]", "for", "var", "in", "os", ".", "environ", ".", "keys", "(", ")", ":", "expVAR", "=", "var", ".", "split", "(", "\"_\"", ")", "if", "expVAR", "[", "0", "]", "==", "self", ...
Return enviroment variables
[ "Return", "enviroment", "variables" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/pkg/build.py#L136-L144
43,463
dslackw/slpkg
slpkg/pkg/build.py
BuildPackage._delete_sbo_tar_gz
def _delete_sbo_tar_gz(self): """Delete slackbuild tar.gz file after untar """ if not self.auto and os.path.isfile(self.meta.build_path + self.script): os.remove(self.meta.build_path + self.script)
python
def _delete_sbo_tar_gz(self): """Delete slackbuild tar.gz file after untar """ if not self.auto and os.path.isfile(self.meta.build_path + self.script): os.remove(self.meta.build_path + self.script)
[ "def", "_delete_sbo_tar_gz", "(", "self", ")", ":", "if", "not", "self", ".", "auto", "and", "os", ".", "path", ".", "isfile", "(", "self", ".", "meta", ".", "build_path", "+", "self", ".", "script", ")", ":", "os", ".", "remove", "(", "self", ".",...
Delete slackbuild tar.gz file after untar
[ "Delete", "slackbuild", "tar", ".", "gz", "file", "after", "untar" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/pkg/build.py#L146-L150
43,464
dslackw/slpkg
slpkg/pkg/build.py
BuildPackage._delete_dir
def _delete_dir(self): """Delete old folder if exists before start build """ if not self.auto and os.path.isdir(self.meta.build_path + self.prgnam): shutil.rmtree(self.meta.build_path + self.prgnam)
python
def _delete_dir(self): """Delete old folder if exists before start build """ if not self.auto and os.path.isdir(self.meta.build_path + self.prgnam): shutil.rmtree(self.meta.build_path + self.prgnam)
[ "def", "_delete_dir", "(", "self", ")", ":", "if", "not", "self", ".", "auto", "and", "os", ".", "path", ".", "isdir", "(", "self", ".", "meta", ".", "build_path", "+", "self", ".", "prgnam", ")", ":", "shutil", ".", "rmtree", "(", "self", ".", "...
Delete old folder if exists before start build
[ "Delete", "old", "folder", "if", "exists", "before", "start", "build" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/pkg/build.py#L152-L156
43,465
dslackw/slpkg
slpkg/blacklist.py
BlackList.listed
def listed(self): """Print blacklist packages """ print("\nPackages in the blacklist:\n") for black in self.get_black(): if black: print("{0}{1}{2}".format(self.meta.color["GREEN"], black, self.meta.color["ENDC"])) ...
python
def listed(self): """Print blacklist packages """ print("\nPackages in the blacklist:\n") for black in self.get_black(): if black: print("{0}{1}{2}".format(self.meta.color["GREEN"], black, self.meta.color["ENDC"])) ...
[ "def", "listed", "(", "self", ")", ":", "print", "(", "\"\\nPackages in the blacklist:\\n\"", ")", "for", "black", "in", "self", ".", "get_black", "(", ")", ":", "if", "black", ":", "print", "(", "\"{0}{1}{2}\"", ".", "format", "(", "self", ".", "meta", ...
Print blacklist packages
[ "Print", "blacklist", "packages" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/blacklist.py#L53-L63
43,466
dslackw/slpkg
slpkg/blacklist.py
BlackList.add
def add(self, pkgs): """Add blacklist packages if not exist """ blacklist = self.get_black() pkgs = set(pkgs) print("\nAdd packages in the blacklist:\n") with open(self.blackfile, "a") as black_conf: for pkg in pkgs: if pkg not in blacklist: ...
python
def add(self, pkgs): """Add blacklist packages if not exist """ blacklist = self.get_black() pkgs = set(pkgs) print("\nAdd packages in the blacklist:\n") with open(self.blackfile, "a") as black_conf: for pkg in pkgs: if pkg not in blacklist: ...
[ "def", "add", "(", "self", ",", "pkgs", ")", ":", "blacklist", "=", "self", ".", "get_black", "(", ")", "pkgs", "=", "set", "(", "pkgs", ")", "print", "(", "\"\\nAdd packages in the blacklist:\\n\"", ")", "with", "open", "(", "self", ".", "blackfile", ",...
Add blacklist packages if not exist
[ "Add", "blacklist", "packages", "if", "not", "exist" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/blacklist.py#L65-L80
43,467
dslackw/slpkg
slpkg/blacklist.py
BlackList.remove
def remove(self, pkgs): """Remove packages from blacklist """ print("\nRemove packages from the blacklist:\n") with open(self.blackfile, "w") as remove: for line in self.black_conf.splitlines(): if line not in pkgs: remove.write(line + "\n"...
python
def remove(self, pkgs): """Remove packages from blacklist """ print("\nRemove packages from the blacklist:\n") with open(self.blackfile, "w") as remove: for line in self.black_conf.splitlines(): if line not in pkgs: remove.write(line + "\n"...
[ "def", "remove", "(", "self", ",", "pkgs", ")", ":", "print", "(", "\"\\nRemove packages from the blacklist:\\n\"", ")", "with", "open", "(", "self", ".", "blackfile", ",", "\"w\"", ")", "as", "remove", ":", "for", "line", "in", "self", ".", "black_conf", ...
Remove packages from blacklist
[ "Remove", "packages", "from", "blacklist" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/blacklist.py#L82-L96
43,468
dslackw/slpkg
slpkg/blacklist.py
BlackList.packages
def packages(self, pkgs, repo): """Return packages in blacklist or by repository """ self.black = [] for bl in self.get_black(): pr = bl.split(":") for pkg in pkgs: self.__priority(pr, repo, pkg) self.__blackpkg(bl, repo, pkg) ...
python
def packages(self, pkgs, repo): """Return packages in blacklist or by repository """ self.black = [] for bl in self.get_black(): pr = bl.split(":") for pkg in pkgs: self.__priority(pr, repo, pkg) self.__blackpkg(bl, repo, pkg) ...
[ "def", "packages", "(", "self", ",", "pkgs", ",", "repo", ")", ":", "self", ".", "black", "=", "[", "]", "for", "bl", "in", "self", ".", "get_black", "(", ")", ":", "pr", "=", "bl", ".", "split", "(", "\":\"", ")", "for", "pkg", "in", "pkgs", ...
Return packages in blacklist or by repository
[ "Return", "packages", "in", "blacklist", "or", "by", "repository" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/blacklist.py#L98-L107
43,469
dslackw/slpkg
slpkg/blacklist.py
BlackList.__priority
def __priority(self, pr, repo, pkg): """Add packages in blacklist by priority """ if (pr[0] == repo and pr[1].startswith("*") and pr[1].endswith("*")): if pr[1][1:-1] in pkg: self.black.append(self.__add(repo, pkg)) elif pr[0] == repo and pr[1]...
python
def __priority(self, pr, repo, pkg): """Add packages in blacklist by priority """ if (pr[0] == repo and pr[1].startswith("*") and pr[1].endswith("*")): if pr[1][1:-1] in pkg: self.black.append(self.__add(repo, pkg)) elif pr[0] == repo and pr[1]...
[ "def", "__priority", "(", "self", ",", "pr", ",", "repo", ",", "pkg", ")", ":", "if", "(", "pr", "[", "0", "]", "==", "repo", "and", "pr", "[", "1", "]", ".", "startswith", "(", "\"*\"", ")", "and", "pr", "[", "1", "]", ".", "endswith", "(", ...
Add packages in blacklist by priority
[ "Add", "packages", "in", "blacklist", "by", "priority" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/blacklist.py#L117-L131
43,470
dslackw/slpkg
slpkg/blacklist.py
BlackList.__blackpkg
def __blackpkg(self, bl, repo, pkg): """Add packages in blacklist """ if bl.startswith("*") and bl.endswith("*"): if bl[1:-1] in pkg: self.black.append(self.__add(repo, pkg)) elif bl.endswith("*"): if pkg.startswith(bl[:-1]): self.b...
python
def __blackpkg(self, bl, repo, pkg): """Add packages in blacklist """ if bl.startswith("*") and bl.endswith("*"): if bl[1:-1] in pkg: self.black.append(self.__add(repo, pkg)) elif bl.endswith("*"): if pkg.startswith(bl[:-1]): self.b...
[ "def", "__blackpkg", "(", "self", ",", "bl", ",", "repo", ",", "pkg", ")", ":", "if", "bl", ".", "startswith", "(", "\"*\"", ")", "and", "bl", ".", "endswith", "(", "\"*\"", ")", ":", "if", "bl", "[", "1", ":", "-", "1", "]", "in", "pkg", ":"...
Add packages in blacklist
[ "Add", "packages", "in", "blacklist" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/blacklist.py#L133-L146
43,471
dslackw/slpkg
slpkg/desc.py
PkgDesc.view
def view(self): """Print package description by repository """ print("") # new line at start description, count = "", 0 if self.repo == "sbo": description = SBoGrep(self.name).description() else: PACKAGES_TXT = Utils().read_file(self.lib) ...
python
def view(self): """Print package description by repository """ print("") # new line at start description, count = "", 0 if self.repo == "sbo": description = SBoGrep(self.name).description() else: PACKAGES_TXT = Utils().read_file(self.lib) ...
[ "def", "view", "(", "self", ")", ":", "print", "(", "\"\"", ")", "# new line at start", "description", ",", "count", "=", "\"\"", ",", "0", "if", "self", ".", "repo", "==", "\"sbo\"", ":", "description", "=", "SBoGrep", "(", "self", ".", "name", ")", ...
Print package description by repository
[ "Print", "package", "description", "by", "repository" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/desc.py#L56-L78
43,472
dslackw/slpkg
slpkg/downloader.py
Download.start
def start(self): """Download files using wget or other downloader. Optional curl, aria2c and httpie """ dwn_count = 1 self._directory_prefix() for dwn in self.url: # get file name from url and fix passing char '+' self.file_name = dwn.split("/")[-1...
python
def start(self): """Download files using wget or other downloader. Optional curl, aria2c and httpie """ dwn_count = 1 self._directory_prefix() for dwn in self.url: # get file name from url and fix passing char '+' self.file_name = dwn.split("/")[-1...
[ "def", "start", "(", "self", ")", ":", "dwn_count", "=", "1", "self", ".", "_directory_prefix", "(", ")", "for", "dwn", "in", "self", ".", "url", ":", "# get file name from url and fix passing char '+'", "self", ".", "file_name", "=", "dwn", ".", "split", "(...
Download files using wget or other downloader. Optional curl, aria2c and httpie
[ "Download", "files", "using", "wget", "or", "other", "downloader", ".", "Optional", "curl", "aria2c", "and", "httpie" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/downloader.py#L49-L83
43,473
dslackw/slpkg
slpkg/downloader.py
Download._make_tarfile
def _make_tarfile(self, output_filename, source_dir): """Create .tar.gz file """ with tarfile.open(output_filename, "w:gz") as tar: tar.add(source_dir, arcname=os.path.basename(source_dir))
python
def _make_tarfile(self, output_filename, source_dir): """Create .tar.gz file """ with tarfile.open(output_filename, "w:gz") as tar: tar.add(source_dir, arcname=os.path.basename(source_dir))
[ "def", "_make_tarfile", "(", "self", ",", "output_filename", ",", "source_dir", ")", ":", "with", "tarfile", ".", "open", "(", "output_filename", ",", "\"w:gz\"", ")", "as", "tar", ":", "tar", ".", "add", "(", "source_dir", ",", "arcname", "=", "os", "."...
Create .tar.gz file
[ "Create", ".", "tar", ".", "gz", "file" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/downloader.py#L85-L89
43,474
dslackw/slpkg
slpkg/downloader.py
Download._directory_prefix
def _directory_prefix(self): """Downloader options for specific directory """ if self.downder == "wget": self.dir_prefix = "--directory-prefix=" elif self.downder == "aria2c": self.dir_prefix = "--dir="
python
def _directory_prefix(self): """Downloader options for specific directory """ if self.downder == "wget": self.dir_prefix = "--directory-prefix=" elif self.downder == "aria2c": self.dir_prefix = "--dir="
[ "def", "_directory_prefix", "(", "self", ")", ":", "if", "self", ".", "downder", "==", "\"wget\"", ":", "self", ".", "dir_prefix", "=", "\"--directory-prefix=\"", "elif", "self", ".", "downder", "==", "\"aria2c\"", ":", "self", ".", "dir_prefix", "=", "\"--d...
Downloader options for specific directory
[ "Downloader", "options", "for", "specific", "directory" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/downloader.py#L91-L97
43,475
dslackw/slpkg
slpkg/downloader.py
Download._check_if_downloaded
def _check_if_downloaded(self): """Check if file downloaded """ if not os.path.isfile(self.path + self.file_name): print("") self.msg.template(78) print("| Download '{0}' file [ {1}FAILED{2} ]".format( self.file_name, self.meta.color["RED"], ...
python
def _check_if_downloaded(self): """Check if file downloaded """ if not os.path.isfile(self.path + self.file_name): print("") self.msg.template(78) print("| Download '{0}' file [ {1}FAILED{2} ]".format( self.file_name, self.meta.color["RED"], ...
[ "def", "_check_if_downloaded", "(", "self", ")", ":", "if", "not", "os", ".", "path", ".", "isfile", "(", "self", ".", "path", "+", "self", ".", "file_name", ")", ":", "print", "(", "\"\"", ")", "self", ".", "msg", ".", "template", "(", "78", ")", ...
Check if file downloaded
[ "Check", "if", "file", "downloaded" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/downloader.py#L99-L111
43,476
dslackw/slpkg
slpkg/downloader.py
Download._check_certificate
def _check_certificate(self): """Check for certificates options for wget """ if (self.file_name.startswith("jdk-") and self.repo == "sbo" and self.downder == "wget"): certificate = (' --no-check-certificate --header="Cookie: ' 'oraclelicense...
python
def _check_certificate(self): """Check for certificates options for wget """ if (self.file_name.startswith("jdk-") and self.repo == "sbo" and self.downder == "wget"): certificate = (' --no-check-certificate --header="Cookie: ' 'oraclelicense...
[ "def", "_check_certificate", "(", "self", ")", ":", "if", "(", "self", ".", "file_name", ".", "startswith", "(", "\"jdk-\"", ")", "and", "self", ".", "repo", "==", "\"sbo\"", "and", "self", ".", "downder", "==", "\"wget\"", ")", ":", "certificate", "=", ...
Check for certificates options for wget
[ "Check", "for", "certificates", "options", "for", "wget" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/downloader.py#L113-L127
43,477
dslackw/slpkg
slpkg/sbo/slack_find.py
slack_package
def slack_package(prgnam): """Return maximum binary Slackware package from output directory """ binaries, cache, binary = [], "0", "" for pkg in find_package(prgnam, _meta_.output): if pkg.startswith(prgnam) and pkg[:-4].endswith("_SBo"): binaries.append(pkg) for bins in binaries...
python
def slack_package(prgnam): """Return maximum binary Slackware package from output directory """ binaries, cache, binary = [], "0", "" for pkg in find_package(prgnam, _meta_.output): if pkg.startswith(prgnam) and pkg[:-4].endswith("_SBo"): binaries.append(pkg) for bins in binaries...
[ "def", "slack_package", "(", "prgnam", ")", ":", "binaries", ",", "cache", ",", "binary", "=", "[", "]", ",", "\"0\"", ",", "\"\"", "for", "pkg", "in", "find_package", "(", "prgnam", ",", "_meta_", ".", "output", ")", ":", "if", "pkg", ".", "startswi...
Return maximum binary Slackware package from output directory
[ "Return", "maximum", "binary", "Slackware", "package", "from", "output", "directory" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/slack_find.py#L33-L47
43,478
dslackw/slpkg
slpkg/file_size.py
FileSize.server
def server(self): """Returns the size of remote files """ try: tar = urllib2.urlopen(self.registry) meta = tar.info() return int(meta.getheaders("Content-Length")[0]) except (urllib2.URLError, IndexError): return " "
python
def server(self): """Returns the size of remote files """ try: tar = urllib2.urlopen(self.registry) meta = tar.info() return int(meta.getheaders("Content-Length")[0]) except (urllib2.URLError, IndexError): return " "
[ "def", "server", "(", "self", ")", ":", "try", ":", "tar", "=", "urllib2", ".", "urlopen", "(", "self", ".", "registry", ")", "meta", "=", "tar", ".", "info", "(", ")", "return", "int", "(", "meta", ".", "getheaders", "(", "\"Content-Length\"", ")", ...
Returns the size of remote files
[ "Returns", "the", "size", "of", "remote", "files" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/file_size.py#L35-L43
43,479
dslackw/slpkg
slpkg/sizes.py
units
def units(comp_sum, uncomp_sum): """Calculate package size """ compressed = round((sum(map(float, comp_sum)) / 1024), 2) uncompressed = round((sum(map(float, uncomp_sum)) / 1024), 2) comp_unit = uncomp_unit = "Mb" if compressed > 1024: compressed = round((compressed / 1024), 2) c...
python
def units(comp_sum, uncomp_sum): """Calculate package size """ compressed = round((sum(map(float, comp_sum)) / 1024), 2) uncompressed = round((sum(map(float, uncomp_sum)) / 1024), 2) comp_unit = uncomp_unit = "Mb" if compressed > 1024: compressed = round((compressed / 1024), 2) c...
[ "def", "units", "(", "comp_sum", ",", "uncomp_sum", ")", ":", "compressed", "=", "round", "(", "(", "sum", "(", "map", "(", "float", ",", "comp_sum", ")", ")", "/", "1024", ")", ",", "2", ")", "uncompressed", "=", "round", "(", "(", "sum", "(", "...
Calculate package size
[ "Calculate", "package", "size" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sizes.py#L25-L43
43,480
dslackw/slpkg
slpkg/toolbar.py
status
def status(sec): """Toolbar progressive status """ if _meta_.prg_bar in ["on", "ON"]: syms = ["|", "/", "-", "\\"] for sym in syms: sys.stdout.write("\b{0}{1}{2}".format(_meta_.color["GREY"], sym, _meta_.color["ENDC"])) ...
python
def status(sec): """Toolbar progressive status """ if _meta_.prg_bar in ["on", "ON"]: syms = ["|", "/", "-", "\\"] for sym in syms: sys.stdout.write("\b{0}{1}{2}".format(_meta_.color["GREY"], sym, _meta_.color["ENDC"])) ...
[ "def", "status", "(", "sec", ")", ":", "if", "_meta_", ".", "prg_bar", "in", "[", "\"on\"", ",", "\"ON\"", "]", ":", "syms", "=", "[", "\"|\"", ",", "\"/\"", ",", "\"-\"", ",", "\"\\\\\"", "]", "for", "sym", "in", "syms", ":", "sys", ".", "stdout...
Toolbar progressive status
[ "Toolbar", "progressive", "status" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/toolbar.py#L31-L40
43,481
dslackw/slpkg
slpkg/sbo/slackbuild.py
SBoInstall.continue_to_install
def continue_to_install(self): """Continue to install ? """ if (self.count_uni > 0 or self.count_upg > 0 or "--download-only" in self.flag or "--rebuild" in self.flag): if self.master_packages and self.msg.answer() in ["y", "Y"]: installs, upgraded = s...
python
def continue_to_install(self): """Continue to install ? """ if (self.count_uni > 0 or self.count_upg > 0 or "--download-only" in self.flag or "--rebuild" in self.flag): if self.master_packages and self.msg.answer() in ["y", "Y"]: installs, upgraded = s...
[ "def", "continue_to_install", "(", "self", ")", ":", "if", "(", "self", ".", "count_uni", ">", "0", "or", "self", ".", "count_upg", ">", "0", "or", "\"--download-only\"", "in", "self", ".", "flag", "or", "\"--rebuild\"", "in", "self", ".", "flag", ")", ...
Continue to install ?
[ "Continue", "to", "install", "?" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/slackbuild.py#L188-L199
43,482
dslackw/slpkg
slpkg/sbo/slackbuild.py
SBoInstall.clear_masters
def clear_masters(self): """Clear master slackbuilds if already exist in dependencies or if added to install two or more times """ self.master_packages = Utils().remove_dbs(self.master_packages) for mas in self.master_packages: if mas in self.dependencies: ...
python
def clear_masters(self): """Clear master slackbuilds if already exist in dependencies or if added to install two or more times """ self.master_packages = Utils().remove_dbs(self.master_packages) for mas in self.master_packages: if mas in self.dependencies: ...
[ "def", "clear_masters", "(", "self", ")", ":", "self", ".", "master_packages", "=", "Utils", "(", ")", ".", "remove_dbs", "(", "self", ".", "master_packages", ")", "for", "mas", "in", "self", ".", "master_packages", ":", "if", "mas", "in", "self", ".", ...
Clear master slackbuilds if already exist in dependencies or if added to install two or more times
[ "Clear", "master", "slackbuilds", "if", "already", "exist", "in", "dependencies", "or", "if", "added", "to", "install", "two", "or", "more", "times" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/slackbuild.py#L207-L214
43,483
dslackw/slpkg
slpkg/sbo/slackbuild.py
SBoInstall.matching
def matching(self): """Return found matching SBo packages """ for sbo in self.package_not_found: for pkg in self.data: if sbo in pkg and pkg not in self.blacklist: self.package_found.append(pkg)
python
def matching(self): """Return found matching SBo packages """ for sbo in self.package_not_found: for pkg in self.data: if sbo in pkg and pkg not in self.blacklist: self.package_found.append(pkg)
[ "def", "matching", "(", "self", ")", ":", "for", "sbo", "in", "self", ".", "package_not_found", ":", "for", "pkg", "in", "self", ".", "data", ":", "if", "sbo", "in", "pkg", "and", "pkg", "not", "in", "self", ".", "blacklist", ":", "self", ".", "pac...
Return found matching SBo packages
[ "Return", "found", "matching", "SBo", "packages" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/slackbuild.py#L216-L222
43,484
dslackw/slpkg
slpkg/sbo/slackbuild.py
SBoInstall.sbo_version_source
def sbo_version_source(self, slackbuilds): """Create sbo name with version """ sbo_versions, sources = [], [] for sbo in slackbuilds: status(0.02) sbo_ver = "{0}-{1}".format(sbo, SBoGrep(sbo).version()) sbo_versions.append(sbo_ver) sources....
python
def sbo_version_source(self, slackbuilds): """Create sbo name with version """ sbo_versions, sources = [], [] for sbo in slackbuilds: status(0.02) sbo_ver = "{0}-{1}".format(sbo, SBoGrep(sbo).version()) sbo_versions.append(sbo_ver) sources....
[ "def", "sbo_version_source", "(", "self", ",", "slackbuilds", ")", ":", "sbo_versions", ",", "sources", "=", "[", "]", ",", "[", "]", "for", "sbo", "in", "slackbuilds", ":", "status", "(", "0.02", ")", "sbo_ver", "=", "\"{0}-{1}\"", ".", "format", "(", ...
Create sbo name with version
[ "Create", "sbo", "name", "with", "version" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/slackbuild.py#L224-L233
43,485
dslackw/slpkg
slpkg/sbo/slackbuild.py
SBoInstall.one_for_all
def one_for_all(self, deps): """Because there are dependencies that depend on other dependencies are created lists into other lists. Thus creating this loop create one-dimensional list and remove double packages from dependencies. """ requires, dependencies = [], [] ...
python
def one_for_all(self, deps): """Because there are dependencies that depend on other dependencies are created lists into other lists. Thus creating this loop create one-dimensional list and remove double packages from dependencies. """ requires, dependencies = [], [] ...
[ "def", "one_for_all", "(", "self", ",", "deps", ")", ":", "requires", ",", "dependencies", "=", "[", "]", ",", "[", "]", "deps", ".", "reverse", "(", ")", "# Inverting the list brings the", "# dependencies in order to be installed.", "requires", "=", "Utils", "(...
Because there are dependencies that depend on other dependencies are created lists into other lists. Thus creating this loop create one-dimensional list and remove double packages from dependencies.
[ "Because", "there", "are", "dependencies", "that", "depend", "on", "other", "dependencies", "are", "created", "lists", "into", "other", "lists", ".", "Thus", "creating", "this", "loop", "create", "one", "-", "dimensional", "list", "and", "remove", "double", "p...
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/slackbuild.py#L235-L247
43,486
dslackw/slpkg
slpkg/sbo/slackbuild.py
SBoInstall.tag
def tag(self, sbo): """Tag with color green if package already installed, color yellow for packages to upgrade and color red if not installed. """ # split sbo name with version and get name sbo_name = "-".join(sbo.split("-")[:-1]) find = GetFromInstalled(sbo_name)...
python
def tag(self, sbo): """Tag with color green if package already installed, color yellow for packages to upgrade and color red if not installed. """ # split sbo name with version and get name sbo_name = "-".join(sbo.split("-")[:-1]) find = GetFromInstalled(sbo_name)...
[ "def", "tag", "(", "self", ",", "sbo", ")", ":", "# split sbo name with version and get name", "sbo_name", "=", "\"-\"", ".", "join", "(", "sbo", ".", "split", "(", "\"-\"", ")", "[", ":", "-", "1", "]", ")", "find", "=", "GetFromInstalled", "(", "sbo_na...
Tag with color green if package already installed, color yellow for packages to upgrade and color red if not installed.
[ "Tag", "with", "color", "green", "if", "package", "already", "installed", "color", "yellow", "for", "packages", "to", "upgrade", "and", "color", "red", "if", "not", "installed", "." ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/slackbuild.py#L277-L296
43,487
dslackw/slpkg
slpkg/sbo/slackbuild.py
SBoInstall.select_arch
def select_arch(self, src): """Looks if sources unsupported or untested from arch else select arch. """ arch = self.arch for item in self.unst: if item in src: arch = item return arch
python
def select_arch(self, src): """Looks if sources unsupported or untested from arch else select arch. """ arch = self.arch for item in self.unst: if item in src: arch = item return arch
[ "def", "select_arch", "(", "self", ",", "src", ")", ":", "arch", "=", "self", ".", "arch", "for", "item", "in", "self", ".", "unst", ":", "if", "item", "in", "src", ":", "arch", "=", "item", "return", "arch" ]
Looks if sources unsupported or untested from arch else select arch.
[ "Looks", "if", "sources", "unsupported", "or", "untested", "from", "arch", "else", "select", "arch", "." ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/slackbuild.py#L298-L306
43,488
dslackw/slpkg
slpkg/sbo/slackbuild.py
SBoInstall.filenames
def filenames(self, sources): """Return filenames from sources links """ filename = [] for src in sources: filename.append(src.split("/")[-1]) return filename
python
def filenames(self, sources): """Return filenames from sources links """ filename = [] for src in sources: filename.append(src.split("/")[-1]) return filename
[ "def", "filenames", "(", "self", ",", "sources", ")", ":", "filename", "=", "[", "]", "for", "src", "in", "sources", ":", "filename", ".", "append", "(", "src", ".", "split", "(", "\"/\"", ")", "[", "-", "1", "]", ")", "return", "filename" ]
Return filenames from sources links
[ "Return", "filenames", "from", "sources", "links" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/slackbuild.py#L308-L314
43,489
dslackw/slpkg
slpkg/sbo/slackbuild.py
SBoInstall.not_downgrade
def not_downgrade(self, prgnam): """Don't downgrade packages if sbo version is lower than installed""" name = "-".join(prgnam.split("-")[:-1]) sbo_ver = prgnam.split("-")[-1] ins_ver = GetFromInstalled(name).version()[1:] if not ins_ver: ins_ver = "0" ...
python
def not_downgrade(self, prgnam): """Don't downgrade packages if sbo version is lower than installed""" name = "-".join(prgnam.split("-")[:-1]) sbo_ver = prgnam.split("-")[-1] ins_ver = GetFromInstalled(name).version()[1:] if not ins_ver: ins_ver = "0" ...
[ "def", "not_downgrade", "(", "self", ",", "prgnam", ")", ":", "name", "=", "\"-\"", ".", "join", "(", "prgnam", ".", "split", "(", "\"-\"", ")", "[", ":", "-", "1", "]", ")", "sbo_ver", "=", "prgnam", ".", "split", "(", "\"-\"", ")", "[", "-", ...
Don't downgrade packages if sbo version is lower than installed
[ "Don", "t", "downgrade", "packages", "if", "sbo", "version", "is", "lower", "than", "installed" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/slackbuild.py#L377-L390
43,490
dslackw/slpkg
slpkg/sbo/slackbuild.py
SBoInstall.sbosrcarsh
def sbosrcarsh(self, prgnam, sbo_link, src_link): """Alternative repository for sbo sources""" sources = [] name = "-".join(prgnam.split("-")[:-1]) category = "{0}/{1}/".format(sbo_link.split("/")[-2], name) for link in src_link: source = link.split("/")[-1] ...
python
def sbosrcarsh(self, prgnam, sbo_link, src_link): """Alternative repository for sbo sources""" sources = [] name = "-".join(prgnam.split("-")[:-1]) category = "{0}/{1}/".format(sbo_link.split("/")[-2], name) for link in src_link: source = link.split("/")[-1] ...
[ "def", "sbosrcarsh", "(", "self", ",", "prgnam", ",", "sbo_link", ",", "src_link", ")", ":", "sources", "=", "[", "]", "name", "=", "\"-\"", ".", "join", "(", "prgnam", ".", "split", "(", "\"-\"", ")", "[", ":", "-", "1", "]", ")", "category", "=...
Alternative repository for sbo sources
[ "Alternative", "repository", "for", "sbo", "sources" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/sbo/slackbuild.py#L392-L401
43,491
dslackw/slpkg
slpkg/version.py
prog_version
def prog_version(): """Print version, license and email """ print("Version : {0}\n" "Licence : {1}\n" "Email : {2}\n" "Maintainer: {3}".format(_meta_.__version__, _meta_.__license__, _meta_.__email__,...
python
def prog_version(): """Print version, license and email """ print("Version : {0}\n" "Licence : {1}\n" "Email : {2}\n" "Maintainer: {3}".format(_meta_.__version__, _meta_.__license__, _meta_.__email__,...
[ "def", "prog_version", "(", ")", ":", "print", "(", "\"Version : {0}\\n\"", "\"Licence : {1}\\n\"", "\"Email : {2}\\n\"", "\"Maintainer: {3}\"", ".", "format", "(", "_meta_", ".", "__version__", ",", "_meta_", ".", "__license__", ",", "_meta_", ".", "__email__...
Print version, license and email
[ "Print", "version", "license", "and", "email" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/version.py#L28-L37
43,492
dslackw/slpkg
slpkg/messages.py
Msg.pkg_not_found
def pkg_not_found(self, bol, pkg, message, eol): """Print message when package not found """ print("{0}No such package {1}: {2}{3}".format(bol, pkg, message, eol))
python
def pkg_not_found(self, bol, pkg, message, eol): """Print message when package not found """ print("{0}No such package {1}: {2}{3}".format(bol, pkg, message, eol))
[ "def", "pkg_not_found", "(", "self", ",", "bol", ",", "pkg", ",", "message", ",", "eol", ")", ":", "print", "(", "\"{0}No such package {1}: {2}{3}\"", ".", "format", "(", "bol", ",", "pkg", ",", "message", ",", "eol", ")", ")" ]
Print message when package not found
[ "Print", "message", "when", "package", "not", "found" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/messages.py#L37-L40
43,493
dslackw/slpkg
slpkg/messages.py
Msg.build_FAILED
def build_FAILED(self, prgnam): """Print error message if build failed """ self.template(78) print("| Some error on the package {0} [ {1}FAILED{2} ]".format( prgnam, self.meta.color["RED"], self.meta.color["ENDC"])) self.template(78) print("| See the log file ...
python
def build_FAILED(self, prgnam): """Print error message if build failed """ self.template(78) print("| Some error on the package {0} [ {1}FAILED{2} ]".format( prgnam, self.meta.color["RED"], self.meta.color["ENDC"])) self.template(78) print("| See the log file ...
[ "def", "build_FAILED", "(", "self", ",", "prgnam", ")", ":", "self", ".", "template", "(", "78", ")", "print", "(", "\"| Some error on the package {0} [ {1}FAILED{2} ]\"", ".", "format", "(", "prgnam", ",", "self", ".", "meta", ".", "color", "[", "\"RED\"", ...
Print error message if build failed
[ "Print", "error", "message", "if", "build", "failed" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/messages.py#L52-L63
43,494
dslackw/slpkg
slpkg/messages.py
Msg.security_pkg
def security_pkg(self, pkg): """Warning message for some special reasons """ print("") self.template(78) print("| {0}{1}*** WARNING ***{2}").format( " " * 27, self.meta.color["RED"], self.meta.color["ENDC"]) self.template(78) print("| Before proceed wi...
python
def security_pkg(self, pkg): """Warning message for some special reasons """ print("") self.template(78) print("| {0}{1}*** WARNING ***{2}").format( " " * 27, self.meta.color["RED"], self.meta.color["ENDC"]) self.template(78) print("| Before proceed wi...
[ "def", "security_pkg", "(", "self", ",", "pkg", ")", ":", "print", "(", "\"\"", ")", "self", ".", "template", "(", "78", ")", "print", "(", "\"| {0}{1}*** WARNING ***{2}\"", ")", ".", "format", "(", "\" \"", "*", "27", ",", "self", ".", "meta", ".", ...
Warning message for some special reasons
[ "Warning", "message", "for", "some", "special", "reasons" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/messages.py#L134-L146
43,495
dslackw/slpkg
slpkg/messages.py
Msg.reference
def reference(self, install, upgrade): """Reference list with packages installed and upgraded """ self.template(78) print("| Total {0} {1} installed and {2} {3} upgraded".format( len(install), self.pkg(len(install)), len(upgrade), self.pkg(len(upgrade)))) ...
python
def reference(self, install, upgrade): """Reference list with packages installed and upgraded """ self.template(78) print("| Total {0} {1} installed and {2} {3} upgraded".format( len(install), self.pkg(len(install)), len(upgrade), self.pkg(len(upgrade)))) ...
[ "def", "reference", "(", "self", ",", "install", ",", "upgrade", ")", ":", "self", ".", "template", "(", "78", ")", "print", "(", "\"| Total {0} {1} installed and {2} {3} upgraded\"", ".", "format", "(", "len", "(", "install", ")", ",", "self", ".", "pkg", ...
Reference list with packages installed and upgraded
[ "Reference", "list", "with", "packages", "installed", "and", "upgraded" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/messages.py#L148-L163
43,496
dslackw/slpkg
slpkg/messages.py
Msg.matching
def matching(self, packages): """Message for matching packages """ print("\nNot found package with the name [ {0}{1}{2} ]. " "Matching packages:\nNOTE: Not dependenc" "ies are resolved\n".format(self.meta.color["CYAN"], "".joi...
python
def matching(self, packages): """Message for matching packages """ print("\nNot found package with the name [ {0}{1}{2} ]. " "Matching packages:\nNOTE: Not dependenc" "ies are resolved\n".format(self.meta.color["CYAN"], "".joi...
[ "def", "matching", "(", "self", ",", "packages", ")", ":", "print", "(", "\"\\nNot found package with the name [ {0}{1}{2} ]. \"", "\"Matching packages:\\nNOTE: Not dependenc\"", "\"ies are resolved\\n\"", ".", "format", "(", "self", ".", "meta", ".", "color", "[", "\"CYA...
Message for matching packages
[ "Message", "for", "matching", "packages" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/messages.py#L165-L172
43,497
dslackw/slpkg
slpkg/slack/mirrors.py
mirrors
def mirrors(name, location): """ Select Slackware official mirror packages based architecture and version. """ rel = _meta_.slack_rel ver = slack_ver() repo = Repo().slack() if _meta_.arch == "x86_64": if rel == "stable": http = repo + "slackware64-{0}/{1}{2}".format(...
python
def mirrors(name, location): """ Select Slackware official mirror packages based architecture and version. """ rel = _meta_.slack_rel ver = slack_ver() repo = Repo().slack() if _meta_.arch == "x86_64": if rel == "stable": http = repo + "slackware64-{0}/{1}{2}".format(...
[ "def", "mirrors", "(", "name", ",", "location", ")", ":", "rel", "=", "_meta_", ".", "slack_rel", "ver", "=", "slack_ver", "(", ")", "repo", "=", "Repo", "(", ")", ".", "slack", "(", ")", "if", "_meta_", ".", "arch", "==", "\"x86_64\"", ":", "if", ...
Select Slackware official mirror packages based architecture and version.
[ "Select", "Slackware", "official", "mirror", "packages", "based", "architecture", "and", "version", "." ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/slack/mirrors.py#L31-L54
43,498
dslackw/slpkg
slpkg/auto_pkg.py
Auto.select
def select(self): """Select Slackware command """ print("\nDetected Slackware binary package for installation:\n") for pkg in self.packages: print(" " + pkg.split("/")[-1]) print("") self.msg.template(78) print("| Choose a Slackware command:") ...
python
def select(self): """Select Slackware command """ print("\nDetected Slackware binary package for installation:\n") for pkg in self.packages: print(" " + pkg.split("/")[-1]) print("") self.msg.template(78) print("| Choose a Slackware command:") ...
[ "def", "select", "(", "self", ")", ":", "print", "(", "\"\\nDetected Slackware binary package for installation:\\n\"", ")", "for", "pkg", "in", "self", ".", "packages", ":", "print", "(", "\" \"", "+", "pkg", ".", "split", "(", "\"/\"", ")", "[", "-", "1", ...
Select Slackware command
[ "Select", "Slackware", "command" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/auto_pkg.py#L46-L72
43,499
dslackw/slpkg
slpkg/auto_pkg.py
Auto.execute
def execute(self): """Execute Slackware command """ if self.choice in self.commands.keys(): if self.choice == "i": PackageManager(self.packages).install("") elif self.choice in ["u", "r"]: PackageManager(self.packages).upgrade( ...
python
def execute(self): """Execute Slackware command """ if self.choice in self.commands.keys(): if self.choice == "i": PackageManager(self.packages).install("") elif self.choice in ["u", "r"]: PackageManager(self.packages).upgrade( ...
[ "def", "execute", "(", "self", ")", ":", "if", "self", ".", "choice", "in", "self", ".", "commands", ".", "keys", "(", ")", ":", "if", "self", ".", "choice", "==", "\"i\"", ":", "PackageManager", "(", "self", ".", "packages", ")", ".", "install", "...
Execute Slackware command
[ "Execute", "Slackware", "command" ]
dd2e08a80e944d337d157b992167ba631a4343de
https://github.com/dslackw/slpkg/blob/dd2e08a80e944d337d157b992167ba631a4343de/slpkg/auto_pkg.py#L74-L82