Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 165167 - etc-update: interactive merging triggers chmod error due to the use of an unsupported option on bsd chmod
Summary: etc-update: interactive merging triggers chmod error due to the use of an uns...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: FreeBSD (show other bugs)
Hardware: x86 FreeBSD
: High normal (vote)
Assignee: Gentoo/BSD Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-03 20:51 UTC by Emanuele A. Bagnaschi (Zephyrus)
Modified: 2007-08-02 16:17 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Emanuele A. Bagnaschi (Zephyrus) 2007-02-03 20:51:21 UTC
Using etc-update, choosing the interactive method to merge a file ( option 3 - Interactively merge original with update ) and then choosing to replace the old one with the merged one ( option 1 - Replace with merged file ) cause the g/fbsd chmod to exit with the following error:

Replacing /etc/conf.d/rc with /etc/conf.d/rc.merged
chmod: illegal option -- 
usage: chmod [-fhv] [-R [-H | -L | -P]] mode file ...

This also means that the merged file is written with the wrong permission.

The problem seeems to originate from etc-update line 388 (as of portage-2.1.2-r7):

chmod --reference=${ofile} ${mfile}

It seems that the --reference option is unsupported on the g/fbsd plattaform.

Reproducible: Always

Steps to Reproduce:
1.Run etc-update
2.Choose option 3, that is -> 3) Interactively merge original with update
3.Complete the interactive merging process
4.Choose option 1, that is -> 1) Replace $FILENAME with merged file


Actual Results:  
etc-update completes the merge without giving the right permission to the merged file due to wrong chmod usage.

Expected Results:  
etc-update should complete the merge without the chmod error message.

Portage 2.1.2-r7 (default-bsd/fbsd/6.2/x86, gcc-4.1.1, freebsd-lib-6.2-r0,6.2-RC2 i386)

Relevant etc-update output from a real world test:
[...]
1) Replace /etc/conf.d/rc with merged file
2) Show differences between merged file and original
3) Remerge original with update
4) Edit merged file
5) Return to the previous menu
Please select from the menu above (-1 to exit, losing this merge): 1
Replacing /etc/conf.d/rc with /etc/conf.d/rc.merged
chmod: illegal option -- -
usage: chmod [-fhv] [-R [-H | -L | -P]] mode file ...
overwrite /etc/conf.d/rc? (y/n [n]) y
remove /etc/conf.d/._cfg0000_rc
Comment 1 Roy Marples (RETIRED) gentoo-dev 2007-08-02 16:17:22 UTC
This should be fixed in portage-2.1.3 - re-open if you disagree