From ad91eca57d8b1c27ceba5d04549e4135dfa181cc Mon Sep 17 00:00:00 2001 From: icymatter Date: Tue, 6 Jul 2021 17:20:14 +0200 Subject: [PATCH 1/2] pacapt(v3.0.3): preparation --- CHANGELOG.md | 10 ++++++++++ README.md | 2 +- pacapt | 44 ++++++++++++++++++++++++-------------------- 3 files changed, 35 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f40077db..f3f909f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## v3.0.3 + +* Add architecture documentation +* `lib/apk/Qe`: Add (credit: @mondeja) +* `lib/dpkg/Sg`: Add (credit: @mondeja) +* `lib/yum`: Minor fixes (credit: @mondeja) +* `libe/homebrew`: Minor bug fix +* `tets/yum`: Add (credit: @mondeja) +* `tests/homebrew`: Add CI support on Github-Action + ## v3.0.2 * `tests/apk`: Add tests (Credit: @mondeja) diff --git a/README.md b/README.md index b6711fc2..17c75ef7 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,7 @@ 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 ~ * * * * * * * * * * * * * * * * * * * * * * diff --git a/pacapt b/pacapt index b904d30d..d06b7872 100755 --- a/pacapt +++ b/pacapt @@ -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 \ @@ -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) @@ -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' @@ -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 @@ -967,10 +971,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 "$@" } @@ -1040,6 +1041,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 "$@" } @@ -1106,17 +1117,10 @@ _homebrew_init() { : } - - - - homebrew_Qi() { brew info "$@" } - - - homebrew_Ql() { local_casks= local_forumlas= @@ -1162,7 +1166,6 @@ homebrew_Qs() { } - homebrew_Qc() { brew log "$@" } @@ -1220,9 +1223,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 ""|"/"|" ") @@ -2136,7 +2136,8 @@ yum_R() { } yum_Si() { - yum info "$@" + _require_programs repoquery + repoquery --requires --resolve "$@" } yum_Suy() { @@ -2177,7 +2178,8 @@ yum_U() { } yum_Sii() { - yum resolvedep "$@" + _require_programs repoquery + repoquery --installed --whatrequires "$@" } @@ -2359,6 +2361,7 @@ zypper_U() { _validate_operation() { case "$1" in "apk_Q") ;; + "apk_Qe") ;; "apk_Qi") ;; "apk_Ql") ;; "apk_Qo") ;; @@ -2445,6 +2448,7 @@ _validate_operation() { "dpkg_Rn") ;; "dpkg_Rns") ;; "dpkg_R") ;; + "dpkg_Sg") ;; "dpkg_Si") ;; "dpkg_Suy") ;; "dpkg_Su") ;; From 3b84460805decf2aaadd7e4b63e68e134b51e80f Mon Sep 17 00:00:00 2001 From: icymatter Date: Tue, 13 Jul 2021 20:40:31 +0200 Subject: [PATCH 2/2] pacapt(v3.0.3): new release preparation --- CHANGELOG.md | 12 +++++++++--- README.md | 4 ++-- pacapt | 19 +++++++++++++++++-- 3 files changed, 28 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f3f909f2..bce0c07a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,18 @@ ## 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) -* `libe/homebrew`: Minor bug fix -* `tets/yum`: Add (credit: @mondeja) -* `tests/homebrew`: Add CI support on Github-Action +* `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 diff --git a/README.md b/README.md index 17c75ef7..1943d0b2 100644 --- a/README.md +++ b/README.md @@ -117,7 +117,7 @@ A long list of options and operations can be found from [`ArchLinux`'s wiki](htt apk ~ * * * * * * * * * * * * * * * * * * * * * * cave * * * * * * * * * * * * * * x * * * * * x conda * * * * * * * - dnf ~ * * * * * * * * * * * * * * * * * * * * * * + dnf ~ * * * * * * * * * * * * * * * * * * * * * * * dpkg ~ * * * * * * * * * * * * ~ * * * * * * * * * * * * homebrew * * * * * * * * * * * * * * * * macports * * * * * ~ * * * * * * * * @@ -129,7 +129,7 @@ sun_tools * * * * * * swupd * * * * * * * * * tazpkg * * * * * * * * * * * * * tlmgr * * * * * * * * * * - yum * * * * * * * * * * * * * * * * * * * * * * + yum * * * * * * * * * * * * * * * * * * * * * * * zypper * * * * * * * * * * * * * * * * * * * * * * * * * * ``` diff --git a/pacapt b/pacapt index d06b7872..6e85cb89 100755 --- a/pacapt +++ b/pacapt @@ -850,7 +850,11 @@ dnf_Sccc() { } dnf_Si() { - dnf info "$@" && dnf repoquery --deplist "$@" + dnf repoquery --requires --resolve "$@" +} + +dnf_Sii() { + dnf repoquery --installed --whatrequires "$@" } dnf_Sg() { @@ -1521,7 +1525,8 @@ pkgng_Scc() { } pkgng_S() { - if [ "$_TOPT" = "fetch" ]; then + # shellcheck disable=SC2153 + if [ "$_EOPT" = "fetch" ]; then pkg fetch "$@" else pkg install "$@" @@ -2135,6 +2140,14 @@ yum_R() { yum erase "$@" } +yum_Sg() { + if [ $# -eq 0 ]; then + yum grouplist hidden + else + yum groups info "$@" + fi +} + yum_Si() { _require_programs repoquery repoquery --requires --resolve "$@" @@ -2416,6 +2429,7 @@ _validate_operation() { "dnf_Scc") ;; "dnf_Sccc") ;; "dnf_Si") ;; + "dnf_Sii") ;; "dnf_Sg") ;; "dnf_Sl") ;; "dnf_Ss") ;; @@ -2606,6 +2620,7 @@ _validate_operation() { "yum_Qm") ;; "yum_Rs") ;; "yum_R") ;; + "yum_Sg") ;; "yum_Si") ;; "yum_Suy") ;; "yum_Su") ;;