Bug 1706 - service dictd condreload would be more appropriate than condrestart
Summary: service dictd condreload would be more appropriate than condrestart
Status: CLOSED WORKSFORME
Alias: None
Product: Sisyphus
Classification: Development
Component: dict-jargon (show other bugs)
Version: unstable
Hardware: all Linux
: P5 enhancement
Assignee: Alexey Dyachenko
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-12 15:40 MSK by imz
Modified: 2006-09-27 16:42 MSD (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description imz 2002-12-12 15:40:57 MSK
When service dictd condreload is available (see #1704), i think, it should be used instead of condrestart command in the install-time scripts of the package.
---
dict-jargon-4.3.1-alt1
---

Comment 1 Alexey Dyachenko 2003-02-04 19:54:46 MSK
fixed in dict-jargon-4.3.1-alt2
Comment 2 Alexey Dyachenko 2003-02-04 19:54:46 MSK
fixed in dict-jargon-4.3.1-alt2
Comment 3 imz 2003-02-12 23:22:47 MSK
For smoother update, we need to require that the version of dictd with condreload support is installed when %post and %postun are executed. Thus:

PreReq: dictd >= 1.9.1-alt1 (according to #0001704)

or:

Requires(post,postun): dictd >= 1.9.1-alt1

(the last variant is not tested to work well for APT).

This applies to dict-eng-deu-0.2-alt2, 
dict-deu-eng-0.2-alt2, dict-jargon-4.3.1-alt2, dict-engcom-0.4-alt3, dict-web1913-1.4_0.47pd-ipl5, dict-mueller7-utf8-1.2-alt3.

Here is an example of a broken update because of the wrong order:

# rpm -qa \'dict*\'
dict-tools-1.8.0-alt1
dict-jargon-4.3.1-alt1
dictd-1.8.0-alt1
dict-engcom-0.4-alt2
dict-deu-eng-0.2-alt1
dict-1.8.0-alt1
dict-eng-deu-0.2-alt1
dict-web1913-1.4_0.47pd-ipl4
dict-mueller7-utf8-1.2-alt2
# apt-get install dict-eng-deu
Reading Package Lists... Done
Building Dependency Tree... Done
Starting
Starting 2
Done
The following packages will be upgraded
  dict-eng-deu 
1 packages upgraded, 0 newly installed, 0 removed and 323 not upgraded.
Need to get 0B/2198kB of archives.
After unpacking 0B of additional disk space will be used.
Executing RPM (/bin/rpm -Uvh --fancypercent --oldpackage)...
Preparing...                 ########################################### [100%]
1: dict-eng-deu              ########################################### [100%]
Usage: dictd {start|stop|status|restart|reload|condstart|condstop|condrestart}
error: execution of %post scriptlet from dict-eng-deu-0.2-alt2 failed, exit status 1
E: Sub-process /bin/rpm returned an error code (1)
# apt-get install dictd       
Reading Package Lists... Error!
E: There are two or more versions of the package \'dict-eng-deu\' installed in your system, which is a situation APT can\'t handle cleanly at the moment.
Please do one of the following:
1) Keep at most one version of the package in the system; or
2) If you do want to keep multiple versions of that package, lookup RPM::Allow-Duplicated in the documentation.

E: Error occured while processing dict-eng-deu (UsePackage2)
E: Problem with MergeList /var/lib/rpm/Packages
E: The package lists or status file could not be parsed or opened.
# rpm -e dict-eng-deu-0.2-alt2 dict-eng-deu-0.2-alt1
Usage: dictd {start|stop|status|restart|reload|condstart|condstop|condrestart}
error: execution of %postun scriptlet from dict-eng-deu-0.2-alt2 failed, exit status 1
#
Comment 4 imz 2003-02-12 23:22:47 MSK
For smoother update, we need to require that the version of dictd with condreload support is installed when %post and %postun are executed. Thus:

PreReq: dictd >= 1.9.1-alt1 (according to #0001704)

or:

Requires(post,postun): dictd >= 1.9.1-alt1

(the last variant is not tested to work well for APT).

This applies to dict-eng-deu-0.2-alt2, 
dict-deu-eng-0.2-alt2, dict-jargon-4.3.1-alt2, dict-engcom-0.4-alt3, dict-web1913-1.4_0.47pd-ipl5, dict-mueller7-utf8-1.2-alt3.

Here is an example of a broken update because of the wrong order:

# rpm -qa \'dict*\'
dict-tools-1.8.0-alt1
dict-jargon-4.3.1-alt1
dictd-1.8.0-alt1
dict-engcom-0.4-alt2
dict-deu-eng-0.2-alt1
dict-1.8.0-alt1
dict-eng-deu-0.2-alt1
dict-web1913-1.4_0.47pd-ipl4
dict-mueller7-utf8-1.2-alt2
# apt-get install dict-eng-deu
Reading Package Lists... Done
Building Dependency Tree... Done
Starting
Starting 2
Done
The following packages will be upgraded
  dict-eng-deu 
1 packages upgraded, 0 newly installed, 0 removed and 323 not upgraded.
Need to get 0B/2198kB of archives.
After unpacking 0B of additional disk space will be used.
Executing RPM (/bin/rpm -Uvh --fancypercent --oldpackage)...
Preparing...                 ########################################### [100%]
1: dict-eng-deu              ########################################### [100%]
Usage: dictd {start|stop|status|restart|reload|condstart|condstop|condrestart}
error: execution of %post scriptlet from dict-eng-deu-0.2-alt2 failed, exit status 1
E: Sub-process /bin/rpm returned an error code (1)
# apt-get install dictd       
Reading Package Lists... Error!
E: There are two or more versions of the package \'dict-eng-deu\' installed in your system, which is a situation APT can\'t handle cleanly at the moment.
Please do one of the following:
1) Keep at most one version of the package in the system; or
2) If you do want to keep multiple versions of that package, lookup RPM::Allow-Duplicated in the documentation.

E: Error occured while processing dict-eng-deu (UsePackage2)
E: Problem with MergeList /var/lib/rpm/Packages
E: The package lists or status file could not be parsed or opened.
# rpm -e dict-eng-deu-0.2-alt2 dict-eng-deu-0.2-alt1
Usage: dictd {start|stop|status|restart|reload|condstart|condstop|condrestart}
error: execution of %postun scriptlet from dict-eng-deu-0.2-alt2 failed, exit status 1
#
Comment 5 Michael Shigorin 2006-09-27 16:42:45 MSD
I think it's de facto fixed: ALM2.2 already had dictd-1.9.1-alt2, and rebuild
was required anyways (initscript migration).  If someone is pedantic enough,
feel free to actlayy fix this.