Skip to content

Commit

Permalink
patch
Browse files Browse the repository at this point in the history
  • Loading branch information
lbr38 committed Jul 22, 2024
1 parent b828fe6 commit af6abfc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions mods-available/reposerver.mod
Original file line number Diff line number Diff line change
Expand Up @@ -1221,9 +1221,9 @@ function send_installed_packages_status
# Cas Redhat
if [ "$OS_FAMILY" == "Redhat" ];then
if [ -f "/usr/bin/dnf" ];then
dnf repoquery -a --installed --qf="%{name} %{epoch}:%{version}-%{release}.%{arch}" > "$INSTALLED_PACKAGES_TMP"
dnf repoquery -q -a --installed --qf="%{name} %{epoch}:%{version}-%{release}.%{arch}" > "$INSTALLED_PACKAGES_TMP"
else
repoquery -a --installed --qf="%{name} %{epoch}:%{version}-%{release}.%{arch}" > "$INSTALLED_PACKAGES_TMP"
repoquery -q -a --installed --qf="%{name} %{epoch}:%{version}-%{release}.%{arch}" > "$INSTALLED_PACKAGES_TMP"
fi
fi
# Cas Debian
Expand Down Expand Up @@ -1295,9 +1295,9 @@ function send_available_packages_status
if [ "$OS_FAMILY" == "Redhat" ];then
# Récupération des paquets disponibles pour mise à jour
if [ -f "/usr/bin/dnf" ];then
dnf repoquery --upgrades --latest-limit 1 -a --qf="%{name} %{epoch}:%{version}-%{release}.%{arch}" --upgrades >> "$CHECK_UPDATE_TMP"
dnf repoquery -q --upgrades --latest-limit 1 -a --qf="%{name} %{epoch}:%{version}-%{release}.%{arch}" --upgrades > "$AVAILABLE_PACKAGES_TMP"
else
repoquery -a --qf="%{name} %{epoch}:%{version}-%{release}.%{arch}" --pkgnarrow=updates > "$CHECK_UPDATE_TMP"
repoquery -q -a --qf="%{name} %{epoch}:%{version}-%{release}.%{arch}" --pkgnarrow=updates > "$AVAILABLE_PACKAGES_TMP"
fi
fi
# Cas Debian
Expand Down
6 changes: 4 additions & 2 deletions src/02_check-packages-before-update
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,17 @@ function checkPackagesBeforeUpdate
apt-get clean && apt-get -qq --allow-releaseinfo-change update
fi

echo -e "\n Generating packages list..."

# Temporary file to work with
CHECK_UPDATE_TMP="/tmp/linupdate_check-update.tmp"

# List packages available for update
if [ "$OS_FAMILY" == "Redhat" ];then
if [ -f "/usr/bin/dnf" ];then
dnf repoquery --upgrades --latest-limit 1 -a --qf="%{name} %{version}-%{release}.%{arch} %{repoid}" --upgrades >> "$CHECK_UPDATE_TMP"
dnf repoquery -q --upgrades --latest-limit 1 -a --qf="%{name} %{version}-%{release}.%{arch} %{repoid}" --upgrades >> "$CHECK_UPDATE_TMP"
else
repoquery -a --qf="%{name} %{version}-%{release}.%{arch} %{repoid}" --pkgnarrow=updates > "$CHECK_UPDATE_TMP"
repoquery -q -a --qf="%{name} %{version}-%{release}.%{arch} %{repoid}" --pkgnarrow=updates > "$CHECK_UPDATE_TMP"
fi
fi
if [ "$OS_FAMILY" == "Debian" ];then
Expand Down

0 comments on commit af6abfc

Please sign in to comment.