Bigtop
  1. Bigtop
  2. BIGTOP-84

Package removal fails in case alternatives are deleted or damaged

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.1.0
    • Fix Version/s: 0.2.0
    • Component/s: debian, rpm
    • Labels:
      None

      Description

      Quite a few of our packages use alternatives --remove mta in there pre-unistall steps. This works fine for as long as the alternative is there and is not damaged, but prevents package removal in any other case:

      1. rpm -e hadoop-hive
        ....
        error: %preun(hadoop-hive-0.7.1+42.4-2.noarch) scriptlet failed, exit status 2
      1. BIGTOP-84.patch.txt
        8 kB
        Roman Shaposhnik

        Activity

        Hide
        Roman Shaposhnik added a comment -

        I'm inclined to fix this by disregarding the exit code from the alternatives command. Something along the lines of:

        alternatives --remove XXXX || true

        Please let me know if there are any objections to it

        Show
        Roman Shaposhnik added a comment - I'm inclined to fix this by disregarding the exit code from the alternatives command. Something along the lines of: alternatives --remove XXXX || true Please let me know if there are any objections to it
        Hide
        Andrew Bayer added a comment -

        +1

        Show
        Andrew Bayer added a comment - +1

          People

          • Assignee:
            Roman Shaposhnik
            Reporter:
            Roman Shaposhnik
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development