An idea on extending the "Package users" approach

Eric Herman eric at
Thu Jan 8 06:20:27 PST 2009

Angel Tsankov wrote:

> Let's say I've installed two versions of the same software, e.g. 
> Python 2.6.1 and Python 3.0.  At some point in the future, I decide I
>  no longer need Python 2.6.1 and want to remove it.  How easy would
> it be to also remove the info about it from the .plan and .project 
> files?

Totally trivial.

The key here is that pinky (and finger) read the .project and .plan
files for a user from that user's home directory.

Try this:

1) call pinky on yourself:
cd ~
pinky -l ${USER}

2) edit the .project file in your own home directory
echo "foo" >> .project
echo "bar" >> .project
echo "baz" >> .project

3) call pinky on yourself again:
pinky -l ${USER}

4) edit the .plan file in your own home directory
echo "No Plan ... let's wing it." >> .plan
echo "line two" >> .plan
echo "line three" >> .plan

5) call pinky on yourself again:
pinky -l ${USER}

You should see that the .plan and .project files are simple text files
which you may edit with any text editor, there is nothing magic about
them, except that finger and pinky go looking for those names in the
users' home directories.

I imagine this already gives you enough that your question is answered.

However, just for completeness, let's imagine that you have one user
"python" for Python 2.6.1 and another user "python3" for playing with
Python v3.

In this case, you'd have a /usr/src/python/.project file with whatever
info you've elected to put into the .project file (say, the version and
two patch file names), and you'd also have a /usr/src/python3/.project
file with the separate Python v3 information there.

When you decided that you were done with your Python v2, and that
everything really does work finally with python3, you'd simply remove
the python2 package, and it's home (/usr/src/python/) directory, in
which case the /usr/src/python/.project file vanishes with it.

Alternatively, you might have decided that you have one user for *every*
version of python you have installed. By the way, this is not something
I do, because I don't trust Version X and Version Y to not stomp on each
others' files. Nor do I trust myself to keep it straight.

But supposing this is your situation, then you'd probably want to put
more verbose information in the /usr/src/python/.project rather than the
sparse approach of simply echoing the version information in there, you
might wish to open up your favorite text editor and write a nice
descriptive summary with whatever notes will be useful when you go to
make changes in the future.

Then, when later you come back to remove Python 2, you'll simply edit
the .project file to reflect the new state of affairs.

Hope this helps,

Eric Herman, Software Developer
Mobile: +31 62 071 9662

More information about the lfs-chat mailing list