From:
[email protected]
This one time, at band camp, Richard Lamont said:
On Friday 13 Aug 2004 17:46, Stephen Gran wrote:
So, if no answer is selected, db.local is filled in. Could you try
purging and starting over? Or remove the seen tag from debconf, and
rerun with set -x at the top of clamav-freshclam.config?
I've tried it again on another machine, with the same result as before.
I'm not sure quite what you mean by 'purging and starting over', unless
you mean remove and purge the packages and reinstall them. I'm not sure
quite what that would prove, as the full dpkg-reconfigure worked whereas
the upgrade didn't.
I guess that wasn't very clear, sorry. What I meant was, could you
remove that line from the conf file (DatabaseMirror ...) and from the
debconf db (/var/cache/debconf/config.dat - look for local_mirror), and
try again. That effectively 'purges' the answer from debconf, and
ensures that the script has nothing to fill it back in with. Probably
you don't need to remove the entire stanza from the db, just the Value:
and Flags: lines. I guess it doesn't hurt to remove the whole stanza
though - I think that is effectively the situation before the upgrade.
After you have done so, can you add a set -x to the top of /var/lib/dpkg/info/clamav-freshclam.postinst and /var/lib/dpkg/info/clamav-freshclam.config, rerun dpkg-reconfigure clamav-freshclam and send me the output?
This is what I see here after doing so: (I changed DatabaseMirror in freshclam.conf to database.clamav.net to more closely mimic upgrade conditions):
clamav-freshclam.config:
pre-seeds debconf with what's in your conf file:
++ grep '^DatabaseMirror' /etc/clamav/freshclam.conf
++ head -n1
++ sed -e 's/DatabaseMirror *//'
+ value=database.clamav.net
+ '[' database.clamav.net = DatabaseMirror -o database.clamav.net = '' ']'
+ export DatabaseMirror=database.clamav.net
+ DatabaseMirror=database.clamav.net
[snip]
+ '[' -n database.clamav.net ']'
+ db_set clamav-freshclam/local_mirror database.clamav.net
+ _db_cmd 'SET clamav-freshclam/local_mirror' database.clamav.net
+ echo 'SET clamav-freshclam/local_mirror' database.clamav.net
[snip]
Asks the question:
+ Statelocal_mirror
+ db_input medium clamav-freshclam/local_mirror
+ _db_cmd 'INPUT medium' clamav-freshclam/local_mirror
+ echo 'INPUT medium' clamav-freshclam/local_mirror
+ local 'IFS=
'
+ local _LINE
+ read -r _LINE
+ RET='question will be asked'
+ return 0
+ db_go
+ _db_cmd 'GO '
+ echo 'GO '
+ local 'IFS=
'
+ local _LINE
+ read -r _LINE
+ RET=ok
+ return 0
+ db_metaget clamav-freshclam/local_mirror value
+ _db_cmd 'METAGET clamav-freshclam/local_mirror' value
+ echo 'METAGET clamav-freshclam/local_mirror' value
+ local 'IFS=
'
+ local _LINE
+ read -r _LINE
+ RET=db.us.clamav.net
+ return 0
+ '[' -z db.us.clamav.net ']'
It got answered correctly.
clamav-freshclam.postinst:
This is an oops - it will be updated in the next release - this provides a fallback.
+ mirrors=database.clamav.net
[snip]
Now it checks what's in debconf:
+ db_metaget clamav-freshclam/local_mirror value
+ _db_cmd 'METAGET clamav-freshclam/local_mirror' value
+ echo 'METAGET clamav-freshclam/local_mirror' value
+ local 'IFS=
'
+ local _LINE
+ read -r _LINE
+ RET=db.us.clamav.net
+ return 0
+ '[' db.us.clamav.net = '' ']'
+ mirrors=db.us.clamav.net
It gets the right thing.
Now it sets another variable to what's in the conf file.
[snip]
++ grep '^DatabaseMirror' /etc/clamav/freshclam.conf
++ head -n1
++ sed -e 's/DatabaseMirror *//'
+ value=database.clamav.net
+ '[' database.clamav.net = DatabaseMirror -o database.clamav.net = '' ']'
+ export DatabaseMirror=database.clamav.net
+ DatabaseMirror=database.clamav.net
[snip]
+ '[' -n db.us.clamav.net ']'
+ for i in '$mirrors'
+ echo 'DatabaseMirror db.us.clamav.net'
[snip]
But the first one is non-zero, so it uses the debconf answer.
The script looks like it's doing the right thing. Please send the
results of this from your machines, and we can hopefully figure out
where the problem is.
Thanks for reporting,
--
-----------------------------------------------------------------
| ,''`. Stephen Gran |
| : :' :
[email protected] |
| `. `' Debian user, admin, and developer |
| `-
http://www.debian.org |
-----------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFBHZdpSYIMHOpZA44RAgZIAKC43b+lZKUNCN9yDuhYjkmsaW5zEgCdHr7m 9ThQrM1Ta60ZLi1UaHKBCmE=
=4TZV
-----END PGP SIGNATURE-----
--- SoupGate-Win32 v1.05
* Origin: you cannot sedate... all the things you hate (1:229/2)