• Bug#265451: Upgrade script doesn't select mirror

    From Richard Lamont@1:229/2 to All on Fri Aug 13 11:30:13 2004
    From: [email protected]

    Package: clamav-freshclam
    Version: 0.75.1-2
    Severity: minor

    When doing a routine apt-get upgrade, I was prompted to choose a
    database mirror. I chose db.uk.clamav.net. However, when
    checking /etc/clamav/freshclam.conf, it still had db.local.clamav.net
    as the entry.

    I then ran dpkg-reconfigure clamav-freshclam manually, and the change
    went through OK.


    --
    Richard Lamont
    <[email protected]>
    OpenPGP Key ID: 2C09F1CB http://www.lamont.me.uk/key.txt
    Fingerprint: 907C 63A3 58E8 4870 17A3 8688 586B 204D 2C09 F1CB



    --
    To UNSUBSCRIBE, email to [email protected]
    with a subject of "unsubscribe". Trouble? Contact [email protected]

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Stephen Gran@1:229/2 to Richard Lamont on Fri Aug 13 21:00:12 2004
    From: [email protected]

    This one time, at band camp, Richard Lamont said:

    Package: clamav-freshclam
    Version: 0.75.1-2
    Severity: minor

    When doing a routine apt-get upgrade, I was prompted to choose a
    database mirror. I chose db.uk.clamav.net. However, when
    checking /etc/clamav/freshclam.conf, it still had db.local.clamav.net
    as the entry.

    I then ran dpkg-reconfigure clamav-freshclam manually, and the change
    went through OK.

    Here is the part that does the debconf interaction:
    db_metaget clamav-freshclam/local_mirror value || true
    if [ -z "$RET" ]; then
    db_set clamav-freshclam/local_mirror 'db.local.clamav.net' || true
    else
    STATE="http_proxy"
    fi

    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?

    Thanks,
    --
    -----------------------------------------------------------------
    | ,''`. Stephen Gran |
    | : :' : [email protected] |
    | `. `' Debian user, admin, and developer |
    | `- http://www.debian.org |
    -----------------------------------------------------------------

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.4 (GNU/Linux)

    iD8DBQFBHPBgSYIMHOpZA44RAo+uAKC4wm6m0i8fhoni+6ZJK+Am4tTCTwCgoFEW ysa6jie2RUDRxENmZ9ykETk=
    =DvE3
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Richard Lamont@1:229/2 to Stephen Gran on Sat Aug 14 00:40:07 2004
    From: [email protected]

    On Friday 13 Aug 2004 17:46, Stephen Gran wrote:
    This one time, at band camp, Richard Lamont said:
    Package: clamav-freshclam
    Version: 0.75.1-2
    Severity: minor

    When doing a routine apt-get upgrade, I was prompted to choose a
    database mirror. I chose db.uk.clamav.net. However, when
    checking /etc/clamav/freshclam.conf, it still had
    db.local.clamav.net as the entry.

    I then ran dpkg-reconfigure clamav-freshclam manually, and the
    change went through OK.

    Here is the part that does the debconf interaction:
    db_metaget clamav-freshclam/local_mirror value || true
    if [ -z "$RET" ]; then
    db_set clamav-freshclam/local_mirror 'db.local.clamav.net' ||
    true else
    STATE="http_proxy"
    fi

    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.

    --
    Richard Lamont
    <[email protected]>
    OpenPGP Key ID: 2C09F1CB http://www.lamont.me.uk/key.txt
    Fingerprint: 907C 63A3 58E8 4870 17A3 8688 586B 204D 2C09 F1CB



    --
    To UNSUBSCRIBE, email to [email protected]
    with a subject of "unsubscribe". Trouble? Contact [email protected]

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Stephen Gran@1:229/2 to Richard Lamont on Sat Aug 14 07:00:09 2004
    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)
  • From Stephen Gran@1:229/2 to Stephen Gran on Mon Aug 16 01:30:07 2004
    From: [email protected]

    This one time, at band camp, Stephen Gran said:
    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?

    Just a ping. I am hoping to do some bug clean up in time to make the
    release. If you need access to 0.74-1 .debs, let me know and I can
    provide them.

    Thanks again,
    --
    -----------------------------------------------------------------
    | ,''`. Stephen Gran |
    | : :' : [email protected] |
    | `. `' Debian user, admin, and developer |
    | `- http://www.debian.org |
    -----------------------------------------------------------------

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.4 (GNU/Linux)

    iD8DBQFBH+4ASYIMHOpZA44RArLlAJ0TWMOc/ElDhpUnFG8AmH8WUnMx5ACfShq+ Cqjb8pixxzzIAwsqLQn+0YM=
    =L/KL
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Richard Lamont@1:229/2 to Stephen Gran on Mon Aug 16 13:10:09 2004
    From: [email protected]

    On Monday 16 Aug 2004 00:13, Stephen Gran wrote:

    Just a ping. I am hoping to do some bug clean up in time to make the release. If you need access to 0.74-1 .debs, let me know and I can
    provide them.

    Sorry, but these are production machines and I don't want to mess around
    with them.

    --
    Richard Lamont
    <[email protected]>
    OpenPGP Key ID: 2C09F1CB http://www.lamont.me.uk/key.txt
    Fingerprint: 907C 63A3 58E8 4870 17A3 8688 586B 204D 2C09 F1CB



    --
    To UNSUBSCRIBE, email to [email protected]
    with a subject of "unsubscribe". Trouble? Contact [email protected]

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Stephen Gran@1:229/2 to Richard Lamont on Mon Aug 16 16:30:12 2004
    From: [email protected]

    tags 265451 +unreproducible moreinfo
    thanks
    This one time, at band camp, Richard Lamont said:
    On Monday 16 Aug 2004 00:13, Stephen Gran wrote:

    Just a ping. I am hoping to do some bug clean up in time to make the release. If you need access to 0.74-1 .debs, let me know and I can
    provide them.

    Sorry, but these are production machines and I don't want to mess around with them.

    OK. Well, I can't reproduce it here. If you can at some point find a
    machine that is able to reproduce it, it would be of great help in
    chasing down this bug. In the meantime, I am just tagging it and
    leaving it open.

    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)

    iD8DBQFBIMBnSYIMHOpZA44RAjsUAKCE1KXl5d3oJumhgiLONKXZEuJUOgCghpCF JGg4nm+jtxU5BhifN7AArvc=
    =s0GZ
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)