2

I'm trying to install a package from a PPA I've added. (Yes, I'm the author of the package if that helps in any way.)

Running a simple install command yields the following:

xxxxx@xxxxx:~$ sudo apt-get install opentracks
[sudo] password for xxxxx: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be upgraded:
  opentracks
1 upgraded, 0 newly installed, 0 to remove
Need to get 1,834kB of archives.
After this operation, 184kB of additional disk space will be used.
(Reading database ... 218827 files and directories currently installed.)
Preparing to replace opentracks 0.0.2-1
    (using .../opentracks_0.0.5-1_amd64.deb) ...
Unpacking replacement opentracks ...
dpkg: error processing /var/cache/apt/archives/opentracks_0.0.5-1_amd64.deb
    (--unpack):
trying to overwrite directory '/usr/share/pixmaps' in package
    mysql-query-browser 5.0r14+openSUSE-2.1 with nondirectory
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/opentracks_0.0.5-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I have emphasized the error... it seems like something is trying to overwrite /usr/share/pixmaps for some strange reason.

What could cause such an error?

2 Answers 2

3

Browsing the .deb package using File Roller and noticed /usr/share/pixmaps is not a directory, it is an image file (/usr/share/applications is also not a directory as it should be).

alt text

I believe the problem is with your Makefile, specifically these two lines:

cp -r images/* $(DESTDIR)/usr/share/pixmaps
cp other/opentracks.desktop $(DESTDIR)/usr/share/applications

Neither of the directories you are trying to copy to exist, so cp just creates new files $(DESTDIR)/usr/share/pixmaps and $(DESTDIR)/usr/share/applications

To fix this, modify your Makefile:

mkdir -p $(DESTDIR)/usr/share/pixmaps
mkdir -p $(DESTDIR)/usr/share/applications
cp -r images/* $(DESTDIR)/usr/share/pixmaps
cp other/opentracks.desktop $(DESTDIR)/usr/share/applications
2
  • Thanks... I should have known my Makefile would be responsible :) Dec 14, 2010 at 21:00
  • Well, its you Makefile being used to build the package in a clean chroot. Running make install, you probably won't run into this problem on most systems. But Debian packages are built in a minimal environment. Dec 14, 2010 at 21:07
0

Type the following in terminal,

sudo dpkg -i --force-overwrite /var/cache/apt/archives/opentracks_0.0.5-1_amd64.deb
2
  • 1
    Is that really safe? This sounds like a fairly serious bug in the package. It seems to me that dpkg is doing the right thing. Overwriting /usr/share/pixmaps would cause quite a bit of data loss. Dec 14, 2010 at 20:41
  • @andrewsomething: You're exactly right... most applications store their icon / image in that folder. Overwriting it would give... interesting... results :) Dec 14, 2010 at 21:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .