diff options
| author | Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com> | 2023-11-30 22:07:47 -0700 |
|---|---|---|
| committer | Mark Hatle <mark.hatle@amd.com> | 2023-12-08 11:30:55 -0600 |
| commit | 9b391bbaf9ed0b83a493f20e48594a1c1e3004ce (patch) | |
| tree | d03c7dacabb3b02841fb9845495589ab5ea69443 /meta-xilinx-core/classes/xilinx-fetch-restricted.bbclass | |
| parent | 9461f910a0b4415941d2bbac4406b37236d0a6de (diff) | |
| download | meta-xilinx-9b391bbaf9ed0b83a493f20e48594a1c1e3004ce.tar.gz | |
classes: Move classes to match bbclass scope functionality
Move classes to classes-global or classes-recipe as appropriate to
match bbclass scope functionality. Below is the list.
classes-recipe: (inherited by recipes)
amd_spi_image.bbclass
dfx_user_dts.bbclass
image-wic-utils.bbclass
kernel-simpleimage.bbclass
qemuboot-xilinx.bbclass
xilinx-fetch-restricted.bbclass
xilinx-platform-init.bbclass
classes-global: (inherited globally)
xilinx-microblaze.bbclass
classes: (usage context is not clearly defined)
gen-machine-conf.bbclass
image-types-xilinx-qemu.bbclass
xilinx-testimage.bbclass
xilinx-vars.bbclass
xilinx-deprecated.bbclass
Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Diffstat (limited to 'meta-xilinx-core/classes/xilinx-fetch-restricted.bbclass')
| -rw-r--r-- | meta-xilinx-core/classes/xilinx-fetch-restricted.bbclass | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/meta-xilinx-core/classes/xilinx-fetch-restricted.bbclass b/meta-xilinx-core/classes/xilinx-fetch-restricted.bbclass deleted file mode 100644 index a778ec7d..00000000 --- a/meta-xilinx-core/classes/xilinx-fetch-restricted.bbclass +++ /dev/null | |||
| @@ -1,35 +0,0 @@ | |||
| 1 | # This class is setup to override the default fetching for the target recipe. | ||
| 2 | # When fetching it forces PREMIRROR only fetching so that no attempts are made | ||
| 3 | # to fetch the Xilinx downloads that are restricted to authenticated users only. | ||
| 4 | # | ||
| 5 | # The purpose of this class is to allow for automatation with pre-downloaded | ||
| 6 | # content or content that is available with curated/user defined pre-mirrors | ||
| 7 | # and or pre-populated downloads/ directories. | ||
| 8 | |||
| 9 | python do_fetch() { | ||
| 10 | xilinx_restricted_url = "xilinx.com/member/forms/download" | ||
| 11 | |||
| 12 | src_uri = (d.getVar('SRC_URI') or "").split() | ||
| 13 | if len(src_uri) == 0: | ||
| 14 | return | ||
| 15 | |||
| 16 | for i in src_uri: | ||
| 17 | if xilinx_restricted_url in i: | ||
| 18 | # force the use of premirrors only, do not attempt download from xilinx.com | ||
| 19 | d.setVar("BB_FETCH_PREMIRRORONLY", "1") | ||
| 20 | break | ||
| 21 | |||
| 22 | try: | ||
| 23 | fetcher = bb.fetch2.Fetch(src_uri, d) | ||
| 24 | fetcher.download() | ||
| 25 | except bb.fetch2.NetworkAccess as e: | ||
| 26 | if xilinx_restricted_url in e.url: | ||
| 27 | # fatal on access to xilinx.com restricted downloads, print the url for manual download | ||
| 28 | bb.fatal("The following download cannot be fetched automatically. " \ | ||
| 29 | "Please manually download the file and place it in the 'downloads' directory (or on an available PREMIRROR).\n" \ | ||
| 30 | " %s" % (e.url.split(";")[0])) | ||
| 31 | else: | ||
| 32 | bb.fatal(str(e)) | ||
| 33 | except bb.fetch2.BBFetchException as e: | ||
| 34 | bb.fatal(str(e)) | ||
| 35 | } | ||
