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

Remove unused clean_image_tars function from report.py #1044

Closed
nishakm opened this issue Sep 27, 2021 · 7 comments · Fixed by #1071
Closed

Remove unused clean_image_tars function from report.py #1044

nishakm opened this issue Sep 27, 2021 · 7 comments · Fixed by #1071
Labels
good first issue A good first issue to tackle if you are new to the project

Comments

@nishakm
Copy link
Contributor

nishakm commented Sep 27, 2021

WARNING
If this is your first tern contribution, please update your local git settings using these instructions.

DO NOT USE THE GITHUB UI!

When creating your commit message for your PR, make sure to use git commit -s rather than git commit -m

Remember to add a Fixes: #1044 line in your commit message.

Description
The clean_image_tars function in report.py has a duplicate in prep.py which
is the function to be used when removing image tarballs after analysis. Hence
we remove this unused function.

Implementation
Remove the following code block from tern/report/report.py:

 31 def clean_image_tars(image_obj):                                                
 32     '''Clean up untar directories'''                                            
 33     for layer in image_obj.layers:                                              
 34         fspath = rootfs.get_untar_dir(layer.tar_file)                           
 35         if os.path.exists(fspath):                                              
 36             rootfs.root_command(rootfs.remove, fspath)    

Remember to leave two blank lines between the write_report and clean_working_dir functions.

@nishakm nishakm added good first issue A good first issue to tackle if you are new to the project GH Open Source Day Reserved for Grace Hopper Open Source Day participants labels Sep 27, 2021
@Rushali-Sarkar
Copy link

Hello! I am taking part in the GHC open-source day and wanted to contribute for this issue

@Samaiya
Copy link
Contributor

Samaiya commented Oct 1, 2021

Hi , I am participating in vGHC and would like to work on this issue

@nishakm
Copy link
Contributor Author

nishakm commented Oct 1, 2021

Hi @Samaiya, This issue has already been assigned :). Would you like to take this one instead? #1041

@Samaiya
Copy link
Contributor

Samaiya commented Oct 1, 2021 via email

@rnjudge rnjudge removed the GH Open Source Day Reserved for Grace Hopper Open Source Day participants label Oct 19, 2021
@sayantani11
Copy link
Contributor

@rnjudge Can I take this?

@rnjudge
Copy link
Contributor

rnjudge commented Oct 26, 2021

@sayantani11 go for it!

@sayantani11
Copy link
Contributor

On it!

sayantani11 added a commit to sayantani11/tern that referenced this issue Oct 26, 2021
The clean_image_tars function in report.py
has a duplicate in prep.py which
is the function to be used when removing
image tarballs after analysis.
Hence we remove this unused function.

Resolves tern-tools#1044

Signed-off by: Sayantani Saha <ii.sayantani.ii@gmail.com>
sayantani11 added a commit to sayantani11/tern that referenced this issue Oct 26, 2021
The clean_image_tars function in report.py
has a duplicate in prep.py which
is the function to be used when removing
image tarballs after analysis.
Hence we remove this unused function.

Resolves tern-tools#1044

Signed-off by: Sayantani Saha <ii.sayantani.ii@gmail.com>
rnjudge pushed a commit that referenced this issue Oct 26, 2021
The clean_image_tars function in report.py
has a duplicate in prep.py which
is the function to be used when removing
image tarballs after analysis.
Hence we remove this unused function.

Resolves #1044

Signed-off by: Sayantani Saha <ii.sayantani.ii@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue A good first issue to tackle if you are new to the project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants