Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 304658 Details for
Bug 445387
Allow specifying basearch on the command line
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch adding --basearch command line argument
livecd-tools-basearch.patch (text/plain), 5.52 KB, created by
Owen Taylor
on 2008-05-06 16:54:02 UTC
(
hide
)
Description:
Patch adding --basearch command line argument
Filename:
MIME Type:
Creator:
Owen Taylor
Created:
2008-05-06 16:54:02 UTC
Size:
5.52 KB
patch
obsolete
>diff -ur livecd-tools-015/imgcreate/creator.py livecd-tools-015.patch/imgcreate/creator.py >--- livecd-tools-015/imgcreate/creator.py 2008-03-06 19:39:56.000000000 -0500 >+++ livecd-tools-015.patch/imgcreate/creator.py 2008-05-06 09:11:04.000000000 -0400 >@@ -48,7 +48,7 @@ > > """ > >- def __init__(self, ks, name): >+ def __init__(self, ks, name, arch = None, basearch = None): > """Initialize an ImageCreator instance. > > ks -- a pykickstart.KickstartParser instance; this instance will be >@@ -58,6 +58,12 @@ > name -- a name for the image; used for e.g. image filenames or > filesystem labels > >+ arch -- the architecture to use for finding yum repositories; if not >+ set will use the system architecture >+ >+ basearch -- the base architecture to use for finding yum repositories; >+ if not set will use the system architecture >+ > """ > self.ks = ks > """A pykickstart.KickstartParser instance.""" >@@ -68,6 +74,9 @@ > self.tmpdir = "/var/tmp" > """The directory in which all temporary files will be created.""" > >+ self.__arch = arch >+ self.__basearch = basearch >+ > self.__builddir = None > self.__bindmounts = [] > >@@ -564,7 +573,7 @@ > for repo in kickstart.get_repos(self.ks, repo_urls): > (name, baseurl, mirrorlist, inc, exc) = repo > >- yr = ayum.addRepository(name, baseurl, mirrorlist) >+ yr = ayum.addRepository(name, baseurl, mirrorlist, arch = self.__arch, basearch = self.__basearch) > if inc: > yr.includepkgs = inc > if exc: >@@ -704,7 +713,7 @@ > > """ > >- def __init__(self, ks, name, fslabel = None): >+ def __init__(self, ks, name, fslabel = None, **kwargs): > """Initialize a LoopImageCreator instance. > > This method takes the same arguments as ImageCreator.__init__() with >@@ -713,7 +722,7 @@ > fslabel -- A string used as a label for any filesystems created. > > """ >- ImageCreator.__init__(self, ks, name) >+ ImageCreator.__init__(self, ks, name, **kwargs) > > self.__fslabel = None > self.fslabel = fslabel >Only in livecd-tools-015.patch/imgcreate: creator.py~ >diff -ur livecd-tools-015/imgcreate/live.py livecd-tools-015.patch/imgcreate/live.py >--- livecd-tools-015/imgcreate/live.py 2008-03-06 19:39:56.000000000 -0500 >+++ livecd-tools-015.patch/imgcreate/live.py 2008-05-06 09:08:49.000000000 -0400 >@@ -37,13 +37,13 @@ > > """ > >- def __init__(self, *args): >+ def __init__(self, *args, **kwargs): > """Initialise a LiveImageCreator instance. > > This method takes the same arguments as ImageCreator.__init__(). > > """ >- LoopImageCreator.__init__(self, *args) >+ LoopImageCreator.__init__(self, *args, **kwargs) > > self.skip_compression = False > """Controls whether to use squashfs to compress the image.""" >Only in livecd-tools-015.patch/imgcreate: live.py~ >diff -ur livecd-tools-015/imgcreate/yuminst.py livecd-tools-015.patch/imgcreate/yuminst.py >--- livecd-tools-015/imgcreate/yuminst.py 2008-03-06 19:39:56.000000000 -0500 >+++ livecd-tools-015.patch/imgcreate/yuminst.py 2008-05-06 09:38:23.000000000 -0400 >@@ -119,11 +119,16 @@ > elif include == pykickstart.parser.GROUP_ALL: > map(lambda p: self.selectPackage(p), grp.optional_packages.keys()) > >- def addRepository(self, name, url = None, mirrorlist = None): >+ def addRepository(self, name, url = None, mirrorlist = None, arch = None, basearch = None): >+ if arch == None: >+ arch = rpmUtils.arch.getCanonArch() >+ if basearch == None: >+ basearch = rpmUtils.arch.getBaseArch() >+ > def _varSubstitute(option): > # takes a variable and substitutes like yum configs do >- option = option.replace("$basearch", rpmUtils.arch.getBaseArch()) >- option = option.replace("$arch", rpmUtils.arch.getCanonArch()) >+ option = option.replace("$basearch", basearch) >+ option = option.replace("$arch", arch) > return option > > repo = yum.yumRepo.YumRepository(name) >Only in livecd-tools-015.patch/imgcreate: yuminst.py~ >diff -ur livecd-tools-015/tools/livecd-creator livecd-tools-015.patch/tools/livecd-creator >--- livecd-tools-015/tools/livecd-creator 2008-03-06 19:39:56.000000000 -0500 >+++ livecd-tools-015.patch/tools/livecd-creator 2008-05-06 09:35:55.000000000 -0400 >@@ -40,6 +40,10 @@ > help="Add packages to an existing live CD iso9660 image.") > imgopt.add_option("-f", "--fslabel", type="string", dest="fs_label", > help="File system label (default based on config name)") >+ imgopt.add_option("--arch", type="string", dest="arch", >+ help="Architecture for packages (default based on current system)") >+ imgopt.add_option("--basearch", type="string", dest="basearch", >+ help="Base architecture for packages (default based on current system)") > parser.add_option_group(imgopt) > > # options related to the config of your system >@@ -105,7 +109,7 @@ > > ks = imgcreate.read_kickstart(options.kscfg) > >- creator = imgcreate.LiveImageCreator(ks, name, fs_label) >+ creator = imgcreate.LiveImageCreator(ks, name, fs_label, arch=options.arch, basearch=options.basearch) > creator.tmpdir = options.tmpdir > creator.skip_compression = options.skip_compression > creator.skip_minimize = options.skip_minimize >Only in livecd-tools-015.patch/tools: livecd-creator~
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 445387
: 304658