Description of problem: After I did yum update on pulp, /etc/init.d/pulp-agent goes missing. [root@10 script]# yum update pulp kalpana | 1.3 kB 00:00 kalpana/primary | 18 kB 00:00 kalpana 72/72 testing-fedora-pulp | 1.3 kB 00:00 testing-fedora-pulp/primary | 2.8 kB 00:00 testing-fedora-pulp 10/10 updates/metalink | 13 kB 00:00 updates | 4.7 kB 00:00 updates/primary_db | 4.5 MB 00:02 Setting up Update Process Resolving Dependencies --> Running transaction check ---> Package pulp.noarch 0:0.0.142-1.fc14 set to be updated --> Processing Dependency: pulp-common = 0.0.142 for package: pulp-0.0.142-1.fc14.noarch --> Processing Dependency: pulp-client >= 0.0.142 for package: pulp-0.0.142-1.fc14.noarch --> Running transaction check ---> Package pulp-client.noarch 0:0.0.142-1.fc14 set to be updated ---> Package pulp-common.noarch 0:0.0.142-1.fc14 set to be updated --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Updating: pulp noarch 0.0.142-1.fc14 testing-fedora-pulp 456 k Updating for dependencies: pulp-client noarch 0.0.142-1.fc14 testing-fedora-pulp 250 k pulp-common noarch 0.0.142-1.fc14 testing-fedora-pulp 81 k Transaction Summary ================================================================================ Upgrade 3 Package(s) Total download size: 786 k Is this ok [y/N]: y Downloading Packages: (1/3): pulp-0.0.142-1.fc14.noarch.rpm | 456 kB 00:00 (2/3): pulp-client-0.0.142-1.fc14.noarch.rpm | 250 kB 00:00 (3/3): pulp-common-0.0.142-1.fc14.noarch.rpm | 81 kB 00:00 -------------------------------------------------------------------------------- Total 720 kB/s | 786 kB 00:01 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Updating : pulp-common-0.0.142-1.fc14.noarch 1/6 Updating : pulp-client-0.0.142-1.fc14.noarch 2/6 /etc/rc.d/init.d / ln: creating symbolic link `pulp-agent': File exists / Updating : pulp-0.0.142-1.fc14.noarch 3/6 Cleanup : pulp-0.0.140-1.fc14.noarch 4/6 Cleanup : pulp-client-0.0.140-1.fc14.noarch 5/6 Cleanup : pulp-common-0.0.140-1.fc14.noarch 6/6 Updated: pulp.noarch 0:0.0.142-1.fc14 Dependency Updated: pulp-client.noarch 0:0.0.142-1.fc14 pulp-common.noarch 0:0.0.142-1.fc14 Complete! [root@10 ~]# ls /etc/init.d/pulp-agent ls: cannot access /etc/init.d/pulp-agent: No such file or directory
As noted here: http://www.rpm.org/max-rpm/s1-rpm-inside-scripts.html, the %post and %postun need to check for install vs upgrade as follows: $post if [ "$1" = 1 ]; then ... and %postun if [ "$1" = 0 ]; then ... To be sure we only create the link during 1st install and remove it only on final uninstall (not upgrade). 83cc9645c0313c87824838b99ddaf7365a860f5e
build: 0.162
Fixed in build 0.163.
[root@kalpana ~]# yum update pulp candlepin | 2.6 kB 00:00 candlepin/primary_db | 2.6 kB 00:00 kalpana | 1.3 kB 00:00 kalpana/primary | 19 kB 00:00 kalpana 77/77 testing-fedora-pulp | 1.3 kB 00:00 updates/metalink | 19 kB 00:00 updates | 4.7 kB 00:00 updates/primary_db | 5.4 MB 00:01 Setting up Update Process Resolving Dependencies --> Running transaction check ---> Package pulp.noarch 0:0.0.163-1.fc14 set to be updated --> Processing Dependency: pulp-common = 0.0.163 for package: pulp-0.0.163-1.fc14.noarch --> Processing Dependency: pulp-client >= 0.0.163 for package: pulp-0.0.163-1.fc14.noarch --> Processing Dependency: grinder >= 0.0.94 for package: pulp-0.0.163-1.fc14.noarch --> Running transaction check ---> Package grinder.noarch 0:0.0.94-1.fc14 set to be updated ---> Package pulp-client.noarch 0:0.0.163-1.fc14 set to be updated ---> Package pulp-common.noarch 0:0.0.163-1.fc14 set to be updated --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Updating: pulp noarch 0.0.163-1.fc14 testing-fedora-pulp 555 k Updating for dependencies: grinder noarch 0.0.94-1.fc14 testing-fedora-pulp 111 k pulp-client noarch 0.0.163-1.fc14 testing-fedora-pulp 226 k pulp-common noarch 0.0.163-1.fc14 testing-fedora-pulp 39 k Transaction Summary ================================================================================ Upgrade 4 Package(s) Total download size: 932 k Is this ok [y/N]: y Downloading Packages: (1/4): grinder-0.0.94-1.fc14.noarch.rpm | 111 kB 00:00 (2/4): pulp-0.0.163-1.fc14.noarch.rpm | 555 kB 00:00 (3/4): pulp-client-0.0.163-1.fc14.noarch.rpm | 226 kB 00:00 (4/4): pulp-common-0.0.163-1.fc14.noarch.rpm | 39 kB 00:00 -------------------------------------------------------------------------------- Total 610 kB/s | 932 kB 00:01 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Updating : pulp-common-0.0.163-1.fc14.noarch 1/8 Updating : pulp-client-0.0.163-1.fc14.noarch 2/8 warning: /etc/pulp/client.conf created as /etc/pulp/client.conf.rpmnew /etc/rc.d/init.d / / Updating : grinder-0.0.94-1.fc14.noarch 3/8 Updating : pulp-0.0.163-1.fc14.noarch 4/8 Cleanup : pulp-0.0.160-1.fc14.noarch 5/8 Cleanup : pulp-client-0.0.160-1.fc14.noarch 6/8 Cleanup : pulp-common-0.0.160-1.fc14.noarch 7/8 Cleanup : grinder-0.0.92-1.fc14.noarch 8/8 Updated: pulp.noarch 0:0.0.163-1.fc14 Dependency Updated: grinder.noarch 0:0.0.94-1.fc14 pulp-client.noarch 0:0.0.163-1.fc14 pulp-common.noarch 0:0.0.163-1.fc14 Complete! [root@kalpana ~]# ls /etc/init.d/pulp-agent ls: cannot access /etc/init.d/pulp-agent: No such file or directory
Looks like this is not fixed in build 0.163
This was fixed in 0.162 in the uninstall logic. To test this, you need to be updating a 0.162+ package not a 0.160 package. I should have noted this in the bz comments.
verified [root@kalpana ~]# yum update pulp Setting up Update Process Resolving Dependencies --> Running transaction check ---> Package pulp.noarch 0:0.0.168-1.fc14 set to be updated --> Processing Dependency: pulp-common = 0.0.168 for package: pulp-0.0.168-1.fc14.noarch --> Processing Dependency: pulp-client >= 0.0.168 for package: pulp-0.0.168-1.fc14.noarch --> Running transaction check ---> Package pulp-client.noarch 0:0.0.168-1.fc14 set to be updated ---> Package pulp-common.noarch 0:0.0.168-1.fc14 set to be updated --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Updating: pulp noarch 0.0.168-1.fc14 testing-fedora-pulp 561 k Updating for dependencies: pulp-client noarch 0.0.168-1.fc14 testing-fedora-pulp 229 k pulp-common noarch 0.0.168-1.fc14 testing-fedora-pulp 41 k Transaction Summary ================================================================================ Upgrade 3 Package(s) Total download size: 831 k Is this ok [y/N]: y Downloading Packages: (1/3): pulp-0.0.168-1.fc14.noarch.rpm | 561 kB 00:00 (2/3): pulp-client-0.0.168-1.fc14.noarch.rpm | 229 kB 00:00 (3/3): pulp-common-0.0.168-1.fc14.noarch.rpm | 41 kB 00:00 -------------------------------------------------------------------------------- Total 357 kB/s | 831 kB 00:02 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Warning: RPMDB altered outside of yum. Updating : pulp-common-0.0.168-1.fc14.noarch 1/6 Updating : pulp-client-0.0.168-1.fc14.noarch 2/6 /etc/rc.d/init.d / / Updating : pulp-0.0.168-1.fc14.noarch 3/6 warning: /etc/pulp/pulp.conf created as /etc/pulp/pulp.conf.rpmnew Cleanup : pulp-0.0.163-1.fc14.noarch 4/6 Cleanup : pulp-client-0.0.163-1.fc14.noarch 5/6 Cleanup : pulp-common-0.0.163-1.fc14.noarch 6/6 Updated: pulp.noarch 0:0.0.168-1.fc14 Dependency Updated: pulp-client.noarch 0:0.0.168-1.fc14 pulp-common.noarch 0:0.0.168-1.fc14 Complete! [root@kalpana ~]# ls /etc/init.d/pulp- pulp-agent pulp-server [root@kalpana ~]# ls /etc/init.d/pulp-agent /etc/init.d/pulp-agent
Closing with Community Release 15 pulp-0.0.223-4.