Bug#342206: dpkg-reconfigure does not work for phpldapadmin

2005-12-09 Thread Marc Blumentritt
Hi,

I tweaked /var/lib/dpkg/info/phpldapadmin.config just a little bit and 
modified line 9:

--- line 9 ---
if [ ! -f $CONFFILE ] || [ $(md5sum $CONFFILE | awk '{print $1}') = 
43b124661b7e30fb94c37c3c221124eb ] || [ $1 = reconfigure ]; then
--- line9 ---

Then of course you have to modify /var/lib/dpkg/info/phpldapadmin.postinst a 
little bit. I 
removed line 25 (exit 0), because otherwise this script would just do nothing.

For me this is working.

After rechecking I realized, that this way does not work like I thought.
The dialog appears, OK. My old configuration was config. I set this to
session and reloaded phpldapadmin in my browser. Now I have to login.
Great. But then I want to set it back from session to config, so I
dpkg-reconfigure phpldapadmin and reaload it in my browser, but now I
have to login, again. So my way is buggy. Sorry.

So if find a way to solve this, great. Otherwise a note in README.Debian
would be nice. Or perhaps a dialog message, when you do a
dpkg-reconfigure, which tells you to delete the files first or asks you
to do it for you?

Regards,
Marc


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#342206: dpkg-reconfigure does not work for phpldapadmin

2005-12-07 Thread Fabio Tranchitella
Il giorno mar, 06/12/2005 alle 10.38 +0100, Marc Blumentritt ha scritto:
 Package: phpldapadmin
 Version: 0.9.5-3sarge2
 Severity: minor

 When I use dpkg-reconfigure phpldapadmin nothing happens. I would
 expect some debconf configuration dialog, which allows me to reconfigure
 it. Only when I delete the files /etc/phpldapadmin/config.php and
 /usr/share/phpldapadmin/config.php (link to
 /etc/phpldapadmin/config.php), dpkg-reconfigure phpldapadmin works as
 expected and presents the debconf configuration dialog.

Hi Marc,
  in my opinion the reconfigure target of dpkg can't delete a
configuration file that could be modified by the system administrator,
so I prefer to not implement such a feature.

 Perhaps the mentioned files should be deleted by
 /var/lib/dpkg/info/phpldapadmin.config, when it is called with the
 reconfigure argument, but I do not know, if this is a good idea, since
 I'm a noob in this area.

If you agree (and think it would be useful), I could add a note about
this behaviour (delete the config file to be asked again by debconf
while reconfiguring) in README.Debian.

I assume this would be enough.

-- 
Fabio Tranchitella http://www.kobold.it
Studio Tranchitella Assoc. Professionale   http://www.tranchitella.it
_
1024D/7F961564, fpr 5465 6E69 E559 6466 BF3D 9F01 2BF8 EE2B 7F96 1564


signature.asc
Description: This is a digitally signed message part


Bug#342206: dpkg-reconfigure does not work for phpldapadmin

2005-12-07 Thread Marc Blumentritt
On 7 Dec 2005 at 8:12, Fabio Tranchitella wrote:
   in my opinion the reconfigure target of dpkg can't delete a
 configuration file that could be modified by the system administrator,
 so I prefer to not implement such a feature.
I'm on your side here (I wrote, I do not know, if deleting is a good idea), but 
I think, it 
should be possible to reconfigure with dpkg-reconfigure, if the package was 
configured 
by debconf during installation. Is deleting config.php really the only way to 
achieve this?

I tweaked /var/lib/dpkg/info/phpldapadmin.config just a little bit and modified 
line 9:

--- line 9 ---
if [ ! -f $CONFFILE ] || [ $(md5sum $CONFFILE | awk '{print $1}') = 
43b124661b7e30fb94c37c3c221124eb ] || [ $1 = reconfigure ]; then
--- line9 ---

Then of course you have to modify /var/lib/dpkg/info/phpldapadmin.postinst a 
little bit. I 
removed line 25 (exit 0), because otherwise this script would just do nothing.

For me this is working. Ok, I do not know what happens, if someone tweaked 
config.php heavily, but this guy what not use dpkg-reconfigure, wouldn't he? 
And if 
heavy tweaking would make problems, then a warning message at the beginning of 
debconf dialog would be appropriate.

I'm not quite sure about the second argument of the if clause. Where does the 
given 
md5sum come from and why are you checking this? $CONFFILE 
(/etc/phpldapadmin/config.php) should always have a different md5sum, if some 
user 
defined parameters are set and the md5sum of 
/usr/share/phpldapadmin/config.php.example is on my PC 
829da044d6c402ca3db35bf9b70e5ac6  . Can you help me with this?

  Perhaps the mentioned files should be deleted by
  /var/lib/dpkg/info/phpldapadmin.config, when it is called with the
  reconfigure argument, but I do not know, if this is a good idea,
  since I'm a noob in this area.
 
 If you agree (and think it would be useful), I could add a note about
 this behaviour (delete the config file to be asked again by debconf
 while reconfiguring) in README.Debian.
 
 I assume this would be enough.

Well, I described another possible solution above. Honestly, I'm not a 
programmer and I 
never configured debconf files before, so I'm not sure, if it is a good 
solution or if it could 
brake something. But I think, that a simple dpkg-reconfigure should be enough 
without 
deleting first some files. In my opinion, a note in README.Debian should be the 
last 
option to solve this behaviour, if everything else fails.

Regards,
Marc Blumentritt




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#342206: dpkg-reconfigure does not work for phpldapadmin

2005-12-07 Thread Stephen Gran
This one time, at band camp, Marc Blumentritt said:
 On 7 Dec 2005 at 8:12, Fabio Tranchitella wrote:
in my opinion the reconfigure target of dpkg can't delete a
  configuration file that could be modified by the system administrator,
  so I prefer to not implement such a feature.
 I'm on your side here (I wrote, I do not know, if deleting is a good idea), 
 but I think, it 
 should be possible to reconfigure with dpkg-reconfigure, if the package was 
 configured 
 by debconf during installation. Is deleting config.php really the only way to 
 achieve this?

The use of ucf is another option, although it is a little tedious to get
up to speed with.  In the long run, it is probably the right solution
for all packages that provide a debconf generated config file.
-- 
 -
|   ,''`.Stephen Gran |
|  : :' :[EMAIL PROTECTED] |
|  `. `'Debian user, admin, and developer |
|`- http://www.debian.org |
 -


signature.asc
Description: Digital signature


Bug#342206: dpkg-reconfigure does not work for phpldapadmin

2005-12-06 Thread Marc Blumentritt
Package: phpldapadmin
Version: 0.9.5-3sarge2
Severity: minor


When I use dpkg-reconfigure phpldapadmin nothing happens. I would
expect some debconf configuration dialog, which allows me to reconfigure
it. Only when I delete the files /etc/phpldapadmin/config.php and
/usr/share/phpldapadmin/config.php (link to
/etc/phpldapadmin/config.php), dpkg-reconfigure phpldapadmin works as
expected and presents the debconf configuration dialog.

Perhaps the mentioned files should be deleted by
/var/lib/dpkg/info/phpldapadmin.config, when it is called with the
reconfigure argument, but I do not know, if this is a good idea, since
I'm a noob in this area.

Regards,
Marc Blumentritt



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]