r452 - packages/cube/cube/trunk/debian/patches

Eddy Petrişor eddy.petrisor at gmail.com
Mon Apr 10 11:26:39 UTC 2006


On 4/10/06, Gonéri Le Bouder <goneri at rulezlan.org> wrote:
> > > -+    exec("/usr/share/cube/data/keymap.cfg");
> > > -+    exec("/usr/share/cube/data/menus.cfg");
> > > -+    exec("/usr/share/cube/data/prefabs.cfg");
> > > -+    exec("/usr/share/cube/data/sounds.cfg");
> >
> > [snip]
> >
> > > ++  char prefixe = "/usr/share/cube/";
> >
> > I am not sure that this is the best way to fix this. AFAIK, the debs
> > should be relocatable, both the source and the data files.
> >
> > Other oppinions?
> The second solution, is to create a warpper script like with
> cube-client-nonfree
> http://svn.debian.org/wsvn/pkg-games/packages/cube/cube-data/trunk/debian/cube-client-nonfree.sh?op=file&rev=0&sc=0
>
> In fact i prefere this solution. More easy :).

I will try to explain a little better this time.

Every Debian package should _NOT_ depend on absolute paths so it can
be installed, e.g. under /opt , too. Thus having absolute paths in
hardcoded the code will prevent this.

The wrapper has also a problem: you do not know where the package will
be installed, so you can't assume the DATADIR to be always under
/usr/share/cube/, but you can (at most) assume
DATADIR=<package_install_root_dir>/usr/share/cube/.

I am not sure how this variable is called, but I assume such a
variable is available while preinst/postinst are ran.

So the wrapper has also the same problem, unless you generate it at
install time.

> I've a patch to do to warn the use that is it can connect to a public server,
> maybe he could try with the nonfree client to avoid problem with upstream
> author.

I am not sure how this is related to the "deb is relocatable" issue I
was pointing out, but such a warrning should be displayed at
installation time (debconf text) or a run time.

--
Regards,
EddyP
=============================================
"Imagination is more important than knowledge" A.Einstein



More information about the Pkg-games-devel mailing list