tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: weirdness/bug in automatic info handling code



On Fri, Feb 15, 2008 at 09:58:17AM -0500, Johnny C. Lam wrote:
> Thomas Klausner wrote:
>>
>> When deinstalling libidn, I get:
>>
>> libidn-1.4: unregistering info file /usr/pkg/info/libidn-components.png
>>
>> I don't think that .png is an info file :)
>>
>> I'm not sure if or what should be done about it. Any ideas?
>
> The relevent code is pkgsrc/mk/plist/plist-info.awk and the INFO_FILES_cmd 
> definition at the bottom of plist.mk.  My assumption when writing that file 
> was that everything in ${PREFIX}/${PKGINFODIR} was an info file.  At the 
> time, I wasn't sure that all info files ended in ".info".  You can try 
> replacing the pattern that ignores *-1, *-2, etc. files with:
>
> # Ignore all files without a ".info" suffix.
> /^[^@]/ && ($0 !~ "^" IGNORE_INFO_REGEXP "/") && \
> ($0 !~ "^([^\/]*\/)*(info\/[^\/]+(\.info)?|[^\/]+\.info)$" {
>         next
> }

I tried the attached diff, but it failed with:
/usr/bin/awk: syntax error at source line 97 source file
/usr/pkgsrc/security/gnutls/../../mk/plist/plist-info.awk
 context is
        ($0 !~ "^([^\/]*\/)*(info\/[^\/]+(\.info)?|[^\/]+\.info)$" >>>  { <<<
        missing )
/usr/bin/awk: bailing out at source line 44

 Thomas
Index: plist-info.awk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/plist/plist-info.awk,v
retrieving revision 1.15
diff -u -r1.15 plist-info.awk
--- plist-info.awk      1 Jun 2006 07:11:09 -0000       1.15
+++ plist-info.awk      4 Mar 2008 15:39:04 -0000
@@ -91,12 +91,11 @@
 }
 
 ###
-### Ignore *-1, *-2, etc. files in the PLIST as we get the list of
-### installed split files below.
+### Ignore all files without a ".info" suffix.
 ###
 /^[^@]/ && ($0 !~ "^" IGNORE_INFO_REGEXP "/") && \
-/^([^\/]*\/)*(info\/[^\/]+(\.info)?|[^\/]+\.info)-[0-9]+$/ {
-       next
+($0 !~ "^([^\/]*\/)*(info\/[^\/]+(\.info)?|[^\/]+\.info)$" {
+        next
 }
 
 ###


Home | Main Index | Thread Index | Old Index