7ceebfd12a0503bee5eaab8d4c062a4389939a61Dwight Engen# Yum plugin to re-patch container rootfs after a yum update is done
7ceebfd12a0503bee5eaab8d4c062a4389939a61Dwight Engen# Copyright (C) 2012 Oracle
7ceebfd12a0503bee5eaab8d4c062a4389939a61Dwight Engen# Dwight Engen <dwight.engen@oracle.com>
391260dcb2ae8060134b635bc268ccdecf59003dDwight Engen# This library is free software; you can redistribute it and/or
391260dcb2ae8060134b635bc268ccdecf59003dDwight Engen# modify it under the terms of the GNU Lesser General Public
391260dcb2ae8060134b635bc268ccdecf59003dDwight Engen# License as published by the Free Software Foundation; either
391260dcb2ae8060134b635bc268ccdecf59003dDwight Engen# version 2.1 of the License, or (at your option) any later version.
391260dcb2ae8060134b635bc268ccdecf59003dDwight Engen# This library is distributed in the hope that it will be useful,
7ceebfd12a0503bee5eaab8d4c062a4389939a61Dwight Engen# but WITHOUT ANY WARRANTY; without even the implied warranty of
391260dcb2ae8060134b635bc268ccdecf59003dDwight Engen# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
391260dcb2ae8060134b635bc268ccdecf59003dDwight Engen# Lesser General Public License for more details.
391260dcb2ae8060134b635bc268ccdecf59003dDwight Engen# You should have received a copy of the GNU Lesser General Public
391260dcb2ae8060134b635bc268ccdecf59003dDwight Engen# License along with this library; if not, write to the Free Software
391260dcb2ae8060134b635bc268ccdecf59003dDwight Engen# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
7ceebfd12a0503bee5eaab8d4c062a4389939a61Dwight Engen # If we aren't root, we can't have updated anything
7ceebfd12a0503bee5eaab8d4c062a4389939a61Dwight Engen # See what packages have files that were patched
7ceebfd12a0503bee5eaab8d4c062a4389939a61Dwight Engen confpkgs = conduit.confString('main', 'packages')
7ceebfd12a0503bee5eaab8d4c062a4389939a61Dwight Engen conduit.info(2, "lxc-patch: checking if updated pkgs need patching...")
7ceebfd12a0503bee5eaab8d4c062a4389939a61Dwight Engen conduit.info(2, "lxc-patch: patching container...")
7ceebfd12a0503bee5eaab8d4c062a4389939a61Dwight Engen os.spawnlp(os.P_WAIT, "lxc-patch", "lxc-patch", "--patch", "/")