internal error from PackageKit — packagekit Error Type:

If you get the below error then there is a bug files here.

Error Type:
Error Value: \’NoneType\’ object is unsubscriptable
File : /usr/share/PackageKit/helpers/yum/yumBackend.py, line 2280, in

main()
File : /usr/share/PackageKit/helpers/yum/yumBackend.py, line 2277, in main
backend.dispatcher(sys.argv[1:])
File : /usr/lib/python2.5/site-packages/packagekit/backend.py, line 600, in
dispatcher
self.dispatch_command(args[0], args[1:])
File : /usr/lib/python2.5/site-packages/packagekit/backend.py, line 526, in
dispatch_command
self.refresh_cache()
File : /usr/share/PackageKit/helpers/yum/yumBackend.py, line 1130, in
refresh_cache
self.yumbase.repos.populateSack(which=[repo.id], mdtype=\’metadata\’,
cacheonly=1)
File : /usr/lib/python2.5/site-packages/yum/repos.py, line 223, in
populateSack
self.doSetup()
File : /usr/lib/python2.5/site-packages/yum/repos.py, line 71, in doSetup
self.ayum.plugins.run(\’postreposetup\’)
File : /usr/lib/python2.5/site-packages/yum/plugins.py, line 178, in run
func(conduitcls(self, self.base, conf, **kwargs))
File : /usr/lib/yum-plugins/rpm-warm-cache.py, line 31, in postreposetup_hook
if commands[0] in (\’upgrade\’, \’install\’, \’remove\’):

And the solution is simply to remove:

yum-rpm-warm-cache with command:

yum remove yum-rpm-warm-cache

feh – versatile image viewer works from command line too.

To install :

sudo yum install feh

From the info for the feh package:

feh – versatile image viewer works from command line too
premier image file handling library. feh has many features,
from simple single file viewing, to multiple file modes using
a slideshow or multiple windows. feh supports the creation of
montages as index prints with many user-configurable options.

One of the reasons, I install feh as one of the first packages on any installation is the reason that it can open multiple images like in stack. To make things even more simpler I create a alias like this:

alias v=\’feh -p –scale-down -Z -r \’

with this alias in place I can go to any directory in bash and just type \”v *\” to see all the images πŸ™‚

Some good things you can do with feh are :

Have a theme or naming for option groups. You can have the name for option groups in $HOME/.fehrc or /etc/fehrc. If none exists then you can create one and then make a entry like below

amit -p –scale-down -Z -r

and then use

feh –theme amit *.jpg

or

feh -Tamit *.jpg

In my default install for feh, I have couple of entries which look quite interesting:

# Webcam mode, simply specify the url(s).
# e.g. feh -Twebcam http://cam1 http://cam2
webcam –multiwindow –reload 20

# Create an index of the current directory. This version uses . as the
# current dir, so you don\’t even need any commandline arguments.
mkindex -iVO index.jpg .

# More ambitious version…
imgidx -iVO .fehindex.jpg –limit-width 1200 –thumb-width 90 –thumb-height 90 .

# Show a presentation
present –full-screen –sort name

# Booth mode πŸ˜‰
booth –full-screen –hide-pointer –slideshow-delay 20

# Screw xscreensaver, use feh =)
screensave –full-screen –randomize –slideshow-delay 5

# Add <img> tags to your html with ease πŸ™‚
newimg -q -L \”<img src=\”%f\” alt=\”%n\” border=\”0\” width=\”%w\” height=\”%h\”>\”

# Different menus
chrome –menu-bg /usr /share/feh/images/menubg_chrome.png
brushed –menu-bg /usr/share/feh/images/menubg_brushed.png
pastel –menu-bg /usr/share/feh/images/menubg_pastel.png
aluminium –menu-bg /usr/share/feh/images/menubg_aluminium.png
wood –menu-bg /usr/share/feh/images/menubg_wood.png
aqua –menu-bg /usr/share/feh/images/menubg_aqua.png
sky –menu-bg /usr/share/feh/images/menubg_sky.png
orange –menu-bg /usr/share/feh/images/menubg_orange.png
light –menu-bg /usr/share/feh/images/menubg_light.png
black –menu-bg /usr/share/feh/images/menubg_black.png –menu-style /usr/share/feh/fonts/black.style

Thats quite a lot of options ..Β  There are quite a lot of others you can see with \”–help\”.

Calculations


\"PerlThis is the third part of a seven-part article on famous Perl one-liners. In this part I will create various one-liners for calculations. See part one for introduction of the series.

Famous Perl one-liners is my attempt to create β€œperl1line.txt” that is similar to β€œawk1line.txt” and β€œsed1line.txt” that have been so popular among Awk and Sed programmers.

The article on famous Perl one-liners will consist of at least seven parts:

  • Part I: File spacing.
  • Part II: Line numbering.
  • Part III: Calculations (this part).
  • Part IV: String creation. Array creation.
  • Part V: Text conversion and substitution.
  • Part VI: Selective printing and deleting of certain lines.
  • Part VII: Release of perl1line.txt.

After I’m done explaining all these one-liners, I’ll publish an ebook. Everyone who’s subscribed to my blog will get a free copy! Subscribe now!

The one-liners will make heavy use of Perl special variables. A few years ago I compiled all the Perl special variables in a single file and called it Perl special variable cheat-sheet. Even tho it’s mostly copied out of perldoc perlvar, it’s still handy to have in front of you, so print it.

Read more…………

URL: http://feedproxy.google.com/~r/catonmat/~3/KqbejYcmAtQ/
\"Reblog