[SCM] crtmpserver/master: Add postrm script for crtmpserver-apps.

Andriy Beregovenko jet at jet.kiev.ua
Tue Apr 24 07:17:01 UTC 2012


Hi Jonas,

On Tue, Apr 24, 2012 at 02:40:22AM -0400, Jonas Smedegaard wrote:
> On 12-04-24 at 08:53am, Andriy Beregovenko wrote:
> > Hi Alessio,
> > 
> > On Tue, Apr 24, 2012 at 02:06:43AM +0200, Alessio Treglia wrote:
> > > This doesn't look sane to me:
> > > 
> > > On Sat, Apr 14, 2012 at 9:45 PM,  <jet-guest at users.alioth.debian.org> wrote:
> > > > +do_remove() {
> > > > +       for app in $APPLICATIONS; do
> > > > +               if [ -f "/etc/crtmpserver/applications/$app.lua" ]; then
> > > > +                       compare "/etc/crtmpserver/applications/$app.lua" \
> > > > +                               "/usr/share/doc/crtmpserver-apps/examples/$app.lua" \
> > > > +                               && rm "/etc/crtmpserver/applications/$app.lua"
> > > 
> > > Why do you try to remove those files?
> > > The crtmpserver-apps package seems to own no conffiles.
> > This files are not managed by conffile, so I check if it is same as default,
> > and if yes - remove it(if no user changes in it)
> > 
> > > 
> > > > +               fi
> > > > +       done
> > > > +       rmdir /etc/crtmpserver/applications
> > > 
> > > This is Severity: grave as it means removing user's files and may potentially
> > > cause data loss!
> > This may not lead to data loss, because rmdir(w/o -f) actually do not remove dir
> > if there are files inside, so this command remove dir only if it is empty 
> > (i.e. user do not modificate any conf files and it was removed during prev
> > steps)
> > 
> > > If you really want to provide crtmpserver-apps with conffiles, you 
> > > should install them clean way (e.g. dh_install) and then manage 
> > > their removal with dpkg-maintscript-helper.
> 
> If you really really need to do it this odd way (I too recommend to 
> simply use conffiles) then beware that you must not rely on files below 
> /usr/share/doc but need to install the reference files somewhere else.

Ok, let me describe my point, maybe I have misunderstood somewhere.
Files that need for server to be usable is installed with package
crtmpserver. Lua scripts that is installed with package crtmpserver-apps
mostly is example scripts and it provides "default solution" that can done
basic needs(so user will not modify them and if it purge app - it will be
removed), but users who need to implement advanced configuration will
modify this scripts harder, and in this way I do not think that annoing user
with conffiles notifications is good idea. That is why i'm just copy
"example scripts" from /usr/share/doc and maintaine "remove/purge" action
manually.

Please correct me if I wrong.
 
>  - Jonas
> 
> -- 
>  * Jonas Smedegaard - idealist & Internet-arkitekt
>  * Tlf.: +45 40843136  Website: http://dr.jones.dk/
> 
>  [x] quote me freely  [ ] ask before reusing  [ ] keep private



> _______________________________________________
> pkg-multimedia-maintainers mailing list
> pkg-multimedia-maintainers at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers


-- 
Best regards,
Andriy
0xBDDBDAE3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-multimedia-maintainers/attachments/20120424/7a4cb9ab/attachment.pgp>


More information about the pkg-multimedia-maintainers mailing list