FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 06-22-2012, 05:27 PM
"Brian C. Lane"
 
Default makeupdates: add rpm contents to updates.img

From: "Brian C. Lane" <bcl@redhat.com>

This adds the -a option to makeupdates, it will expand the contents of
an rpm into the root of the updates image. This overlays the installer's
root filesystem, allowing any file to be updated.
---
scripts/makeupdates | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/scripts/makeupdates b/scripts/makeupdates
index b8f2e1d..12e9366 100755
--- a/scripts/makeupdates
+++ b/scripts/makeupdates
@@ -201,6 +201,12 @@ def copyUpdatedIsys(updates, cwd):
if os.path.isfile(isysmodule):
shutil.copy2(isysmodule, updates)

+def addRpms(updates, add_rpms):
+ for rpm in add_rpms:
+ cmd = "cd %s && rpm2cpio %s | cpio -dium" % (updates, rpm)
+ sys.stdout.write(cmd+"
")
+ os.system(cmd)
+
def createUpdatesImage(cwd, updates):
os.chdir(updates)
os.system("find . | cpio -c -o | gzip -9cv > %s/updates.img" % (cwd,))
@@ -214,6 +220,7 @@ def usage(cmd):
sys.stdout.write(" -h, --help Display this help and exit.
")
sys.stdout.write(" -t, --tag Make image from TAG to HEAD.
")
sys.stdout.write(" -o, --offset Make image from (latest_tag - OFFSET) to HEAD.
")
+ sys.stdout.write(" -a, --add Add contents of rpm to the update
")

def main(argv):
prog = os.path.basename(sys.argv[0])
@@ -225,10 +232,11 @@ def main(argv):
tag = None
opts = []
offset = 0
+ add_rpms = []

try:
- opts, args = getopt.getopt(sys.argv[1:], 't:kc?',
- ['tag=', 'offset=',
+ opts, args = getopt.getopt(sys.argv[1:], 'a:t:kc?',
+ ['add=', 'tag=', 'offset=',
'keep', 'compile', 'help'])
except getopt.GetoptError:
help = True
@@ -244,6 +252,8 @@ def main(argv):
tag = a
elif o in ('-o', '--offset'):
offset = int(a)
+ elif o in ('-a', '--add'):
+ add_rpms.append(os.path.abspath(a))
else:
unknown = True

@@ -275,6 +285,9 @@ def main(argv):
if isysChanged(tag):
copyUpdatedIsys(updates, cwd)

+ if add_rpms:
+ addRpms(updates, add_rpms)
+
createUpdatesImage(cwd, updates)

if not keep:
--
1.7.7.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 06-22-2012, 05:44 PM
Jesse Keating
 
Default makeupdates: add rpm contents to updates.img

On 06/22/2012 10:27 AM, Brian C. Lane wrote:

From: "Brian C. Lane"<bcl@redhat.com>

This adds the -a option to makeupdates, it will expand the contents of
an rpm into the root of the updates image. This overlays the installer's
root filesystem, allowing any file to be updated.


Ack.

--
Jesse Keating
Fedora -- Freedom˛ is a feature!


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 09:07 AM.

VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org