mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-10 20:01:54 +01:00
Merge branch 'develop'
This commit is contained in:
commit
1b086c342e
12 changed files with 24 additions and 35 deletions
|
@ -1,5 +1,11 @@
|
||||||
|
4.1.5 - 9/9/2022
|
||||||
|
Updated:
|
||||||
|
- Rename config files to .yml
|
||||||
|
Bugfixed:
|
||||||
|
- Show version to noarch packages
|
||||||
|
|
||||||
4.1.4 - 17/07/2022
|
4.1.4 - 17/07/2022
|
||||||
-Added
|
Added:
|
||||||
- setup.cfg file
|
- setup.cfg file
|
||||||
- Option to upgrade sbo packages
|
- Option to upgrade sbo packages
|
||||||
|
|
||||||
|
|
|
@ -30,8 +30,8 @@ Install from the official third-party `SBo repository <https://slackbuilds.org/r
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
$ tar xvf slpkg-4.1.4.tar.gz
|
$ tar xvf slpkg-4.1.5.tar.gz
|
||||||
$ cd slpkg-4.1.4
|
$ cd slpkg-4.1.5
|
||||||
$ ./install.sh
|
$ ./install.sh
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
blacklist:
|
|
||||||
packages: []
|
|
|
@ -1,22 +0,0 @@
|
||||||
configs:
|
|
||||||
os_arch: x86_64
|
|
||||||
tmp_path: /tmp
|
|
||||||
tmp_slpkg: /tmp/slpkg
|
|
||||||
build_path: /tmp/slpkg/build
|
|
||||||
lib_path: /var/lib/slpkg
|
|
||||||
etc_path: /etc/slpkg
|
|
||||||
db_path: /var/lib/slpkg/database
|
|
||||||
sbo_repo_path: /var/lib/slpkg/repository
|
|
||||||
log_packages: /var/log/packages
|
|
||||||
database: database.slpkg
|
|
||||||
repo_version: 15.0
|
|
||||||
sbo_url: http://slackbuilds.org/slackbuilds/15.0
|
|
||||||
sbo_txt: SLACKBUILDS.TXT
|
|
||||||
tar_suffix: .tar.gz
|
|
||||||
pkg_suffix: .tgz
|
|
||||||
repo_tag: _SBo
|
|
||||||
installpkg: upgradepkg --install-new
|
|
||||||
reinstall: upgradepkg --reinstall
|
|
||||||
removepkg: removepkg
|
|
||||||
colors: on
|
|
||||||
wget_options: -c -N
|
|
|
@ -1,6 +1,6 @@
|
||||||
[metadata]
|
[metadata]
|
||||||
name = slpkg
|
name = slpkg
|
||||||
version = 4.1.4
|
version = 4.1.5
|
||||||
license_file = LICENSE
|
license_file = LICENSE
|
||||||
author = Dimitris Zlatanidis
|
author = Dimitris Zlatanidis
|
||||||
author_email = d.zlatanidis@gmail.com
|
author_email = d.zlatanidis@gmail.com
|
||||||
|
|
|
@ -8,8 +8,8 @@ config() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
config etc/slpkg/slpkg.yaml.new
|
config etc/slpkg/slpkg.yml.new
|
||||||
config etc/slpkg/blacklist.yaml.new
|
config etc/slpkg/blacklist.yml.new
|
||||||
|
|
||||||
if [ -x /usr/bin/update-desktop-database ]; then
|
if [ -x /usr/bin/update-desktop-database ]; then
|
||||||
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
|
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
|
||||||
|
|
|
@ -98,8 +98,8 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr
|
||||||
|
|
||||||
# install configuration files
|
# install configuration files
|
||||||
mkdir -p $PKG/etc/slpkg
|
mkdir -p $PKG/etc/slpkg
|
||||||
install -D -m0644 configs/slpkg.yaml $PKG/etc/slpkg/slpkg.yaml.new
|
install -D -m0644 configs/slpkg.yml $PKG/etc/slpkg/slpkg.yml.new
|
||||||
install -D -m0644 configs/blacklist.yaml $PKG/etc/slpkg/blacklist.yaml.new
|
install -D -m0644 configs/blacklist.yml $PKG/etc/slpkg/blacklist.yml.new
|
||||||
|
|
||||||
mkdir -p $PKG/usr/man/man1
|
mkdir -p $PKG/usr/man/man1
|
||||||
cp man/slpkg.1 $PKG/usr/man/man1
|
cp man/slpkg.1 $PKG/usr/man/man1
|
||||||
|
|
|
@ -15,7 +15,7 @@ class Blacklist:
|
||||||
etc_path: str = Configs.etc_path
|
etc_path: str = Configs.etc_path
|
||||||
|
|
||||||
def get(self):
|
def get(self):
|
||||||
file = f'{self.etc_path}/blacklist.yaml'
|
file = f'{self.etc_path}/blacklist.yml'
|
||||||
if os.path.isfile(file):
|
if os.path.isfile(file):
|
||||||
with open(file, 'r') as black:
|
with open(file, 'r') as black:
|
||||||
return yaml.safe_load(black)['blacklist']['packages']
|
return yaml.safe_load(black)['blacklist']['packages']
|
||||||
|
|
|
@ -53,7 +53,7 @@ class Configs:
|
||||||
os.makedirs(build_path)
|
os.makedirs(build_path)
|
||||||
|
|
||||||
''' Overwrite with user configuration. '''
|
''' Overwrite with user configuration. '''
|
||||||
config_file: str = f'{etc_path}/{prog_name}.yaml'
|
config_file: str = f'{etc_path}/{prog_name}.yml'
|
||||||
if os.path.isfile(config_file):
|
if os.path.isfile(config_file):
|
||||||
with open(config_file, 'r') as conf:
|
with open(config_file, 'r') as conf:
|
||||||
configs = yaml.safe_load(conf)
|
configs = yaml.safe_load(conf)
|
||||||
|
|
|
@ -68,6 +68,10 @@ class Argparse:
|
||||||
upgrade = Upgrade()
|
upgrade = Upgrade()
|
||||||
packages = list(upgrade.packages())
|
packages = list(upgrade.packages())
|
||||||
|
|
||||||
|
if not packages:
|
||||||
|
print('\nEverything is up-to-date.\n')
|
||||||
|
raise SystemExit()
|
||||||
|
|
||||||
install = Slackbuilds(packages, self.flags, install=True)
|
install = Slackbuilds(packages, self.flags, install=True)
|
||||||
install.execute()
|
install.execute()
|
||||||
raise SystemExit()
|
raise SystemExit()
|
||||||
|
|
|
@ -10,7 +10,7 @@ from slpkg.configs import Configs
|
||||||
@dataclass
|
@dataclass
|
||||||
class Version:
|
class Version:
|
||||||
prog_name: str = Configs.prog_name
|
prog_name: str = Configs.prog_name
|
||||||
version_info: tuple = (4, 1, 4)
|
version_info: tuple = (4, 1, 5)
|
||||||
version: str = '{0}.{1}.{2}'.format(*version_info)
|
version: str = '{0}.{1}.{2}'.format(*version_info)
|
||||||
license: str = 'MIT License'
|
license: str = 'MIT License'
|
||||||
author: str = 'dslackw'
|
author: str = 'dslackw'
|
||||||
|
|
|
@ -95,6 +95,9 @@ class ViewMessage:
|
||||||
if '--reinstall' in self.flags:
|
if '--reinstall' in self.flags:
|
||||||
install, set_color = 'upgrade', color['YELLOW']
|
install, set_color = 'upgrade', color['YELLOW']
|
||||||
|
|
||||||
|
if installed and 'noarch' in installed:
|
||||||
|
self.arch = 'noarch'
|
||||||
|
|
||||||
if installed:
|
if installed:
|
||||||
print(f'[{set_color} {install} {color["ENDC"]}] -> '
|
print(f'[{set_color} {install} {color["ENDC"]}] -> '
|
||||||
f'{sbo}-{version} {set_color}'
|
f'{sbo}-{version} {set_color}'
|
||||||
|
|
Loading…
Reference in a new issue