getInfo 2.36.4

This commit is contained in:
kyodev 2017-11-17 08:46:22 +01:00
parent 8ef5ae691c
commit 1f6adc779e
2 changed files with 10 additions and 9 deletions

View File

@ -1,6 +1,6 @@
#!/bin/bash
version=2.36.3
version=2.36.4
date="17/11/2017"
projet="simpledeb"
contact="IRC freenode ##sdeb ou https://framagit.org/kyodev/kyopages/issues/"
@ -1360,7 +1360,7 @@ fi_pkg_apt(){ #v3 17/11/2017
# => upgradable_qte [0]=upgraded, [1]=notUpgraded
[ "${upgradable_qte[0]}" -gt 1 ] && pluriel="s" || unset pluriel
upgrade_comment="${upgradable_qte[0]} paquet"$pluriel" à mettre à jour"
[ "${upgradable_qte[0]}" -eq 0 ] && upgrade_comment=${upgrade_comment/aucun }
[ "${upgradable_qte[0]}" -eq 0 ] && upgrade_comment=${upgrade_comment/0 /aucun }
if [ "${upgradable_qte[0]}" -gt 0 ]; then # upgraded
# upgrade
upgrade=$( grep '^Inst' <<< "$stock_upgd" )
@ -1392,7 +1392,7 @@ fi_pkg_apt(){ #v3 17/11/2017
toRemove=$( sed '/newly/d' <<< "$toRemove" ) # suppression ligne état
[ "$toRemove_qte" -gt 1 ] && pluriel="s" || unset pluriel
toRemove_comment="$toRemove_qte paquet"$pluriel" non nécessaire"$pluriel
[ "$toRemove_qte" -eq 0 ] && toRemove_comment=${toRemove_comment/aucun }
[ "$toRemove_qte" -eq 0 ] && toRemove_comment=${toRemove_comment/0 /aucun }
if [ "$toRemove_qte" -gt 0 ]; then
toRemove=$( sed -E '/^Remv/!d; s/\[.*\]//g; s/Remv //' <<< $toRemove | tr '\n' ' ' )
toRemove=${toRemove// / }
@ -1409,7 +1409,7 @@ fi_pkg_apt(){ #v3 17/11/2017
non_ii_qte=$( f__wcv -l "$non_ii" )
[ "$non_ii_qte" -gt 1 ] && pluriel="s" || unset pluriel
non_ii_comment="$non_ii_qte paquet"$pluriel" dans un état non standard"
[ "$non_ii_qte" -eq 0 ] && non_ii_comment=${non_ii_comment/aucun }
[ "$non_ii_qte" -eq 0 ] && non_ii_comment=${non_ii_comment/0 /aucun }
if [ "$non_ii_qte" -gt 0 ]; then
# extraction différents états constatés
while read etat ligne ; do
@ -1438,15 +1438,15 @@ fi_pkg_apt(){ #v3 17/11/2017
alert_non_ii="les paquets dans un état 'rc' (fichiers de configuration restants) "
alert_non_ii+="peuvent être purgés avec: \n"
alert_non_ii+="\`dpkg --purge \$(dpkg -l | awk '/^rc/{print \$2}'\`) \n\n"
alert_non_ii+="les paquets dans un autre état peuvent éventuellement être purgés avec précaution, "
alert_non_ii+="selon l\'état"
alert_non_ii+="les paquets dans un autre état doivent être examinés avec précaution \n"
alert_non_ii+="un paquet _hi_ indique juste un paquet épinglé (hold)"
fi
if [ "$( f__cmd_exist deborphan )" ]; then
deborphan=$( deborphan -P )
deborphan_qte=$( f__wcv "-l" "$deborphan" )
[ "$deborphan_qte" -gt 1 ] && pluriel="s" || unset pluriel
deborphan_comment="$deborphan_qte bibliothèque"$pluriel" orpheline"$pluriel
[ "$deborphan_qte" -eq 0 ] && deborphan_comment=${deborphan_comment/aucune }
[ "$deborphan_qte" -eq 0 ] && deborphan_comment=${deborphan_comment/0 /aucune }
if [ "$deborphan_qte" -gt 0 ]; then
alert_deborphan="bibliothèque"$pluriel" orpheline"$pluriel", suppression possible: \n"
alert_deborphan+='`apt remove \$(deborphan)` \n'
@ -1455,9 +1455,10 @@ fi_pkg_apt(){ #v3 17/11/2017
fi
holded=$( apt-mark showhold )
holded_qte=$( f__wcv "-l" "$holded" )
[ "$holded" ] && holded=$( sort <<< $holded | tr '\n' ' ' )
[ "$holded_qte" -gt 1 ] && pluriel="s" || unset pluriel
holded_comment="$holded_qte paquet"$pluriel" épinglé"$pluriel
[ "$holded_qte" -eq 0 ] && holded_comment=${holded_comment/0/aucun }
[ "$holded_qte" -eq 0 ] && holded_comment=${holded_comment/0 /aucun }
###
text="## gestion de paquets **${fg_pkg_mgr#*:}** \n\n"
text+="* nombre de paquets installés: **$nb_packages** \n"

View File

@ -5,7 +5,7 @@
## 2.36.3 17/11/2017
## 2.36.4 17/11/2017
* fix mineurs: fi_pkg_apt