1 Star 0 Fork 58

李月/dnf

forked from src-openEuler/dnf 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
fix-unload-plugins-behavior-without-filelists.patch 971 Bytes
一键复制 编辑 原始数据 按行查看 历史
From 73a42eaadc292918a6e2b692d46e78dfa6571a29 Mon Sep 17 00:00:00 2001
From: liyue01 <liyue01@kylinos.cn>
Date: Mon, 29 Jul 2024 16:07:40 +0800
Subject: [PATCH] Fix unload plugins behavior without filelists
---
dnf/plugin.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dnf/plugin.py b/dnf/plugin.py
index d2f46ce..6ab71c2 100644
--- a/dnf/plugin.py
+++ b/dnf/plugin.py
@@ -29,6 +29,7 @@ import inspect
import logging
import operator
import os
+import rpm
import sys
import traceback
@@ -193,7 +194,7 @@ class Plugins(object):
# check whether removed plugin file is added at the same time (upgrade of a plugin)
for pkg in transaction.install_set:
- erased_plugin_files.difference_update(pkg.files)
+ erased_plugin_files.difference_update(pkg._header[rpm.RPMTAG_FILENAMES])
# unload plugins that were removed in transaction
for plugin_file in erased_plugin_files:
--
2.27.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/llyue/dnf.git
git@gitee.com:llyue/dnf.git
llyue
dnf
dnf
master

搜索帮助