• Bug#264241: Some corrections regardings statements in this bug

    From Adrian Bunk@1:229/2 to All on Wed Aug 11 01:30:10 2004
    XPost: linux.debian.maint.tetex
    From: [email protected]

    tags 264241 - patch
    retitle 264241 removal of tetex-extra fails
    thanks

    Some corrections regardings statements in this bug ("postrm assumes
    mktexlsr is available").


    <-- snip -->


    Ryan Murray:
    You can't assume that any of your dependencies are available in your postrm script, so you need to handle the case where mktexlsr has already been removed.


    mktexlsr is in tetex-bin.

    tetex-extra depends on tetex-bin.

    Section 7.2. of your policy states:

    <-- snip -->

    ...
    The `Depends' field should also be used if the `postinst',
    `prerm' or `postrm' scripts require the package to be present in
    order to run. Note, however, that the `postrm' cannot rely on
    any non-essential packages to be present during the `purge'
    phase.
    ...

    <-- snip -->


    Could you explain your statement which exactly contradicts your policy
    (note that the tetex-extra postinst does nothing during purge)?


    Can you reproduce the bug?
    If yes, does it help to let /var/lib/dpkg/info/tetex-extra.postrm start
    with
    #!/bin/bash
    ?


    <-- snip -->


    Hilmar Preusse:

    The man page of bash tells us, that it should be sufficient to do so
    if /bin/sh points to /bin/bash. I guess we have to remove the bashism
    in that script and are done. Correct?


    If the problem is a bashism, the trival solution is to let the script
    start with
    #!/bin/bash
    instead of
    #!/bin/sh

    This is 100% correct since bash is Essential and /bin/bash is therefore garuanteed to be always available.


    <-- snip -->


    cu
    Adrian

    --

    "Is there not promise of rain?" Ling Tan asked suddenly out
    of the darkness. There had been need of rain for many days.
    "Only a promise," Lao Er said.
    Pearl S. Buck - Dragon Seed



    --
    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 Hilmar Preusse@1:229/2 to [email protected] on Thu Aug 12 14:10:12 2004
    XPost: linux.debian.maint.tetex
    From: [email protected]

    On 11.08.04 Adrian Bunk ([email protected]) wrote:

    Hi,

    Some corrections regarding statements in this bug ("postrm assumes
    mktexlsr is available").

    <-- snip -->

    Ryan Murray:
    You can't assume that any of your dependencies are available in
    your postrm script, so you need to handle the case where mktexlsr
    has already been removed.

    mktexlsr is in tetex-bin.

    tetex-extra depends on tetex-bin.

    Section 7.2. of your policy states:

    <-- snip -->
    ...
    The `Depends' field should also be used if the `postinst',
    `prerm' or `postrm' scripts require the package to be present in
    order to run. Note, however, that the `postrm' cannot rely on
    any non-essential packages to be present during the `purge'
    phase.
    ...
    <-- snip -->

    Could you explain your statement which exactly contradicts your policy

    So, what are you trying to tell me? As far as I understand you tell
    me, that this bug is not a bug.

    (note that the tetex-extra postinst does nothing during purge)?

    mktexlsr is intended to be called in case of upgrade, remove or purge.
    Hence we don't check $1, but call it unconditionally.

    Can you reproduce the bug?
    If yes, does it help to let /var/lib/dpkg/info/tetex-extra.postrm start
    with
    #!/bin/bash
    ?

    <-- snip -->

    Hilmar Preusse:

    The man page of bash tells us, that it should be sufficient to do so
    if /bin/sh points to /bin/bash. I guess we have to remove the bashism
    in that script and are done. Correct?


    If the problem is a bashism, the trivial solution is to let the script
    start with
    #!/bin/bash
    instead of
    #!/bin/sh

    This is 100% correct since bash is Essential and /bin/bash is therefore garuanteed to be always available.

    <-- snip -->

    The more convenient solution could be to remove to bashism. Should
    not be that hard in this special case. I'm not sure, if command is a
    bashism or if it is available in dash too.
    I'd like to see another tetex-base package RSN and I'd like to have
    this bug closed too.

    Thanks,
    H.
    --
    sigmentation fault


    --
    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 Adrian Bunk@1:229/2 to Hilmar Preusse on Thu Aug 12 14:30:12 2004
    XPost: linux.debian.maint.tetex
    From: [email protected]

    On Thu, Aug 12, 2004 at 01:44:22PM +0200, Hilmar Preusse wrote:
    On 11.08.04 Adrian Bunk ([email protected]) wrote:

    Hi,

    Hi Hilmar,

    Some corrections regarding statements in this bug ("postrm assumes
    mktexlsr is available").

    <-- snip -->

    Ryan Murray:
    You can't assume that any of your dependencies are available in
    your postrm script, so you need to handle the case where mktexlsr
    has already been removed.

    mktexlsr is in tetex-bin.

    tetex-extra depends on tetex-bin.

    Section 7.2. of your policy states:

    <-- snip -->
    ...
    The `Depends' field should also be used if the `postinst',
    `prerm' or `postrm' scripts require the package to be present in
    order to run. Note, however, that the `postrm' cannot rely on
    any non-essential packages to be present during the `purge'
    phase.
    ...
    <-- snip -->

    Could you explain your statement which exactly contradicts your policy

    So, what are you trying to tell me? As far as I understand you tell
    me, that this bug is not a bug.


    A failed postrm is a bug, but as far as I can see, the problem is not
    that mktexlsr wasn't available.


    (note that the tetex-extra postinst does nothing during purge)?

    mktexlsr is intended to be called in case of upgrade, remove or purge.
    Hence we don't check $1, but call it unconditionally.

    As far as I can see, it's not called during purge.

    ...
    The more convenient solution could be to remove to bashism. Should
    not be that hard in this special case. I'm not sure, if command is a
    bashism or if it is available in dash too.
    ...

    It's currently not even 100% clear why the postrm fails.

    @Ryan:
    Could you reproduce the problem, and if yes, what's the output with a
    "set -x" in the postrm script?

    Thanks,
    H.

    cu
    Adrian

    --

    "Is there not promise of rain?" Ling Tan asked suddenly out
    of the darkness. There had been need of rain for many days.
    "Only a promise," Lao Er said.
    Pearl S. Buck - Dragon Seed



    --
    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 Hilmar Preusse@1:229/2 to [email protected] on Fri Aug 13 21:00:11 2004
    XPost: linux.debian.maint.tetex
    From: [email protected]

    On 12.08.04 Adrian Bunk ([email protected]) wrote:
    On Thu, Aug 12, 2004 at 01:44:22PM +0200, Hilmar Preusse wrote:

    Hi Adrian,

    So, what are you trying to tell me? As far as I understand you
    tell me, that this bug is not a bug.

    A failed postrm is a bug, but as far as I can see, the problem is
    not that mktexlsr wasn't available.

    Sorry, I have no clue, what exactly he's referring to. I just
    thought, it is a general (policy) issue, that we assume some things
    to be existent which aren't.

    (note that the tetex-extra postinst does nothing during purge)?

    mktexlsr is intended to be called in case of upgrade, remove or purge. Hence we don't check $1, but call it unconditionally.

    As far as I can see, it's not called during purge.

    Maybe I'm dumb. If you do the experiment: Install tetex-base, -bin,
    -extra and then purge tetex-extra he'll call mktexlsr. Same happens
    on remove.

    The more convenient solution could be to remove to bashism.
    Should not be that hard in this special case. I'm not sure, if
    command is a bashism or if it is available in dash too.
    ...

    It's currently not even 100% clear why the postrm fails.

    @Ryan:
    Could you reproduce the problem, and if yes, what's the output with
    a "set -x" in the postrm script?


    H.
    --
    sigmentation fault


    --
    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 Adrian Bunk@1:229/2 to Hilmar Preusse on Fri Aug 13 21:20:07 2004
    XPost: linux.debian.maint.tetex
    From: [email protected]

    On Fri, Aug 13, 2004 at 06:07:03PM +0200, Hilmar Preusse wrote:
    On 12.08.04 Adrian Bunk ([email protected]) wrote:
    On Thu, Aug 12, 2004 at 01:44:22PM +0200, Hilmar Preusse wrote:

    Hi Adrian,

    So, what are you trying to tell me? As far as I understand you
    tell me, that this bug is not a bug.

    A failed postrm is a bug, but as far as I can see, the problem is
    not that mktexlsr wasn't available.

    Sorry, I have no clue, what exactly he's referring to. I just
    thought, it is a general (policy) issue, that we assume some things
    to be existent which aren't.

    (note that the tetex-extra postinst does nothing during purge)?

    mktexlsr is intended to be called in case of upgrade, remove or purge. Hence we don't check $1, but call it unconditionally.

    As far as I can see, it's not called during purge.

    Maybe I'm dumb. If you do the experiment: Install tetex-base, -bin,
    -extra and then purge tetex-extra he'll call mktexlsr. Same happens
    on remove.
    ...

    If you purge an installed package, it's first removed and then purged.

    mktexlsr is called during the remove phase, but not during the purge
    phase.

    Look at the following (with "set -x" in the postrm script):

    <-- snip -->

    # dpkg --purge tetex-extra
    (Reading database ... 136930 files and directories currently installed.) Removing tetex-extra ...
    + PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11
    + TETEXDIR=
    + TEXMF=
    + TEXCONFIG=/usr/bin/texconfig
    + BLUESKY_UCF=config.ams config.cm config.amz config.cmz
    + BSRTETEX_UCF=bsr-interpolated.map bsr.map
    + rm -f /var/lib/texmf/web2c/amstex.fmt
    + rm -f /var/lib/texmf/web2c/omega.oft
    + rm -f /var/lib/texmf/web2c/lambda.oft
    + rm -f /var/lib/texmf/web2c/mpost.mem
    + rm -f /var/lib/texmf/web2c/metafun.mem
    + rm -f /var/lib/texmf/web2c/omega.fmt
    + rm -f /var/lib/texmf/web2c/lambda.fmt
    + command mktexlsr
    + mktexlsr
    mktexlsr: Updating /usr/local/lib/texmf/ls-R...
    mktexlsr: Updating /var/lib/texmf/ls-R...
    mktexlsr: Updating /var/lib/texmf/ls-R-TEXMFMAIN...
    mktexlsr: Updating /var/cache/fonts/ls-R...
    mktexlsr: Done.
    + '[' xremove = xremove ']'
    + ucf_purge
    + '[' -x /usr/bin/ucf ']'
    + purgefile /etc/texmf/dvips/config.ams
    + ucf --purge /etc/texmf/dvips/config.ams
    + rm -f /etc/texmf/dvips/config.ams
    /etc/texmf/dvips/config.ams.dpkg-dist
    /etc/texmf/dvips/config.ams.dpkg-old
    + purgefile /etc/texmf/dvips/config.cm
    + ucf --purge /etc/texmf/dvips/config.cm
    + rm -f /etc/texmf/dvips/config.cm /etc/texmf/dvips/config.cm.dpkg-dist /etc/texmf/dvips/config.cm.dpkg-old
    + purgefile /etc/texmf/dvips/config.amz
    + ucf --purge /etc/texmf/dvips/config.amz
    + rm -f /etc/texmf/dvips/config.amz
    /etc/texmf/dvips/config.amz.dpkg-dist
    /etc/texmf/dvips/config.amz.dpkg-old
    + purgefile /etc/texmf/dvips/config.cmz
    + ucf --purge /etc/texmf/dvips/config.cmz
    + rm -f /etc/texmf/dvips/config.cmz
    /etc/texmf/dvips/config.cmz.dpkg-dist
    /etc/texmf/dvips/config.cmz.dpkg-old
    + purgefile /etc/texmf/dvips/bsr-interpolated.map
    + ucf --purge /etc/texmf/dvips/bsr-interpolated.map
    + rm -f /etc/texmf/dvips/bsr-interpolated.map /etc/texmf/dvips/bsr-interpolated.map.dpkg-dist /etc/texmf/dvips/bsr-interpolated.map.dpkg-old
    + purgefile /etc/texmf/dvips/bsr.map
    + ucf --purge /etc/texmf/dvips/bsr.map
    + rm -f /etc/texmf/dvips/bsr.map /etc/texmf/dvips/bsr.map.dpkg-dist /etc/texmf/dvips/bsr.map.dpkg-old
    Purging configuration files for tetex-extra ...
    + PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11
    + TETEXDIR=
    + TEXMF=
    + TEXCONFIG=/usr/bin/texconfig
    + BLUESKY_UCF=config.ams config.cm config.amz config.cmz
    + BSRTETEX_UCF=bsr-interpolated.map bsr.map
    + rm -f /var/lib/texmf/web2c/amstex.fmt
    + rm -f /var/lib/texmf/web2c/omega.oft
    + rm -f /var/lib/texmf/web2c/lambda.oft
    + rm -f /var/lib/texmf/web2c/mpost.mem
    + rm -f /var/lib/texmf/web2c/metafun.mem
    + rm -f /var/lib/texmf/web2c/omega.fmt
    + rm -f /var/lib/texmf/web2c/lambda.fmt
    + command mktexlsr
    + mktexlsr
    mktexlsr: Updating /usr/local/lib/texmf/ls-R...
    mktexlsr: Updating /var/lib/texmf/ls-R...
    mktexlsr: Updating /var/lib/texmf/ls-R-TEXMFMAIN...
    mktexlsr: Updating /var/cache/fonts/ls-R...
    mktexlsr: Done.
    + '[' xpurge = xremove ']'
    #

    <-- snip -->


    Notice the lines "Removing tetex-extra" and "Purging configuration files
    for tetex-extra".


    H.

    cu
    Adrian

    --

    "Is there not promise of rain?" Ling Tan asked suddenly out
    of the darkness. There had been need of rain for many days.
    "Only a promise," Lao Er said.
    Pearl S. Buck - Dragon Seed



    --
    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 Hilmar Preusse@1:229/2 to [email protected] on Sat Aug 14 13:00:16 2004
    XPost: linux.debian.maint.tetex
    From: [email protected]

    On 13.08.04 Adrian Bunk ([email protected]) wrote:
    On Fri, Aug 13, 2004 at 06:07:03PM +0200, Hilmar Preusse wrote:

    Hi Adrian,

    Maybe I'm dumb. If you do the experiment: Install tetex-base, -bin,
    -extra and then purge tetex-extra he'll call mktexlsr. Same
    happens on remove.

    If you purge an installed package, it's first removed and then purged.

    I guess that was my failure.

    mktexlsr is called during the remove phase, but not during the
    purge phase.
    Look at the following (with "set -x" in the postrm script):

    <-- snip -->

    # dpkg --purge tetex-extra
    (Reading database ... 136930 files and directories currently installed.) Removing tetex-extra ...
    + PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11
    + TETEXDIR=
    + TEXMF=
    + TEXCONFIG=/usr/bin/texconfig
    + BLUESKY_UCF=config.ams config.cm config.amz config.cmz
    <snip>
    + command mktexlsr
    + mktexlsr
    mktexlsr: Updating /usr/local/lib/texmf/ls-R...
    mktexlsr: Updating /var/lib/texmf/ls-R...
    mktexlsr: Updating /var/lib/texmf/ls-R-TEXMFMAIN...
    mktexlsr: Updating /var/cache/fonts/ls-R...
    mktexlsr: Done.
    + '[' xpurge = xremove ']'

    And this is the point, where he starts purging, right?

    Thanks for clarification. Ryan, is that still an serious bug?

    Regards,
    Hilmar
    --
    sigmentation fault


    --
    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 Adrian Bunk@1:229/2 to Hilmar Preusse on Sat Aug 14 13:20:06 2004
    XPost: linux.debian.maint.tetex
    From: [email protected]

    On Sat, Aug 14, 2004 at 12:25:49PM +0200, Hilmar Preusse wrote:
    ...
    Hi Adrian,

    Hi Hilmar,

    Maybe I'm dumb. If you do the experiment: Install tetex-base, -bin, -extra and then purge tetex-extra he'll call mktexlsr. Same
    happens on remove.

    If you purge an installed package, it's first removed and then purged.

    I guess that was my failure.

    mktexlsr is called during the remove phase, but not during the
    purge phase.
    Look at the following (with "set -x" in the postrm script):

    <-- snip -->

    # dpkg --purge tetex-extra
    (Reading database ... 136930 files and directories currently installed.) Removing tetex-extra ...
    + PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11
    + TETEXDIR=
    + TEXMF=
    + TEXCONFIG=/usr/bin/texconfig
    + BLUESKY_UCF=config.ams config.cm config.amz config.cmz
    <snip>
    + command mktexlsr
    + mktexlsr
    mktexlsr: Updating /usr/local/lib/texmf/ls-R...
    mktexlsr: Updating /var/lib/texmf/ls-R...
    mktexlsr: Updating /var/lib/texmf/ls-R-TEXMFMAIN...
    mktexlsr: Updating /var/cache/fonts/ls-R...
    mktexlsr: Done.
    + '[' xpurge = xremove ']'

    And this is the point, where he starts purging, right?
    ...

    no.

    I'm an idiot.

    Ryan is right.

    Purging starts after the "Purging configuration files for tetex-extra".

    The mktexlsr call is outside of the check whether it's the removal
    phase (I've first looked at 2.0.2-9, where it's inside the check).

    Regards,
    Hilmar

    Sorry for the confusion
    Adrian

    --

    "Is there not promise of rain?" Ling Tan asked suddenly out
    of the darkness. There had been need of rain for many days.
    "Only a promise," Lao Er said.
    Pearl S. Buck - Dragon Seed



    --
    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 Hilmar Preusse@1:229/2 to [email protected] on Sat Aug 14 14:10:08 2004
    XPost: linux.debian.maint.tetex
    From: [email protected]

    tags 264241 + patch
    stop

    On 14.08.04 Adrian Bunk ([email protected]) wrote:
    On Sat, Aug 14, 2004 at 12:25:49PM +0200, Hilmar Preusse wrote:

    Hi Adrian,

    + command mktexlsr
    + mktexlsr
    mktexlsr: Updating /usr/local/lib/texmf/ls-R...
    mktexlsr: Updating /var/lib/texmf/ls-R...
    mktexlsr: Updating /var/lib/texmf/ls-R-TEXMFMAIN...
    mktexlsr: Updating /var/cache/fonts/ls-R...
    mktexlsr: Done.
    + '[' xpurge = xremove ']'

    And this is the point, where he starts purging, right?
    ...

    no.

    I'm an idiot.

    Ryan is right.

    Purging starts after the "Purging configuration files for tetex-extra".

    The mktexlsr call is outside of the check whether it's the removal
    phase (I've first looked at 2.0.2-9, where it's inside the check).

    Yes. We took it out, to make sure it is called during upgrade too.
    Might it be a better idea to check if we're upgrading or removing
    before we remove the formats and call mktexlsr, instead of checking
    if mktexlsr exists.
    Patch attached. Frank, is that a good idea?

    H.
    --
    sigmentation fault

    --- tetex-extra.postrm.orig 2004-08-14 11:22:03.000000000 +0000
    +++ tetex-extra.postrm 2004-08-14 11:45:13.000000000 +0000
    @@ -24,15 +24,14 @@

    # we remove tetex-extra's formats always, also on upgrade: If there was an error in
    # tetex-extra that caused a corrupted format to be build, it has to be redone. -for file in amstex.fmt omega.oft lambda.oft mpost.mem \
    +if [ x"$1" = "xremove" -o x"$1" = "xupgrade" ]; then
    + for file in amstex.fmt omega.oft lambda.oft mpost.mem \
    metafun.mem omega.fmt lambda.fmt; do
    - rm -f /var/lib/texmf/web2c/$file
    -done
    -
    -command mktexlsr >/dev/null 2>&1 && mktexlsr
    + rm -f /var/lib/texmf/web2c/$file
    + done
    + command mktexlsr >/dev/null 2>&1 && mktexlsr
    +fi

    if [ x"$1" = "xremove" ]; then
    ucf_purge
    fi
    -
    -

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From =?iso-8859-1?q?Frank_K=FCster?=@1:229/2 to Hilmar Preusse on Mon Aug 16 11:30:13 2004
    XPost: linux.debian.maint.tetex
    From: [email protected]

    Hilmar Preusse <[email protected]> wrote:

    Yes. We took it out, to make sure it is called during upgrade too.
    Might it be a better idea to check if we're upgrading or removing
    before we remove the formats and call mktexlsr, instead of checking
    if mktexlsr exists.
    Patch attached. Frank, is that a good idea?

    Looks good.


    --
    Frank K�ster, Biozentrum der Univ. Basel
    Abt. Biophysikalische Chemie

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Florent Rougon@1:229/2 to Hilmar Preusse on Mon Aug 16 12:50:08 2004
    XPost: linux.debian.maint.tetex
    From: [email protected]

    Hi,

    Hilmar Preusse <[email protected]> wrote:

    Patch attached. Frank, is that a good idea?

    [...]

    +if [ x"$1" = "xremove" -o x"$1" = "xupgrade" ]; then

    *Now* we have a bashism. :)

    -o and -a in tests are XSI extensions; not POSIX. You should use
    something like:

    +if [ x"$1" = "xremove" ] || [ x"$1" = "xupgrade" ]; then

    (and I would even drop the x thingies 'cause I don't think they are of
    any use these days...)

    --
    Florent


    --
    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 Adrian Bunk@1:229/2 to Florent Rougon on Mon Aug 16 22:30:11 2004
    XPost: linux.debian.maint.tetex
    From: [email protected]

    On Mon, Aug 16, 2004 at 12:23:27PM +0200, Florent Rougon wrote:
    ...
    +if [ x"$1" = "xremove" ] || [ x"$1" = "xupgrade" ]; then

    (and I would even drop the x thingies 'cause I don't think they are of
    any use these days...)

    I don't know which shells have problems without them, but if a script is written to be executed by nearly every shell, I'd keep them.

    Florent

    cu
    Adrian

    --

    "Is there not promise of rain?" Ling Tan asked suddenly out
    of the darkness. There had been need of rain for many days.
    "Only a promise," Lao Er said.
    Pearl S. Buck - Dragon Seed



    --
    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 Florent Rougon@1:229/2 to Adrian Bunk on Mon Aug 16 23:00:15 2004
    XPost: linux.debian.maint.tetex
    From: [email protected]

    Hi,

    Adrian Bunk <[email protected]> wrote:

    On Mon, Aug 16, 2004 at 12:23:27PM +0200, Florent Rougon wrote:
    ...
    +if [ x"$1" = "xremove" ] || [ x"$1" = "xupgrade" ]; then

    (and I would even drop the x thingies 'cause I don't think they are of
    any use these days...)

    I don't know which shells have problems without them, but if a script is written to be executed by nearly every shell, I'd keep them.

    But in this case, we are talking about maintainer scripts; they are
    written for Debian systems and I'd rather have the buggy shells fixed,
    than all Debian maintainer scripts plagued with ugly workarounds like
    this one, that make shell code harder to read.

    --
    Florent


    --
    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 Florent Rougon@1:229/2 to All on Mon Aug 16 23:40:08 2004
    XPost: linux.debian.maint.tetex
    From: [email protected]

    But following this argumentation, shouldn't maintainers simply put a #!/bin/bash at the top of their scripts instead of removing
    bash-specific features?

    They are free to do so as far as I am concerned. However, two advantages
    of sticking to POSIX shell constructs (when it does not lead to ugly contortions) and using /bin/sh are:
    - there are POSIX-compliant shells in Debian that are said to be
    faster than bash (cf. the package description for dash);
    - there are POSIX-compliant shells in Debian that are smaller than
    bash and as a consequence, some people using embedded systems would
    like to be able to use them exclusively on these systems, where they
    could delete bash to save space.

    --
    Florent


    --
    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 Adrian Bunk@1:229/2 to Florent Rougon on Tue Aug 17 00:10:09 2004
    XPost: linux.debian.maint.tetex
    From: [email protected]

    On Mon, Aug 16, 2004 at 11:28:21PM +0200, Florent Rougon wrote:
    But following this argumentation, shouldn't maintainers simply put a #!/bin/bash at the top of their scripts instead of removing
    bash-specific features?

    They are free to do so as far as I am concerned. However, two advantages
    of sticking to POSIX shell constructs (when it does not lead to ugly contortions) and using /bin/sh are:
    - there are POSIX-compliant shells in Debian that are said to be
    faster than bash (cf. the package description for dash);

    The shell speed is hardly the major factor in maintainer scripts speed.

    - there are POSIX-compliant shells in Debian that are smaller than
    bash and as a consequence, some people using embedded systems would
    like to be able to use them exclusively on these systems, where they
    could delete bash to save space.

    bash is essential.
    A Debian system without bash is therefore by definition broken.
    Making an essential package non-essential is basically impossible.

    If an embedded system is that space limited, it would use a small system
    based on busybox instead of a Debian installation.

    Florent

    cu
    Adrian

    --

    "Is there not promise of rain?" Ling Tan asked suddenly out
    of the darkness. There had been need of rain for many days.
    "Only a promise," Lao Er said.
    Pearl S. Buck - Dragon Seed



    --
    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 Florent Rougon@1:229/2 to Adrian Bunk on Tue Aug 17 01:00:13 2004
    XPost: linux.debian.maint.tetex
    From: [email protected]

    [ Mail-Followup-To set to [email protected].; I suggest to drop
    the bug address in followups since I think the discussion is not
    relevant to the bug report any more. ]

    Adrian Bunk <[email protected]> wrote:

    The shell speed is hardly the major factor in maintainer scripts speed.

    I think this is mostly correct, although I have no benchmark to back it
    up.

    bash is essential.
    A Debian system without bash is therefore by definition broken.

    Right. They get to keep the pieces together, but as long as they are
    willing to do so, I do not mind.

    Making an essential package non-essential is basically impossible.

    Really? Suppose bash is not essential anymore. Well, bash-specific shell scripts that use "#! /bin/sh" will be found quickly. Also, packages
    calling bash correctly will stop working with a "Command not found" or a similar, presumably obvious, failure mode. Add the missing dependency
    and you are done. Of course, the whole transition would take some time
    to complete, but what is impossible about that?

    If an embedded system is that space limited, it would use a small system based on busybox instead of a Debian installation.

    Maybe. All I can say is, there *are* some people out there who are
    trying to get things working this way (look for posts by David Weinehall
    on -devel, IIRC).

    --
    Florent


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