1 Star 0 Fork 58

majianhan/dnf

forked from src-openEuler/dnf 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-remove-oldinstallonly-when-no-old-installonly-packages-exit-with-0.patch 1.16 KB
一键复制 编辑 原始数据 按行查看 历史
From 87eb5a7a3561381b5ef5e70548f49288251300fc Mon Sep 17 00:00:00 2001
From: Pavla Kratochvilova <pkratoch@redhat.com>
Date: Fri, 5 Apr 2024 14:43:04 +0200
Subject: [PATCH] remove --oldinstallonly: when no old installonly packages,
exit with 0
If no old installonly packages are present, then the command succesfully
removed all of them and should exit with 0 and write the message to
stdout instead of stderr.
Conflict:NA
Reference:https://github.com/rpm-software-management/dnf/commit/87eb5a7a3561381b5ef5e70548f49288251300fc
---
dnf/cli/commands/remove.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dnf/cli/commands/remove.py b/dnf/cli/commands/remove.py
index af9622fdef..32e78d6d4d 100644
--- a/dnf/cli/commands/remove.py
+++ b/dnf/cli/commands/remove.py
@@ -124,8 +124,7 @@ def run(self):
for pkg in instonly:
self.base.package_remove(pkg)
else:
- raise dnf.exceptions.Error(
- _('No old installonly packages found for removal.'))
+ logger.info(_('No old installonly packages found for removal.'))
return
# Remove groups.
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/crawfordxx/dnf.git
git@gitee.com:crawfordxx/dnf.git
crawfordxx
dnf
dnf
master

搜索帮助