[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Some questions
- From: James Olin Oden <joden malachi lee k12 nc us>
- To: rpm-list redhat com
- Subject: Re: Some questions
- Date: Fri, 12 Sep 2003 13:30:41 -0400 (EDT)
On Fri, 12 Sep 2003, mike corbeil wrote:
>
>
> seth vidal wrote:
>
> >On Fri, 2003-09-12 at 03:09, John Newbigin wrote:
> >
> >
> >>If I have a package X which requires Y and package Y which requires X
> >>and I want to install X and upgrade Y, can I do this all at once? (X =
> >>iptables and Y = kernel)
> >>
> >>
> >
> >
> >yes
> >rpm -ivh X Y
> >
> >
>
> Given that John wants to upgrade pkg Y, this should mean that an
> instance, prior version, of Y is already installed on his system.
> If this is the case, then John should use -U, instead of -i, because -U
> will either upgrade or install a pkg, depending on whether a
> prior version of a pkg is already installed, or not.
>
The problem is that one of the packages is the kernel, which probably does
what to install rather than upgrade, but the other package is iptables
which he will want to upgrade and not install. Unfortunately, from the
cli you cannot stackup installs, upgrades, and erases. You can do this
using librpm, or the python binding to that (and one day with perl RPM2
(-;). Course you probably don't want to revert to coding, but I will say
that the python bindings look pretty easy to do, and you could probably
wip a 5-10 line script that would add an install of the kernel and an
upgrade of iptables to transaciton and run it. If I worked with
python every day I would give you such an exampel, but I am an evil
perl coder so alas I can't quickly give you said example (-;
Cheeers...james
> If a pkg, older version, is already installed and -i is used to upgrade,
> then this is not what happens; or, not what used to happen
> with rpm. If rpm works the way it used to, then -i would install the
> new version of a pkg, alongside the older version, which will
> not be replaced. I did this once, for the rpm pkg itself, and ended up
> with two instances of the rpm pkg being installed, an older
> version, and the newer version. This lead to other problems, eventually
> both instances being uninstalled, leaving no rpm
> pkg available; and, to recover from this, I simply copied the existing
> rpm pkg from a second hdd on which I had a second,
> alternative Linux installation. That cleared the problem, but it was a
> pain in the neck.
>
> Use -i only when a pkg is not already installed. -U will upgrade, or
> install, and upgrades only when the specified pkg
> is a more recent version than the already installed version. -F can be
> used to freshen an installation of a pkg. Normally, I use
> either -i or -U, but -F can potentially be safer when people aren't
> entirely sure about what they're doing; is the way I read or
> interpret -F, as opposed to -U.
>
> One habit I kind of developed is to also do a test, --test, upgrade or
> install, prior to performing the actual operation. This can
> alert you to problems an actual attempt would produced, and never harms
> anything. If using --test, then simply add the switch
> following -ivh or -Uvh, whichever you're using: rpm -Uvh --test X Y.
> If the test run doesn't report any problems, or none that
> you need to be specially concerned about, then redo the operation
> without the --test switch.
>
> >
> >
> >
> >>And related to that question, if I install X with --nodeps, is there a
> >>way I can get a report of things in the rpm database with unsatisfied
> >>dependencies?
> >>
> >>
> >
> >1. don't use --nodeps, this is bad
> >2. rpm -Va --nofiles will print out a list of bad deps/conflicts/etc
> >
> >-sv
> >
> >
> >
> >_______________________________________________
> >Rpm-list mailing list
> >Rpm-list@redhat.com
> >https://www.redhat.com/mailman/listinfo/rpm-list
> >
> >
> >
> >
>
>
> _______________________________________________
> Rpm-list mailing list
> Rpm-list@redhat.com
> https://www.redhat.com/mailman/listinfo/rpm-list
>
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]