Active Topics

 


Reply
Thread Tools
jaeezzy's Avatar
Posts: 664 | Thanked: 160 times | Joined on Jul 2008 @ Australia
#1
Hi,
I'm trying to create a .deb package of my application and after going through various sources in the net, I've come to know few basic things but still there are lot of things I'm still confused about so thought I'll ask here. I could create a basic .deb package and are both installable and uninstallable but trying to make one with all my requirements, I'm having problem to make a clean uninstallable one as it does install nice. Below are my requirements:
  • I'll have a .conf file where user settings will be saved
  • I'll have icon used in the application itself and also to display icon in the application manager.

I know these are the basic things but the one I tried was even without these things Here are what I tried:

For I wanted to have a directory in /home/user I created the directories: (/home/user/my_dir/config/my_config.conf and /home/user/my_dir/icons/my_icon.png) under DEBIAN folder like I made others (/etc and /usr) and also wrote postinst and prerm where prerm copies the .conf file to /home/user/.my_conf.conf before removing application so the settings can be used later if the user again installs the application and postinst moves the /home/user/.my_conf.conf back to the actual location which is (/home/user/my_dir/config) if the file exists.

With this, while uninstalling, dpkg warns me that /home/user can't be removed and uninstalling fails. Any help would be great. Thanks
 
Posts: 1,208 | Thanked: 1,028 times | Joined on Oct 2007
#2
Originally Posted by jaeezzy View Post
For I wanted to have a directory in /home/user I created the directories: (/home/user/my_dir/config/my_config.conf and /home/user/my_dir/icons/my_icon.png) under DEBIAN folder like I made others (/etc and /usr) and also wrote postinst and prerm where prerm copies the .conf file to /home/user/.my_conf.conf before removing application so the settings can be used later if the user again installs the application and postinst moves the /home/user/.my_conf.conf back to the actual location which is (/home/user/my_dir/config) if the file exists.

With this, while uninstalling, dpkg warns me that /home/user can't be removed and uninstalling fails. Any help would be great. Thanks
Don't install anything to /home/user with package. Generate default config file during runtime or save default config file somewhere in /usr and copy it in place with startup script
 

The Following User Says Thank You to mikkov For This Useful Post:
qgil's Avatar
Posts: 3,105 | Thanked: 11,088 times | Joined on Jul 2007 @ Mountain View (CA, USA)
#3
Hi, please help finding what is missing and what could be improved at http://wiki.maemo.org/Documentation/...d_Distributing

In principle that should be enough to get your Debian packages right.
 

The Following User Says Thank You to qgil For This Useful Post:
jkq's Avatar
Posts: 251 | Thanked: 131 times | Joined on Oct 2009 @ USA
#4
Originally Posted by qgil View Post
Hi, please help finding what is missing and what could be improved at http://wiki.maemo.org/Documentation/...d_Distributing
I'm still pretty new to this stuff myself, but how about a link to http://wiki.maemo.org/Py2deb as an alternate method?

-jkq
__________________
Class .. : Quiet One
Humor .. : [*********-] Alignment: Chaotic Good
Patience : [******----] Weapon(s): Python scripts
Agro ... : [***-------] Relic(s) : N900
 

The Following 2 Users Say Thank You to jkq For This Useful Post:
Posts: 883 | Thanked: 980 times | Joined on Jul 2007 @ Bern, Switzerland
#5
I suggest storing user preferences in GConf.
__________________
-Tom (N900, N810, N800)

"the idea of truly having a computer in your pocket just moved a big step closer."
 

The Following User Says Thank You to twaelti For This Useful Post:
jeremiah's Avatar
Posts: 170 | Thanked: 261 times | Joined on Feb 2009 @ Gothenburg, Sweden
#6
Originally Posted by jaeezzy View Post
With this, while uninstalling, dpkg warns me that /home/user can't be removed and uninstalling fails. Any help would be great. Thanks
There are standard places in Linux where one installs configuration files, binaries, etc. The place in the file system for your files is determined by something called the FHS, or File Hierarchy Standard. Not every distro follows the FHS in every detail, so Linux is not uniform, but debian follows the FHS as much as possible and maemo pretty much defaults to debian's policys (optification nothwithstanding.)

In short, if you look at the New Maintainer's Guide or Debian Policy, you'll find the best places for your config files and not run into any problems with dpkg.
 

The Following User Says Thank You to jeremiah For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 20:07.