Control: severity -1 wishlist Hi,
RC bug as an attention grubber is OK but let's not use it until it is proven to be so. Let's continue discussion first. Also, before making noise on d-devel@l.d.o to discuss this package and the use of Pre-Depends, let's distill issues. I still need more clarification on "should" and "own" mentioned below. Let's discuss. I still see APT warning in your updated test install log. > W: Download is performed unsandboxed as root as file > '//debian-reference-de_2.126_all.deb' couldn't be accessed by user '_apt'. - > pkgAcquire::Run (13: Permission denied) > Selecting previously unselected package debian-reference-de. > (Reading database ... 6748 files and directories currently installed.) > Preparing to unpack debian-reference-de_2.126_all.deb ... Are you insisting that "Preparing to unpack" process run under warned condition is a valid test case to warrant declaring pre-depends against the policy guidance. "Preparing to unpack" runs preinst in advance. If this process is run by _apt, it may be unable to find preinst and skipped. This may be the case in your test case due to this permission problem. > Unpacking debian-reference-de (2.126) ... It looks like it failed since preinst script was skipped when it really meant to be executed. > > osamu@goofy:~/salsa/debian-reference/test 00:11:28 ↵ > > $ sudo dpkg --unpack --auto-deconfigure debian-reference-de_2.126_all.deb > > (Reading database ... 636494 files and directories currently installed.) > > Preparing to unpack debian-reference-de_2.126_all.deb ... > > Unpacking debian-reference-de (2.126) over (2.100) ... > > Processing triggers for doc-base (0.11.1) ... > > Processing 1 changed doc-base file... > > osamu@goofy:~/salsa/debian-reference/test 00:13:12 ↵ > > This is closely following my reproducer. At this point, the damage > should be there. Whilst, debian-reference-de.preinst attempts to perform > the link to directory conversion, the link is owned by the "wrong" > package and hence the helper does not act. At this point, dpkg --verify > should tell you about missing files. > You say "should". But really? I don't see such problem in my test case since debian-reference-de.preinst is accessible and executed. Here is the situation: > osamu@goofy:~/salsa/debian-reference/test 10:19:23 ↵ > $ sudo dpkg --unpack --auto-deconfigure debian-reference-de_2.126_all.deb > (Reading database ... 636574 files and directories currently installed.) > Preparing to unpack debian-reference-de_2.126_all.deb ... > Unpacking debian-reference-de (2.126) over (2.126) ... > Processing triggers for doc-base (0.11.1) ... > Processing 1 changed doc-base file... > osamu@goofy:~/salsa/debian-reference/test 10:21:20 ↵ > $ ls -l /usr/share/doc/debian-reference-common/ > total 24 > -rw-r--r-- 1 root root 6616 Apr 24 11:18 changelog.gz > -rw-r--r-- 1 root root 1430 Apr 24 11:18 copyright > drwxr-xr-x 1 root root 548 Apr 29 10:20 docs > -rw-r--r-- 1 root root 8893 Apr 24 11:18 README.md.gz > osamu@goofy:~/salsa/debian-reference/test 10:21:28 ↵ > $ ls -l /usr/share/doc/debian-reference-common/docs > total 4136 > -rw-r--r-- 1 root root 11784 Apr 24 11:18 apa.de.html > -rw-r--r-- 1 root root 312453 Apr 24 11:18 ch01.de.html > -rw-r--r-- 1 root root 338061 Apr 24 11:18 ch02.de.html > -rw-r--r-- 1 root root 97281 Apr 24 11:18 ch03.de.html > -rw-r--r-- 1 root root 91827 Apr 24 11:18 ch04.de.html > -rw-r--r-- 1 root root 105029 Apr 24 11:18 ch05.de.html > -rw-r--r-- 1 root root 153626 Apr 24 11:18 ch06.de.html > -rw-r--r-- 1 root root 134147 Apr 24 11:18 ch07.de.html > -rw-r--r-- 1 root root 52121 Apr 24 11:18 ch08.de.html > -rw-r--r-- 1 root root 421040 Apr 24 11:18 ch09.de.html > -rw-r--r-- 1 root root 226593 Apr 24 11:18 ch10.de.html > -rw-r--r-- 1 root root 208745 Apr 24 11:18 ch11.de.html > -rw-r--r-- 1 root root 189855 Apr 24 11:18 ch12.de.html > -rw-r--r-- 1 root root 3396 Apr 24 11:18 debian-reference.css > -rw-r--r-- 1 root root 1406403 Apr 24 11:18 debian-reference.de.pdf > -rw-r--r-- 1 root root 271388 Apr 24 11:18 debian-reference.de.txt.gz > drwxr-xr-x 1 root root 160 Apr 29 00:13 images > -rw-r--r-- 1 root root 142757 Apr 24 11:18 index.de.html > -rw-r--r-- 1 root root 986 Apr 29 10:20 index.html > -rw-r--r-- 1 root root 36145 Apr 24 11:18 pr01.de.html Please note this package uses "dpkg-maintscript-helper symlink_to_dir ..." instead of "dpkg-maintscript-helper dir_to_symlink ...". I see "own" reference only in "Switching a directory to symlink" for "dpkg- maintscript-helper dir_to_symlink ...". Your argument doesn't make sense. > > $ sudo apt-get -y -f install ... > > Unpacking debian-reference-common (2.126) over (2.100) ... > > Setting up debian-reference-common (2.126) ... > > This is when the link really got converted into a directory. No. It was done by debian-reference-de.preinst as shown in the above and debian-reference-common.preinst here becomes NOP since there is no symlink. There is very tall policy requirement for Pre-depends: > > > Pre-Depends should be used sparingly, preferably only by packages whose > > > premature upgrade or installation would hamper the ability of the system > > > to continue with any upgrade that might be in progress. I need to see it but so far I haven't. > I am aware of this policy aspect. I argue that this is one of those > exceptional cases where Pre-Depends really is the cure and the risk of > downsides is manageable, because the packages that shall issue > Pre-Depends do not have any reverse dependencies. "It works" is not good enough excuse for using Pre-depends. > There is another relatively simple argument that might help with > understanding the matter. Take a moment to think about file ownership in > a packaging sense. Initially, > /usr/share/doc/debian-reference-common/docs is a symbolic link owned by > debian-reference-common. Now you unpack debian-reference-de, which > installs the same location as a directory. Which package is now the > proper owner of that file? After unpacking debian-reference-de, there is > no obligation to configure it. I agree it doesn't need to be "configured". I still think that it needs to be "unpacked" properly after running its preinst scripts properly. Are you sure your test case with warning qualify as a proper unpack example? > And yeah, by all means, discuss the use of Pre-Depends with > d-devel@l.d.o. Let me think about it after getting your updated thoughts on your "should" and "own" comments. Regards, Osamu