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 56fc8d2 commit c5b7493
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 13 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/build-rpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,11 @@ jobs:

- name: Test some params
run: |
python3 /opt/linupdate/linupdate.py --help
python3 /opt/linupdate/linupdate.py --version
python3 /opt/linupdate/linupdate.py --check-updates
python3 /opt/linupdate/linupdate.py --profile container
python3 /opt/linupdate/linupdate.py --env test
/opt/linupdate/linupdate --help
/opt/linupdate/linupdate --version
/opt/linupdate/linupdate --check-updates
/opt/linupdate/linupdate --profile container
/opt/linupdate/linupdate --env test
# Try to install packages on latest Fedora
Expand Down Expand Up @@ -200,8 +200,8 @@ jobs:

- name: Test some params
run: |
python3 /opt/linupdate/linupdate.py --help
python3 /opt/linupdate/linupdate.py --version
python3 /opt/linupdate/linupdate.py --check-updates
python3 /opt/linupdate/linupdate.py --profile container
python3 /opt/linupdate/linupdate.py --env test
/opt/linupdate/linupdate --help
/opt/linupdate/linupdate --version
/opt/linupdate/linupdate --check-updates
/opt/linupdate/linupdate --profile container
/opt/linupdate/linupdate --env test
9 changes: 8 additions & 1 deletion mods-available/reposerver.mod
Original file line number Diff line number Diff line change
Expand Up @@ -1290,7 +1290,14 @@ function send_available_packages_status
# Cas Redhat
if [ "$OS_FAMILY" == "Redhat" ];then
# Récupération des paquets disponibles pour mise à jour
repoquery -q -a --qf="%{name} %{epoch}:%{version}-%{release}.%{arch}" --pkgnarrow=updates > "$AVAILABLE_PACKAGES_TMP"
if [ -f "$OS_VERSION" == "7" ];then
repoquery -q -a --qf="%{name} %{epoch}:%{version}-%{release}.%{arch}" --pkgnarrow=updates > "$AVAILABLE_PACKAGES_TMP"
elif [ -f "$OS_VERSION" == "8" ] || [ -f "$OS_VERSION" == "9" ];then
repoquery -q -a --qf="%{name} %{epoch}:%{version}-%{release}.%{arch}" --upgrades >> "$AVAILABLE_PACKAGES_TMP"
else
echo -e "[$RED ERROR $RESET] Could not find a suitable repoquery command for this system. Exiting."
return
fi
fi
# Cas Debian
if [ "$OS_FAMILY" == "Debian" ];then
Expand Down
7 changes: 5 additions & 2 deletions src/02_check-packages-before-update
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@ function checkPackagesBeforeUpdate

# List packages available for update
if [ "$OS_FAMILY" == "Redhat" ];then
if [ -f "/usr/bin/dnf" ];then
if [ -f "$OS_VERSION" == "7" ];then
repoquery -q -a --qf="%{name} %{version}-%{release}.%{arch} %{repoid}" --pkgnarrow=updates > "$CHECK_UPDATE_TMP"
elif [ -f "$OS_VERSION" == "8" ] || [ -f "$OS_VERSION" == "9" ];then
repoquery -q -a --qf="%{name} %{version}-%{release}.%{arch} %{repoid}" --upgrades >> "$CHECK_UPDATE_TMP"
else
repoquery -q -a --qf="%{name} %{version}-%{release}.%{arch} %{repoid}" --pkgnarrow=updates > "$CHECK_UPDATE_TMP"
echo -e "[$RED ERROR $RESET] Could not find a suitable repoquery command for this system. Exiting."
clean_exit
fi
fi
if [ "$OS_FAMILY" == "Debian" ];then
Expand Down

0 comments on commit c5b7493

Please sign in to comment.