mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-30 20:34:38 +01:00
Added to check if there is news on ChangeLog.txt
Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
parent
301e5b321f
commit
aa9c58c636
7 changed files with 32 additions and 4 deletions
|
@ -1,4 +1,6 @@
|
||||||
4.2.5 - 01/11/2022
|
4.2.5 - 01/11/2022
|
||||||
|
Added:
|
||||||
|
- Command to check if there is news on ChangeLog.txt
|
||||||
Updated:
|
Updated:
|
||||||
- man page
|
- man page
|
||||||
|
|
||||||
|
|
|
@ -20,9 +20,12 @@ configs:
|
||||||
# Slackbuilds.org repository url.
|
# Slackbuilds.org repository url.
|
||||||
sbo_repo_url: http://slackbuilds.org/slackbuilds/15.0
|
sbo_repo_url: http://slackbuilds.org/slackbuilds/15.0
|
||||||
|
|
||||||
# The sbo repository main file.
|
# The SLACKBUILDS.TXT repository file.
|
||||||
sbo_txt: SLACKBUILDS.TXT
|
sbo_txt: SLACKBUILDS.TXT
|
||||||
|
|
||||||
|
# The ChangeLog.txt file.
|
||||||
|
chglog_txt: ChangeLog.txt
|
||||||
|
|
||||||
# The sbo tar suffix.
|
# The sbo tar suffix.
|
||||||
sbo_tar_suffix: .tar.gz
|
sbo_tar_suffix: .tar.gz
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
slpkg - [OPTIONS] [COMMAND] <packages>
|
slpkg - [OPTIONS] [COMMAND] <packages>
|
||||||
.SH SYNAPSES
|
.SH SYNAPSES
|
||||||
.P
|
.P
|
||||||
slpkg [-h|-v] [update] [upgrade] [build] [install] [download] [remove] [find] [view] [search] [clean-logs] [clean-tmp] --yes --jobs --resolve-off --reinstall --skip-installed
|
slpkg [-h|-v] [update] [upgrade] [check-updates] [build] [install] [download] [remove] [find] [view] [search] [clean-logs] [clean-tmp] --yes --jobs --resolve-off --reinstall --skip-installed
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.P
|
.P
|
||||||
Slpkg is a software package manager that installs, updates, and removes packages on Slackware based systems. It automatically computes dependencies and figures out what things should occur to install packages. Slpkg makes it easier to maintain groups of machines without having to manually update.
|
Slpkg is a software package manager that installs, updates, and removes packages on Slackware based systems. It automatically computes dependencies and figures out what things should occur to install packages. Slpkg makes it easier to maintain groups of machines without having to manually update.
|
||||||
|
@ -22,6 +22,11 @@ upgrade
|
||||||
Upgrade all the installed packages if the newer version exists in the repository.
|
Upgrade all the installed packages if the newer version exists in the repository.
|
||||||
.RE
|
.RE
|
||||||
.P
|
.P
|
||||||
|
check-updates
|
||||||
|
.RS
|
||||||
|
Check if there is any news on the SlackBuild's ChangeLog.txt file.
|
||||||
|
.RE
|
||||||
|
.P
|
||||||
build
|
build
|
||||||
.RS
|
.RS
|
||||||
Builds the Slackbuilds scripts and adds them to the /tmp directory.
|
Builds the Slackbuilds scripts and adds them to the /tmp directory.
|
||||||
|
|
|
@ -35,6 +35,7 @@ class Configs:
|
||||||
# SBo repository configs
|
# SBo repository configs
|
||||||
sbo_repo_url: str = 'http://slackbuilds.org/slackbuilds/15.0'
|
sbo_repo_url: str = 'http://slackbuilds.org/slackbuilds/15.0'
|
||||||
sbo_txt: str = 'SLACKBUILDS.TXT'
|
sbo_txt: str = 'SLACKBUILDS.TXT'
|
||||||
|
chglog_txt: str = 'ChangeLog.txt'
|
||||||
sbo_tar_suffix: str = '.tar.gz'
|
sbo_tar_suffix: str = '.tar.gz'
|
||||||
sbo_repo_tag: str = '_SBo'
|
sbo_repo_tag: str = '_SBo'
|
||||||
|
|
||||||
|
@ -74,6 +75,7 @@ class Configs:
|
||||||
# SBo repository details
|
# SBo repository details
|
||||||
sbo_repo_url: str = config['sbo_repo_url']
|
sbo_repo_url: str = config['sbo_repo_url']
|
||||||
sbo_txt: str = config['sbo_txt']
|
sbo_txt: str = config['sbo_txt']
|
||||||
|
chglog_txt: str = config['chglog_txt']
|
||||||
sbo_tar_suffix: str = config['sbo_tar_suffix']
|
sbo_tar_suffix: str = config['sbo_tar_suffix']
|
||||||
sbo_repo_tag: str = config['sbo_repo_tag']
|
sbo_repo_tag: str = config['sbo_repo_tag']
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ from slpkg.find_installed import FindInstalled
|
||||||
from slpkg.remove_packages import RemovePackages
|
from slpkg.remove_packages import RemovePackages
|
||||||
from slpkg.clean_logs import CleanLogsDependencies
|
from slpkg.clean_logs import CleanLogsDependencies
|
||||||
from slpkg.update_repository import UpdateRepository
|
from slpkg.update_repository import UpdateRepository
|
||||||
|
from slpkg.check_updates import CheckUpdates
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
|
@ -81,6 +82,15 @@ class Argparse:
|
||||||
raise SystemExit()
|
raise SystemExit()
|
||||||
usage(1)
|
usage(1)
|
||||||
|
|
||||||
|
def check_updates(self):
|
||||||
|
if len(self.args) == 1 and not self.flags:
|
||||||
|
self.check.database()
|
||||||
|
|
||||||
|
check = CheckUpdates()
|
||||||
|
check.updates()
|
||||||
|
raise SystemExit()
|
||||||
|
usage(1)
|
||||||
|
|
||||||
def build(self):
|
def build(self):
|
||||||
if len(self.args) >= 2 and '--reinstall' not in self.flags:
|
if len(self.args) >= 2 and '--reinstall' not in self.flags:
|
||||||
packages = list(set(self.args[1:]))
|
packages = list(set(self.args[1:]))
|
||||||
|
@ -219,6 +229,7 @@ def main():
|
||||||
'--version': argparse.version,
|
'--version': argparse.version,
|
||||||
'update': argparse.update,
|
'update': argparse.update,
|
||||||
'upgrade': argparse.upgrade,
|
'upgrade': argparse.upgrade,
|
||||||
|
'check-updates': argparse.check_updates,
|
||||||
'build': argparse.build,
|
'build': argparse.build,
|
||||||
'install': argparse.install,
|
'install': argparse.install,
|
||||||
'download': argparse.download,
|
'download': argparse.download,
|
||||||
|
|
|
@ -20,6 +20,7 @@ class UpdateRepository:
|
||||||
sbo_repo_path: str = Configs.sbo_repo_path
|
sbo_repo_path: str = Configs.sbo_repo_path
|
||||||
url: str = Configs.sbo_repo_url
|
url: str = Configs.sbo_repo_url
|
||||||
sbo_txt: str = Configs.sbo_txt
|
sbo_txt: str = Configs.sbo_txt
|
||||||
|
chglog_txt: str = Configs.chglog_txt
|
||||||
db_path: str = Configs.db_path
|
db_path: str = Configs.db_path
|
||||||
database: str = Configs.database
|
database: str = Configs.database
|
||||||
session: str = Session
|
session: str = Session
|
||||||
|
@ -27,12 +28,15 @@ class UpdateRepository:
|
||||||
def sbo(self):
|
def sbo(self):
|
||||||
print('Updating the package list...\n')
|
print('Updating the package list...\n')
|
||||||
self.delete_file(self.sbo_repo_path, self.sbo_txt)
|
self.delete_file(self.sbo_repo_path, self.sbo_txt)
|
||||||
|
self.delete_file(self.sbo_repo_path, self.chglog_txt)
|
||||||
self.delete_sbo_data()
|
self.delete_sbo_data()
|
||||||
|
|
||||||
sbo_repo_url = f'{self.url}/{self.sbo_txt}'
|
slackbuilds_txt = f'{self.url}/{self.sbo_txt}'
|
||||||
|
changelog_txt = f'{self.url}/{self.chglog_txt}'
|
||||||
|
|
||||||
wget = Wget()
|
wget = Wget()
|
||||||
wget.download(self.sbo_repo_path, sbo_repo_url)
|
wget.download(self.sbo_repo_path, slackbuilds_txt)
|
||||||
|
wget.download(self.sbo_repo_path, changelog_txt)
|
||||||
|
|
||||||
data = CreateData()
|
data = CreateData()
|
||||||
data.insert_sbo_table()
|
data.insert_sbo_table()
|
||||||
|
|
|
@ -21,6 +21,7 @@ def usage(status: int):
|
||||||
f'{BOLD}COMMANDS:{ENDC}',
|
f'{BOLD}COMMANDS:{ENDC}',
|
||||||
f' {RED}update{ENDC} Update the package lists.',
|
f' {RED}update{ENDC} Update the package lists.',
|
||||||
f' {CYAN}upgrade{ENDC} Upgrade all the packages.',
|
f' {CYAN}upgrade{ENDC} Upgrade all the packages.',
|
||||||
|
f' {CYAN}check-updates{ENDC} Check for news on ChangeLog.txt.',
|
||||||
f' {CYAN}build{ENDC} <packages> Build only the packages.',
|
f' {CYAN}build{ENDC} <packages> Build only the packages.',
|
||||||
f' {CYAN}install{ENDC} <packages> Build and install the packages.',
|
f' {CYAN}install{ENDC} <packages> Build and install the packages.',
|
||||||
f' {CYAN}download{ENDC} <packages> Download only the scripts and sources.',
|
f' {CYAN}download{ENDC} <packages> Download only the scripts and sources.',
|
||||||
|
|
Loading…
Add table
Reference in a new issue