This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=560574b55a543d3d0a0f4e8abf0ae42f46d2a2f1

commit 560574b55a543d3d0a0f4e8abf0ae42f46d2a2f1
Author: Guillem Jover <guil...@debian.org>
AuthorDate: Sat Jan 29 20:29:33 2022 +0100

    libdpkg: Do not restrict source:* virtual fields to installed packages
    
    Initially the code was not handling missing data properly. It got changed
    in two ways, in commit 536a38582a2d92da84f82d850e22f581b00d2082 it was
    first restricted to only operate on installed packages, which regressed
    support for dpkg-deb show format, and then the code was made robust
    against such missing data (which was really the only correct and necessary
    part to the fix) in commit 9022f9e0ffc58425c6798ff62e797f4026a29fe9.
    
    Fixes: commit 536a38582a2d92da84f82d850e22f581b00d2082
    Closes: #1004372
    Stable-Candidate: 1.20.x
---
 lib/dpkg/pkg-format.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/lib/dpkg/pkg-format.c b/lib/dpkg/pkg-format.c
index 48966c4e0..84052a7f1 100644
--- a/lib/dpkg/pkg-format.c
+++ b/lib/dpkg/pkg-format.c
@@ -333,9 +333,6 @@ virt_source_package(struct varbuf *vb,
        const char *name;
        size_t len;
 
-       if (pkg->status == PKG_STAT_NOTINSTALLED)
-               return;
-
        name = pkgbin->source;
        if (name == NULL)
                name = pkg->set->name;
@@ -350,9 +347,6 @@ virt_source_version(struct varbuf *vb,
                     const struct pkginfo *pkg, const struct pkgbin *pkgbin,
                     enum fwriteflags flags, const struct fieldinfo *fip)
 {
-       if (pkg->status == PKG_STAT_NOTINSTALLED)
-               return;
-
        varbuf_add_source_version(vb, pkg, pkgbin);
 }
 
@@ -363,9 +357,6 @@ virt_source_upstream_version(struct varbuf *vb,
 {
        struct dpkg_version version;
 
-       if (pkg->status == PKG_STAT_NOTINSTALLED)
-               return;
-
        pkg_source_version(&version, pkg, pkgbin);
 
        varbuf_add_str(vb, version.version);

-- 
Dpkg.Org's dpkg

Reply via email to