Re: scripting rpm installs

From: Robert Locke (rlocke_at_ralii.com)
Date: 01/08/05

  • Next message: Chadley Wilson: "Bash scripting problems"
    To: For users of Fedora Core releases <fedora-list@redhat.com>
    Date: Sat, 08 Jan 2005 11:27:27 -0500
    
    

    On Sat, 2005-01-08 at 03:06, Chadley Wilson wrote:
    > Greetings
    >
    > Me again and my script,
    >
    > OK so part of scripting a fix for cdrom and udev and bla bla, I thought is
    > would be cool to also script some rpms to save time,
    >
    > In the script I have some line like this
    >
    > rpm -Uvh $packagedir/package.rpm
    > rpm -Ivh $packagedir/package.rpm
    >
    > theres about 70 packages in the dir.
    > The problem I am experiencing is if I upgrade a package in the dir, the
    > version changes. and the script must be updated,
    > Now for dependancy solving I have to install them in a certian order.
    >
    > Unfortunately I can't use up2date, apt , yume etc for this as The network that
    > does the installs is isolated and has not internet access, As you can imagine
    > on a PC prodction line we also do windows, and the risk of a virus getting
    > onto brand new systems in too high so we are disconnected from the inet.
    >
    > The PC builder 30 of them scp a folder from the server an execute the script
    > which patches fixes install etc
    >
    > is there some way to tell the script not to look at the version number in
    > other words:
    > this one is normal and must be updated on change of package
    > rpm -Uvh a52dec_0.7.4-7.1.fc3.fr_i386.rpm
    >
    > This line is what I am after but am unsure of how to go about it
    > ie if I replace the rpm in the package dir with a newer version I don't need
    > to update the script line.
    >
    > rpm -Uvh a52dec<version>.rpm
    >
    >
    > I hope this makes, I am confusing myself here! :0
    >

    Chad,

    Couple of suggestions.

    1) Have you looked at -F as an option for rpm? I have an errata
    directory that I carry around. Problem is, an rpm -Uvh $erratadir/*.rpm
    would not only upgrade everything it would also install everything else
    from that directory on me. After I do an interactive or kickstart
    install, I simply point to that directory and do an rpm -Fvh
    ${erratadir}/*.rpm

    2) This leads me to my second thought. Why not just put a wildcard in
    for the version number? For example, rpm -Uvh
    $packagedir/packagename-*.arch.rpm. Remember that with rpm you can
    specify multiple filenames (either with a wildcard or put a space in
    between names). Then during the "pre-flight check" rpm will resequence
    based on pre-req needs.

    HTH,

    --Rob

    -- 
    fedora-list mailing list
    fedora-list@redhat.com
    To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
    

  • Next message: Chadley Wilson: "Bash scripting problems"

    Relevant Pages

    • Re: [opensuse] Local cache of updates, installed programs in openSUSE
      ... don't have the same package config, I created a "Generic" openSuSE repository ... script to separate all the files by architecture and then upload to the server ... server instead of from the internet. ... but they are a hell of a lot slower to install. ...
      (SuSE)
    • Re: [opensuse] Package manager for command line?
      ... I know there are apt, smart, zypper and maybe even more. ... rpm will not download. ... I want to install packages by script. ...
      (SuSE)
    • Re: Reiser FS: all data lost!
      ... > As long as you're giving out free advice on automated backups, ... > see any problems with the following script called from cron.daily? ... you install an RPM that was created more than two days ago? ...
      (alt.os.linux.suse)
    • Re: scripting rpm installs
      ... > would not only upgrade everything it would also install everything else ... For example, rpm -Uvh ... In my script I have a small issue which I can't seem to solve, ... I have carefully setup a kickstart file and install the machines I am testing ...
      (Fedora)
    • Re: How do a Lite Touch install with a WIM
      ... You could use the OS Deployment Image Installation CD Wizard. ... "Automatically choose the Operating System Package to install by running a ... custom program or script" and select "Allow installation from SMS ...
      (microsoft.public.sms.tools)