diff options
author | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2016-10-21 20:48:48 +0100 |
---|---|---|
committer | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2016-10-21 21:46:07 +0100 |
commit | f631bf349a9f9bbff7e034887fb57b4b89d73574 (patch) | |
tree | 62741fbcfd53e12df915f7c4d4157e23f27ec221 | |
parent | 665851133f2c72e4f746cd95863710375bac2fe3 (diff) | |
download | draklive-config-f631bf349a9f9bbff7e034887fb57b4b89d73574.tar draklive-config-f631bf349a9f9bbff7e034887fb57b4b89d73574.tar.gz draklive-config-f631bf349a9f9bbff7e034887fb57b4b89d73574.tar.bz2 draklive-config-f631bf349a9f9bbff7e034887fb57b4b89d73574.tar.xz draklive-config-f631bf349a9f9bbff7e034887fb57b4b89d73574.zip |
Merge live media repos and use newest version of each package
- we no longer need different repos for KDE and GNOME
- we need to search both 'release' and 'update' repositories
to find the newest version of each package
-rw-r--r-- | config/live.cfg | 18 | ||||
-rwxr-xr-x | files/mga_rpms/GNOME/update_media.sh | 61 | ||||
-rwxr-xr-x | files/mga_rpms/KDE4/update_media.sh | 52 | ||||
-rwxr-xr-x | files/mga_rpms/update_media.sh | 64 |
4 files changed, 68 insertions, 127 deletions
diff --git a/config/live.cfg b/config/live.cfg index 182685a..9c8e13a 100644 --- a/config/live.cfg +++ b/config/live.cfg @@ -55,21 +55,11 @@ my $_l = { [ 'files/live.modprobe.conf', '/etc/modprobe.conf', { mode => 0644 } ], # add local repos - if_($live->{settings}{desktop} eq 'GNOME', - if_($live->{settings}{arch} eq 'i586', - [ 'files/mga_rpms/GNOME/i586/mga_rpms', '/var/local/mga_rpms' ], - ), - if_($live->{settings}{arch} eq 'x86_64', - [ 'files/mga_rpms/GNOME/x86_64/mga_rpms', '/var/local/mga_rpms' ], - ), + if_($live->{settings}{arch} eq 'i586', + [ 'files/mga_rpms/i586/mga_rpms', '/var/local' ], ), - if_($live->{settings}{desktop} eq 'KDE4', - if_($live->{settings}{arch} eq 'i586', - [ 'files/mga_rpms/KDE4/i586/mga_rpms', '/var/local/mga_rpms' ], - ), - if_($live->{settings}{arch} eq 'x86_64', - [ 'files/mga_rpms/KDE4/x86_64/mga_rpms', '/var/local/mga_rpms' ], - ), + if_($live->{settings}{arch} eq 'x86_64', + [ 'files/mga_rpms/x86_64/mga_rpms', '/var/local' ], ), # disable suspend and hibernate in live mode diff --git a/files/mga_rpms/GNOME/update_media.sh b/files/mga_rpms/GNOME/update_media.sh deleted file mode 100755 index 3dd617a..0000000 --- a/files/mga_rpms/GNOME/update_media.sh +++ /dev/null @@ -1,61 +0,0 @@ - -bcdmedia=/home/bcd/build_bcd/pieces/5 - -# create dirs if non-existant -mkdir -p {i586,x86_64}/mga_rpms/{core,nonfree}/media_info - -# clean dirs -rm -f {i586,x86_64}/mga_rpms/{core,nonfree}/*.rpm -rm -f {i586,x86_64}/mga_rpms/{core,nonfree}/media_info/* - -# add fglrx drivers -cp $bcdmedia/i586/media/nonfree/release/x11-driver-video-fglrx-*.rpm i586/mga_rpms/nonfree/ -cp $bcdmedia/i586/media/nonfree/release/fglrx-kernel-*-desktop586-*.rpm i586/mga_rpms/nonfree/ -cp $bcdmedia/i586/media/nonfree/release/fglrx-kernel-desktop586-latest-*.rpm i586/mga_rpms/nonfree/ - -cp $bcdmedia/x86_64/media/nonfree/release/x11-driver-video-fglrx-*.rpm x86_64/mga_rpms/nonfree/ -cp $bcdmedia/x86_64/media/nonfree/release/fglrx-kernel-*-desktop-*.rpm x86_64/mga_rpms/nonfree/ -cp $bcdmedia/x86_64/media/nonfree/release/fglrx-kernel-desktop-latest-*.rpm x86_64/mga_rpms/nonfree/ - -# add broadcom-wl -cp $bcdmedia/i586/media/nonfree/release/broadcom-wl-common*.rpm i586/mga_rpms/nonfree/ -cp $bcdmedia/i586/media/nonfree/release/broadcom-wl-kernel-*-desktop586-*.rpm i586/mga_rpms/nonfree/ -cp $bcdmedia/i586/media/nonfree/release/broadcom-wl-kernel-desktop586-latest-*.rpm i586/mga_rpms/nonfree/ - -cp $bcdmedia/x86_64/media/nonfree/release/broadcom-wl-common-*.rpm x86_64/mga_rpms/nonfree/ -cp $bcdmedia/x86_64/media/nonfree/release/broadcom-wl-kernel-*-desktop-*.rpm x86_64/mga_rpms/nonfree/ -cp $bcdmedia/x86_64/media/nonfree/release/broadcom-wl-kernel-desktop-latest-*.rpm x86_64/mga_rpms/nonfree/ - -# add broadcom wireless configs -cp $bcdmedia/i586/media/core/release/broadcom-*-config-*.rpm i586/mga_rpms/core/ -cp $bcdmedia/x86_64/media/core/release/broadcom-*-config-*.rpm x86_64/mga_rpms/core/ - -# add grub2 stuff -cp $bcdmedia/i586/media/core/release/grub2-2*.rpm i586/mga_rpms/core/ -cp $bcdmedia/i586/media/core/release/grub2-efi-2*.rpm i586/mga_rpms/core/ -cp $bcdmedia/i586/media/core/release/grub2-mageia-theme-*.rpm i586/mga_rpms/core/ -cp $bcdmedia/i586/media/core/release/os-prober-*.rpm i586/mga_rpms/core/ -cp $bcdmedia/i586/media/core/release/efibootmgr-*.rpm i586/mga_rpms/core/ -cp $bcdmedia/i586/media/core/release/efivar-*.rpm i586/mga_rpms/core/ -cp $bcdmedia/i586/media/core/release/libefivar0-*.rpm i586/mga_rpms/core/ - -cp $bcdmedia/x86_64/media/core/release/grub2-2*.rpm x86_64/mga_rpms/core/ -cp $bcdmedia/x86_64/media/core/release/grub2-efi-2*.rpm x86_64/mga_rpms/core/ -cp $bcdmedia/x86_64/media/core/release/grub2-mageia-theme-*.rpm x86_64/mga_rpms/core/ -cp $bcdmedia/x86_64/media/core/release/os-prober-*.rpm x86_64/mga_rpms/core/ -cp $bcdmedia/x86_64/media/core/release/efibootmgr-*.rpm x86_64/mga_rpms/core/ -cp $bcdmedia/x86_64/media/core/release/efivar-*.rpm x86_64/mga_rpms/core/ -cp $bcdmedia/x86_64/media/core/release/lib64efivar0-*.rpm x86_64/mga_rpms/core/ - -# add repo pubkeys -cp $bcdmedia/i586/media/core/release/media_info/pubkey i586/mga_rpms/core/media_info/ -cp $bcdmedia/x86_64/media/core/release/media_info/pubkey x86_64/mga_rpms/core/media_info/ - -cp $bcdmedia/i586/media/nonfree/release/media_info/pubkey i586/mga_rpms/nonfree/media_info/ -cp $bcdmedia/x86_64/media/nonfree/release/media_info/pubkey x86_64/mga_rpms/nonfree/media_info/ - -# create hdlists -genhdlist2 i586/mga_rpms/core -genhdlist2 i586/mga_rpms/nonfree -genhdlist2 x86_64/mga_rpms/core -genhdlist2 x86_64/mga_rpms/nonfree diff --git a/files/mga_rpms/KDE4/update_media.sh b/files/mga_rpms/KDE4/update_media.sh deleted file mode 100755 index 9122604..0000000 --- a/files/mga_rpms/KDE4/update_media.sh +++ /dev/null @@ -1,52 +0,0 @@ - -bcdmedia=/home/bcd/build_bcd/pieces/5 - -# create dirs if non-existant -mkdir -p {i586,x86_64}/mga_rpms/{core,nonfree}/media_info - -# clean dirs -rm -f {i586,x86_64}/mga_rpms/{core,nonfree}/*.rpm -rm -f {i586,x86_64}/mga_rpms/{core,nonfree}/media_info/* - -# add broadcom-wl -cp $bcdmedia/i586/media/nonfree/release/broadcom-wl-common*.rpm i586/mga_rpms/nonfree/ -cp $bcdmedia/i586/media/nonfree/release/broadcom-wl-kernel-*-desktop586-*.rpm i586/mga_rpms/nonfree/ -cp $bcdmedia/i586/media/nonfree/release/broadcom-wl-kernel-desktop586-latest-*.rpm i586/mga_rpms/nonfree/ - -cp $bcdmedia/x86_64/media/nonfree/release/broadcom-wl-common-*.rpm x86_64/mga_rpms/nonfree/ -cp $bcdmedia/x86_64/media/nonfree/release/broadcom-wl-kernel-*-desktop-*.rpm x86_64/mga_rpms/nonfree/ -cp $bcdmedia/x86_64/media/nonfree/release/broadcom-wl-kernel-desktop-latest-*.rpm x86_64/mga_rpms/nonfree/ - -# add broadcom wireless configs -cp $bcdmedia/i586/media/core/release/broadcom-*-config-*.rpm i586/mga_rpms/core/ -cp $bcdmedia/x86_64/media/core/release/broadcom-*-config-*.rpm x86_64/mga_rpms/core/ - -# add grub2 stuff -cp $bcdmedia/i586/media/core/release/grub2-2*.rpm i586/mga_rpms/core/ -cp $bcdmedia/i586/media/core/release/grub2-efi-2*.rpm i586/mga_rpms/core/ -cp $bcdmedia/i586/media/core/release/grub2-mageia-theme-*.rpm i586/mga_rpms/core/ -cp $bcdmedia/i586/media/core/release/os-prober-*.rpm i586/mga_rpms/core/ -cp $bcdmedia/i586/media/core/release/efibootmgr-*.rpm i586/mga_rpms/core/ -cp $bcdmedia/i586/media/core/release/efivar-*.rpm i586/mga_rpms/core/ -cp $bcdmedia/i586/media/core/release/libefivar0-*.rpm i586/mga_rpms/core/ - -cp $bcdmedia/x86_64/media/core/release/grub2-2*.rpm x86_64/mga_rpms/core/ -cp $bcdmedia/x86_64/media/core/release/grub2-efi-2*.rpm x86_64/mga_rpms/core/ -cp $bcdmedia/x86_64/media/core/release/grub2-mageia-theme-*.rpm x86_64/mga_rpms/core/ -cp $bcdmedia/x86_64/media/core/release/os-prober-*.rpm x86_64/mga_rpms/core/ -cp $bcdmedia/x86_64/media/core/release/efibootmgr-*.rpm x86_64/mga_rpms/core/ -cp $bcdmedia/x86_64/media/core/release/efivar-*.rpm x86_64/mga_rpms/core/ -cp $bcdmedia/x86_64/media/core/release/lib64efivar0-*.rpm x86_64/mga_rpms/core/ - -# add repo pubkeys -cp $bcdmedia/i586/media/core/release/media_info/pubkey i586/mga_rpms/core/media_info/ -cp $bcdmedia/x86_64/media/core/release/media_info/pubkey x86_64/mga_rpms/core/media_info/ - -cp $bcdmedia/i586/media/nonfree/release/media_info/pubkey i586/mga_rpms/nonfree/media_info/ -cp $bcdmedia/x86_64/media/nonfree/release/media_info/pubkey x86_64/mga_rpms/nonfree/media_info/ - -# create hdlists -genhdlist2 i586/mga_rpms/core -genhdlist2 i586/mga_rpms/nonfree -genhdlist2 x86_64/mga_rpms/core -genhdlist2 x86_64/mga_rpms/nonfree diff --git a/files/mga_rpms/update_media.sh b/files/mga_rpms/update_media.sh new file mode 100755 index 0000000..3fe9670 --- /dev/null +++ b/files/mga_rpms/update_media.sh @@ -0,0 +1,64 @@ + +bcdmedia=/home/bcd/build_bcd/pieces/5 + +copy_latest() +{ + repo=$1 + for arch in i586 x86_64 ; do + path=`ls -1v $bcdmedia/$arch/media/$repo/{release,updates}/$2.rpm 2> /dev/null | tail -1` + if [ -z $path ] ; then + echo "Couldn't find $2 for $arch" + exit 1 + else + cp $path $arch/mga_rpms/$repo/ + fi + done +} + +# create dirs if non-existant +mkdir -p {i586,x86_64}/mga_rpms/{core,nonfree}/media_info + +# clean dirs +rm -f {i586,x86_64}/mga_rpms/{core,nonfree}/*.rpm +rm -f {i586,x86_64}/mga_rpms/{core,nonfree}/media_info/* + +# add grub2 +copy_latest core grub2-2.* +copy_latest core grub2-efi-2.* +copy_latest core grub2-mageia-theme-2.* +copy_latest core os-prober-* +copy_latest core lib*efivar0-* +copy_latest core efibootmgr-* +copy_latest core efivar-* + +# add fglrx +copy_latest nonfree dkms-fglrx-* +copy_latest nonfree x11-driver-video-fglrx-* + +# add nvidia +copy_latest nonfree dkms-nvidia304-* +copy_latest nonfree dkms-nvidia340-* +copy_latest nonfree dkms-nvidia-current-* +copy_latest nonfree x11-driver-video-nvidia304-* +copy_latest nonfree x11-driver-video-nvidia340-* +copy_latest nonfree x11-driver-video-nvidia-current-* + +# add broadcom-wl +copy_latest nonfree dkms-broadcom-wl-* +copy_latest nonfree broadcom-wl-common-* + +# add broadcom wireless configs +copy_latest core broadcom-bcma-config-* +copy_latest core broadcom-ssb-config-* + +# add repo pubkeys +for arch in i586 x86_64 ; do + cp $bcdmedia/$arch/media/core/release/media_info/pubkey $arch/mga_rpms/core/media_info/ + cp $bcdmedia/$arch/media/nonfree/release/media_info/pubkey $arch/mga_rpms/nonfree/media_info/ +done + +# create hdlists +for arch in i586 x86_64 ; do + genhdlist2 $arch/mga_rpms/core + genhdlist2 $arch/mga_rpms/nonfree +done |