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

Jonas Smedegaard dr at jones.dk
Tue Apr 24 06:40:22 UTC 2012


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.


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private
-------------- 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/88e1c100/attachment.pgp>


More information about the pkg-multimedia-maintainers mailing list