Skip to content

Commit

Permalink
Unbreak --setperms (RhBug:881835)
Browse files Browse the repository at this point in the history
- Fixes a regression introduced in rpm >= 4.10 caused by query format
  simplification (loss of zero padding support), in commit
  1f1e5e8.
- 'chmod' command doesn't need zero padding, just remove the formatting.
  In fact we shouldn't be passing the entire mode to it but just the
  permission bits, but fortunately chmod isn't too picky here.
  • Loading branch information
pmatilai committed Nov 30, 2012
1 parent e86bae3 commit 4c90c79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rpmpopt.in
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ rpm alias --scripts --qf '\
' \
--POPTdesc=$"list install/erase scriptlets from package(s)"

rpm alias --setperms -q --qf '[\[ -L %{FILENAMES:shescape} \] || chmod %7.7{FILEMODES:octal} %{FILENAMES:shescape}\n]' \
rpm alias --setperms -q --qf '[\[ -L %{FILENAMES:shescape} \] || chmod %7{FILEMODES:octal} %{FILENAMES:shescape}\n]' \
--pipe "grep -v \(none\) | grep '^. -L ' | sed 's/chmod .../chmod /' | sh" \
--POPTdesc=$"set permissions of files in a package"

Expand Down

0 comments on commit 4c90c79

Please sign in to comment.