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

Not able to correctly use downloaded file with in action ''raw" #77

Open
d4s opened this issue May 11, 2018 · 2 comments
Open

Not able to correctly use downloaded file with in action ''raw" #77

d4s opened this issue May 11, 2018 · 2 comments
Labels

Comments

@d4s
Copy link
Collaborator

d4s commented May 11, 2018

In case if a single file is needed the origin is set to the file name.
It is not possible to use the pair origin + filename in other actions.
Example:

  - action: download
    name: uboot
    url: http://linode.boundarydevices.com/u-boot-images/u-boot.nitrogen6q

Ths action sets origin named uboot to downloaded file /scratch/u-boot.nitrogen6q

  • Expected raw action
  - action: raw
    description: Install U-Boot
    origin: uboot
    source: u-boot.nitrogen6q
    offset: {{ sector 2 }}

is trying to write file named /scratch/u-boot.nitrogen6q/u-boot.nitrogen6q

  • Workaround
  - action: raw
    description: Install U-Boot
    origin: uboot
    source: ../u-boot.nitrogen6q
    offset: {{ sector 2 }}
@d4s d4s added the bug label May 11, 2018
@cmuellner
Copy link
Contributor

Just ran into this as well.
Thank's for the workaround!

@andhe
Copy link
Contributor

andhe commented Nov 25, 2020

I think I ran into this exact issue in the above referenced PR and the workaround I found was source: .. My intuition suggested source key should be optional when the downloaded is the file and not an archive (i.e. unpack in download action is false), but apparently it's required. (Original issue seems to suggest it should be possible to specify the downloaded files name, but that feels like Write Everything Twice (WET) - not Don't Repeat Yourself (DRY).)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants