FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor


 
 
LinkBack Thread Tools
 
Old 05-16-2011, 09:21 PM
rosea grammostola
 
Default dpkg-divert

Hi,

I made a custom package to customize the Gnome2 menus. When I install the package I get the warning:
*trying to overwrite '/etc/xdg/menus/applications.menu', which is also in package gnome-menus 0:2.30.0-0ubuntu4


To fix this I was looking into dpkg-divert, but it didn't became clear to me how this actually works and how I should use it.

The existing applications.menu file (gnome-menu package) should be renamed to something like applications.menu_bak right?


This is what I have in the preinst file right now:

dpkg-divert --divert /etc/xdg/menus/applications.menu_gnome --rename /etc/xdg/menus/applications.menu

But it gives:

(Reading database ... 141750 files and directories currently installed.)

Unpacking openstudiomenu (from .../openstudiomenu_0.1-1ubuntu1_i386.deb) ...
Adding `local diversion of /etc/xdg/menus/applications.menu to /etc/xdg/menus/applications.menu_gnome'
dpkg: error processing /tmp/openstudiomenu_0.1-1ubuntu1_i386.deb (--install):

*trying to overwrite '/etc/xdg/menus/applications.menu', which is also in package gnome-menus 0:2.30.0-0ubuntu4
Removing `local diversion of /etc/xdg/menus/applications.menu to /etc/xdg/menus/applications.menu_gnome'

Processing triggers for desktop-file-utils ...
Processing triggers for python-gmenu ...
Rebuilding /usr/share/applications/desktop.en_US.utf8.cache...
Processing triggers for python-support ...
Errors were encountered while processing:

*/tmp/openstudiomenu_0.1-1ubuntu1_i386.deb


Another thing I would like to know is how to make upgrades to new versions of the package run ok?

Thanks in advance,




--
Ubuntu-motu mailing list
Ubuntu-motu@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-motu
 
Old 05-16-2011, 09:30 PM
Evan Broder
 
Default dpkg-divert

Hi -
Some colleagues of mine at MIT developed a set of tools for
handling this sort of scenario, called config-package-dev. It makes
doing this sort of thing very easy.

Basically, you pick a suffix for the files you're configuring (ours
was .debathena), then install the file with the .debathena suffix
(e.g. the package resulting package would include an
/etc/xdg/menus/application.menu.debathena file).

In the debian/rules file, you set a couple of variables to tell
config-package-dev what to do.

Then at install time, an auto-generated postinst script would divert
/etc/xdg/menus/application.menu ->
/etc/xdg/menus/application.menu.debathena-orig, and create a symlink
from /etc/xdg/menus/application.menu ->
/etc/xdg/menus/application.menu.debathena

There's documentation on how to use config-package-dev at
<http://debathena.mit.edu/config-package-dev/>. The Debathena project
at MIT wants to see other people using config-package-dev, so feel
free to drop us a line at debathena@mit.edu if you run into any
problems.

- Evan

On Mon, May 16, 2011 at 2:21 PM, rosea grammostola
<rosea.grammostola@gmail.com> wrote:
> Hi,
>
> I made a custom package to customize the Gnome2 menus. When I install the
> package I get the warning:
> *trying to overwrite '/etc/xdg/menus/applications.menu', which is also in
> package gnome-menus 0:2.30.0-0ubuntu4
>
> To fix this I was looking into dpkg-divert, but it didn't became clear to me
> how this actually works and how I should use it.
>
> The existing applications.menu file (gnome-menu package) should be renamed
> to something like applications.menu_bak right?
>
> This is what I have in the preinst file right now:
>
> dpkg-divert --divert /etc/xdg/menus/applications.menu_gnome --rename
> /etc/xdg/menus/applications.menu
>
> But it gives:
>
> (Reading database ... 141750 files and directories currently installed.)
> Unpacking openstudiomenu (from .../openstudiomenu_0.1-1ubuntu1_i386.deb) ...
> Adding `local diversion of /etc/xdg/menus/applications.menu to
> /etc/xdg/menus/applications.menu_gnome'
> dpkg: error processing /tmp/openstudiomenu_0.1-1ubuntu1_i386.deb
> (--install):
> *trying to overwrite '/etc/xdg/menus/applications.menu', which is also in
> package gnome-menus 0:2.30.0-0ubuntu4
> Removing `local diversion of /etc/xdg/menus/applications.menu to
> /etc/xdg/menus/applications.menu_gnome'
> Processing triggers for desktop-file-utils ...
> Processing triggers for python-gmenu ...
> Rebuilding /usr/share/applications/desktop.en_US.utf8.cache...
> Processing triggers for python-support ...
> Errors were encountered while processing:
> */tmp/openstudiomenu_0.1-1ubuntu1_i386.deb
>
>
> Another thing I would like to know is how to make upgrades to new versions
> of the package run ok?
>
> Thanks in advance,
>
>
>
>
> --
> Ubuntu-motu mailing list
> Ubuntu-motu@lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-motu
>
>

--
Ubuntu-motu mailing list
Ubuntu-motu@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-motu
 
Old 05-17-2011, 01:18 PM
"rosea.grammostola"
 
Default dpkg-divert

On 05/16/2011 11:29 PM, Evan Broder wrote:

Hi -
Some colleagues of mine at MIT developed a set of tools for
handling this sort of scenario, called config-package-dev. It makes
doing this sort of thing very easy.

Basically, you pick a suffix for the files you're configuring (ours
was .debathena), then install the file with the .debathena suffix
(e.g. the package resulting package would include an
/etc/xdg/menus/application.menu.debathena file).

In the debian/rules file, you set a couple of variables to tell
config-package-dev what to do.

Then at install time, an auto-generated postinst script would divert
/etc/xdg/menus/application.menu ->
/etc/xdg/menus/application.menu.debathena-orig, and create a symlink
from /etc/xdg/menus/application.menu ->
/etc/xdg/menus/application.menu.debathena

There's documentation on how to use config-package-dev at
<http://debathena.mit.edu/config-package-dev/>. The Debathena project
at MIT wants to see other people using config-package-dev, so feel
free to drop us a line at debathena@mit.edu if you run into any
problems.

- Evan



Thanks, I'll look into this.

What are my other possibilities to solve this problem?



On Mon, May 16, 2011 at 2:21 PM, rosea grammostola
<rosea.grammostola@gmail.com> wrote:

Hi,

I made a custom package to customize the Gnome2 menus. When I install the
package I get the warning:
trying to overwrite '/etc/xdg/menus/applications.menu', which is also in
package gnome-menus 0:2.30.0-0ubuntu4

To fix this I was looking into dpkg-divert, but it didn't became clear to me
how this actually works and how I should use it.

The existing applications.menu file (gnome-menu package) should be renamed
to something like applications.menu_bak right?

This is what I have in the preinst file right now:

dpkg-divert --divert /etc/xdg/menus/applications.menu_gnome --rename
/etc/xdg/menus/applications.menu

But it gives:

(Reading database ... 141750 files and directories currently installed.)
Unpacking openstudiomenu (from .../openstudiomenu_0.1-1ubuntu1_i386.deb) ...
Adding `local diversion of /etc/xdg/menus/applications.menu to
/etc/xdg/menus/applications.menu_gnome'
dpkg: error processing /tmp/openstudiomenu_0.1-1ubuntu1_i386.deb
(--install):
trying to overwrite '/etc/xdg/menus/applications.menu', which is also in
package gnome-menus 0:2.30.0-0ubuntu4
Removing `local diversion of /etc/xdg/menus/applications.menu to
/etc/xdg/menus/applications.menu_gnome'
Processing triggers for desktop-file-utils ...
Processing triggers for python-gmenu ...
Rebuilding /usr/share/applications/desktop.en_US.utf8.cache...
Processing triggers for python-support ...
Errors were encountered while processing:
/tmp/openstudiomenu_0.1-1ubuntu1_i386.deb


Another thing I would like to know is how to make upgrades to new versions
of the package run ok?

Thanks in advance,




--
Ubuntu-motu mailing list
Ubuntu-motu@lists.ubuntu.com
Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/ubuntu-motu





--
Ubuntu-motu mailing list
Ubuntu-motu@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-motu
 
Old 06-28-2011, 03:52 PM
Christoph Mathys
 
Default dpkg-divert

On 05/16/2011 11:21 PM, rosea grammostola wrote:
> This is what I have in the preinst file right now:
>
> dpkg-divert --divert /etc/xdg/menus/applications.menu_gnome --rename
> /etc/xdg/menus/applications.menu

If you use dpkg-divert from a package, you have to specify --package
$YOUR_PACKAGE_NAME so the diversion is not active for this package. The
default is --local, which means that your package will install the file
to the diverted location.


--
Ubuntu-motu mailing list
Ubuntu-motu@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-motu
 

Thread Tools




All times are GMT. The time now is 01:12 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org