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

Use ar & tar instead of dpkg -x #86

Merged
merged 1 commit into from
Aug 31, 2021
Merged

Use ar & tar instead of dpkg -x #86

merged 1 commit into from
Aug 31, 2021

Conversation

jwodder
Copy link
Member

@jwodder jwodder commented Aug 31, 2021

Closes #85.

@jwodder jwodder added the patch Increment the patch version when merged label Aug 31, 2021
@codecov-commenter
Copy link

Codecov Report

Merging #86 (570fd0a) into master (826a617) will decrease coverage by 0.32%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #86      +/-   ##
==========================================
- Coverage   63.09%   62.76%   -0.33%     
==========================================
  Files           1        1              
  Lines        1157     1163       +6     
  Branches      217      218       +1     
==========================================
  Hits          730      730              
- Misses        363      369       +6     
  Partials       64       64              
Impacted Files Coverage Δ
src/datalad_installer.py 62.76% <0.00%> (-0.33%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 826a617...570fd0a. Read the comment docs.

install_dir = install_dir.resolve()
with tempfile.TemporaryDirectory() as tmpdir:
oldpwd = os.getcwd()
os.chdir(tmpdir)
Copy link
Member

Choose a reason for hiding this comment

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

note: although unlikely to matter here chdir within a process is a bit "atrocious" , e.g. IIRC getcwd would return a resolved directory name if you are in a dir which is symlinked somewhere. I thought to suggest to use --output option for ar I find available on Debian 2.35.2, but it seems to be not available on centos with 2.27-27.base.el7. So let's keep chdiring I guess

@yarikoptic
Copy link
Member

Looks LGTM, thank you!
just to make sure (since we have no test coverage for this) - did you try it out on some linux box?

@jwodder
Copy link
Member Author

jwodder commented Aug 31, 2021

@yarikoptic Yes, I tested it in a Docker container.

@yarikoptic
Copy link
Member

Great, thank you! Let's proceed

@yarikoptic yarikoptic merged commit 655b0f7 into master Aug 31, 2021
@yarikoptic yarikoptic deleted the gh-85 branch August 31, 2021 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

switch from dpkg -x to ar x && tar -xvf
3 participants