You are currently only viewing entries from May 2007.

To go back to view all items, click here. Also, see June 2007 and April 2007
Wednesday, 30 May 2007

Hacking APT

Workaround for the Advanced Packaging Tool # Permalink

OK. Here's the solution to a really annoying problem relating to the Debian APT tool - that package that just won't uninstall for love nor money. I eventually solved it with a little bit of thinking... when I was thinking in the right way about it!

The scenario

Firstly, you get a fairly standard error message, e.g. referring to a non-existent file (typically the init.d file). Then, it triggers the subprocess pre-removal script returned error exit status 1 error. Thus, you get the wonderful E: Sub-process /usr/bin/dpkg returned an error code (1) to top it off. My problem, as the example above suggests, was that I accidentally deleted the init.d script.

What is happening is that the Debian package manager (dkpg) is running the "pre-removal script" found in the /var/lib/dkpg/info/ folder. This will be named [package].prerm. Typically, this is a brief script which manages the stopping of processes, chmod instructions, and deletes/renames certain package files. By all means, have a look in the file.

The solution

To resolve this problem (at your own risk), simply edit the /var/lib/dkpg/info/[package].prerm file, removing troublesome lines, or even, if necessary, simply emptying (but not deleting) the whole file. This allows the process to continue, and the files to be removed.

Having allowed the package to be removed, you may have problems with re-installation - so even if you do not plan on doing so, you may be well advised to tidy up the files - this is simply done by renaming (rather than deleting, for safety) the remaining [package]. files in the /var/lib/dkpg/info/ folder, to, for example, [package].postrm.old. The files likely to be left behind are the .postrm (post-removal script) and the .list (file list) files. These can safely be renamed, since any re-installation will simply replace them with fresh files.

A footnote

If you want a motto, try "everything Linux does makes sense". The script files are easily reachable to ensure you can fix any little bugs you find or create.

And something else I learned recently relating to APT - if you want to search repositories from the command-line, try "apt-cache search ...".

Posted by carl at 04:00

Filed under: Computing

Tuesday, 29 May 2007

Traffic

a new design # Permalink C Comment

I've put together a new design, and started adjusting the Increase/Decrease font size options, which currently do not work on the published site.

Just so's you know, the way I've chosen to do this is to adjust the font-size CSS attribute of the body element. So long as all internal font-sizes are then specified as percentages, this single adjustment can alter all the necessary formatting options.

Unfortunately, since I uploaded the site only half-way through the process, several items/modules are somehow broken. My Expression CMS currently generates "/journal/" pages which are not valid, since there's an issue with an anchor, which I wasn't really thinking about when I typed up. My local copy's fixed this and most other issues... I just haven't actually uploaded it yet :/

Ciao!

Posted by carl at 04:00

Filed under: Style

Wednesday, 16 May 2007

Nacho's Online

nacho done got himself a website! # Permalink C Comment

No, it's not an advertisement!

Go see Nacho at rag-n-bone.co.uk now!

We're helping each other out now and then, having recently finished school together; I'm the programmer, he's the design dude. Although his site's entirely his work, and my site's entirely mine, advice is exchanged now and again.

Posted by carl at 04:00

Journal from May 2007

All entries from month May 2007

Simple diagrams for LaTeX with Inkscape • 1.7.2013 Yesterday I discovered how to make nice, simple, elegant diagrams for fairly painless inclusion… [read more - comment]No Data Connection (Android) • 4.6.2013 Just spent an age dealing with a phone (Samsung Galaxy S2, I9100, on the UK network 3) running a… [read more - comment]Android/BusyBox Segmentation Faults • 30.9.2012 Just had a terrifying moment when, after attempting to install BusyBox on an Android device,… [read more - comment]Temporarily Redefining In-built Mathematica Functions • 16.7.2012 Suppose a package you're using is, say, zealously Simplifying lots of Mathematica expressions… [read more - comment]Nuclear Power • 24.7.2011 I've never known the answers to the big questions about energy. I do know that with … [read more - comment]
top / xhtml / css
© Carl Turner 2008-2017
design & engine by suchideas / hosted by xenSmart