All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] V2 add downloadfilename to wget fetcher
@ 2012-07-19  0:39 ` nitin.a.kamble
  0 siblings, 0 replies; 6+ messages in thread
From: nitin.a.kamble @ 2012-07-18 18:21 UTC (permalink / raw)
  To: Openembedded-core, poky

From: Nitin A Kamble <nitin.a.kamble@intel.com>

In this V2 commit, not required changes from __init__.py are removed.
Thanks,
Nitin

The following changes since commit 5b014eae151a1584df4e3d3b96d18f9df3e55665:

  fix my typos in patch headers (2012-07-16 21:45:01 -0700)

are available in the git repository at:
  git://git.pokylinux.org/poky-contrib nitin/misc
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=nitin/misc

Nitin A Kamble (1):
  bitbake wget fetcher: add parameter: downloadfilename

 bitbake/lib/bb/fetch2/wget.py |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

-- 
1.7.3.4




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

* [PATCH 1/1] bitbake wget fetcher: add parameter: downloadfilename
  2012-07-19  0:39 ` [PATCH 0/1] V2 add downloadfilename param " nitin.a.kamble
@ 2012-07-19  0:39   ` nitin.a.kamble
  -1 siblings, 0 replies; 6+ messages in thread
From: nitin.a.kamble @ 2012-07-18 18:21 UTC (permalink / raw)
  To: Openembedded-core, poky

From: Nitin A Kamble <nitin.a.kamble@intel.com>

this allows wget fetcher to store the downloaded file in a specified custom filename in ${DL_DIR}

Exmaple:
SRC_URI = "https://edc.intel.com/Download.aspx?id=6190;downloadfilename=LIN_IEMGD_1_14_GOLD_2443.tgz"

This fixes bug:
[YOCTO #2570]

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
---
 bitbake/lib/bb/fetch2/wget.py |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py
index b784afb..9affa0d 100644
--- a/bitbake/lib/bb/fetch2/wget.py
+++ b/bitbake/lib/bb/fetch2/wget.py
@@ -50,7 +50,11 @@ class Wget(FetchMethod):
 
     def urldata_init(self, ud, d):
 
-        ud.basename = os.path.basename(ud.path)
+        if 'downloadfilename' in ud.parm:
+            ud.basename = ud.parm['downloadfilename']
+        else:
+            ud.basename = os.path.basename(ud.path)
+
         ud.localfile = data.expand(urllib.unquote(ud.basename), d)
 
     def download(self, uri, ud, d, checkonly = False):
@@ -58,6 +62,9 @@ class Wget(FetchMethod):
 
         basecmd = d.getVar("FETCHCMD_wget", True) or "/usr/bin/env wget -t 2 -T 30 -nv --passive-ftp --no-check-certificate"
 
+        if 'downloadfilename' in ud.parm:
+            basecmd += " -O ${DL_DIR}/" + ud.localfile
+
         if checkonly:
             fetchcmd = d.getVar("CHECKCOMMAND_wget", True) or d.expand(basecmd + " -c -P ${DL_DIR} '${URI}'")
         elif os.path.exists(ud.localpath):
-- 
1.7.3.4




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

* [PATCH 0/1] V2 add downloadfilename param to wget fetcher
@ 2012-07-19  0:39 ` nitin.a.kamble
  0 siblings, 0 replies; 6+ messages in thread
From: nitin.a.kamble @ 2012-07-19  0:39 UTC (permalink / raw)
  To: bitbake-devel; +Cc: Nitin A Kamble

From: Nitin A Kamble <nitin.a.kamble@intel.com>

This add a new parameter to wget fetcher. It enables storing the
downloaded file with any custom name which can be different than
the basename of the url.

It is useful for situations like this:
SRC_URI = "https://edc.intel.com/Download.aspx?id=6190;downloadfilename=LIN_IEMGD_1_14_GOLD_2443.tgz"

Thanks,
Nitin

The following changes since commit 5b014eae151a1584df4e3d3b96d18f9df3e55665:

  fix my typos in patch headers (2012-07-16 21:45:01 -0700)

are available in the git repository at:
  git://git.pokylinux.org/poky-contrib nitin/misc
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=nitin/misc

Nitin A Kamble (1):
  bitbake wget fetcher: add parameter: downloadfilename

 bitbake/lib/bb/fetch2/wget.py |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

-- 
1.7.3.4




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

* [PATCH 1/1] bitbake wget fetcher: add parameter: downloadfilename
@ 2012-07-19  0:39   ` nitin.a.kamble
  0 siblings, 0 replies; 6+ messages in thread
From: nitin.a.kamble @ 2012-07-19  0:39 UTC (permalink / raw)
  To: bitbake-devel

From: Nitin A Kamble <nitin.a.kamble@intel.com>

this allows wget fetcher to store the downloaded file in a specified custom filename in ${DL_DIR}

Exmaple:
SRC_URI = "https://edc.intel.com/Download.aspx?id=6190;downloadfilename=LIN_IEMGD_1_14_GOLD_2443.tgz"

This fixes bug:
[YOCTO #2570]

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
---
 bitbake/lib/bb/fetch2/wget.py |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py
index b784afb..9affa0d 100644
--- a/bitbake/lib/bb/fetch2/wget.py
+++ b/bitbake/lib/bb/fetch2/wget.py
@@ -50,7 +50,11 @@ class Wget(FetchMethod):
 
     def urldata_init(self, ud, d):
 
-        ud.basename = os.path.basename(ud.path)
+        if 'downloadfilename' in ud.parm:
+            ud.basename = ud.parm['downloadfilename']
+        else:
+            ud.basename = os.path.basename(ud.path)
+
         ud.localfile = data.expand(urllib.unquote(ud.basename), d)
 
     def download(self, uri, ud, d, checkonly = False):
@@ -58,6 +62,9 @@ class Wget(FetchMethod):
 
         basecmd = d.getVar("FETCHCMD_wget", True) or "/usr/bin/env wget -t 2 -T 30 -nv --passive-ftp --no-check-certificate"
 
+        if 'downloadfilename' in ud.parm:
+            basecmd += " -O ${DL_DIR}/" + ud.localfile
+
         if checkonly:
             fetchcmd = d.getVar("CHECKCOMMAND_wget", True) or d.expand(basecmd + " -c -P ${DL_DIR} '${URI}'")
         elif os.path.exists(ud.localpath):
-- 
1.7.3.4




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

* Re: [PATCH 0/1] V2 add downloadfilename to wget fetcher
  2012-07-19  0:39 ` [PATCH 0/1] V2 add downloadfilename param " nitin.a.kamble
  (?)
  (?)
@ 2012-07-19 19:00 ` Saul Wold
  -1 siblings, 0 replies; 6+ messages in thread
From: Saul Wold @ 2012-07-19 19:00 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer


This should go to the bitbake-devel@lists.openembedded.org

Sau!


On 07/18/2012 11:21 AM, nitin.a.kamble@intel.com wrote:
> From: Nitin A Kamble <nitin.a.kamble@intel.com>
>
> In this V2 commit, not required changes from __init__.py are removed.
> Thanks,
> Nitin
>
> The following changes since commit 5b014eae151a1584df4e3d3b96d18f9df3e55665:
>
>    fix my typos in patch headers (2012-07-16 21:45:01 -0700)
>
> are available in the git repository at:
>    git://git.pokylinux.org/poky-contrib nitin/misc
>    http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=nitin/misc
>
> Nitin A Kamble (1):
>    bitbake wget fetcher: add parameter: downloadfilename
>
>   bitbake/lib/bb/fetch2/wget.py |    9 ++++++++-
>   1 files changed, 8 insertions(+), 1 deletions(-)
>




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

* Re: [PATCH 1/1] bitbake wget fetcher: add parameter: downloadfilename
  2012-07-19  0:39   ` nitin.a.kamble
  (?)
@ 2012-07-24  9:37   ` Richard Purdie
  -1 siblings, 0 replies; 6+ messages in thread
From: Richard Purdie @ 2012-07-24  9:37 UTC (permalink / raw)
  To: nitin.a.kamble; +Cc: bitbake-devel

On Wed, 2012-07-18 at 17:39 -0700, nitin.a.kamble@intel.com wrote:
> From: Nitin A Kamble <nitin.a.kamble@intel.com>
> 
> this allows wget fetcher to store the downloaded file in a specified custom filename in ${DL_DIR}
> 
> Exmaple:
> SRC_URI = "https://edc.intel.com/Download.aspx?id=6190;downloadfilename=LIN_IEMGD_1_14_GOLD_2443.tgz"
> 
> This fixes bug:
> [YOCTO #2570]
> 
> Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
> ---
>  bitbake/lib/bb/fetch2/wget.py |    9 ++++++++-
>  1 files changed, 8 insertions(+), 1 deletions(-)

Merged to master, thanks.

Richard




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

end of thread, other threads:[~2012-07-24  9:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-18 18:21 [PATCH 0/1] V2 add downloadfilename to wget fetcher nitin.a.kamble
2012-07-19  0:39 ` [PATCH 0/1] V2 add downloadfilename param " nitin.a.kamble
2012-07-18 18:21 ` [PATCH 1/1] bitbake wget fetcher: add parameter: downloadfilename nitin.a.kamble
2012-07-19  0:39   ` nitin.a.kamble
2012-07-24  9:37   ` Richard Purdie
2012-07-19 19:00 ` [PATCH 0/1] V2 add downloadfilename to wget fetcher Saul Wold

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.