And *really* skip the leading % in --define, double duh :)
authorPanu Matilainen <pmatilai@redhat.com>
Thu, 10 Jan 2008 09:48:31 +0000 (11:48 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Thu, 10 Jan 2008 09:48:31 +0000 (11:48 +0200)
lib/poptALL.c

index 7914543..8b51167 100644 (file)
@@ -127,13 +127,14 @@ static void rpmcliAllArgCallback( poptContext con,
            if (*t == '-') *t = '_';
            t++;
        }
+       t = s;
        if (*t == '%') t++;
        /* XXX Predefine macro if not initialized yet. */
        if (rpmcliInitialized < 0)
-           (void) rpmDefineMacro(NULL, s, RMIL_CMDLINE);
+           (void) rpmDefineMacro(NULL, t, RMIL_CMDLINE);
        rpmcliConfigured();
-       (void) rpmDefineMacro(NULL, s, RMIL_CMDLINE);
-       (void) rpmDefineMacro(rpmCLIMacroContext, s, RMIL_CMDLINE);
+       (void) rpmDefineMacro(NULL, t, RMIL_CMDLINE);
+       (void) rpmDefineMacro(rpmCLIMacroContext, t, RMIL_CMDLINE);
        s = _free(s);
        break;
     }