13
faheel
15d

WTF was dpkg trying to do here?!

Comments
  • 13
    Vibe check
  • 9
    The package installs files to /usr/local/bin

    The package only knows about it's own package files.

    When uninstall happens, from the point of view of the package the /usr/local/bin directory should be empty.

    Hence it tries to nuke it. Default behaviour of dpkg packages.
  • 4
    @IntrusionCM

    No it is not default behavior of .deb packages.
    Poorly packaged packages thou.
  • 1
    @Linux Nope. It's default behaviour.

    Afaik for any non protected path.

    Eg /opt.

    Would need to check dpkg / debian pages, but this is definitely 100 % a thing.
  • 1
    @IntrusionCM funny, I've never noticed this kind of warning while in upgrade or remove process. But then again, there's a chance I didn't pay attention it it 🤷‍♂️
  • 1
    I think linux and I are both right.

    If I remember correctly you could state sny directory in... Debian/files ? I think.

    And if it's stated there and an non protected path, the *rm stage will nuke it.
    (prerm I think)

    Regular pathes like /usr/bin, /bin ... should be protected afaik.
  • 3
    @IntrusionCM or just some classic sloppy script bug without failsafes in the pre/post-install

    bin_dir=/usr/local/bin
    rm -f "${bin_dir}/${file}"

    and if ${file} ir empty - this happens
  • 0
    @netikras of all the fuckery...

    Does this still exist Oo

    I thought stuff like that was bombed away by QA long time ago
  • 1
    It was reminding you to buy a MacBook once you start earning enough money.
  • 4
    @IntrusionCM

    That is not the default behavior.

    // Someone that actually package
    .deb packages.
  • 2
    @kejojedi Never. Even if a faulty upgrade script screwed up my system I would first fix my system, and then try to fix the script and maybe send it's dev's the patch, but I wouldn't buy a Mac. No matter how much money I made.
Add Comment