Bug 7657

Summary: up2date wipes out .mailcap file first time it runs
Product: [Retired] Red Hat Linux Reporter: Mark Lord <mlord>
Component: up2dateAssignee: Preston Brown <pbrown>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-02-24 18:51:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mark Lord 1999-12-07 19:02:45 UTC
When the redhat update agent is run for the very first time,
it wipes out the user's ~/.mailcap file, replacing it with
two new lines for the update manager.

Once the two lines are in ~/.mailcap, the problem goes away.

Not sure where the bug is, since the /sbin/up2date script
appears to try to open the .mailcap in "w+" mode.. maybe this
is not a valid mode in Pythonspeak?

Cheers

mlord

Comment 1 Mark Lord 1999-12-07 19:16:59 UTC
Ahh.. looked in the Python references, and the "w+" mode means "truncate".
This script /usr/sbin/up2date should be using "w" instead of "w+" when
opening the ~/.mailcap file for updating!!

-ml

Comment 2 Mark Lord 1999-12-07 19:18:59 UTC
Ooopps.. meant to say that open mode should be "a", not "w" or "w+"!!

Comment 3 Preston Brown 2000-02-24 18:51:59 UTC
this is very true.  fixed for 6.2.