summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2012-11-30 08:15:24 +0200
committerPanu Matilainen <pmatilai@redhat.com>2012-12-07 14:36:26 +0200
commitb3e8030226a02ca3df03103fac415b92367644cd (patch)
tree6f587a52d650d837d42b65d4ea3ee07c19fd6d9b
parent011e91155d1b63d026176a26394874b8c8451667 (diff)
downloadrpm-b3e8030226a02ca3df03103fac415b92367644cd.tar.gz
Unbreak --setperms (RhBug:881835)
- Fixes a regression introduced in rpm >= 4.10 caused by query format simplification (loss of zero padding support), in commit 1f1e5e88a1f6c60cf2d11014d809000e97a63aad. - '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. (cherry picked from commit 4c90c79e3f3c178189ad3bd89dfd87cd3a2290ab)
-rw-r--r--rpmpopt.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/rpmpopt.in b/rpmpopt.in
index 146c0ce19..b7bc44e70 100644
--- a/rpmpopt.in
+++ b/rpmpopt.in
@@ -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"