本文整理汇总了Python中slpkg.slack.slack_version.slack_ver函数的典型用法代码示例。如果您正苦于以下问题:Python slack_ver函数的具体用法?Python slack_ver怎么用?Python slack_ver使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了slack_ver函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: sbo
def sbo(self):
"""Creating sbo local library
"""
repo = Repo().sbo()
log = self.log_path + "sbo/"
lib = self.lib_path + "sbo_repo/"
repo_name = log[:-1].split("/")[-1]
lib_file = "SLACKBUILDS.TXT"
# lst_file = ""
# md5_file = ""
log_file = "ChangeLog.txt"
if not os.path.exists(log):
os.mkdir(log)
if not os.path.exists(lib):
os.mkdir(lib)
SLACKBUILDS_TXT = "{0}{1}/{2}".format(repo, slack_ver(), lib_file)
FILELIST_TXT = ""
CHECKSUMS_MD5 = ""
ChangeLog_txt = "{0}{1}/{2}".format(repo, slack_ver(), log_file)
if self.check:
return self.checks_logs(log, ChangeLog_txt)
self.down(lib, SLACKBUILDS_TXT, repo_name)
self.down(log, ChangeLog_txt, repo_name)
self.remote(log, ChangeLog_txt, lib, SLACKBUILDS_TXT, CHECKSUMS_MD5,
FILELIST_TXT, repo_name)
示例2: connos
def connos(self):
"""Creating connochaetos (slack-n-free) local library
"""
nickname = "slack-n-free"
ar = ""
arch = self.meta.arch
repo = self.def_repos_dict["connos"]
log = self.log_path + "connos/"
lib = self.lib_path + "connos_repo/"
repo_name = log[:-1].split("/")[-1]
lib_file = "PACKAGES.TXT"
# lst_file = ""
md5_file = "CHECKSUMS.md5"
log_file = "ChangeLog.txt"
if not os.path.exists(log):
os.mkdir(log)
if not os.path.exists(lib):
os.mkdir(lib)
if arch == "x86_64":
ar = "64"
PACKAGES_TXT = "{0}{1}{2}-{3}/{4}".format(repo, nickname, ar,
slack_ver(), lib_file)
FILELIST_TXT = ""
CHECKSUMS_MD5 = "{0}{1}{2}-{3}/{4}".format(repo, nickname, ar,
slack_ver(), md5_file)
ChangeLog_txt = "{0}{1}{2}-{3}/{4}".format(repo, nickname, ar,
slack_ver(), log_file)
if self.check:
return self.checks_logs(log, ChangeLog_txt)
self.down(lib, PACKAGES_TXT, repo_name)
self.down(lib, CHECKSUMS_MD5, repo_name)
self.down(log, ChangeLog_txt, repo_name)
self.remote(log, ChangeLog_txt, lib, PACKAGES_TXT, CHECKSUMS_MD5,
FILELIST_TXT, repo_name)
示例3: rlw
def rlw(self):
"""Creating rlw local library
"""
repo = Repo().rlw()
log = self.log_path + "rlw/"
lib = self.lib_path + "rlw_repo/"
repo_name = log[:-1].split("/")[-1]
lib_file = "PACKAGES.TXT"
# lst_file = ""
md5_file = "CHECKSUMS.md5"
log_file = "ChangeLog.txt"
if not os.path.exists(log):
os.mkdir(log)
if not os.path.exists(lib):
os.mkdir(lib)
PACKAGES_TXT = "{0}{1}/{2}".format(repo, slack_ver(), lib_file)
FILELIST_TXT = ""
CHECKSUMS_MD5 = "{0}{1}/{2}".format(repo, slack_ver(), md5_file)
ChangeLog_txt = "{0}{1}/{2}".format(repo, slack_ver(), log_file)
if self.check:
return self.checks_logs(log, ChangeLog_txt)
self.down(lib, PACKAGES_TXT, repo_name)
self.down(lib, CHECKSUMS_MD5, repo_name)
self.down(log, ChangeLog_txt, repo_name)
self.remote(log, ChangeLog_txt, lib, PACKAGES_TXT, CHECKSUMS_MD5,
FILELIST_TXT, repo_name)
示例4: studio
def studio(self):
"""Creating studio local library
"""
ar = ""
arch = self.meta.arch
repo = Repo().studioware()
log = self.log_path + "studio/"
lib = self.lib_path + "studio_repo/"
repo_name = log[:-1].split("/")[-1]
lib_file = "PACKAGES.TXT"
# lst_file = ""
md5_file = "CHECKSUMS.md5"
log_file = "ChangeLog.txt"
if not os.path.exists(log):
os.mkdir(log)
if not os.path.exists(lib):
os.mkdir(lib)
if arch == "x86_64":
ar = "64"
PACKAGES_TXT = "{0}slackware{1}-{2}/{3}".format(repo, ar, slack_ver(),
lib_file)
FILELIST_TXT = ""
CHECKSUMS_MD5 = "{0}slackware{1}-{2}/{3}".format(repo, ar, slack_ver(),
md5_file)
ChangeLog_txt = "{0}slackware{1}-{2}/{3}".format(repo, ar, slack_ver(),
log_file)
if self.check:
return self.checks_logs(log, ChangeLog_txt)
self.down(lib, PACKAGES_TXT, repo_name)
self.down(lib, CHECKSUMS_MD5, repo_name)
self.down(log, ChangeLog_txt, repo_name)
self.remote(log, ChangeLog_txt, lib, PACKAGES_TXT, CHECKSUMS_MD5,
FILELIST_TXT, repo_name)
示例5: msb
def msb(self):
"""Creating MATE local library
"""
ar = "x86"
arch = self.meta.arch
repo = Repo().msb()
log = self.log_path + "msb/"
lib = self.lib_path + "msb_repo/"
repo_name = log[:-1].split("/")[-1]
lib_file = "PACKAGES.TXT"
# lst_file = ""
md5_file = "CHECKSUMS.md5"
log_file = "ChangeLog.txt"
if not os.path.exists(log):
os.mkdir(log)
if not os.path.exists(lib):
os.mkdir(lib)
if arch == "x86_64":
ar = "x86_64"
PACKAGES_TXT = "{0}{1}/{2}/{3}/{4}".format(
repo, slack_ver(), self.meta.msb_sub_repo[1:-1], ar, lib_file)
FILELIST_TXT = ""
CHECKSUMS_MD5 = "{0}{1}/{2}/{3}/{4}".format(
repo, slack_ver(), self.meta.msb_sub_repo[1:-1], ar, md5_file)
ChangeLog_txt = "{0}{1}".format(repo, log_file)
if self.check:
return self.checks_logs(log, ChangeLog_txt)
self.down(lib, PACKAGES_TXT, repo_name)
self.down(lib, CHECKSUMS_MD5, repo_name)
self.down(log, ChangeLog_txt, repo_name)
self.remote(log, ChangeLog_txt, lib, PACKAGES_TXT, CHECKSUMS_MD5,
FILELIST_TXT, repo_name)
示例6: slacke
def slacke(self):
"""Creating Slacke local library
"""
ar = ""
arch = self.meta.arch
repo = self.def_repos_dict["slacke"]
log = self.log_path + "slacke/"
lib = self.lib_path + "slacke_repo/"
repo_name = log[:-1].split("/")[-1]
lib_file = "PACKAGES.TXT"
# lst_file = ""
md5_file = "CHECKSUMS.md5"
log_file = "ChangeLog.txt"
if not os.path.exists(log):
os.mkdir(log)
if not os.path.exists(lib):
os.mkdir(lib)
if arch == "x86_64":
ar = "64"
PACKAGES_TXT = "{0}slacke{1}/slackware{2}-{3}/{4}".format(
repo, self.meta.slacke_sub_repo[1:-1], ar, slack_ver(), lib_file)
FILELIST_TXT = ""
CHECKSUMS_MD5 = "{0}slacke{1}/slackware{2}-{3}/{4}".format(
repo, self.meta.slacke_sub_repo[1:-1], ar, slack_ver(), md5_file)
ChangeLog_txt = "{0}slacke{1}/slackware{2}-{3}/{4}".format(
repo, self.meta.slacke_sub_repo[1:-1], ar, slack_ver(), log_file)
if self.check:
return self.checks_logs(log, ChangeLog_txt)
self.down(lib, PACKAGES_TXT, repo_name)
self.down(lib, CHECKSUMS_MD5, repo_name)
self.down(log, ChangeLog_txt, repo_name)
self.remote(log, ChangeLog_txt, lib, PACKAGES_TXT, CHECKSUMS_MD5,
FILELIST_TXT, repo_name)
示例7: mles
def mles(self):
"""Creating Microlinux local library
"""
ar = "32"
arch = self.meta.arch
repo = self.def_repos_dict["mles"]
log = self.log_path + "mles/"
lib = self.lib_path + "mles_repo/"
repo_name = log[:-1].split("/")[-1]
lib_file = "PACKAGES.TXT"
# lst_file = ""
md5_file = "CHECKSUMS.md5"
log_file = "ChangeLog.txt"
if not os.path.exists(log):
os.mkdir(log)
if not os.path.exists(lib):
os.mkdir(lib)
if arch == "x86_64":
ar = "64"
version = self.meta.mles_sub_repo[1:-1]
PACKAGES_TXT = "{0}{1}-{2}-{3}bit/{4}".format(
repo, version, slack_ver(), ar, lib_file)
FILELIST_TXT = ""
CHECKSUMS_MD5 = "{0}{1}-{2}-{3}bit/{4}".format(
repo, version, slack_ver(), ar, md5_file)
ChangeLog_txt = "{0}{1}-{2}-{3}bit/{4}".format(
repo, version, slack_ver(), ar, log_file)
if self.check:
return self.checks_logs(log, ChangeLog_txt)
self.down(lib, PACKAGES_TXT, repo_name)
self.down(lib, CHECKSUMS_MD5, repo_name)
self.down(log, ChangeLog_txt, repo_name)
self.remote(log, ChangeLog_txt, lib, PACKAGES_TXT, CHECKSUMS_MD5,
FILELIST_TXT, repo_name)
示例8: _init_msb
def _init_msb(self):
arch = "x86"
if self.meta.arch == "x86_64":
arch = "x86_64"
self.mirror = "{0}{1}/{2}/{3}/".format(
self.def_repo_dict["msb"], slack_ver(),
self.meta.msb_sub_repo[1:-1], arch)
示例9: _init_slacke
def _init_slacke(self):
arch = ""
if self.meta.arch == "x86_64":
arch = "64"
self.mirror = "{0}slacke{1}/slackware{2}-{3}/".format(
self.def_repo_dict["slacke"], self.meta.slacke_sub_repo[1:-1],
arch, slack_ver())
示例10: 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].replace("%2B", "+")
if dwn.startswith("file:///"):
source_dir = dwn[7:-7].replace(slack_ver(), "")
self._make_tarfile(self.file_name, source_dir)
self._check_certificate()
print("\n[{0}/{1}][ {2}Download{3} ] --> {4}\n".format(
dwn_count, len(self.url), self.meta.color["GREEN"],
self.meta.color["ENDC"],
self.file_name))
if self.downder in ["wget"]:
subprocess.call("{0} {1} {2}{3} {4}".format(
self.downder, self.downder_options,
self.dir_prefix, self.path, dwn),
shell=True)
if self.downder in ["aria2c"]:
subprocess.call("{0} {1} {2}{3} {4}".format(
self.downder, self.downder_options,
self.dir_prefix, self.path[:-1], dwn),
shell=True)
elif self.downder in ["curl", "http"]:
subprocess.call("{0} {1} {2}{3} {4}".format(
self.downder, self.downder_options,
self.path, self.file_name, dwn), shell=True)
self._check_if_downloaded()
dwn_count += 1
示例11: slonly
def slonly(self):
"""Creating slackers local library
"""
ver = slack_ver()
ar = "{0}-x86".format(ver)
arch = self.meta.arch
repo = Repo().slackonly()
log = self.log_path + "slonly/"
lib = self.lib_path + "slonly_repo/"
repo_name = log[:-1].split("/")[-1]
lib_file = "PACKAGES.TXT"
# lst_file = ""
md5_file = "CHECKSUMS.md5"
log_file = "ChangeLog.txt"
if not os.path.exists(log):
os.mkdir(log)
if not os.path.exists(lib):
os.mkdir(lib)
if arch == "x86_64":
ar = "{0}-x86_64".format(ver)
if self.meta.slack_rel == "current":
ar = "{0}-x86".format(self.meta.slack_rel)
if self.meta.slack_rel == "current" and arch == "x86_64":
ar = "{0}-x86_64".format(self.meta.slack_rel)
PACKAGES_TXT = "{0}{1}/{2}".format(repo, ar, lib_file)
FILELIST_TXT = ""
CHECKSUMS_MD5 = "{0}{1}/{2}".format(repo, ar, md5_file)
ChangeLog_txt = "{0}{1}/{2}".format(repo, ar, log_file)
if self.check:
return self.checks_logs(log, ChangeLog_txt)
self.down(lib, PACKAGES_TXT, repo_name)
self.down(lib, CHECKSUMS_MD5, repo_name)
self.down(log, ChangeLog_txt, repo_name)
self.remote(log, ChangeLog_txt, lib, PACKAGES_TXT, CHECKSUMS_MD5,
FILELIST_TXT, repo_name)
示例12: 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, ChangeLog_txt):
# remove old files
self.file_remove(log_path, ChangeLog_txt.split("/")[-1])
self.file_remove(lib_path, PACKAGES_TXT.split("/")[-1])
self.file_remove(lib_path, CHECKSUMS_MD5.split("/")[-1])
self.file_remove(lib_path, FILELIST_TXT.split("/")[-1])
if repo == "slack":
dirs = ["core/", "extra/", "pasture/"]
for d in dirs:
self.file_remove(lib_path + d, "PACKAGES.TXT")
self.file_remove(lib_path + d, "CHECKSUMS.md5")
self.down(lib_path + "core/", PACKAGES_TXT, repo)
self.down(lib_path + "core/", CHECKSUMS_MD5, repo)
self.down(lib_path + "extra/", self.EXTRA, repo)
self.down(lib_path + "extra/", self.EXT_CHECKSUMS, repo)
if slack_ver() != "14.0": # no pasture/ folder for 14.0 version
self.down(lib_path + "pasture/", self.PASTURE, repo)
self.down(lib_path + "pasture/", self.PAS_CHECKSUMS, repo)
# download new files
if repo != "slack":
self.down(lib_path, PACKAGES_TXT, repo)
self.down(lib_path, CHECKSUMS_MD5, repo)
self.down(lib_path, FILELIST_TXT, repo)
self.down(log_path, ChangeLog_txt, repo)
示例13: multi
def multi(self):
"""Creating alien multilib local library
"""
ver = slack_ver()
repo = Repo().multi()
log = self.log_path + "multi/"
lib = self.lib_path + "multi_repo/"
repo_name = log[:-1].split("/")[-1]
lib_file = "PACKAGES.TXT"
# lst_file = ""
md5_file = "CHECKSUMS.md5"
log_file = "ChangeLog.txt"
if not os.path.exists(log):
os.mkdir(log)
if not os.path.exists(lib):
os.mkdir(lib)
if self.meta.slack_rel == "current":
ver = self.meta.slack_rel
PACKAGES_TXT = "{0}{1}/{2}".format(repo, ver, lib_file)
FILELIST_TXT = ""
CHECKSUMS_MD5 = "{0}{1}/{2}".format(repo, ver, md5_file)
ChangeLog_txt = "{0}{1}".format(repo, log_file)
if self.check:
return self.checks_logs(log, ChangeLog_txt)
self.down(lib, PACKAGES_TXT, repo_name)
self.down(lib, CHECKSUMS_MD5, repo_name)
self.down(log, ChangeLog_txt, repo_name)
self.remote(log, ChangeLog_txt, lib, PACKAGES_TXT, CHECKSUMS_MD5,
FILELIST_TXT, repo_name)
示例14: csb
def csb(self):
"""Creating Cinnamon local library
"""
ar = "x86"
ver_slack = slack_ver()
arch = self.meta.arch
repo = self.def_repos_dict["csb"]
log = self.log_path + "csb/"
lib = self.lib_path + "csb_repo/"
repo_name = log[:-1].split("/")[-1]
lib_file = "PACKAGES.TXT"
# lst_file = ""
md5_file = "CHECKSUMS.md5"
log_file = "ChangeLog.txt"
if not os.path.exists(log):
os.mkdir(log)
if not os.path.exists(lib):
os.mkdir(lib)
if arch == "x86_64":
ar = "x86_64"
if self.meta.slack_rel == "current":
ver_slack = self.meta.slack_rel
PACKAGES_TXT = "{0}{1}/{2}/{3}".format(
repo, ver_slack, ar, lib_file)
FILELIST_TXT = ""
CHECKSUMS_MD5 = "{0}{1}/{2}/{3}".format(
repo, ver_slack, ar, md5_file)
ChangeLog_txt = "{0}{1}".format(repo, log_file)
if self.check:
return self.checks_logs(log, ChangeLog_txt)
self.down(lib, PACKAGES_TXT, repo_name)
self.down(lib, CHECKSUMS_MD5, repo_name)
self.down(log, ChangeLog_txt, repo_name)
self.remote(log, ChangeLog_txt, lib, PACKAGES_TXT, CHECKSUMS_MD5,
FILELIST_TXT, repo_name)
示例15: _init_slacke
def _init_slacke(self):
arch = ""
if os.uname()[4] == "x86_64":
arch = "64"
elif os.uname()[4] == "arm":
arch = "arm"
self.mirror = "{0}slacke{1}/slackware{2}-{3}/".format(
Repo().slacke(), self.meta.slacke_sub_repo[1:-1], arch, slack_ver())