diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:30:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:30:09 +0000 |
commit | 3c05da1bdef2a6e2142b4fcac974e7e3fc0db93c (patch) | |
tree | 9532e637f47d6ff7246ccbabb62d4e2b4b5908df /src/main/help.c | |
parent | Adding debian version 1.22.6. (diff) | |
download | dpkg-3c05da1bdef2a6e2142b4fcac974e7e3fc0db93c.tar.xz dpkg-3c05da1bdef2a6e2142b4fcac974e7e3fc0db93c.zip |
Merging upstream version 1.22.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/main/help.c')
-rw-r--r-- | src/main/help.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/main/help.c b/src/main/help.c index 59e730e..c6abc8a 100644 --- a/src/main/help.c +++ b/src/main/help.c @@ -196,7 +196,7 @@ dir_has_conffiles(struct fsys_namenode *file, struct pkginfo *pkg) pkg_name(pkg, pnaw_always)); namelen = strlen(file->name); for (conff= pkg->installed.conffiles; conff; conff= conff->next) { - if (conff->obsolete || conff->remove_on_upgrade) + if (conffile_is_disappearing(conff)) continue; if (strncmp(file->name, conff->name, namelen) == 0 && strlen(conff->name) > namelen && conff->name[namelen] == '/') { @@ -272,6 +272,16 @@ dir_is_used_by_pkg(struct fsys_namenode *file, struct pkginfo *pkg, } /** + * Returns whether the conffile is disappearing, because it is obsolete + * or marked for removal on upgrade. + */ +bool +conffile_is_disappearing(struct conffile *conff) +{ + return conff->flags & (CONFFILE_OBSOLETE | CONFFILE_REMOVE_ON_UPGRADE); +} + +/** * Mark a conffile as obsolete. * * @param pkg The package owning the conffile. @@ -286,7 +296,7 @@ conffile_mark_obsolete(struct pkginfo *pkg, struct fsys_namenode *namenode) if (strcmp(conff->name, namenode->name) == 0) { debug(dbg_conff, "marking %s conffile %s as obsolete", pkg_name(pkg, pnaw_always), conff->name); - conff->obsolete = true; + conff->flags |= CONFFILE_OBSOLETE; return; } } |