[CentOS] is yum a complete substitute of rpm?

2010-02-16 Thread R P Herrold
On Mon, 15 Feb 2010, Bowie Bailey wrote:

> I use rpm for basic stuff because it runs faster.  For example:
>
> $ time yum list installed
> ...
> real0m17.069s
> user0m0.857s
> sys 0m0.675s
>
> $ time rpm -qa
> ...
> real0m4.714s
> user0m4.457s
> sys 0m0.120s
>
> Yum tends to take a while to read in its databases before it processes
> your command.  So for simple commands, it is faster to use rpm.  On slow
> boxes, it can be significantly faster.

naw -- The 'speed' issue here comes down to a scripting 
language v a compiled one -- librpm underneath on each in 
CentOS 5.  Here is a more apple to apples comparison on those 
timings on the work being done

[herr...@centos-5 clang]$ time rpm -qa --nosignature \
--nodigest > /dev/null

real0m0.329s
user0m0.208s
sys 0m0.076s
[herr...@centos-5 clang]$ time yum list installed > /dev/null

real0m4.252s
user0m1.948s
sys 0m0.132s
[herr...@centos-5 clang]$

-- Russ herrold
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] is yum a complete substitute of rpm?

2010-02-15 Thread Peter Kjellstrom
On Monday 15 February 2010, Bowie Bailey wrote:
> Jim Green wrote:
> > On 13 February 2010 10:27, Robert P. J. Day  wrote:
> >> On Sat, 13 Feb 2010, Jim Green wrote:
> >>
> >>
> >>  $ rpm -qa # list all installed packages
> >
> > yum list installed
>
> I use rpm for basic stuff because it runs faster.  For example:
>
> $ time yum list installed
> ...
> real0m17.069s
> user0m0.857s
> sys 0m0.675s
>
> $ time rpm -qa
> ...
> real0m4.714s
> user0m4.457s
> sys 0m0.120s

A nice twist is that "-qa" can be extened to "-qa --last" to get the output 
sorted on install date (or you can have any format you want with --qf like a 
previous poster suggested).

/Peter


signature.asc
Description: This is a digitally signed message part.
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] is yum a complete substitute of rpm?

2010-02-15 Thread Bowie Bailey
Jim Green wrote:
> On 13 February 2010 10:27, Robert P. J. Day  wrote:
>   
>> On Sat, 13 Feb 2010, Jim Green wrote:
>>
>>
>>  $ rpm -qa # list all installed packages
>> 
>
> yum list installed

I use rpm for basic stuff because it runs faster.  For example:

$ time yum list installed
...
real0m17.069s
user0m0.857s
sys 0m0.675s

$ time rpm -qa
...
real0m4.714s
user0m4.457s
sys 0m0.120s

Yum tends to take a while to read in its databases before it processes
your command.  So for simple commands, it is faster to use rpm.  On slow
boxes, it can be significantly faster.

-- 
Bowie
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] is yum a complete substitute of rpm?

2010-02-15 Thread Mathieu Baudier
> Thank Robert and Ron, Could you list an example where I need to use
> rpm command alone? I used rpm to install stand alone package if that
> is the case.

This one illustrates the kind of information you rather get with the
rpm command (here the installed size):

# List RPMS ordered by size (biggest last)
rpm -q -a --qf '%10{SIZE}\t%{NAME}\n' | sort -k1,1n

Useful when you need to make room in an /usr partition for example
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] is yum a complete substitute of rpm?

2010-02-15 Thread Peter Kjellstrom
On Saturday 13 February 2010, Robert P. J. Day wrote:
> On Sat, 13 Feb 2010, Jim Green wrote:
...
> > Thank Robert and Ron, Could you list an example where I need to use
> > rpm command alone? I used rpm to install stand alone package if that
> > is the case.
>
>   i suspect there are yum alternatives for some of these but here's
> some stuff i like:
>
>   $ rpm -qa   # list all installed packages
>   $ rpm -qR  # list dependencies of package
>   $ rpm -ql  # display list of files in package
>   $ rpm -qf # what package is  from?
>
> and many others.

One from me:

 $ rpm -V  # verify all files from installed pkg 

/Peter


signature.asc
Description: This is a digitally signed message part.
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] is yum a complete substitute of rpm?

2010-02-13 Thread Robert Heller
At Sat, 13 Feb 2010 10:00:14 -0600 CentOS mailing list  
wrote:

> 
> Dear Centos community,
> I am new to centos/redhat and I would like to know on a centos system,
> can I use yum alone to do all package management? I don't want to learn
> two systems and confuse myself, I understand yum is much better than
> rpm if is the case?

yum is layered on top of RPM.  That is, yum uses rpm itself to actually
manage packages.  yum adds several additional features/functions:

1) It deals with dependencies (rpm only complains about dependencies,
but makes no attempt on its own to resolve dependencies).

2) It deals with updates from one (or more) repositories.  A repository
is a collection of RPMs, from which updates and/or dependencies can be
resolved as well as a source of packages to install.



> 
> Thank you!
> 
> Jim
> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
> 
>

-- 
Robert Heller -- 978-544-6933
Deepwoods Software-- Download the Model Railroad System
http://www.deepsoft.com/  -- Binaries for Linux and MS-Windows
hel...@deepsoft.com   -- http://www.deepsoft.com/ModelRailroadSystem/

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] is yum a complete substitute of rpm?

2010-02-13 Thread Jim Green
On 13 February 2010 10:35, Kwan Lowe  wrote:
>> Thank Robert and Ron, Could you list an example where I need to use
>> rpm command alone? I used rpm to install stand alone package if that
>> is the case.
>
> If you need information on a specific package then you'll likely need
> to use rpm directly. For the most part, anytime I need to install a
> package I use yum. This includes installing a standalone package. I
> use rpm mainly during troubleshooting. For example, to list package
> contents, scripts, or extract portions of a package.

Thank Kwan, I get a much better feel of when to use rpm/yum now.
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] is yum a complete substitute of rpm?

2010-02-13 Thread Jim Green
On 13 February 2010 10:27, Robert P. J. Day  wrote:
> On Sat, 13 Feb 2010, Jim Green wrote:
>
>> On 13 February 2010 10:13, Ron Loftin  wrote:
>> >
>> > On Sat, 2010-02-13 at 10:00 -0600, Jim Green wrote:
>> >> Dear Centos community,
>> >> I am new to centos/redhat and I would like to know on a centos system,
>> >> can I use yum alone to do all package management? I don't want to learn
>> >> two systems and confuse myself, I understand yum is much better than
>> >> rpm if is the case?
>> >
>> > I expect that you will get a bunch of replies on this.
>> >
>> > The short form is that yum lives on TOP of RPM.  It is not a replacement
>> > for RPM.
>> >
>> > Yum does most of the thinking for you as far as dependency
>> > management. It is much more user-friendly, and is the preferred
>> > mechanism for software installation and maintenance because it
>> > does the dependency resolution for you, and saves much in the way
>> > of headaches, elevated stress, confusion, and RSI from excessive
>> > keyboard use.
>> >
>> > All that being said, there are times when you do want to use RPM
>> > by itself, without Yum.  If you stay with CentOS and/or RedHat
>> > long enough, you will run across this situation now and then.
>>
>> Thank Robert and Ron, Could you list an example where I need to use
>> rpm command alone? I used rpm to install stand alone package if that
>> is the case.
>
>  i suspect there are yum alternatives for some of these but here's
> some stuff i like:
>
>  $ rpm -qa                     # list all installed packages

yum list installed

>  $ rpm -qR            # list dependencies of package

yum deplist 


>  $ rpm -ql            # display list of files in package

>  $ rpm -qf           # what package is  from?

yum provides 

this kind of exercise is fun. I came from debian and it is fun to make matches:)
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] is yum a complete substitute of rpm?

2010-02-13 Thread Kwan Lowe
> Thank Robert and Ron, Could you list an example where I need to use
> rpm command alone? I used rpm to install stand alone package if that
> is the case.

If you need information on a specific package then you'll likely need
to use rpm directly. For the most part, anytime I need to install a
package I use yum. This includes installing a standalone package. I
use rpm mainly during troubleshooting. For example, to list package
contents, scripts, or extract portions of a package.
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] is yum a complete substitute of rpm?

2010-02-13 Thread Robert P. J. Day
On Sat, 13 Feb 2010, Jim Green wrote:

> On 13 February 2010 10:13, Ron Loftin  wrote:
> >
> > On Sat, 2010-02-13 at 10:00 -0600, Jim Green wrote:
> >> Dear Centos community,
> >> I am new to centos/redhat and I would like to know on a centos system,
> >> can I use yum alone to do all package management? I don't want to learn
> >> two systems and confuse myself, I understand yum is much better than
> >> rpm if is the case?
> >
> > I expect that you will get a bunch of replies on this.
> >
> > The short form is that yum lives on TOP of RPM.  It is not a replacement
> > for RPM.
> >
> > Yum does most of the thinking for you as far as dependency
> > management. It is much more user-friendly, and is the preferred
> > mechanism for software installation and maintenance because it
> > does the dependency resolution for you, and saves much in the way
> > of headaches, elevated stress, confusion, and RSI from excessive
> > keyboard use.
> >
> > All that being said, there are times when you do want to use RPM
> > by itself, without Yum.  If you stay with CentOS and/or RedHat
> > long enough, you will run across this situation now and then.
>
> Thank Robert and Ron, Could you list an example where I need to use
> rpm command alone? I used rpm to install stand alone package if that
> is the case.

  i suspect there are yum alternatives for some of these but here's
some stuff i like:

  $ rpm -qa # list all installed packages
  $ rpm -qR# list dependencies of package
  $ rpm -ql# display list of files in package
  $ rpm -qf   # what package is  from?

and many others.

rday
--



Robert P. J. Day   Waterloo, Ontario, CANADA

Linux Consulting, Training and Kernel Pedantry.

Web page:  http://crashcourse.ca
Twitter:   http://twitter.com/rpjday
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] is yum a complete substitute of rpm?

2010-02-13 Thread Jim Green
On 13 February 2010 10:13, Ron Loftin  wrote:
>
> On Sat, 2010-02-13 at 10:00 -0600, Jim Green wrote:
>> Dear Centos community,
>> I am new to centos/redhat and I would like to know on a centos system,
>> can I use yum alone to do all package management? I don't want to learn
>> two systems and confuse myself, I understand yum is much better than
>> rpm if is the case?
>
> I expect that you will get a bunch of replies on this.
>
> The short form is that yum lives on TOP of RPM.  It is not a replacement
> for RPM.
>
> Yum does most of the thinking for you as far as dependency management.
> It is much more user-friendly, and is the preferred mechanism for
> software installation and maintenance because it does the dependency
> resolution for you, and saves much in the way of headaches, elevated
> stress, confusion, and RSI from excessive keyboard use.
>
> All that being said, there are times when you do want to use RPM by
> itself, without Yum.  If you stay with CentOS and/or RedHat long enough,
> you will run across this situation now and then.

Thank Robert and Ron, Could you list an example where I need to use
rpm command alone? I used rpm to install stand alone package if that
is the case.

Jim
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] is yum a complete substitute of rpm?

2010-02-13 Thread Ron Loftin

On Sat, 2010-02-13 at 10:00 -0600, Jim Green wrote:
> Dear Centos community,
> I am new to centos/redhat and I would like to know on a centos system,
> can I use yum alone to do all package management? I don't want to learn
> two systems and confuse myself, I understand yum is much better than
> rpm if is the case?

I expect that you will get a bunch of replies on this.

The short form is that yum lives on TOP of RPM.  It is not a replacement
for RPM.

Yum does most of the thinking for you as far as dependency management.
It is much more user-friendly, and is the preferred mechanism for
software installation and maintenance because it does the dependency
resolution for you, and saves much in the way of headaches, elevated
stress, confusion, and RSI from excessive keyboard use.

All that being said, there are times when you do want to use RPM by
itself, without Yum.  If you stay with CentOS and/or RedHat long enough,
you will run across this situation now and then.

> 
> Thank you!
> 
> Jim
> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
-- 
Ron Loftin  relof...@twcny.rr.com

"God, root, what is difference ?"   Piter from UserFriendly

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] is yum a complete substitute of rpm?

2010-02-13 Thread Robert P. J. Day
On Sat, 13 Feb 2010, Jim Green wrote:

> Dear Centos community, I am new to centos/redhat and I would like to
> know on a centos system, can I use yum alone to do all package
> management? I don't want to learn two systems and confuse myself, I
> understand yum is much better than rpm if is the case?

  yum is simply a layer built on top of rpm.  it's nice if you can do
everything you want with yum, but it doesn't hurt to learn the basics
of rpm anyway.

rday
--



Robert P. J. Day   Waterloo, Ontario, CANADA

Linux Consulting, Training and Kernel Pedantry.

Web page:  http://crashcourse.ca
Twitter:   http://twitter.com/rpjday

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] is yum a complete substitute of rpm?

2010-02-13 Thread Jim Green
Dear Centos community,
I am new to centos/redhat and I would like to know on a centos system,
can I use yum alone to do all package management? I don't want to learn
two systems and confuse myself, I understand yum is much better than
rpm if is the case?

Thank you!

Jim
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos