

Microsoft’s failed attempt on Debian packaging
source link: https://www.tuicool.com/articles/hit/NF7jI37
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Just recently Microsoft Open R 3.5 was announced, as an open source implementation of R with some improvements. Binaries are available for Windows, Mac, and Linux. I dared to download and play around with the files, only to get shocked how incompetent Microsoft is in packaging.
From the microsoft-r-open-mro-3.5.0 postinstall script:
#!/bin/bash #TODO: Avoid hard code VERSION number in all scripts VERSION=`echo $DPKG_MAINTSCRIPT_PACKAGE | sed 's/[[:alpha:]|(|[:space:]]//g' | sed 's/\-*//' | awk -F. '{print $1 "." $2 "." $3}'` INSTALL_PREFIX="/opt/microsoft/ropen/${VERSION}" echo $VERSION ln -s "${INSTALL_PREFIX}/lib64/R/bin/R" /usr/bin/R ln -s "${INSTALL_PREFIX}/lib64/R/bin/Rscript" /usr/bin/Rscript rm /bin/sh ln -s /bin/bash /bin/sh
First of all, the ln -s
will not work in case the standard R package is installed, but much worse, forcibly relinking /bin/sh
to bash
is something I didn’t expect to see.
Then, looking at the prerm script, it is getting even more funny:
#!/bin/bash VERSION=`echo $DPKG_MAINTSCRIPT_PACKAGE | sed 's/[[:alpha:]|(|[:space:]]//g' | sed 's/\-*//' | awk -F. '{print $1 "." $2 "." $3}'` INSTALL_PREFIX="/opt/microsoft/ropen/${VERSION}/" rm /usr/bin/R rm /usr/bin/Rscript rm -rf "${INSTALL_PREFIX}/lib64/R/backup"
Stop, wait, you are removing /usr/bin/R
without even checking that it points to the R you have installed???
I guess Microsoft should read a bit up, in particular about dpkg-divert
and proper packaging. What came in here was such an exhibition of incompetence that I can only assume they are doing it on purpose.
Recommend
-
56
Just recently Microsoft Open R 3.5 was announced, as an open source implementation of R with some improvements. Binaries are available for Windows, Mac, and Linux. I dared to download and play around with...
-
11
TechSuspected Russian hackers made failed attempt to breach CrowdStrike, company saysPublished Thu, Dec 24 20201:08 PM EST
-
13
A failed attempt to align the DIV elements advertisements I am trying to align 3 <div> elements in such way that two are ne...
-
5
TechnologyFacebook tried to outsource its decision about Trump. The Oversight Board said not so fast.The panel of experts sent the fa...
-
6
Debian Packaging Guide (NodeJs) Reading Time: 6 minutes In this Blog, we will package a nodejs module to the Debian Standa...
-
7
Optimising a JavaScript library with WebAssembly, a failed attempt! Rust is becoming more and more the language of choice to build t...
-
6
My second, failed attempt, at moving to Linux 02.11.2021 2 comments 126 days since last revision. Minor details have likely changed.
-
5
Rust Implementation of Debian Packaging Primitives January 03, 2022 at 04:00 PM | categories:
-
7
SpaceflightNASA’s Megarocket Will Head Back to Garage After Second Failed Launch AttemptThe current SLS launch period...
-
6
“Nutritious and Delicious.” Inside YouTube’s Early, Failed Attempt To Recommend Videos That Are Good For You, And Enjoyable Too.Well before the social media backlash, YouTube tried to recommend videos...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK