dpkg database during postinst processing

Simon Richter <[email protected]>
Newsgroups gmane.linux.debian.devel.dpkg.general
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.