PackageKit error File \”/usr/share/PackageKit/helpers/yum/yumBackend.py\”, line 1215, in _get_depends_not_installed – Resolved

2010-02-04 1 min read Fedora

In packagekit, if you getting the error below:

Traceback (most recent call last):
File ”/usr/share/PackageKit/helpers/yum/yumBackend.py”, line 1215, in _get_depends_not_installed
rc, msgs =  self.yumbase.buildTransaction()
File ”/usr/lib/python2.6/site-packages/yum/__init__.py”, line 719, in buildTransaction
self.plugins.run(’postresolve’, rescode=rescode, restring=restring)
File ”/usr/lib/python2.6/site-packages/yum/plugins.py”, line 179, in run
func(conduitcls(self, self.base, conf, **kwargs))
File ”/usr/lib/yum-plugins/remove-with-leaves.py”, line 71, in postresolve_hook
if opts.remove_leaves or remove_always:
AttributeError: ’NoneType’ object has no attribute ’remove_leaves’

then you can resolve it. The solution to the problem is there in the traceback, luckily this time.

Continue reading

How To Build A Self-hosted WordPress Blog For Free

2010-02-04 1 min read Linux

A blog is a layman-friendly variation of a website, and having a blog is one of the many ways to state your presence in the virtual world. While there are many hassle-free blog services out there that will take care of everything except automatically blog for you – like <a href="http://www.makeuseof.com/tags/blogger">Blogger and <a href="http://www.makeuseof.com/tags/wordpress">WordPress, nothing can beat a self-hosted blog in the terms of customization and self pride.

The problem is, the process of building your own self-hosted blog is (almost always) not free and is considered complicated. So most newbies will choose the easier path and never give themselves a chance to experiment.

Continue reading

Splitting strings with IFS

2010-02-04 2 min read Bash Linux

Today I want to discuss splitting strings into tokens or “words”. I previously discussed how to do this with the <a href="http://bashcurescancer.com/reading-a-file-line-by-line.html">IFS variable and promised a more in depth discussion. Today, I will make the case on WHY to use IFS to split strings as opposed to using a subshell combined with <a class="zem_slink freebase/en/awk" title="AWK" rel="homepage" href="http://cm.bell-labs.com/cm/cs/awkbook/index.html">awk or cut.

I wrote this script which reads the /etc/password file line-by-line and prints the <a class="zem_slink freebase/en/user" title="User (computing)" rel="wikipedia" href="http://en.wikipedia.org/wiki/User_%28computing%29">username of any user which has a UID greater than 10 and has the shell of /sbin/nologin. Each test function performs this task 10 times to increase the length of the test:

Continue reading

Kill processes that have been running for more than a week

2010-02-04 1 min read Linux

<a href="http://blog.amit-agarwal.co.in/category/linux/">Bookmark this category

<span style="font-size: x-large;"><a href="http://feedproxy.google.com/~r/Command-line-fu/~3/kr_otvdAVxA/kill-processes-that-have-been-running-for-more-than-a-week">Kill processes that have been running for more than a week
$ find /proc -user myuser -maxdepth 1 -type d -mtime +7 -exec basename {} ; | xargs kill -9

  • <a href="http://www.commandlinefu.com/commands/view/3702/kill-processes-that-have-been-running-for-more-than-a-week">View this command to comment, vote or add to favourites
  • <a href="http://feeds2.feedburner.com/commands/by/sharfah">View all commands by <a href="http://feeds2.feedburner.com/commands/by/sharfah">sharfah

<a href="http://www.commandlinefu.com"><img src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/header-logo.jpg" alt="commandlinefu.com" align="bottom" />

by David Winterbottom (<a href="http://codeinthehole.com">codeinthehole.com)

<a href="http://feedads.g.doubleclick.net/~a/NeXCFRlIt7EM3A_bb4x2jLaegwk/0/da"><img src="http://blog.amit-agarwal.com/wp-content/uploads/amit-agarwal.co.in/~a/NeXCFRlIt7EM3A_bb4x2jLaegwk/0/di" border="0" alt="" align="bottom" />
<a href="http://feedads.g.doubleclick.net/~a/NeXCFRlIt7EM3A_bb4x2jLaegwk/1/da"><img src="http://blog.amit-agarwal.com/wp-content/uploads/amit-agarwal.co.in/~a/NeXCFRlIt7EM3A_bb4x2jLaegwk/1/di" border="0" alt="" align="bottom" />

Continue reading

Execute mysql command from shell

2010-02-04 1 min read Database

phpMyAdmin is a very slow application if you want to execute a query on your database. If you know the name of the database then any GUI tool is an overhead. So I have written a one liner shell script to do that for me 🙂

Here&#8217;s the script:

echo &#8221;select * from table where field like &#8221;%$1%&#8221;&#8221;|mysql -h doamin.com -u amit -p -D amit -r –password=hello

When run with one argument it will execute the sql query directly without asking for password also.

Continue reading

Packagekit Error

2010-02-04 1 min read Fedora

With the latest update on my Fedora 10(F10) I started getting this error when ever I wanted to use the gnome package kit (I was able to use yum though):
failed to get a TID: A security policy in place prevents this sender from sending this message to this recipient, see message bus configuration file (rejected message had interface &#8221;org.freedesktop.PackageKit.Transaction&#8221; member &#8221;SetLocale&#8221; error name &#8221;(unset)&#8221; destination &#8221;org.freedesktop.PackageKit&#8221;) (0)

I searched couple of forums but did not find any good resource on what was happening. Finally I decided to rollback Packagekit and dbus. And Yahoooooooooooo, it started working again.

Continue reading

Color in grep output to distinquish the matching entries

2010-02-04 1 min read Linux

Most of the times I end up spending a lot of time to look for the string in the grep output when I do a search. This is quite frustrating and thus I looked at the options for grep command that would make my life easier and there definately is something. Here it is:

export GREP_COLOR=&#8221;5;36&#8221;

But for this to work you would still need to give the &#8221;–color=auto&#8221; option in the grep command. There are two ways to do this, create a alias for grep as &#8221;grep –color=auto&#8221; or specify the same in GREPOPTIONS.

Continue reading
Older posts Newer posts