• Re: dpkg database during postinst processing

    From Simon Richter@21:1/5 to Simon Richter on Mon Jul 29 10:50:01 2024
    Hi,

    On 7/29/24 17:27, Simon Richter wrote:

    Do I need to do anything special to get the current view, or should
    libdpkg provide a current view in any case?

    Nevermind, the modstatdb_open() call got lost in a rebase. Oof.

    Simon

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon Richter@21:1/5 to All on Mon Jul 29 10:40:01 2024
    Hi,

    I'm trying to look at the list of installed files from a program that
    uses libdpkg and runs as part of postinst processing.

    Simple test case is a package containing a single file /testfile, and a postinst "exec /bin/bash -i <>/dev/tty", installed into empty
    installation and database directories.

    Here, info/status is empty, and the new package can only be seen in updates/000*. When I now call ensure_allinstfiles_available(), the files installed with my package are not visible as namenodes.

    I'd assume it's the same for all files installed within the same
    transaction -- so I am seeing a slightly outdated view. For dpkg-divert,
    that is probably not a big problem (but might still be wrong), but if I
    want to check for file conflicts caused by aliasing, I absolutely need
    the view to be up-to-date.

    Do I need to do anything special to get the current view, or should
    libdpkg provide a current view in any case?

    Simon

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)