Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

devops: show package names instead of missing libs on Ubuntu 18.04 #3013

Merged
merged 1 commit into from
Jul 17, 2020

Conversation

aslushnikov
Copy link
Collaborator

This patch starts putting package names to install on Ubuntu instead
of missing dependencies list.

The mapping of library to package name is obtained using the following
script: https://gist.github.com/aslushnikov/2766200430228c3700537292fccad064

References #2745

@aslushnikov aslushnikov force-pushed the packages-to-install branch from 92abf0c to b6639ed Compare July 17, 2020 21:22
Copy link
Member

@yury-s yury-s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's commit the script for collecting deps to this repo too?

// Check Ubuntu version.
const missingPackages = new Set();
const osRelease = await readFileAsync('/etc/os-release', 'utf8').catch(e => '');
const [ubuntuName = '', ubuntuVersion = ''] = osRelease.trim().split('\n');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the order of entries actually predefined? Not a big deal but using a map could be more reliable.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair enough. Done.

if (missingPackages.size) {
missingPackagesMessage = [
` Install missing packages with:`,
` apt-get install -y ${[...missingPackages].join('\\\n ')}`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--no-install-recommends?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed -y instead as per offline discussion

This patch starts putting package names to install on Ubuntu instead
of missing dependencies list.

The mapping of library to package name is obtained using the following
script: https://gist.github.com/aslushnikov/2766200430228c3700537292fccad064

References microsoft#2745
@aslushnikov aslushnikov force-pushed the packages-to-install branch from 733e6e5 to c976048 Compare July 17, 2020 23:38
@aslushnikov aslushnikov merged commit 9a2245d into microsoft:master Jul 17, 2020
@aslushnikov aslushnikov deleted the packages-to-install branch July 17, 2020 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants