Skip to content

Commit

Permalink
Merge pull request #186 from icy/release-v3.0.3
Browse files Browse the repository at this point in the history
pacapt(v3.0.3): preparation
  • Loading branch information
icy authored Jul 13, 2021
2 parents 4ad6c45 + 6327f75 commit 19ad0e3
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 25 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## v3.0.3

Minor bug fixes and features added.
More development improvements.
This release is mainly driven by @mondeja.

* Add architecture documentation
* `lib/apk/Qe`: Add (credit: @mondeja)
* `lib/dpkg/Sg`: Add (credit: @mondeja)
* `lib/yum`: Minor fixes (credit: @mondeja)
* `lib/yum/Sg`: Add (credit: @mondeja)
* `lib/zypper/Sg`: Add (credit: @mondeja)
* `tests/yum`: Add (credit: @mondeja)
* Add CI support on Github-Action for many package managers
(`dnf`, `yum`, `homebrew`, `pkgng`, `sun_tools`)

## v3.0.2

* `tests/apk`: Add tests (Credit: @mondeja)
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ A long list of options and operations can be found from [`ArchLinux`'s wiki](htt

```
Q Qc Qe Qi Qk Ql Qm Qo Qp Qs Qu R Rn Rns Rs S Sc Scc Sccc Sg Si Sii Sl Ss Su Suy Sy U
apk ~ * * * * * * * * * * * * * * * * * * * * *
apk ~ * * * * * * * * * * * * * * * * * * * * * *
cave * * * * * * * * * * * * * * x * * * * * x
conda * * * * * * *
dnf ~ * * * * * * * * * * * * * * * * * * * * * *
dnf ~ * * * * * * * * * * * * * * * * * * * * * * *
dpkg ~ * * * * * * * * * * * * ~ * * * * * * * * * * * *
homebrew * * * * * * * * * * * * * * * *
macports * * * * * ~ * * * * * * * *
Expand All @@ -129,7 +129,7 @@ sun_tools * * * * * *
swupd * * * * * * * * *
tazpkg * * * * * * * * * * * * *
tlmgr * * * * * * * * * *
yum * * * * * * * * * * * * * * * * * * * * * *
yum * * * * * * * * * * * * * * * * * * * * * * *
zypper * * * * * * * * * * * * * * * * * * * * * * * * * *
```

Expand Down
63 changes: 41 additions & 22 deletions pacapt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Purpose: A wrapper for all Unix package managers
# License: Fair license (http://www.opensource.org/licenses/fair)
# Source : http://github.com/icy/pacapt/
# Version: 3.0.2
# Version: 3.0.3
# Authors: Anh K. Huynh et al.

# Copyright (C) 2010 - 2021 \
Expand Down Expand Up @@ -46,7 +46,7 @@

_print_pacapt_version() {
cat <<_EOF_
pacapt version '3.0.2'
pacapt version '3.0.3'
Copyright (C) 2010 - 2021 \\
| 10sr (10sr)
Expand Down Expand Up @@ -87,7 +87,7 @@ DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
_EOF_
}

export PACAPT_VERSION='3.0.2'
export PACAPT_VERSION='3.0.3'

_help() {
cat <<'EOF'
Expand Down Expand Up @@ -505,6 +505,10 @@ apk_Q() {
esac
}

apk_Qe() {
apk info | grep -x -f /etc/apk/world
}

apk_Qi() {
if [ "$#" -eq 0 ]; then
# shellcheck disable=SC2046
Expand Down Expand Up @@ -846,7 +850,11 @@ dnf_Sccc() {
}

dnf_Si() {
dnf info "$@" && dnf repoquery --deplist "$@"
dnf repoquery --requires --resolve "$@"
}

dnf_Sii() {
dnf repoquery --installed --whatrequires "$@"
}

dnf_Sg() {
Expand Down Expand Up @@ -967,10 +975,7 @@ dpkg_Qe() {
}

dpkg_Qk() {
if ! command -v debsums > /dev/null 2>&1; then
_die "pacapt: debsums binary does not exist in system."
fi

_require_programs debsums
debsums "$@"
}

Expand Down Expand Up @@ -1040,6 +1045,16 @@ dpkg_R() {
apt-get remove "$@"
}

dpkg_Sg() {
_require_programs tasksel

if [ $# -gt 0 ]; then
tasksel --task-packages "$@"
else
tasksel --list-task
fi
}

dpkg_Si() {
apt-cache show "$@"
}
Expand Down Expand Up @@ -1106,17 +1121,10 @@ _homebrew_init() {
:
}





homebrew_Qi() {
brew info "$@"
}




homebrew_Ql() {
local_casks=
local_forumlas=
Expand Down Expand Up @@ -1162,7 +1170,6 @@ homebrew_Qs() {
}



homebrew_Qc() {
brew log "$@"
}
Expand Down Expand Up @@ -1220,9 +1227,6 @@ homebrew_Scc() {
homebrew_Sccc() {
# See more discussion in
# https://github.com/icy/pacapt/issues/47

local_dcache

local_dcache="$(brew --cache)"
case "$local_dcache" in
""|"/"|" ")
Expand Down Expand Up @@ -1521,7 +1525,8 @@ pkgng_Scc() {
}

pkgng_S() {
if [ "$_TOPT" = "fetch" ]; then
# shellcheck disable=SC2153
if [ "$_EOPT" = "fetch" ]; then
pkg fetch "$@"
else
pkg install "$@"
Expand Down Expand Up @@ -2135,8 +2140,17 @@ yum_R() {
yum erase "$@"
}

yum_Sg() {
if [ $# -eq 0 ]; then
yum grouplist hidden
else
yum groups info "$@"
fi
}

yum_Si() {
yum info "$@"
_require_programs repoquery
repoquery --requires --resolve "$@"
}

yum_Suy() {
Expand Down Expand Up @@ -2177,7 +2191,8 @@ yum_U() {
}

yum_Sii() {
yum resolvedep "$@"
_require_programs repoquery
repoquery --installed --whatrequires "$@"
}


Expand Down Expand Up @@ -2359,6 +2374,7 @@ zypper_U() {
_validate_operation() {
case "$1" in
"apk_Q") ;;
"apk_Qe") ;;
"apk_Qi") ;;
"apk_Ql") ;;
"apk_Qo") ;;
Expand Down Expand Up @@ -2413,6 +2429,7 @@ _validate_operation() {
"dnf_Scc") ;;
"dnf_Sccc") ;;
"dnf_Si") ;;
"dnf_Sii") ;;
"dnf_Sg") ;;
"dnf_Sl") ;;
"dnf_Ss") ;;
Expand Down Expand Up @@ -2445,6 +2462,7 @@ _validate_operation() {
"dpkg_Rn") ;;
"dpkg_Rns") ;;
"dpkg_R") ;;
"dpkg_Sg") ;;
"dpkg_Si") ;;
"dpkg_Suy") ;;
"dpkg_Su") ;;
Expand Down Expand Up @@ -2602,6 +2620,7 @@ _validate_operation() {
"yum_Qm") ;;
"yum_Rs") ;;
"yum_R") ;;
"yum_Sg") ;;
"yum_Si") ;;
"yum_Suy") ;;
"yum_Su") ;;
Expand Down

0 comments on commit 19ad0e3

Please sign in to comment.