2009-09-30 21:57Creating a dummy Debian package of kdebase-workspace-libs4+5Sometimes something unusual can happen in Debian’s archive which can stop you from installing the packages you’d like. The most likely reason is that you want to install a package you shouldn’t, but Debian is about Freedom, even the Freedom to do something stupid. I found myself in a situation where I wanted to install the Ubuntu package plasma-widget-adjustableclock which depended on a package which wasn’t in Debian (kdebase-workspace-libs4+5), or rather, existed in Debian but under a different name (libkworkspace4). To make the installation possible I ended up creating a dummy package for kdebase-workspace-libs4+5 and installing that, then trying the clock package again. Here I will explain the steps I took to solve the problem, and any issues I encountered along the way. The first step, as always, is to check what it says on the web. If you’re reading this, then chances are you’ve already done that to some extent, but there are other pages too which I shall refer to rather than repeating in detail. One page is on a wiki, and it correctly instructs readers to run apt-get install equivs but doesn’t mention that the output could be something like this: # apt-get install equivs Reading package lists… Done Building dependency tree Reading state information… Done The following extra packages will be installed: debhelper devscripts dpkg-dev fakeroot gettext gettext-base html2text intltool-debian make patch po-debconf … If you don’t mind installing a dozen packages just to create one dummy package, then go right ahead and say yes at the prompt. As the Debian APT HOWTO then explains, the next command to run is equivs-control name where name is the name of a template file the program will create. Once you have this file, you need to edit it to contain the necessary information about your dummy package. Fortunately the template is quite self-explanatory and has sensible defaults. It’s possible to overlook some advisable changes, though, and the syntax is not always obvious, so I will list below the changes I made:
As the HOWTO says, you next have to run equivs-build name (using the same name of course), and this will produce some output. When I ran this command, it output the message: sh: gcc: not found dpkg-architecture: warning: Couldn’t determine gcc system type, falling back to default (native compilation) several times, interleaved with the expected output. Despite these warnings, I could still run dpkg -i kdebase-workspace-libs4+5_4.2.95_all.deb (but not apt-get install foo.deb, which the wiki page suggested). To check this had worked successfully, I ran apt-cache policy kdebase-workspace-libs4+5 and saw that the package was indeed installed correctly: kdebase-workspace-libs4+5: Installed: 4:4.2.95 Candidate: 4:4.2.95 Version table: *** 4:4.2.95 0 100 /var/lib/dpkg/status The only remaining step to be run as root is dpkg -i plasma-widget-adjustableclock_2.1-0ubuntu1_amd64.deb and then you can follow the normal process to install the widget in your KDE desktop. Finally, if you don’t like the default settings (perhaps you’d prefer it used the ISO date format) you can set the HTML template it uses. I use something a bit like this: <div style="text-align:center; margin:15px 5px; white-space:pre;"><big>%H:%M:%S</big> <small>%Y-%m-%d</small></div> So, that’s my little problem solved for now, and maybe the next version of Ubuntu will have package names synched with Debian’s. That would mean I wouldn’t need a dummy package any more, but I would still be installing packages which aren’t official Debian packages or even officially supported Ubuntu packages. How hard can it be to become a Debian developer? Trackbacks
Trackback specific URI for this entry
No Trackbacks
|
QuicksearchCategoriesSyndicate This BlogBlog Administration |