[PATCH] Allow rebranding by excluding "the other" packages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi there,

This patch allows rebranding by excluding all other packages we know about, using the PRODUCTSTR (instead of adding a --logopkg option).

The only thing is,

- the -logos and -release packages are now presumed to be lowercase (so not CentOS-release) - the -logos and -release packages both have to exist (or we fall back to generic-*)

665c42cd099ceab1240c9d2e9083054d0f32d335

from git://git.kanarip.com/anaconda (master branch), or attached (if mailman is done eating patches)

Thanks,

Kind regards,

Jeroen van Meeuwen
-kanarip
>From 665c42cd099ceab1240c9d2e9083054d0f32d335 Mon Sep 17 00:00:00 2001
From: Jeroen van Meeuwen (Fedora Unity) <kanarip@xxxxxxxxxxxxxxx>
Date: Sun, 11 Jan 2009 19:53:01 -0500
Subject: [PATCH] Allow rebranding

---
 scripts/buildinstall  |   12 ++++++++++++
 scripts/mk-images.efi |    2 +-
 scripts/upd-instroot  |    2 +-
 3 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/scripts/buildinstall b/scripts/buildinstall
index 818959d..614623f 100755
--- a/scripts/buildinstall
+++ b/scripts/buildinstall
@@ -128,6 +128,17 @@ BUILDINSTDIR=$(mktemp -d ${TMPDIR:-/tmp}/buildinstall.tree.XXXXXX)
 TREEDIR=$(mktemp -d ${TMPDIR:-/tmp}/treedir.XXXXXX)
 CACHEDIR=$(mktemp -d ${TMPDIR:-/tmp}/yumcache.XXXXXX)
 
+# The first -release and -logos package we are going to look for is the lowercase
+# equivalent of the PRODUCTSTR
+export brandpkgname="`echo $PRODUCTSTR | tr '[:upper:]' '[:lower:]'`"
+
+# The other -release and -logos packages will need to be excluded
+for pkg in fedora redhat generic; do
+    if [ "$pkg" != "$brandpkgname" ]; then
+        EXCLUDEPKGS="$EXCLUDEPKGS ${pkg}-release ${pkg}-logos"
+    fi
+done
+
 yumconf=$(mktemp ${TMPDIR:-/tmp}/yum.conf.XXXXXX)
 cat > $yumconf <<EOF
 [main]
@@ -137,6 +148,7 @@ gpgcheck=0
 plugins=0
 reposdir=
 tsflags=nodocs
+exclude=$EXCLUDEPKGS
 
 [anacondarepo]
 name=anaconda repo
diff --git a/scripts/mk-images.efi b/scripts/mk-images.efi
index 6e06a72..8639220 100644
--- a/scripts/mk-images.efi
+++ b/scripts/mk-images.efi
@@ -157,7 +157,7 @@ prepareEfiTree() {
     mv $MBD_BOOTTREE_TMP/EFI/boot/grub.efi $MBD_BOOTTREE_TMP/EFI/boot/boot${efiarch}.efi
     mv $MBD_BOOTTREE_TMP/EFI/boot/grub.conf $MBD_BOOTTREE_TMP/EFI/boot/boot${efiarch}.conf
 
-    artpkg=$(repoquery --qf "%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}" --whatprovides system-logos | grep -v generic-logos | head -1)
+    artpkg=$(repoquery --qf "%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}" --whatprovides ${brandpkgname}-logos | head -1)
 
     if [ -z "$artpkg" ]; then
        argpkg="generic-logos"
diff --git a/scripts/upd-instroot b/scripts/upd-instroot
index e1bb45a..2342589 100755
--- a/scripts/upd-instroot
+++ b/scripts/upd-instroot
@@ -172,7 +172,7 @@ PACKAGES="GConf2 NetworkManager ORBit2 PolicyKit VLGothic-fonts acl anaconda
     python-urlgrabber pyxf86config raidtools readline redhat-artwork
     reiserfs-utils rhpl rpm rpm-libs rpm-python sed selinux-policy-targeted
     setup slang smc-fonts-meera specspo sqlite synaptics system-config-date
-    system-config-keyboard system-logos system-release taipeifonts tcp_wrappers
+    system-config-keyboard ${brandpkgname}-logos ${brandpkgname}-release taipeifonts tcp_wrappers
     tzdata udev un-core-fonts-dotum urw-fonts util-linux-ng vnc-libs vnc-server
     wpa_supplicant xkeyboard-config xfsdump xfsprogs xorg-x11 xorg-x11-auth
     xorg-x11-base xorg-x11-drivers xorg-x11-font-utils xorg-x11-fonts-ethiopic
-- 
1.6.0.6

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

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux