On 2021-03-14 Hideki Yamane <henr...@iijmio-mail.jp> wrote: > On Sun, 7 Mar 2021 08:47:05 +0100 > Andreas Metzler <ametz...@bebt.de> wrote: >> I think that might be a dh_installdeb error, it seems to check whether >> the first character is a '/', and does not account for possible quoting >> characters.
>> This might work around this >> rm_conffile /etc/apt/trusted.gpg.d/ubuntu-keyring-2016-dbgsym.gpg,\ \* > Well, * is considered as [prior-version], then. > > BTW you should really specify [prior-version and [package]. > Yes, but above problem prevent me to solve issue... Hello Hideki, just did a quick test: download hello 2.10-2 and make (local) NMU 2.10-2.1 which adds junk: ametzler@argenau:/tmp/hello-2.10$ dpkg --contents ../hello_2.10-2.1_amd64.deb | grep etc drwxr-xr-x root/root 0 2021-03-14 13:10 ./etc/ drwxr-xr-x root/root 0 2021-03-14 13:10 ./etc/apt/ drwxr-xr-x root/root 0 2021-03-14 13:10 ./etc/apt/trusted.gpg.d/ -rw-r--r-- root/root 8 2021-03-14 13:09 ./etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cloud-archive, ubuntu-cloud-removed-keys.gpg -rw-r--r-- root/root 10 2021-03-14 13:10 ./etc/apt/trusted.gpg.d/ubuntu-keyring-2016-dbgsym.gpg, * Then drop the junk again, increase version number to 2.10-3 and add a maintsript snippet: ametzler@argenau:/tmp/hello-2.10$ cat debian/hello.maintscript rm_conffile '/etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cloud-archive, ubuntu-cloud-removed-keys.gpg' '2.10-2.2~' 'hello' rm_conffile '/etc/apt/trusted.gpg.d/ubuntu-keyring-2016-dbgsym.gpg, *' '2.10-2.2~' 'hello' Which seems to just work: (sid)root@argenau:/# ls /etc/apt/trusted.gpg.d/u* '/etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cloud-archive, ubuntu-cloud-removed-keys.gpg' '/etc/apt/trusted.gpg.d/ubuntu-keyring-2016-dbgsym.gpg, *' (sid)root@argenau:/# dpkg -i /tmp/hello_2.10-3_amd64.deb (Reading database ... 21100 files and directories currently installed.) Preparing to unpack /tmp/hello_2.10-3_amd64.deb ... Unpacking hello (2.10-3) over (2.10-2.1) ... Setting up hello (2.10-3) ... Removing obsolete conffile /etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cloud-archive, ubuntu-cloud-removed-keys.gpg ... Removing obsolete conffile /etc/apt/trusted.gpg.d/ubuntu-keyring-2016-dbgsym.gpg, * ... Processing triggers for install-info (6.7.0.dfsg.2-6) ... Processing triggers for man-db (2.9.4-2) ... (sid)root@argenau:/# ls /etc/apt/trusted.gpg.d/u* ls: cannot access '/etc/apt/trusted.gpg.d/u*': No such file or directory Hello is using debhelper compat 9 though, it breaks with compat >= 12. 9 does not warn, 10-11 warn without fatal error., 12 and later fail. So you could work around this by avoiding this dh_installdeb functionality and directly adding dpkg-maintscript-helper invocations to {post,pre}{inst,rm}. I will submit a bug against debhelper and Cc you. cu Andreas -- `What a good friend you are to him, Dr. Maturin. His other friends are so grateful to you.' `I sew his ears on from time to time, sure'