Project

General

Profile

Actions

Bug #5002

closed

Package upgrade can fail if /etc/{cron.d,init.d,default}/rudder-agent are missing

Added by Jonathan CLARKE almost 10 years ago. Updated about 9 years ago.

Status:
Released
Priority:
2
Assignee:
Matthieu CERDA
Category:
Packaging
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

When rudder-agent package gets upgraded, it tries to backup somes files (/etc/{cron.d,init.d,default}/rudder-agent) "just in case".

However, this operation will fail and cause the package upgrade to appear failed if the files don't exist:

[root@centos-3-32 root]# rpm -Uvh rudder-agent-2.10.1.release-1.EL.3.i386.rpm 
warning: rudder-agent-2.10.1.release-1.EL.3.i386.rpm: V3 RSA/MD5 signature: NOKEY, key ID 6f07d355
Preparing...                ########################################### [100%]
INFO: A back up copy of the /etc/init.d/rudder-agent has been created in /var/backups/rudder
INFO: A back up copy of the /etc/default/rudder-agent has been created in /var/backups/rudder
install: cannot stat `/etc/cron.d/rudder-agent': No such file or directory
error: %pre(rudder-agent-2.10.1.release-1.EL.3) scriptlet failed, exit status 1
error:   install: %pre scriptlet failed (2), skipping rudder-agent-2.10.1.release-1.EL.3

We should wrap all these backup calls with a condition "if the file exists, then" to avoid errors about not backuping files that don't exit.

Actions

Also available in: Atom PDF