rpm --qf / nonsense

Jeffrey Johnson n3npq at me.com
Thu Sep 18 19:46:34 CEST 2014


On Sep 18, 2014, at 12:59 PM, Aria Stewart wrote:

> 
> On Sep 18, 2014, at 9:55 AM, Jeffrey Johnson <n3npq at me.com> wrote:
>> There is an attempt to read long complicated queryformats
>> from /usr/lib/rpm/qf/* based on whether the 1st character 
>> starts with a '/'. Here's one of the aliases
>> rpm     alias --yum:primary.xml --qf /usr/lib/rpm-5.4.16/qf/yum_primary_xml \
>>       --POPTdesc=$"display yum primary.xml markup"
>> 
> 
> [snip]
> 
>> I'll change the character to something else (but the obvious '@' is
>> already in use for other purposes.
> 
> 
> Yow.  Why not another flag? --queryformatfile? --qff?
> 

Patch to check a lead-in of "@/" attached.

The '@' needs to also be added in rpmpopt.in aliases.

Insert the extra @ in lines like this:

 #==============================================================================
-rpm	alias --yum:primary.xml --qf @USRLIBRPM@/qf/yum_primary_xml \
+rpm	alias --yum:primary.xml --qf @@USRLIBRPM@/qf/yum_primary_xml \
 	--POPTdesc=$"display yum primary.xml markup"

hth

73 de Jeff

Index: poptQV.c
===================================================================
RCS file: /v/rpm/cvs/rpm/lib/poptQV.c,v
retrieving revision 2.68.2.3
diff -p -u -w -r2.68.2.3 poptQV.c
--- poptQV.c	6 Jun 2012 20:50:41 -0000	2.68.2.3
+++ poptQV.c	18 Sep 2014 17:43:16 -0000
@@ -231,8 +231,8 @@ static void queryArgCallback(poptContext
 	    size_t nb = 0;
 
 	    /* Read queryformat from file. */
-	    if (arg[0] == '/') {
-		const char * fn = arg;
+	    if (arg[0] == '@' && arg[1] == '/') {
+		const char * fn = arg + 1;
 		int rc;
 
 		rc = poptReadFile(fn, &b, &nb, POPT_READFILE_TRIMNEWLINES);

> Aria
> _______________________________________________
> pld-devel-en mailing list
> pld-devel-en at lists.pld-linux.org
> http://lists.pld-linux.org/mailman/listinfo/pld-devel-en



More information about the pld-devel-en mailing list