All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Kanavin <alexander.kanavin@linux.intel.com>
To: Mikko Ylinen <mikko.ylinen@linux.intel.com>,
	openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] package_manager: rpm: remove update-alternatives correctly
Date: Tue, 26 Sep 2017 15:21:20 +0300	[thread overview]
Message-ID: <cf7451e5-77c3-36ff-8e3e-dfef487c6b9e@linux.intel.com> (raw)
In-Reply-To: <20170926120328.14928-1-mikko.ylinen@linux.intel.com>

On 09/26/2017 03:03 PM, Mikko Ylinen wrote:
> @@ -614,13 +614,16 @@ class RpmPM(PackageManager):
>               self._invoke_dnf(["remove"] + pkgs)
>           else:
>               cmd = bb.utils.which(os.getenv('PATH'), "rpm")
> -            args = ["-e", "--nodeps", "--root=%s" %self.target_rootfs]
> +            args = ["-e", "-v", "--nodeps", "--root=%s" %self.target_rootfs]
>   
> -            try:
> -                output = subprocess.check_output([cmd] + args + pkgs, stderr=subprocess.STDOUT).decode("utf-8")
> -            except subprocess.CalledProcessError as e:
> -                bb.fatal("Could not invoke rpm. Command "
> -                     "'%s' returned %d:\n%s" % (' '.join([cmd] + args + pkgs), e.returncode, e.output.decode("utf-8")))
> +            for pkg in pkgs:
> +                try:
> +                    bb.note("Running %s" % ' '.join([cmd] + args + [pkg]))
> +                    output = subprocess.check_output([cmd] + args + [pkg], stderr=subprocess.STDOUT).decode("utf-8")
> +                    bb.note(output)
> +                except subprocess.CalledProcessError as e:
> +                    bb.fatal("Could not invoke rpm. Command "
> +                         "'%s' returned %d:\n%s" % (' '.join([cmd] + args + [pkg]), e.returncode, e.output.decode("utf-8")))
>   
>       def upgrade(self):
>           self._prepare_pkg_transaction()
> 

I'm worried this might significantly slow down image creation. How about 
fixing this in rootfs.py: first remove everything except 
update-alternatives, then remove that?


Alex


  reply	other threads:[~2017-09-26 12:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-26 12:03 [PATCH] package_manager: rpm: remove update-alternatives correctly Mikko Ylinen
2017-09-26 12:21 ` Alexander Kanavin [this message]
2017-09-27  8:08 ` [PATCH v2 0/2] " Mikko Ylinen
2017-09-27  8:08   ` [PATCH 1/2] rootfs.py: " Mikko Ylinen
2017-09-27  8:08   ` [PATCH 2/2] package_manager: rpm: improve logging Mikko Ylinen

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=cf7451e5-77c3-36ff-8e3e-dfef487c6b9e@linux.intel.com \
    --to=alexander.kanavin@linux.intel.com \
    --cc=mikko.ylinen@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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.