suse - RPM gives a warning during un-installation if file does not exist -
some files of rpm package (depending on conditions) deleted in %post scriptlet causes warning during uninstallation: "remove failed: no such file or directory"
note: problem not occur in systems older versions of rpm , noticed on rhel7 , sles12.
while trying figure out, found following code in rpm sources (fsm.c):
/* * missing %ghost or %missingok entries not errors. * xxx: non-existent files ever actual error here? afterall * that's we're trying accomplish here, * , complaining job done seems kinderkarten * level "but turn!" whining... */ if (rc == rpmerr_enoent && missingok) { rc = 0; } /* * dont whine on non-empty directories now. might able * track @ least of expected failures though, * such when knowingly left config file backups etc behind. */ if (rc == rpmerr_enotempty) { rc = 0; } if (rc) { int lvl = strict_erasures ? rpmlog_err : rpmlog_warning; rpmlog(lvl, _("%s %s: remove failed: %s\n"), s_isdir(sb.st_mode) ? _("directory") : _("file"), fpath, strerror(errno)); } }
seems %missingok virtual file attribute solves problem, actually, there no %missingok attribute, there %config(missingok) one, instead.
what makes strange me mark file config file, though afaics there no strict difference between config files , ordinary files.
the question: ok use abovementioned attribute non-config files (for binaries)? cause problems on upgrades or something?
thanks.
Comments
Post a Comment