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

fix extraneous output when outputting build path #950

Merged
merged 2 commits into from
May 18, 2016

Conversation

msarahan
Copy link
Contributor

conda build --output was outputting other stuff, when external tools required strictly the package output path. This fixes it, and adds tests for the behavior.

Closes #949 (sorry everyone)

@msarahan msarahan added the in_progress [deprecated] use milestones/project boards label May 13, 2016
@stefanseefeld
Copy link

Now I see the "old" (and wrong) behavior again, i.e. it reports a label that doesn't correspond to what's in my local tree.

@msarahan
Copy link
Contributor Author

Yeah, I was trying to be clever about avoiding downloading the source, but that just doesn't work. It will successfully render without it in your case, but it will not be accurate.

@msarahan msarahan force-pushed the output_junk_fixes branch 2 times, most recently from 7dca28c to 1b89c42 Compare May 14, 2016 01:39
@stefanseefeld
Copy link

Now conda build ... --output again generates more output than is desirable:

(py34)[stefan@quasimodo numba]$ conda build --numpy=1.10 --python=2.7 buildscripts/condarecipe.local --output
Copying /home/stefan/projects/numba to /usr/local/Continuum/anaconda/conda-bld/work
/usr/local/Continuum/anaconda/conda-bld/linux-64/numba-0.26.0.dev-np110py27_199.tar.bz2

@codecov-io
Copy link

Current coverage is 13.0%

Merging #950 into master will increase coverage by 1.1%

@@             master       #950   diff @@
==========================================
  Files            42         42          
  Lines          5305       5313     +8   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits            632        691    +59   
+ Misses         4673       4622    -51   
  Partials          0          0          
  1. 5 files (not in diff) in conda_build were modified. more
    • Misses -58
    • Hits +58

Powered by Codecov. Last updated by c06bfdf...777fab6

@johanneskoester
Copy link
Contributor

Can you quickly clarify when the source is downloaded now? To me, it looks like it is downloaded always, regardless of if it is needed or not. This would be a huge problem for bioconda, because we use --skip-existing and --output to determine if recipes need a rebuild. However, we have thousands of recipes in our repository and downloading the source for all of them would need ages.

@msarahan
Copy link
Contributor Author

This isn't finished yet. The idea is that it will only download source when it needs to. For example, if your recipe uses git variables in jinja templates, you can't know the build output path without downloading the source. However, if that's not necessary, then we should not download the source.

@msarahan msarahan changed the title fix extraneous output when outputting build path WIP: fix extraneous output when outputting build path May 16, 2016
@johanneskoester
Copy link
Contributor

That's good, thanks!

if src_path.lower().endswith(('.tar.gz', '.tar.bz2', '.tgz', '.tar.xz',
'.tar', 'tar.z')):
tar_xf(src_path, WORK_DIR)
elif src_path.lower().endswith('.zip'):
unzip(src_path, WORK_DIR)
else:
# In this case, the build script will need to deal with unpacking the source
print("Warning: Unrecognized source format. Source file will be copied to the SRC_DIR")
if verbose:
print("Warning: Unrecognized source format. Source file will be copied to the SRC_DIR")
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this warning be raised even if verbose is False? I normally think of verbose as "no chatter, but if something goes wrong please do tell me."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I'll fix that.

@mwcraig
Copy link
Contributor

mwcraig commented May 17, 2016

Just one fairly minor comment. The tests do seem to be checking for #949 properly. Haven't tried running this locally, but can if you want.

@msarahan msarahan changed the title WIP: fix extraneous output when outputting build path fix extraneous output when outputting build path May 18, 2016
@msarahan msarahan merged commit f91de2a into conda:master May 18, 2016
@msarahan msarahan removed the in_progress [deprecated] use milestones/project boards label May 18, 2016
@msarahan msarahan deleted the output_junk_fixes branch May 18, 2016 01:14
@github-actions github-actions bot added the locked [bot] locked due to inactivity label May 16, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Erroneous extra output in conda build --output conda.recipe
5 participants