* [PATCH 0/3] Delete WORKDIR/installed_pkgs.txt after use
@ 2015-11-04 7:50 mariano.lopez
2015-11-04 7:50 ` [PATCH 1/3] runtime/_ptest.py: Delete WORKDIR/installed_pkgs.txt mariano.lopez
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: mariano.lopez @ 2015-11-04 7:50 UTC (permalink / raw)
To: openembedded-core
From: Mariano Lopez <mariano.lopez@linux.intel.com>
These changes will delete the file installed_pkgs.txt once it used.
This file is used internally for complementary package installation
but it was left there after the use. This file was causing some
confusion and shouldn't be left there after the installation process
The following changes since commit fc45deac89ef63ca1c44e763c38ced7dfd72cbe1:
build-appliance-image: Update to jethro head revision (2015-11-03 14:03:03 +0000)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib mariano/bug8444
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=mariano/bug8444
Mariano Lopez (3):
runtime/_ptest.py: Delete WORKDIR/installed_pkgs.txt
rootfs.py: Stop using installed_pkgs.txt
package_manager.py: Delete installed_pkgs.txt file
meta/lib/oe/package_manager.py | 1 +
meta/lib/oe/rootfs.py | 24 +++++++++---------------
meta/lib/oeqa/runtime/_ptest.py | 2 ++
3 files changed, 12 insertions(+), 15 deletions(-)
--
1.8.4.5
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/3] runtime/_ptest.py: Delete WORKDIR/installed_pkgs.txt
2015-11-04 7:50 [PATCH 0/3] Delete WORKDIR/installed_pkgs.txt after use mariano.lopez
@ 2015-11-04 7:50 ` mariano.lopez
2015-11-04 7:50 ` [PATCH 2/3] rootfs.py: Stop using installed_pkgs.txt mariano.lopez
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: mariano.lopez @ 2015-11-04 7:50 UTC (permalink / raw)
To: openembedded-core
From: Mariano Lopez <mariano.lopez@linux.intel.com>
The file WORKDIR/installed_pkgs.txt is an internal file
used for package installation, neverteless it is left in
the WORKDIR and this can cause confusion.
ptest use this file internally also (it overwrites the file
left when creating the rootfs) and don't remove the file in
WORKDIR, this changes deletes the file once is used.
[YOCTO #8444]
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
---
meta/lib/oeqa/runtime/_ptest.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/meta/lib/oeqa/runtime/_ptest.py b/meta/lib/oeqa/runtime/_ptest.py
index 0621028..fefc576 100644
--- a/meta/lib/oeqa/runtime/_ptest.py
+++ b/meta/lib/oeqa/runtime/_ptest.py
@@ -91,7 +91,9 @@ class PtestRunnerTest(oeRuntimeTest):
try:
bb.note("Installing complementary packages ...")
complementary_pkgs = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
+ os.remove(installed_pkgs_file)
except subprocess.CalledProcessError as e:
+ os.remove(installed_pkgs_file)
bb.fatal("Could not compute complementary packages list. Command "
"'%s' returned %d:\n%s" %
(' '.join(cmd), e.returncode, e.output))
--
1.8.4.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] rootfs.py: Stop using installed_pkgs.txt
2015-11-04 7:50 [PATCH 0/3] Delete WORKDIR/installed_pkgs.txt after use mariano.lopez
2015-11-04 7:50 ` [PATCH 1/3] runtime/_ptest.py: Delete WORKDIR/installed_pkgs.txt mariano.lopez
@ 2015-11-04 7:50 ` mariano.lopez
2015-11-04 7:50 ` [PATCH 3/3] package_manager.py: Delete installed_pkgs.txt file mariano.lopez
2015-11-05 1:28 ` [PATCH 0/3] Delete WORKDIR/installed_pkgs.txt after use Robert Yang
3 siblings, 0 replies; 7+ messages in thread
From: mariano.lopez @ 2015-11-04 7:50 UTC (permalink / raw)
To: openembedded-core
From: Mariano Lopez <mariano.lopez@linux.intel.com>
The method _uninstall_unneeded uses the file installed_pkgs.txt,
this file is left after the build and can cause confusion. This
changes allow to get the installed packages using functions of
rootfs instead of the installed_pkgs.txt file. With this change
now is possible to remove the file without breaking anything.
[YOCTO #8444]
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
---
meta/lib/oe/rootfs.py | 24 +++++++++---------------
1 file changed, 9 insertions(+), 15 deletions(-)
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index 18df22d..c004a5b 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -243,25 +243,19 @@ class Rootfs(object):
# Remove components that we don't need if we're not going to install
# additional packages at runtime
if delayed_postinsts is None:
- installed_pkgs_dir = self.d.expand('${WORKDIR}/installed_pkgs.txt')
+ pkgs_installed = image_list_installed_packages(self.d)
pkgs_to_remove = list()
- with open(installed_pkgs_dir, "r+") as installed_pkgs:
- pkgs_installed = installed_pkgs.read().splitlines()
- for pkg_installed in pkgs_installed[:]:
- pkg = pkg_installed.split()[0]
- if pkg in ["update-rc.d",
- "base-passwd",
- "shadow",
- "update-alternatives", pkg_to_remove,
- self.d.getVar("ROOTFS_BOOTSTRAP_INSTALL", True)
- ]:
- pkgs_to_remove.append(pkg)
- pkgs_installed.remove(pkg_installed)
+ for pkg in pkgs_installed.split():
+ if pkg in ["update-rc.d",
+ "base-passwd",
+ "shadow",
+ "update-alternatives", pkg_to_remove,
+ self.d.getVar("ROOTFS_BOOTSTRAP_INSTALL", True)
+ ]:
+ pkgs_to_remove.append(pkg)
if len(pkgs_to_remove) > 0:
self.pm.remove(pkgs_to_remove, False)
- # Update installed_pkgs.txt
- open(installed_pkgs_dir, "w+").write('\n'.join(pkgs_installed))
else:
self._save_postinsts()
--
1.8.4.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] package_manager.py: Delete installed_pkgs.txt file
2015-11-04 7:50 [PATCH 0/3] Delete WORKDIR/installed_pkgs.txt after use mariano.lopez
2015-11-04 7:50 ` [PATCH 1/3] runtime/_ptest.py: Delete WORKDIR/installed_pkgs.txt mariano.lopez
2015-11-04 7:50 ` [PATCH 2/3] rootfs.py: Stop using installed_pkgs.txt mariano.lopez
@ 2015-11-04 7:50 ` mariano.lopez
2015-11-05 1:28 ` [PATCH 0/3] Delete WORKDIR/installed_pkgs.txt after use Robert Yang
3 siblings, 0 replies; 7+ messages in thread
From: mariano.lopez @ 2015-11-04 7:50 UTC (permalink / raw)
To: openembedded-core
From: Mariano Lopez <mariano.lopez@linux.intel.com>
This change removes the file installed_pkgs.txt after it
was used for installation of complementary packages. This
file was causing confusion when left in the WORKDIR after
the build.
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
---
meta/lib/oe/package_manager.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 964fddc..bc33473 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -625,6 +625,7 @@ class PackageManager(object):
"'%s' returned %d:\n%s" %
(' '.join(cmd), e.returncode, e.output))
self.install(complementary_pkgs.split(), attempt_only=True)
+ os.remove(installed_pkgs_file)
def deploy_dir_lock(self):
if self.deploy_dir is None:
--
1.8.4.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/3] Delete WORKDIR/installed_pkgs.txt after use
2015-11-04 7:50 [PATCH 0/3] Delete WORKDIR/installed_pkgs.txt after use mariano.lopez
` (2 preceding siblings ...)
2015-11-04 7:50 ` [PATCH 3/3] package_manager.py: Delete installed_pkgs.txt file mariano.lopez
@ 2015-11-05 1:28 ` Robert Yang
2015-11-05 8:56 ` Burton, Ross
3 siblings, 1 reply; 7+ messages in thread
From: Robert Yang @ 2015-11-05 1:28 UTC (permalink / raw)
To: mariano.lopez, openembedded-core
On 11/04/2015 03:50 PM, mariano.lopez@linux.intel.com wrote:
> From: Mariano Lopez <mariano.lopez@linux.intel.com>
>
> These changes will delete the file installed_pkgs.txt once it used.
> This file is used internally for complementary package installation
> but it was left there after the use. This file was causing some
> confusion and shouldn't be left there after the installation process
The installed_pkgs.txt is very useful as a reference when we want to know
which pkgs are installed, there is no other easy way to know.
// Robert
>
> The following changes since commit fc45deac89ef63ca1c44e763c38ced7dfd72cbe1:
>
> build-appliance-image: Update to jethro head revision (2015-11-03 14:03:03 +0000)
>
> are available in the git repository at:
>
> git://git.yoctoproject.org/poky-contrib mariano/bug8444
> http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=mariano/bug8444
>
> Mariano Lopez (3):
> runtime/_ptest.py: Delete WORKDIR/installed_pkgs.txt
> rootfs.py: Stop using installed_pkgs.txt
> package_manager.py: Delete installed_pkgs.txt file
>
> meta/lib/oe/package_manager.py | 1 +
> meta/lib/oe/rootfs.py | 24 +++++++++---------------
> meta/lib/oeqa/runtime/_ptest.py | 2 ++
> 3 files changed, 12 insertions(+), 15 deletions(-)
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/3] Delete WORKDIR/installed_pkgs.txt after use
2015-11-05 1:28 ` [PATCH 0/3] Delete WORKDIR/installed_pkgs.txt after use Robert Yang
@ 2015-11-05 8:56 ` Burton, Ross
2015-11-05 15:48 ` Mariano Lopez
0 siblings, 1 reply; 7+ messages in thread
From: Burton, Ross @ 2015-11-05 8:56 UTC (permalink / raw)
To: Robert Yang; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 321 bytes --]
On 5 November 2015 at 01:28, Robert Yang <liezhi.yang@windriver.com> wrote:
> The installed_pkgs.txt is very useful as a reference when we want to know
> which pkgs are installed, there is no other easy way to know.
>
There's a manifest in the deploy directory which has the advantage of being
correct.
Ross
[-- Attachment #2: Type: text/html, Size: 717 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/3] Delete WORKDIR/installed_pkgs.txt after use
2015-11-05 8:56 ` Burton, Ross
@ 2015-11-05 15:48 ` Mariano Lopez
0 siblings, 0 replies; 7+ messages in thread
From: Mariano Lopez @ 2015-11-05 15:48 UTC (permalink / raw)
To: Burton, Ross, Robert Yang; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 523 bytes --]
On 11/05/2015 02:56 AM, Burton, Ross wrote:
>
> On 5 November 2015 at 01:28, Robert Yang <liezhi.yang@windriver.com
> <mailto:liezhi.yang@windriver.com>> wrote:
>
> The installed_pkgs.txt is very useful as a reference when we want
> to know
> which pkgs are installed, there is no other easy way to know.
>
You can also use function image_list_installed_packages from oe.rootfs
Mariano
>
> There's a manifest in the deploy directory which has the advantage of
> being correct.
>
> Ross
[-- Attachment #2: Type: text/html, Size: 1827 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-11-05 15:48 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-04 7:50 [PATCH 0/3] Delete WORKDIR/installed_pkgs.txt after use mariano.lopez
2015-11-04 7:50 ` [PATCH 1/3] runtime/_ptest.py: Delete WORKDIR/installed_pkgs.txt mariano.lopez
2015-11-04 7:50 ` [PATCH 2/3] rootfs.py: Stop using installed_pkgs.txt mariano.lopez
2015-11-04 7:50 ` [PATCH 3/3] package_manager.py: Delete installed_pkgs.txt file mariano.lopez
2015-11-05 1:28 ` [PATCH 0/3] Delete WORKDIR/installed_pkgs.txt after use Robert Yang
2015-11-05 8:56 ` Burton, Ross
2015-11-05 15:48 ` Mariano Lopez
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.