• Bug#266749: postinst script OVERWRITES the conffile /etc/default/mldonk

    From Sylvain LE GALL@1:229/2 to All on Thu Aug 19 23:40:06 2004
    From: [email protected]

    Hello,

    On Thu, Aug 19, 2004 at 04:17:47PM +0200, Adeodato Sim� wrote:
    Hi Sylvain,
    ps : should if fullfill the requirement of your policy line not to write configuration file, except when people changes things in debconf ?

    I think so. that is, don't overwrite the file in the postinst, just in
    the dpkg-reconfigure process.

    Ok, i have turned it 20 times in my head to find a reasonnable solution
    for your problem.

    Here is my proposal :
    - install /etc/default/mldonkey-server with all values in this files
    commented
    - write values from debconf in /var/lib/misc/mldonkey-server ( same file
    as before, just change the location )
    - load /var/lib/misc/mldonkey-server if it exists and then load
    /etc/default/mldonkey-server in the init script

    By this way :
    - we never touch /etc/default/mldonkey-server
    - we keep the whole scheme running as before

    What do you think of this solution ?

    Since i am not trying to hide problem, i should also said that the same
    problem should arise also with the update of value of downloads.ini ( ie
    if you modify upload/download rate et al ). The things i can do
    regarding this issue is to use a temporary file where i put answer to
    question which as not been seen by user ( ie debconf has ask them and
    they have answered ).

    Kind regard
    Sylvain Le Gall


    --
    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 Frank Lichtenheld@1:229/2 to Sylvain LE GALL on Fri Aug 20 00:00:16 2004
    From: [email protected]

    On Thu, Aug 19, 2004 at 11:00:37PM +0200, Sylvain LE GALL wrote:
    Hello,

    On Thu, Aug 19, 2004 at 04:17:47PM +0200, Adeodato Sim� wrote:
    Hi Sylvain,
    ps : should if fullfill the requirement of your policy line not to write configuration file, except when people changes things in debconf ?

    I think so. that is, don't overwrite the file in the postinst, just in
    the dpkg-reconfigure process.

    Ok, i have turned it 20 times in my head to find a reasonnable solution
    for your problem.

    Here is my proposal :
    [...]

    Hmm, many packages do actually solve this by parsing the config file on
    upgrade and using the old values as default to the debconf questions.
    Wouldn't this be possible here, too (The format doesn't seem too
    complicated)?

    Gruesse,
    --
    Frank Lichtenheld <[email protected]>
    www: http://www.djpig.de/


    --
    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 Sylvain LE GALL@1:229/2 to Frank Lichtenheld on Fri Aug 20 00:50:08 2004
    From: [email protected]

    On Thu, Aug 19, 2004 at 11:39:53PM +0200, Frank Lichtenheld wrote:
    On Thu, Aug 19, 2004 at 11:00:37PM +0200, Sylvain LE GALL wrote:
    Hello,

    On Thu, Aug 19, 2004 at 04:17:47PM +0200, Adeodato Sim� wrote:
    Hi Sylvain,
    ps : should if fullfill the requirement of your policy line not to write
    configuration file, except when people changes things in debconf ?

    I think so. that is, don't overwrite the file in the postinst, just in
    the dpkg-reconfigure process.

    Ok, i have turned it 20 times in my head to find a reasonnable solution
    for your problem.

    Here is my proposal :
    [...]

    Hmm, many packages do actually solve this by parsing the config file on upgrade and using the old values as default to the debconf questions. Wouldn't this be possible here, too (The format doesn't seem too complicated)?


    Concerning mldonkey-server it is possible -- because it is simple

    Concerning downloads.ini it is far more complicated ( because it needs
    programs which are installed by the package ).

    The problem is that when reading the policy line cited, i think they
    means that they should be no overwrite AT ALL ( ie don't touch it ).

    Kind regard
    Sylvain Le Gall

    ps : i need to find a solution very fast, otherwise mldonkey will be
    removed from sarge -- i only have 5 days left before mldonkey should be
    removed from debian.


    --
    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 Sylvain LE GALL@1:229/2 to All on Sat Aug 21 00:30:15 2004
    From: [email protected]

    On Fri, Aug 20, 2004 at 08:41:17PM +0200, Adeodato Sim� wrote:
    * Frank Lichtenheld [Thu, 19 Aug 2004 23:39:53 +0200]:
    On Thu, Aug 19, 2004 at 11:00:37PM +0200, Sylvain LE GALL wrote:
    Hello,

    On Thu, Aug 19, 2004 at 04:17:47PM +0200, Adeodato Sim� wrote:
    Hi Sylvain,
    ps : should if fullfill the requirement of your policy line not to write
    configuration file, except when people changes things in debconf ?

    I think so. that is, don't overwrite the file in the postinst, just in
    the dpkg-reconfigure process.

    Ok, i have turned it 20 times in my head to find a reasonnable solution for your problem.

    Here is my proposal :
    [...]

    Hmm, many packages do actually solve this by parsing the config file on upgrade and using the old values as default to the debconf questions. Wouldn't this be possible here, too (The format doesn't seem too complicated)?

    it's one possibility.

    FYI, there was a similar bug recently reported against gpm (#266822),
    which the maintainers resolved by switching to ucf. you may wish to
    investigate that too.

    thanks,


    Ok, another user propose me a patch just to read the conffiles if it
    exists and try to update the debconf values.

    I will also try to read the configuration from the download.ini : my_tool_to_read_config_value && db_set key value .

    I will use a temporary file as suggested in ucf examples and use ucf to
    keep things well with absolute requirement of the policy...

    What do you think of this ?

    Kind regard
    Sylvain Le Gall


    --
    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 Adeodato =?iso-8859-1?Q?Sim=F3?=@1:229/2 to All on Sat Aug 21 01:00:11 2004
    From: [email protected]

    * Sylvain LE GALL [Sat, 21 Aug 2004 00:07:36 +0200]:

    Ok, another user propose me a patch just to read the conffiles if it
    exists and try to update the debconf values.

    I don't know if it's a good idea. I would seek advice from some
    experienced developer.

    I will use a temporary file as suggested in ucf examples and use ucf to
    keep things well with absolute requirement of the policy...

    that's nice.

    What do you think of this ?

    in any case, thanks for your quick response and willingness to resolve
    the issue.

    thanks again,

    --
    Adeodato Sim�
    EM: asp16 [ykwim] alu.ua.es | PK: DA6AE621

    A. Because it breaks the logical sequence of discussion
    Q. Why is top posting bad?



    --
    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 Adeodato =?iso-8859-1?Q?Sim=F3?=@1:229/2 to All on Fri Aug 20 21:00:32 2004
    From: [email protected]

    * Frank Lichtenheld [Thu, 19 Aug 2004 23:39:53 +0200]:
    On Thu, Aug 19, 2004 at 11:00:37PM +0200, Sylvain LE GALL wrote:
    Hello,

    On Thu, Aug 19, 2004 at 04:17:47PM +0200, Adeodato Sim� wrote:
    Hi Sylvain,
    ps : should if fullfill the requirement of your policy line not to write
    configuration file, except when people changes things in debconf ?

    I think so. that is, don't overwrite the file in the postinst, just in
    the dpkg-reconfigure process.

    Ok, i have turned it 20 times in my head to find a reasonnable solution
    for your problem.

    Here is my proposal :
    [...]

    Hmm, many packages do actually solve this by parsing the config file on upgrade and using the old values as default to the debconf questions. Wouldn't this be possible here, too (The format doesn't seem too complicated)?

    it's one possibility.

    FYI, there was a similar bug recently reported against gpm (#266822),
    which the maintainers resolved by switching to ucf. you may wish to
    investigate that too.

    thanks,

    --
    Adeodato Sim�
    EM: asp16 [ykwim] alu.ua.es | PK: DA6AE621

    If you want the holes in your knowledge showing up try teaching someone.
    -- Alan Cox



    --
    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)