Description of problem: # vgchange test --addtag "--h/K.6g0A4FOEatf3+k_nI/Yp&L_u2oy-=j649x:+dUcYWPEo6.IWT0c" Volume group "test" successfully changed [root@localhost dbus]# vgs -o+tags VG #PV #LV #SN Attr VSize VFree VG Tags test 1 0 0 wz--n- 16.00g 16.00g --h/K.6g0A4FOEatf3+k_nI/Yp&L_u2oy=j649x:+dUcYWPEo6.IWT0c The tags do not match --h/K.6g0A4FOEatf3+k_nI/Yp&L_u2oy-=j649x:+dUcYWPEo6.IWT0c --h/K.6g0A4FOEatf3+k_nI/Yp&L_u2oy=j649x:+dUcYWPEo6.IWT0c Version-Release number of selected component (if applicable): F24 & Rawhide both exhibit same behavior How reproducible: 100% Steps to Reproduce: See problem description Actual results: Tag added != tag retrieved Expected results: Tag added == tag retrieved Additional info:
any argv lvm sees that starts with -- is de-hypenated before matching with known options, so the '-' in the middle is removed.
so we surely need to 'dehyphen' only options - not their args.
when using unusual tag names like this, either one of the following forms would work: --addtag=--h/K.6g0A4FOEatf3+k_nI/Yp&L_u2oy-=j649x:+dUcYWPEo6.IWT0c --addtag @--h/K.6g0A4FOEatf3+k_nI/Yp&L_u2oy-=j649x:+dUcYWPEo6.IWT0c
(In reply to Zdenek Kabelac from comment #2) > so we surely need to 'dehyphen' only options - not their args. That's hard. There are some easy improvements we could make though, like not touching items that don't have the right characteristics to be arguments.
We should just keep args in both forms hyphened and de-hyphened - and use the right one for option and for its arg