revisor/__init__.py.in | 59 ++++++++++++++++++++++++++++++---
revisor/base.py | 30 +++++++++++-----
revisor/misc.py | 12 ++++--
scripts/DEVEL-buildinstall | 2 -
scripts/F10-buildinstall | 2 -
unity/conf/rawhide-install-respin.conf | 8 ++--
6 files changed, 90 insertions(+), 23 deletions(-)
New commits:
commit c76d857046e931121ab8241a268fd921dfa8960a
Author: Jeroen van Meeuwen (Fedora Unity) <kanarip(a)fedoraunity.org>
Date: Tue Feb 17 16:35:42 2009 +0100
Fix the case where allarch packages like glibc and openssl are not being pulled in
properly
diff --git a/revisor/base.py b/revisor/base.py
index af18de5..77cf11b 100644
--- a/revisor/base.py
+++ b/revisor/base.py
@@ -1107,10 +1107,10 @@ class RevisorBase:
def pkglist_required(self, mode='installation'):
- required_pkgs = revisor.misc.resolve_pkgs(self.cfg.yumobj,
self.cfg.get_package_list(mode,['require']), log=self.log)
- suggested_pkgs = revisor.misc.resolve_pkgs(self.cfg.yumobj,
self.cfg.get_package_list(mode,['suggest']), log=self.log)
- allarch_pkgs = revisor.misc.resolve_pkgs(self.cfg.yumobj,
self.cfg.get_package_list(mode,['allarch']), log=self.log)
- onearch_pkgs = revisor.misc.resolve_pkgs(self.cfg.yumobj,
self.cfg.get_package_list(mode,['onearch']), log=self.log)
+ required_pkgs = revisor.misc.resolve_pkgs(self.cfg.yumobj,
self.cfg.get_package_list(mode, ['require']), log=self.log)
+ suggested_pkgs = revisor.misc.resolve_pkgs(self.cfg.yumobj,
self.cfg.get_package_list(mode, ['suggest']), log=self.log)
+ allarch_pkgs = revisor.misc.resolve_pkgs(self.cfg.yumobj,
self.cfg.get_package_list(mode, ['allarch']), log=self.log)
+ onearch_pkgs = revisor.misc.resolve_pkgs(self.cfg.yumobj,
self.cfg.get_package_list(mode, ['onearch']), log=self.log)
packages_to_add = required_pkgs + suggested_pkgs + allarch_pkgs + onearch_pkgs
packages_to_skip = []
@@ -1170,13 +1170,25 @@ class RevisorBase:
except:
pass
- self.added_pkgs = []
+ # From the list of packages that need all architectures
+ for pkg in allarch_pkgs:
+ if not pkg in packages_to_skip:
+ try:
+ pkgs = self.cfg.yumobj.pkgSack.returnNewestByName(pkg)
+ for po in pkgs:
+ self.cfg.yumobj.tsInfo.addInstall(po)
+ self.log.debug(_("Adding all-arch package
%s-%s:%s-%s.%s") % (po.name, po.epoch, po.version, po.release, po.arch), level=4)
+ except:
+ pass
+
+ #self.added_pkgs = []
+
+ #for package in packages_to_add:
+ #if not package in packages_to_skip:
+ #self.added_pkgs.append(package)
- for package in packages_to_add:
- if not package in packages_to_skip:
- self.added_pkgs.append(package)
+ #self.log.debug(_("Packages that do not need to be on the media: %s") %
str(self.added_pkgs), level=9)
- self.log.debug(_("Packages that do not need to be on the media: %s") %
str(self.added_pkgs), level=9)
return True
def lift_off(self):
commit bae7b025b6cbc0a61043f7b788fdbd5c039dccca
Author: Jeroen van Meeuwen (Fedora Unity) <kanarip(a)fedoraunity.org>
Date: Tue Feb 17 15:26:33 2009 +0100
Update the description for rawhide spins
diff --git a/unity/conf/rawhide-install-respin.conf
b/unity/conf/rawhide-install-respin.conf
index 21c29c2..f4e0f18 100644
--- a/unity/conf/rawhide-install-respin.conf
+++ b/unity/conf/rawhide-install-respin.conf
@@ -23,7 +23,7 @@ getsource = 1
bugurl =
http://bugzilla.redhat.com
[rawhide-i386-respin]
-description = Fedora Unity Re-Spin Model for Fedora 9
+description = Fedora Unity Re-Spin Model for Fedora Rawhide
main = /etc/revisor-unity/conf.d/revisor-rawhide-i386-respin.conf
product_name = Fedora
product_path = Packages
@@ -35,7 +35,7 @@ version_from = DEVEL
kickstart_file = /usr/share/spin-kickstarts/fedora-install-fedora.ks
[rawhide-x86_64-respin]
-description = Fedora Unity Re-Spin Model for Fedora 9
+description = Fedora Unity Re-Spin Model for Fedora Rawhide
main = /etc/revisor-unity/conf.d/revisor-rawhide-x86_64-respin.conf
product_name = Fedora
product_path = Packages
@@ -47,7 +47,7 @@ version_from = DEVEL
kickstart_file = /usr/share/spin-kickstarts/fedora-install-fedora.ks
[rawhide-ppc-respin]
-description = Fedora Unity Re-Spin Model for Fedora 9
+description = Fedora Unity Re-Spin Model for Fedora Rawhide
main = /etc/revisor-unity/conf.d/revisor-rawhide-ppc-respin.conf
product_name = Fedora
product_path = Packages
@@ -59,7 +59,7 @@ version_from = DEVEL
kickstart_file = /usr/share/spin-kickstarts/fedora-install-fedora.ks
[rawhide-ppc64-respin]
-description = Fedora Unity Re-Spin Model for Fedora 9
+description = Fedora Unity Re-Spin Model for Fedora Rawhide
main = /etc/revisor-unity/conf.d/revisor-rawhide-ppc64-respin.conf
product_name = Fedora
product_path = Packages
commit 01893ac59b2b963c32723332b72764e3dcde8fa7
Author: Jeroen van Meeuwen (Fedora Unity) <kanarip(a)fedoraunity.org>
Date: Tue Feb 17 15:25:11 2009 +0100
Remove the extra verbose execution
diff --git a/scripts/F10-buildinstall b/scripts/F10-buildinstall
index 64c3d06..3cd7cdd 100755
--- a/scripts/F10-buildinstall
+++ b/scripts/F10-buildinstall
@@ -197,17 +197,17 @@ BUILDINSTALL=$BUILDINSTDIR/buildinstall
if [ -n "$UPDATES" ]; then UPDATES="--updates $UPDATES"; fi
echo "Building images..."
-sh -x $UPD_INSTROOT $DEBUGSTR $NOGRSTR --arch $BUILDARCH $UPDATES --imgdir
$TREEDIR/install $yumconf
+$UPD_INSTROOT $DEBUGSTR $NOGRSTR --arch $BUILDARCH $UPDATES --imgdir $TREEDIR/install
$yumconf
echo "Writing .treeinfo file..."
$MK_TREEINFO --family="$PRODUCTSTR" ${VARIANT:+--variant="$VARIANT"}
--version=$VERSION --arch=$BUILDARCH --outfile=$OUTPUT/.treeinfo
# FIXME: need to update mk-images to take the yumconf
echo "Making images..."
-sh -x $MK_IMAGES $DEBUGSTR $NOGRSTR --imgdir $TREEDIR/install --arch $BUILDARCH --product
"$PRODUCTSTR" --version $VERSION --bugurl "$BUGURL" --output $OUTPUT
$yumconf
+$MK_IMAGES $DEBUGSTR $NOGRSTR --imgdir $TREEDIR/install --arch $BUILDARCH --product
"$PRODUCTSTR" --version $VERSION --bugurl "$BUGURL" --output $OUTPUT
$yumconf
echo "Writing .discinfo file"
$MK_STAMP --releasestr="$RELEASESTR" --arch=$BUILDARCH
--discNum="ALL" --outfile=$OUTPUT/.discinfo
-#rm -rf $TREEDIR $BUILDINSTDIR
-#rm -f $yumconf
+rm -rf $TREEDIR $BUILDINSTDIR
+rm -f $yumconf
commit 9a94eefe5daf620cb77f0bf61dbb8f292407a857
Author: Jeroen van Meeuwen (Fedora Unity) <kanarip(a)fedoraunity.org>
Date: Tue Feb 17 15:24:28 2009 +0100
Make the cache for anacondarepos more consistent, rather then random
diff --git a/scripts/DEVEL-buildinstall b/scripts/DEVEL-buildinstall
index 614623f..8453ba1 100755
--- a/scripts/DEVEL-buildinstall
+++ b/scripts/DEVEL-buildinstall
@@ -142,7 +142,7 @@ done
yumconf=$(mktemp ${TMPDIR:-/tmp}/yum.conf.XXXXXX)
cat > $yumconf <<EOF
[main]
-cachedir=$CACHEDIR
+cachedir=/var/tmp/revisor-yumcache
keepcache=0
gpgcheck=0
plugins=0
diff --git a/scripts/F10-buildinstall b/scripts/F10-buildinstall
index 97eaf61..64c3d06 100755
--- a/scripts/F10-buildinstall
+++ b/scripts/F10-buildinstall
@@ -123,7 +123,7 @@ CACHEDIR=$(mktemp -d ${TMPDIR:-/tmp}/yumcache.XXXXXX)
yumconf=$(mktemp ${TMPDIR:-/tmp}/yum.conf.XXXXXX)
cat > $yumconf <<EOF
[main]
-cachedir=$CACHEDIR
+cachedir=/var/tmp/revisor-yumcache
keepcache=0
gpgcheck=0
plugins=0
@@ -197,17 +197,17 @@ BUILDINSTALL=$BUILDINSTDIR/buildinstall
if [ -n "$UPDATES" ]; then UPDATES="--updates $UPDATES"; fi
echo "Building images..."
-$UPD_INSTROOT $DEBUGSTR $NOGRSTR --arch $BUILDARCH $UPDATES --imgdir $TREEDIR/install
$yumconf
+sh -x $UPD_INSTROOT $DEBUGSTR $NOGRSTR --arch $BUILDARCH $UPDATES --imgdir
$TREEDIR/install $yumconf
echo "Writing .treeinfo file..."
$MK_TREEINFO --family="$PRODUCTSTR" ${VARIANT:+--variant="$VARIANT"}
--version=$VERSION --arch=$BUILDARCH --outfile=$OUTPUT/.treeinfo
# FIXME: need to update mk-images to take the yumconf
echo "Making images..."
-$MK_IMAGES $DEBUGSTR $NOGRSTR --imgdir $TREEDIR/install --arch $BUILDARCH --product
"$PRODUCTSTR" --version $VERSION --bugurl "$BUGURL" --output $OUTPUT
$yumconf
+sh -x $MK_IMAGES $DEBUGSTR $NOGRSTR --imgdir $TREEDIR/install --arch $BUILDARCH --product
"$PRODUCTSTR" --version $VERSION --bugurl "$BUGURL" --output $OUTPUT
$yumconf
echo "Writing .discinfo file"
$MK_STAMP --releasestr="$RELEASESTR" --arch=$BUILDARCH
--discNum="ALL" --outfile=$OUTPUT/.discinfo
-rm -rf $TREEDIR $BUILDINSTDIR
-rm -f $yumconf
+#rm -rf $TREEDIR $BUILDINSTDIR
+#rm -f $yumconf
commit 02a7d2c93b3bf70b01027c4d29efa71660c4c478
Author: Jeroen van Meeuwen (Fedora Unity) <kanarip(a)fedoraunity.org>
Date: Tue Feb 17 15:24:00 2009 +0100
Cosmetic
diff --git a/revisor/misc.py b/revisor/misc.py
index bde8f4f..8df46bc 100644
--- a/revisor/misc.py
+++ b/revisor/misc.py
@@ -112,10 +112,14 @@ def check_file(file_name, checksum=None, destroy=False):
return False
def resolve_pkgs(yumobj, package_list, log=None):
- """Given a list of 'packages', resolves these
'packages' into package names so that later
- they can be selected. A good example is the suggested package 'system-logos',
which just so
- happens to be 'fedora-logos', or 'generic-logos', or
'redhat-logos', or 'centos-logos'. We don't
- know, and neither do you"""
+ """
+ Given a list of 'packages', resolves these 'packages' into
package names
+ so that later they can be selected. A good example is the suggested
+ package 'system-logos', which just so happens to be
'fedora-logos', or
+ 'generic-logos', or 'redhat-logos', or 'centos-logos'. We
don't know,
+ and neither do you
+ """
+
final_package_list = []
for pkg in package_list:
commit 1db25c660bfa4d569b5420f625812aa3c7820fb5
Author: Jeroen van Meeuwen (Fedora Unity) <kanarip(a)fedoraunity.org>
Date: Tue Feb 17 15:23:38 2009 +0100
Cosmetic
diff --git a/revisor/__init__.py.in b/revisor/__init__.py.in
index dce9aef..97cba53 100644
--- a/revisor/__init__.py.in
+++ b/revisor/__init__.py.in
@@ -69,10 +69,13 @@ class Revisor:
self.base = revisor.base.RevisorBase(self)
def parse_options(self, load_plugins=True):
- """Create the OptionParser for the options passed to us from
runtime cli"""
+ """
+ Create the OptionParser for the options passed to us from runtime
+ Command Line Interface.
+ """
- epilog = """Revisor is a Fedora Unity product. For more
information about Revisor, visit
-
http://revisor.fedoraunity.org/"""
+ epilog = """Revisor is a Fedora Unity product. For more
information
+ about Revisor, visit
http://revisor.fedoraunity.org/"""
# Enterprise Linux 5 does not have an "epilog" parameter to
OptionParser
try:
@@ -89,42 +92,53 @@ class Revisor:
action = "store_true",
default = False,
help = _("Use the CLI rather then
GUI"))
+
runtime_group.add_option( "--gui",
dest = "gui_mode",
action = "store_true",
default = False,
- help = _("Force Revisor to use the GUI. Does
not fallback to CLI and thus shows GUI related errors"))
+ help = _("Force Revisor to use the " +
\
+ "GUI. Does not fallback to " +
\
+ "CLI and thus shows GUI " + \
+ "related errors"))
+ "
runtime_group.add_option( "--list-models",
dest = "list_models",
action = "store_true",
default = False,
help = _("List available models"))
+
runtime_group.add_option( "--devel",
dest = "mode_devel",
action = "store_true",
default = False,
help = _("Development mode. Skips some tasks
that take time."))
+
runtime_group.add_option( "--report-sizes",
dest = "report_sizes",
action = "store_true",
default = False,
help = _("Report the sizes of all RPMs
selected in a list"))
+
runtime_group.add_option( "--kickstart-exact-nevra",
dest = "kickstart_exact_nevra",
action = "store_true",
default = False,
help = _("Force Revisor to interpret the
package manifest as complete package nevra (name, epoch, version, release and
architecture). Implies --kickstart-exact"))
+
runtime_group.add_option( "--kickstart-exact",
dest = "kickstart_exact",
action = "store_true",
default = False,
help = _("Tells Revisor to ignore @core and
@base (or %packages --nobase) and only add what is in the package manifest"))
+
runtime_group.add_option( "--clean-up",
dest = "clean_up",
action = "store",
type = 'int',
default = 1,
help = _("Should Revisor not clean up at all
(0), clean up it's temporary build data (1), or everything -this includes the yum
cache (2)"))
+
runtime_group.add_option( "--usb-size",
dest = "usb_size",
action = "store",
@@ -162,51 +176,60 @@ class Revisor:
# default =
os.path.join(BASE_CONFD_DIR,"fedora-7-gold.cfg"),
help = _("Use kickstart file"),
metavar = "[kickstart file]")
+
config_group.add_option( "--kickstart-save",
dest = "kickstart_save",
action ="store",
default = "",
help = _("Save options to given file (as a
kickstart)"),
metavar = "[file name]")
+
config_group.add_option( "-c", "--config",
dest = "config",
action = "store",
default =
os.path.join(BASE_CONF_DIR,"revisor.conf"),
help = _("Revisor configuration file to
use"),
metavar = "[config file]")
+
config_group.add_option( "--source",
dest = "getsource",
action = "store_true",
default = False,
help = _("Get the sources to go with the
binaries"))
+
config_group.add_option( "--destination-directory",
dest = "destination_directory",
action = "store",
default = "/srv/revisor/",
help = _("Destination directory for
products"),
metavar = "[directory]")
+
config_group.add_option( "--working-directory",
dest = "working_directory",
action = "store",
default = "/var/tmp/",
help = _("Working directory"),
metavar = "[directory]")
+
config_group.add_option( "--model",
dest = "model",
action = "store",
default = "",
help = _("Model to use for composing"),
metavar = "[model]")
+
config_group.add_option( "--respin",
dest = "mode_respin",
action = "store_true",
default = False,
help = _("Mode to use for composing updated
spins"))
+
config_group.add_option( "--copy-local",
dest = "copy_local",
action = "store_true",
default = False,
help = _("Sometimes, it's better to copy
local data rather then (sym)linking it. If you have enough space..."))
+
config_group.add_option( "--copy-dir",
dest = "copy_dir",
action = "store",
@@ -222,103 +245,123 @@ class Revisor:
action = "store_true",
default = False,
help = _("Create Installation Media CDs
(Capacity per disc: 685MB)"))
+
install_group.add_option( "--install-dvd",
dest = "media_installation_dvd",
action = "store_true",
default = False,
help = _("Create Installation Media DVDs
(Capacity per disc: 4.3GB)"))
+
install_group.add_option( "--install-dvd-dl",
dest =
"media_installation_dvd_duallayer",
action = "store_true",
default = False,
help = _("Create Installation Media
Dual-Layered DVDs (Capacity per disc: 8.5GB)"))
+
install_group.add_option( "--install-bluray",
dest = "media_installation_bluray",
action = "store_true",
default = False,
help = _("Create Installation Media Blu-Ray
Discs (Capacity per disc: 25GB)"))
+
install_group.add_option( "--install-bluray-dl",
dest =
"media_installation_bluray_duallayer",
action = "store_true",
default = False,
help = _("Create Installation Media Duallayer
Blu-Ray Discs (Capacity per disc: 50GB)"))
+
install_group.add_option( "--install-unified",
dest = "media_installation_unified",
action = "store_true",
default = False,
help = _("Create Unified ISO from install
tree"))
+
# This doesn't work because anaconda doesn't allow expanded tree
installations from hard drive
#install_group.add_option( "--install-usb",
#dest = "media_installation_usb",
#action = "store_true",
#default = False,
#help = _("Build install image for use on USB
thumb drives (Remember to specify the size of the USB Thumb Drive with
--usb-size)"))
+
install_group.add_option( "--install-tree",
dest = "media_installation_tree",
action = "store_true",
default = False,
help = _("Create the Installation
Tree."))
+
install_group.add_option( "--install-nogr",
dest = "install_nogr",
action = "store_true",
default = False,
help = _("Create Media without graphical
installer."))
+
install_group.add_option( "--kickstart-include",
dest = "kickstart_include",
action = "store_true",
default = False,
help = _("Include kickstart file on media or
in the tree"))
+
install_group.add_option( "--kickstart-default",
dest = "kickstart_default",
action = "store_true",
default = False,
help = _("In the bootloader menu
(isolinux.cfg), set kickstart to boot by default (works with --kickstart-include)"))
+
install_group.add_option( "--filter-comps",
dest = "comps_filter",
action = "store_true",
default = False,
help = _("Filter anything from comps that is
not in the package set"))
+
install_group.add_option( "--revisor-comps",
dest = "revisor_comps",
action = "store_true",
default = False,
help = _("Use Revisor's comps file
instead of those from the repositories"))
+
install_group.add_option( "--comps",
dest = "comps",
action = "store",
default =
"/usr/share/revisor/comps-f7.xml",
help = _("Comps file to include on the
installation media"))
+
install_group.add_option( "--updates-img",
dest = "updates_img",
action = "store",
default = "",
help = _("Include specified updates.img on
installation media."),
metavar = "[updates image]")
+
install_group.add_option( "--product-name",
dest = "product_name",
action = "store",
default = "Fedora",
help = _("Product Name"))
+
install_group.add_option( "--product-path",
dest = "product_path",
action = "store",
default = "Fedora",
help = _("Product Path (e.g. Fedora/ or
Packages/ -but without the appending slash)"))
+
install_group.add_option( "--iso-label",
dest = "iso_label",
action = "store",
default = "Fedora",
help = _("ISO Label Base. Note that other
things are appended but that the length can be 32 chars maximum."))
+
install_group.add_option( "--iso-basename",
dest = "iso_basename",
action = "store",
default = "Fedora",
help = _("The base name for the ISOs"))
+
install_group.add_option( "--product-version",
dest = "version",
action = "store",
default = "8",
help = _("Product Version"))
+
install_group.add_option( "--product-version-from",
dest = "version_from",
action = "store",
@@ -344,41 +387,49 @@ class Revisor:
action = "store_true",
default = False,
help = _("Create Live Media CD/DVD"))
+
live_group.add_option( "--live-usb-thumb",
dest = "media_live_thumb",
action = "store_true",
default = False,
help = _("Create Live Media Thumb Drive Image
(will be depreciated)"))
+
live_group.add_option( "--live-usb-hd",
dest = "media_live_hd",
action = "store_true",
default = False,
help = _("Create Live Media Hard Disk Image
(will be depreciated)"))
+
live_group.add_option( "--live-raw",
dest = "media_live_raw",
action = "store_true",
default = False,
help = _("Create Live Media Raw Hard Disk
Image"))
+
live_group.add_option( "--live-shell",
dest = "lm_chroot_shell",
action = "store_true",
default = False,
help = _("Interactively work in the live
image before building the ISO image."))
+
live_group.add_option( "--skip-compression",
dest = "lm_skip_fs_compression",
action = "store_true",
default = False,
help = _("Skip file system
compression."))
+
live_group.add_option( "--skip-prelink",
dest = "lm_skip_prelink",
action = "store_true",
default = False,
help = _("Skip prelinking the contents of the
filesystem."))
+
live_group.add_option( "--ignore-deleted",
dest = "lm_ignore_deleted",
action = "store_true",
default = False,
help = _("Ignore filesystem overhead. Useless
blocks will not be removed from the filesystem."))
+
live_group.add_option( "--preferred-kernel",
dest = "lm_preferred_kernel",
action = "store",