All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Cc: paul.eggleton@linux.intel.com
Subject: Re: [PATCH] lib/oe/package_manager: Include PACKAGE_FEED_PREFIX instead of hardcode paths
Date: Wed, 02 Sep 2015 14:31:25 -0500	[thread overview]
Message-ID: <55E74E8D.7040508@linux.intel.com> (raw)
In-Reply-To: <1439327368-2796-1-git-send-email-leonardo.sandoval.gonzalez@linux.intel.com>

ping..

Sent sometime ago, without any comments yet.

On 08/11/2015 04:09 PM, leonardo.sandoval.gonzalez@linux.intel.com wrote:
> From: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
>
> Instead of hardcode paths (/rpm/, /ipk/, /deb/), use a user-defined prefix
> when creating the URI feeds. URIs now will have the following syntax:
>
>      PACKAGE_FEED_URIS_1/PACKAGE_FEED_PREFIX
>      PACKAGE_FEED_URIS_2/PACKAGE_FEED_PREFIX
>      .
>
> where PACKAGE_FEED_URIS = "PACKAGE_FEED_URIS_1 PACKAGE_FEED_URIS_2 ...."
>
> [YOCTO #5407]
>
> Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
> ---
>   meta/lib/oe/package_manager.py |   28 +++++++++++++++++++---------
>   1 file changed, 19 insertions(+), 9 deletions(-)
>
> diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
> index 55b8ab0..7a85816 100644
> --- a/meta/lib/oe/package_manager.py
> +++ b/meta/lib/oe/package_manager.py
> @@ -488,6 +488,7 @@ class PackageManager(object):
>           self.deploy_dir = None
>           self.deploy_lock = None
>           self.feed_uris = self.d.getVar('PACKAGE_FEED_URIS', True) or ""
> +        self.feed_prefix = self.d.getVar('PACKAGE_FEED_PREFIX', True) or ""
>
>       """
>       Update the package manager package database.
> @@ -662,11 +663,14 @@ class RpmPM(PackageManager):
>           channel_priority = 10 + 5 * len(self.feed_uris.split()) * len(arch_list)
>
>           for uri in self.feed_uris.split():
> +            full_uri = uri
> +            if self.feed_prefix:
> +                full_uri = os.path.join(uri, self.feed_prefix)
>               for arch in arch_list:
>                   bb.note('Note: adding Smart channel url%d%s (%s)' %
>                           (uri_iterator, arch, channel_priority))
> -                self._invoke_smart('channel --add url%d-%s type=rpm-md baseurl=%s/rpm/%s -y'
> -                                   % (uri_iterator, arch, uri, arch))
> +                self._invoke_smart('channel --add url%d-%s type=rpm-md baseurl=%s/%s -y'
> +                                   % (uri_iterator, arch, full_uri, arch))
>                   self._invoke_smart('channel --set url%d-%s priority=%d' %
>                                      (uri_iterator, arch, channel_priority))
>                   channel_priority -= 5
> @@ -1343,17 +1347,20 @@ class OpkgPM(PackageManager):
>           with open(rootfs_config, "w+") as config_file:
>               uri_iterator = 0
>               for uri in self.feed_uris.split():
> -                config_file.write("src/gz url-%d %s/ipk\n" %
> -                                  (uri_iterator, uri))
> +                full_uri = uri
> +                if self.feed_prefix:
> +                    full_uri = os.path.join(uri, self.feed_prefix)
> +                config_file.write("src/gz url-%d %s\n" %
> +                                  (uri_iterator, full_uri))
>
>                   for arch in self.pkg_archs.split():
>                       if not os.path.exists(os.path.join(self.deploy_dir, arch)):
>                           continue
>                       bb.note('Note: adding opkg channel url-%s-%d (%s)' %
> -                        (arch, uri_iterator, uri))
> +                            (arch, uri_iterator, full_uri))
>
> -                    config_file.write("src/gz uri-%s-%d %s/ipk/%s\n" %
> -                                      (arch, uri_iterator, uri, arch))
> +                    config_file.write("src/gz uri-%s-%d %s/%s\n" %
> +                                      (arch, uri_iterator, full_uri, arch))
>                   uri_iterator += 1
>
>       def update(self):
> @@ -1706,10 +1713,13 @@ class DpkgPM(PackageManager):
>
>           with open(sources_conf, "w+") as sources_file:
>               for uri in self.feed_uris.split():
> +                full_uri = uri
> +                if self.feed_prefix:
> +                    full_uri = os.path.join(uri, self.feed_prefix)
>                   for arch in arch_list:
>                       bb.note('Note: adding dpkg channel at (%s)' % uri)
> -                    sources_file.write("deb %s/deb/%s ./\n" %
> -                                       (uri, arch))
> +                    sources_file.write("deb %s/%s ./\n" %
> +                                       (full_uri, arch))
>
>       def _create_configs(self, archs, base_archs):
>           base_archs = re.sub("_", "-", base_archs)
>


      reply	other threads:[~2015-09-02 19:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-11 21:09 [PATCH] lib/oe/package_manager: Include PACKAGE_FEED_PREFIX instead of hardcode paths leonardo.sandoval.gonzalez
2015-09-02 19:31 ` Leonardo Sandoval [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55E74E8D.7040508@linux.intel.com \
    --to=leonardo.sandoval.gonzalez@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=paul.eggleton@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.