All of lore.kernel.org
 help / color / mirror / Atom feed
* Proper way to rename a downloaded file in SRC_URI
@ 2017-07-18 16:40 Jimi Damon
  2017-07-18 16:47 ` Paul Eggleton
  2017-07-18 16:53 ` Leonardo Sandoval
  0 siblings, 2 replies; 3+ messages in thread
From: Jimi Damon @ 2017-07-18 16:40 UTC (permalink / raw)
  To: yocto@yoctoproject.org

[-- Attachment #1: Type: text/plain, Size: 792 bytes --]

I have a recipe that I built for building jzmq, however one of the 
issues I have is with the naming of the release files from the github site.

Unlike czmq which has downloads ( zip and tar.gz ) that are named 
czmq-${PV}.tar.gz, the downloads from jzmq are just called v${PV}.tar.gz.


How can I rename this file upon download so that the filename is in fact 
unique to this package ?

I can definitely see that the file v3.1.0.tar.gz in my downloads 
directory is not unique and could conflict with another package that is 
similarly named for its releases.


My workaround right now is to use the specific SHA string and use the 
git:// protocol, but it would be a bit easier to just use the released 
version and change the filename for saving it in downloads.





[-- Attachment #2: Type: text/html, Size: 1214 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Proper way to rename a downloaded file in SRC_URI
  2017-07-18 16:40 Proper way to rename a downloaded file in SRC_URI Jimi Damon
@ 2017-07-18 16:47 ` Paul Eggleton
  2017-07-18 16:53 ` Leonardo Sandoval
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Eggleton @ 2017-07-18 16:47 UTC (permalink / raw)
  To: Jimi Damon; +Cc: yocto

Hi Jimi,

On Tuesday, 18 July 2017 6:40:52 PM CEST Jimi Damon wrote:
> I have a recipe that I built for building jzmq, however one of the 
> issues I have is with the naming of the release files from the github site.
> 
> Unlike czmq which has downloads ( zip and tar.gz ) that are named 
> czmq-${PV}.tar.gz, the downloads from jzmq are just called v${PV}.tar.gz.
> 
> How can I rename this file upon download so that the filename is in fact 
> unique to this package ?

Use the downloadfilename parameter e.g. (made up URL):

SRC_URI = "http://github.com/jzmq/download/v${PV}.tar.gz;downloadfilename=${PN}-${PV}.tar.gz"

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Proper way to rename a downloaded file in SRC_URI
  2017-07-18 16:40 Proper way to rename a downloaded file in SRC_URI Jimi Damon
  2017-07-18 16:47 ` Paul Eggleton
@ 2017-07-18 16:53 ` Leonardo Sandoval
  1 sibling, 0 replies; 3+ messages in thread
From: Leonardo Sandoval @ 2017-07-18 16:53 UTC (permalink / raw)
  To: Jimi Damon; +Cc: yocto@yoctoproject.org

On Tue, 2017-07-18 at 09:40 -0700, Jimi Damon wrote:
> I have a recipe that I built for building jzmq, however one of the
> issues I have is with the naming of the release files from the github
> site.
> 
> Unlike czmq which has downloads ( zip and tar.gz ) that are named
> czmq-${PV}.tar.gz, the downloads from jzmq are just called v
> ${PV}.tar.gz. 
> 
> 
> 
> How can I rename this file upon download so that the filename is in
> fact unique to this package ? 

at the SRC_URI value, you may use the downloadfilename standard option.

http://www.yoctoproject.org/docs/2.3/mega-manual/mega-manual.html#var-SRC_URI



> 
> 
> I can definitely see that the file v3.1.0.tar.gz in my downloads
> directory is not unique and could conflict with another package that
> is similarly named for its releases.
> 
> 
> My workaround right now is to use the specific SHA string and use the
> git:// protocol, but it would be a bit easier to just use the released
> version and change the filename for saving it in downloads.
> 
> 
> 
> 
> -- 
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-07-18 16:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-18 16:40 Proper way to rename a downloaded file in SRC_URI Jimi Damon
2017-07-18 16:47 ` Paul Eggleton
2017-07-18 16:53 ` Leonardo Sandoval

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.