Friday, November 6, 2009

Now save and quit... doh!

If you like me are annoyed by the "recording" feature on vim (or better, by the way you can accidentally start it), then you may find at least useful to learn how it can be actually used.

This post explains it.

Monday, October 26, 2009

Most used Perl editors

I've seen this poll too late, although it's interesting that the most used Perl editor is the vi family (where I'd belong) with 34%, followed not very closely by Emacs (13%).

Eclipse + EPIC got only 6%...

The full poll results here.

Tuesday, October 20, 2009

Debianize a Perl module

What a good day.

Not only I've got a new laptop from the company, but I've found also an extremely useful tool to build a debian package from a perl module: dh-make-perl.

You just need to do 2 things:

- Run dh-make-perl on the untarred module directory (this creates the necessary debian dir and files).
- Inside the module directory, run debuild.

Very nice. Now I wonder why most of the CPAN and POE components don't come with a debian package...

Thursday, October 8, 2009

When was that package installed?

You can check the date from the output of:
ls /var/lib/dpkg/info/*.list -lh

Just | grep the name of the package you're interested to.

See this for important details.

Friday, July 17, 2009

My favourite photographer

http://www.egglestontrust.com/

debian policy for init scripts

It could be useful to add your /etc/init.d/ script to debian/conffiles to avoid overwriting local changes.
Sometimes sysadmins change the init scripts and with this little tip you can help them in case of package upgrades.

From the Debian Policy Manual:
"The /etc/init.d scripts must be treated as configuration files, either (if they are present in the package, that is, in the .deb file) by marking them as conffiles, or, (if they do not exist in the .deb) by managing them correctly in the maintainer scripts (see Configuration files, Section 10.7). This is important since we want to give the local system administrator the chance to adapt the scripts to the local system, e.g., to disable a service without de-installing the package, or to specify some special command line options when starting a service, while making sure their changes aren't lost during the next package upgrade. "


Using externals with SVN

UPDATE: You need to specify the directory you want to create when setting the external property. No need to create the dir before propset: it'll be done automatically when you 'svn up'.


- Create somewhere in the SVN repo the directory you want to use as external (let's call it SVNEXTURL)
- Go in the working copy where you want to have an external reference and:

svn propset svn:externals 'newlocaldir SVNEXTYURL' .

where newlocaldir is the name of the directory being created by SVN during this operation.
Quotes are needed.
Note the '.'

- and then
svn up

Enjoy!

Problem: if you're using a version of svn-buildpackage older than 0.6.24 (debian), it won't work with external references. You can upgrade to >= 0.6.24 or apply locally the patch described here:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=363003