summaryrefslogtreecommitdiff
path: root/rpmio
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2012-11-01 12:09:30 +0200
committerPanu Matilainen <pmatilai@redhat.com>2012-11-01 12:12:51 +0200
commit1fdcb341cd374bfea27d1a85f37c640904299c7f (patch)
treec25cbff9f8b114aec9b2b958a85fa98feddf5e4e /rpmio
parent9cd34fc882c66ebdd71a95916017a84ccb68193b (diff)
downloadlibrpm-tizen-1fdcb341cd374bfea27d1a85f37c640904299c7f.tar.gz
librpm-tizen-1fdcb341cd374bfea27d1a85f37c640904299c7f.tar.bz2
librpm-tizen-1fdcb341cd374bfea27d1a85f37c640904299c7f.zip
Enable built-in %dirname macro
- This might've clashed with %dir in spec %files at some point as indicated by the comments, but that should no longer be the case.
Diffstat (limited to 'rpmio')
-rw-r--r--rpmio/macro.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/rpmio/macro.c b/rpmio/macro.c
index e5a346321..f7954b3d5 100644
--- a/rpmio/macro.c
+++ b/rpmio/macro.c
@@ -919,13 +919,10 @@ doFoo(MacroBuf mb, int negate, const char * f, size_t fn,
b = buf;
else
b++;
-#if NOTYET
- /* XXX watchout for conflict with %dir */
} else if (STREQ("dirname", f, fn)) {
if ((b = strrchr(buf, '/')) != NULL)
*b = '\0';
b = buf;
-#endif
} else if (STREQ("suffix", f, fn)) {
if ((b = strrchr(buf, '.')) != NULL)
b++;
@@ -1256,6 +1253,7 @@ expandMacro(MacroBuf mb, const char *src, size_t slen)
/* XXX necessary but clunky */
if (STREQ("basename", f, fn) ||
+ STREQ("dirname", f, fn) ||
STREQ("suffix", f, fn) ||
STREQ("expand", f, fn) ||
STREQ("verbose", f, fn) ||