Emerge Portage – Multiple package instances within a single package resulting slot conflict

April 22, 2009 by V-Teq · Leave a Comment
Filed under: Gentoo Linux 


As usual at least once a month, I came across a bug in The Portage Tree of Gentoo Linux.

root@v-teq-laptop $ emerge -Dup world # --deep --update --pretend
 
!!! Multiple package instances within a single package slot have been pulled
!!! into the dependency graph, resulting in a slot conflict:
 
sys-libs/readline:0
 
('ebuild', '/', 'sys-libs/readline-5.2_p13', 'merge') pulled in by
=sys-libs/readline-5* required by ('ebuild', '/', 'dev-lang/ghc-6.8.2', 'merge')
(and 16 more)
 
('installed', '/', 'sys-libs/readline-6.0', 'nomerge') pulled in by
sys-libs/readline:0 required by world
sys-libs/readline required by system
sys-libs/readline required by world
(and 13 more)
 
It may be possible to solve this problem by using package.mask to
prevent one of those packages from being selected. However, it is also
possible that conflicting dependencies exist such that they are
impossible to satisfy simultaneously. If such a conflict exists in the
dependencies of two different packages, then those packages can not be
installed simultaneously.
 
For more information, see MASKED PACKAGES section in the emerge man page
or refer to the Gentoo Handbook.

To get rid of such package conflict you have to add package name into package.mask file. And even better is to put there only one version of those conflicted packages.
There you can see example solution of this kind of bug:

echo ">=sys-libs/readline-6.0" >> /etc/portage/package.mask

Firefox ‘already running’ bug -> delete .parentlock file

February 11, 2009 by V-Teq · 3 Comments
Filed under: CentOS 


I came across a strange bug today, using CentOS Linux. The whole system suddenly froze up and I had to restart the whole computer (it was not even possible to change to any TTY using CTRL+ALT+F[0-8] or restart X by pushing CTRL+ALT+BACKSPACE). But after rebooting I couldn’t start Mozilla Firefox browser.

Error dialogue during a Firefox startup:

Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system.

The solution is to delete .parentlock file in your firefox home directory.

$ rm ~/.mozilla/firefox/<session>.default/.parentlock
# substitute <session> with your default session (or '*' should probably work too)

Networking notes

January 26, 2009 by V-Teq · 2 Comments
Filed under: Linux Notes 

How to change MAC (hardware) address of NIC (network interface card)

$ ifconfig eth0 down
$ ifconfig eth0 hw ether 00:ab:cd:ef:12:34 # new MAC address
$ ifconfig eth0 up
$ ifconfig eth0 | grep HWaddr # check new MAC address

Sparse files

December 20, 2008 by V-Teq · Leave a Comment
Filed under: Linux Notes 

How to create ~20GB sparse file

A few days ago, I wanted to download some files using DC network via Linux DC++. The problem was, that I had a borrowed laptop with no files to share, so I decided to create a faked file – in my case sparse file.
This Unix-like command creates ~20GB sparse file. To be clear, it’s file size seems to be 20GB for most of applications (including Linux DC++), but in real it’s only about a few bytes long, just because of “seek”. Zeros needn’t to be physically stored in the harddisk, they’re simply seeked.

$ dd if=/dev/zero of=<FILE> bs=1 count=0 seek=20480M

Sparse files are available on most of Unix-like file systems. Microsoft implements sparse files since release of NTFS (fsutil).

Subversion commands (svn)

November 12, 2008 by V-Teq · Leave a Comment
Filed under: Linux Notes, Programming 

SVN Update

svn update – Bring changes from the repository into your working copy.

$ svn update [-r <REV>] [<PATH>]

Usage examples:

$ svn update # update the whole working copy to the latest revision
$ svn update doc/ # update doc/ directory to the latest revision
$ svn update -r 128 # update (revert) the whole working copy to revision #128
$ svn update -r 56 stack.h stack.c # update (revert) stack.h and stack.c files to revision #56

SVN Merge

svn merge – Apply the differences between two sources to a working copy path.

$ svn merge -r <FROM_REV>:<TO_REV> [<PATH>]

Usage examples:

$ svn merge -r 58:56 stack.h # undo stack.h file changes from revision #58 to revision #56

« Previous PageNext Page »