Matthew Rosewarne on 11 Jul 2007 19:59:20 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] rpm -Va using apt = debsums


On Tuesday 10 July 2007, JP Vossen wrote:
> Does anyone have a better way than debsums?

is there a problem with debsums?  Is there some functionality of rpm -V that 
debsums does not provide?

> Wajig (http://www.togaware.com/linux/survivor/Wajig_Overview.html) is a
> nifty Python script that unifies all the apt tools (apt-*, dpkg*, etc.).
>   It's pretty cool, but I find it to be more complicated than I need, so
> I've written a simple shell script that uses a case statement to do what
> I want.  Wajig's -t (teach) option is great for seeing just how it works.
>
> My script only does about 20 things (wajig does over 100) but it was a
> useful exercise to "translate" things I knew how to do in RPM to APT.
> (I have a bit more background in RPM than APT as may be obvious by now).
>   I'll post the script someplace if there is any interest in it.  Here's
> what it does now:
>
> COMMANDS
> * The | in upd|ate means you only need to type the "upd" part.
> * <names> means one or more space delimited package names
> * <egrep> means a single egrep regular expression (e.g. 'zip|arj')
>
>      upd|ate         # Update the package cache (do this at least weekly)
"apt-get update", or "aptitude update"
>      che|ck,chk           # Check for available upgrades
Not sure what this means, perhaps "apt-get -s upgrade" or "aptitude -s 
upgrade" ?
>      upche|ck,upchk       # Update, then check for available upgrades
Just run the two above....
>      upg|rade             # Upgrade all installed packages
"apt-get upgrade" or "aptitude upgrade"
>      dist|-upgrade        # Really upgrade all installed packages
"apt-get dist-upgrade" or "aptitude full-upgrade"
>      se|arch;find <regex> # Search for <regex> in the package cache
"apt-cache search <regex>" or "aptitude search <regex>"
>      sh|ow,info <names>   # Show details about package <names>
"apt-cache show <names>" or "aptitude show <names>" or for only installed 
packages "dpkg -s <names>" or "dpkg --status <names>"
>      showpkg <names>     # Show name and various depends info for <names>
"apt-cache showpkg <names>" (not very useful)
>      in|stall <names>     # Install package <names>
"apt-get install <names>" or "aptitude install <names>"
>      rem|ove <names>      # Remove package <names>
"apt-get remove <names>" or "aptitude remove <names"
>                           # (--purge <names> removes config files too!)
"apt-get --purge remove <names>" or "aptitude purge <names>" or the 
newly-added "apt-get purge <names>"
>      what <egrep>     # Show the name and version of <egrep> if installed
>      which,installed,list <egrep> # Same as previous
"dpkg -l <regex>" or "dpkg --list <regex>"
>      files <names>        # List the files installed by package <names>
"dpkg -L <names>" or "dpkg --listfiles <names>"
the "apt-file" utility can show the contents of packages that aren't even 
installed
>      dep|ends <names>     # Show packages <names> depends on
"apt-cache depends <names>"
>      rdep|ends <names>    # Show other packages that depend on <names>
"apt-cache rdepends <names>"
>      pro|vides <names>    # Show the capability that <names> provides
"apt-cache show <names> | grep 'Provides:'" or for only installed 
packages "dpkg -s <names> | grep 'Provides:'"
>      whatpro|vides <file> # Show the package that provides <file>
"dpkg -S <file>" or "dpkg --search <file>"
the "apt-file" utility can search for files in packages that aren't even 
installed
>      clean               # Remove downloaded package files from the cache
"apt-get clean" or "aptitude clean"
>      autoclean            # Remove obsolete packages from the cache
"apt-get autoclean" or "aptitude autoclean"
>      purge           # Purge the local cache, forces complete re-download
"rm -r /var/cache/apt" (this should never ever be needed)
>      stats                # Show package cache stats
"apt-cache stats" (not very useful)

Is this script really necessary?  You should check out "aptitude", which does 
most of the things you have here, as well as some others.  Running "aptitude" 
without any arguments brings up its ncurses UI.  It's probably better to get 
used to a standard tool like aptitude than to tie yourself to a homebrew 
script, since aptitude will be present on almost every Debian system.

All in all, apt+dpkg, rpm+yum, and apt+rpm all do the same things.  The 
primary difference between dpkg and rpm is the design choice between having 
one app that does everything and several apps that each do a specific task.

Attachment: signature.asc
Description: This is a digitally signed message part.

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug