qeldroma Posted August 11, 2003 Report Share Posted August 11, 2003 I use several remote RPM-sites as sources in URPMI. Because they are changing often, i want to see in a type of list, which of my installed RPMs needs/can be updated. Ex: Installed is SUPERKARAMBA v0.17 If i am trying "urpmi superkaramba" and the actual version is 0.24, urpmi doesn't recognize this. I have manually to "urpme" it, before i can "urpmi"ze it. Perfect would be a script or short-step-way to do a "update world". Any ideas? Quote Link to comment Share on other sites More sharing options...
tyme Posted August 11, 2003 Report Share Posted August 11, 2003 you could always open up software manager (the installer) from MCC, check the box for all available packages (or does it say all repositories? it's the last one) and then on the drop-down box in that line select by update availability. Quote Link to comment Share on other sites More sharing options...
scoopy Posted August 11, 2003 Report Share Posted August 11, 2003 That's the way I have been checking. And by selected one of the updates that are available, it also tells me what version is installed among other tidbits. Quote Link to comment Share on other sites More sharing options...
qeldroma Posted August 13, 2003 Author Report Share Posted August 13, 2003 Thx, the hint with the mcc dropdown was it. It's bad translated in german, so you don't know, that you'll find it there.... Quote Link to comment Share on other sites More sharing options...
aru Posted August 13, 2003 Report Share Posted August 13, 2003 In another order of things, this is what I've been using to update my system (home made scripts): [WARNING] BIZZARRE SCRIPTING BELOW [/WARNING] #! /bin/bash # ---------------------------------------------------------------------------- # PROGRAM: ~/bin/updatemdk # VERSION: $Id: updatemdk,v 1.1 2003/05/09 13:32:44 aru devel aru $ # PURPOSE: Daily retrieving of new updated rpm-packages --cron--. # DATE: 7-03-2003 # AUTHOR: aru@mandrakeusers.org - Copyright (C) 1990-2003 ChitiPC Corp. # # FILES: /home/aru/bin/rpmmirrors # listing generator # /home/aru/etc/rpmmirrorsrc # Config file # /home/aru/var/rpms/UPDATES_82.listing # Updates rpm listing # # LICENSE: This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, # or (at your option) any later version. # # NOTES: <TODO> # # HISTORY: # 01-07-2003 Mandrake 9.1(no version ctrl, solo para neo) # 09-04-2003 Cambiamos a Mdk8.2, pq mdksecure ha dejado de soportar la 8.1 # 07-03-2003 First version; script "updatemdk" release # ---------------------------------------------------------------------------- PROGRAM=${0##*/} VER="1.1" # RCS version # Script Vars ---------------------------------------------------------------- # ---------------------------------------------------------------------------- listing=/home/aru/var/rpms/UPDATES_91.listing old_listing=${listing}.old config=/home/aru/etc/rpmmirrorsrc dwldir=/home/aru/var/rpms/ mirrorListing=/home/aru/bin/rpmmirrors # listing generator script. # Actualizar el kernel?? : ${updatemdk_kernel:=0} # 0 = no; 1 = si # Gestión automática de la conexión a internet: autoconexion=/home/aru/lib/autoconexion.sh # Functions ------------------------------------------------------------------ # ---------------------------------------------------------------------------- error () { # -> error "description" echo -e "${@:-$(usage)}" >&2 exit 1 } # Main ----------------------------------------------------------------------- # ---------------------------------------------------------------------------- if [[ -f ${listing} && -f ${config} ]]; then . ${config} && cd ${dwldir} cp ${listing} ${old_listing} # para comparar despues else error "${PROGRAM}: Config files not found; exiting." fi # run ${mirrorListing} to get the current rpm listing echo "${PROGRAM}: Retrieving remote rpm listing... might trigger a while" ${mirrorListing} 1> /dev/null || error "Error: Couldn't retrieve remote listing." # checking updates: updates="$(diff ${listing} ${old_listing} | sed -n '/^</ {s|^< ||p;}' | col -b)" rm ${old_listing} # downloading updates if any: if [ "${updates}" != "" ]; then echo "New updates for installed packages available." l_listing="$(rpm -qa)" # local rpm list. for package in ${updates}; do if echo "${l_listing}" | egrep -q "^${package%%-[0-9]*}-[0-9]"; then # Provisional, para evitar bajar *actualizaciones* ya instaladas: installed_package=$(echo "${l_listing}" | egrep "^${package%%-[0-9]*}-[0-9]"| col -b) if [ "${installed_package}" != "${package%.*.*}" ]; then # fin provisional #if [ "${package%%-[0-9]*}" != "kernel" ]; then #if [ "${updatemdk_kernel}" == "0" ]; then #Bajar el kernel #fi echo -n "Downloading ${package} ... " /usr/bin/wget -qc $(echo "${UPDATES_91}/${package}") && echo "done" || echo "failed" fi #;fi # provisional fi done echo "Packages saved on: ${dwldir}" else echo "Nothing interesting today. Quiting." fi exit 0; #! /bin/bash # ---------------------------------------------------------------------------- # PROGRAM: ~/bin/rpmmirrors # VERSION: $Id: rpmmirrors,v 1.1 2003/05/09 13:40:18 aru devel aru $ # PURPOSE: Gets and archives the rpm listings from selected mirrors. # DATE: 05-01-2003 # AUTHOR: aru@mandrakeusers.org - Copyright (C) 1990-2003 ChitiPC Corp. # # USAGE: rpmmirrors [-v] [-h] # # Options: # -v Shows version and exits. # -h Shows this help. # # FILES: ~/etc/rpmmirrorsrc #--- Config file. # ~/var/rpms/* #--- Listings archive directory. # # LICENSE: This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, # or (at your option) any later version. # # NOTES: <TODO> # # HISTORY: # 07-02-2003 Control de conexión/desconexión a internet. # ---------------------------------------------------------------------------- PROGRAM=${0##*/} VER="1.1" # Script Vars ---------------------------------------------------------------- # ---------------------------------------------------------------------------- : ${config:="/home/aru/etc/rpmmirrorsrc"} : ${list_dir:="/home/aru/var/rpms/"} : ${no_es_un_rpm:="no_es_nada_*"} CWD="${list_dir}" # Functions ------------------------------------------------------------------ # ---------------------------------------------------------------------------- usage () { # Shows the program usage striped from the script-head comments. sed -n " /^# PURPOSE: / {s/// p;} /^# USAGE/,/^#$/ {s/ USAGE: /Usage:/; s/^[# ]{1,4}// p;} " ${0} } error () { # -> error "description" echo -e ${@:-$(usage)} >&2 exit 1 } showVer () { echo "$PROGRAM, ver: $VER"; } # Main ----------------------------------------------------------------------- # ---------------------------------------------------------------------------- # silenciar la salida standard en cron if [ ! -t ]; then exec >&1 /dev/null fi showVer cd $CWD # command line default options: while getopts ":vh" option; do case ${option} in v) exit 0;; # Shows the version number h) usage && exit 0;; # help. *) error;; esac done # Cargamos y comprobamos la configuración if [ -r ${config} ]; then . ${config} elif [ "${MIRRORS}" != "" ]; then : # ${MIRRORS[@]} se carga desde el fich de configuración. else error "ERROR: ${config} no se pudo leer, o contiene parámetros erroneos." fi # Bajamos y procesamos los listados de rpms : ${list:=".listing"} # listado obtenido de wget (no cambiar). echo -e "nPaciencia, puede tardar unos minutos en acabarn" for mirror in ${MIRRORS[@]}; do eval ftp_mirror="$$mirror" echo -n "Guardando listado de ${ftp_mirror} " wget -qc --dont-remove-listing "${ftp_mirror}/${no_es_un_rpm}" if [ -f ${list} ]; then awk '{print $NF}' ${list} > ${mirror}${list} && rm ${list} echo " ... en ${mirror}${list}" fi done exit 0; ... and the config file: # ~/etc/rpmmirrorsrc # Define fuentes de rpms para instalar. # Puede ser usado por distintos scripts. No borrar. # FTP servers: SE_MIRROR="ftp.sunet.se/pub/Linux/distributions" FR_MIRROR="ftp.lip6.fr/pub/linux/distributions" ES_MIRROR="ftp.rediris.es/mirror" FULL_DISTRO="ftp://ftp.esat.net/pub/linux/mandrake-old/" # Listado de Mirrors fuente de rpms (binaries and source): : ${ROOT:="ftp://${ES_MIRROR}"} COOKER="${ROOT}/mandrake-devel/cooker/cooker/Mandrake/RPMS" CURRENT="${ROOT}/mandrake/current/i586/Mandrake/RPMS" MIRROR_81="${FULL_DISTRO}/8.1/i586/Mandrake/RPMS" MIRROR_82="${FULL_DISTRO}/8.2/i586/Mandrake/RPMS" MIRROR_90="${FULL_DISTRO}/9.0/i586/Mandrake/RPMS" MIRROR_91="${CURRENT}" UPDATES_81="${ROOT}/mandrake/updates/8.1/RPMS" UPDATES_82="${ROOT}/mandrake/updates/8.2/RPMS" UPDATES_90="${ROOT}/mandrake/updates/9.0/RPMS" UPDATES_91="${ROOT}/mandrake/updates/9.1/RPMS" sCOOKER="${ROOT}/mandrake-devel/cooker/SRPMS" sCURRENT="${ROOT}/mandrake/current/i586/Mandrake/SRPMS" sMIRROR_81="${FULL_DISTRO}/8.1/i586/Mandrake/SRPMS" sMIRROR_82="${FULL_DISTRO}/8.2/i586/Mandrake/SRPMS" sMIRROR_90="${FULL_DISTRO}/9.0/i586/Mandrake/SRPMS" sMIRROR_91="${sCURRENT}" sUPDATES_81="${ROOT}/mandrake/updates/8.1/SRPMS" sUPDATES_82="${ROOT}/mandrake/updates/8.2/SRPMS" sUPDATES_90="${ROOT}/mandrake/updates/9.0/SRPMS" sUPDATES_91="${ROOT}/mandrake/updates/9.1/SRPMS" # Misc: PLF="ftp://ftp.easynet.fr/plf/cooker/i586/" CONTRIB="${ROOT}/mandrake-devel/contrib/i586/" sPLF="ftp://ftp.easynet.fr/plf/src/" sCONTRIB="${ROOT}/mandrake-devel/contrib/SRPMS/" # Variables de configuración para ~/bin/rpmmirrors MIRRORS=("COOKER" "sCOOKER" "UPDATES_91" "sUPDATES_91" "CURRENT" "sCURRENT") ... I post this just in case some ill mind will find it interesting :D Quote Link to comment Share on other sites More sharing options...
phazeman Posted August 13, 2003 Report Share Posted August 13, 2003 The most easyest way is to do the next: To check if there are updaed rpms: # urpmq -r --list --auto-select Toc install the updated rpms: # urpmi --auto-select If you wish to work with only specific media (like updates) you should add the next flag to that command: --media updates Works really nice for me. Phazeman Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.