From parv_@yahoo.com  Thu Mar  7 19:22:22 2002
Return-Path: <parv_@yahoo.com>
Received: from falcon.prod.itd.earthlink.net (falcon.mail.pas.earthlink.net [207.217.120.74])
	by hub.freebsd.org (Postfix) with ESMTP id 0CE7B37B41A
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  7 Mar 2002 19:22:21 -0800 (PST)
Received: from sdn-ar-007dcwashp251.dialsprint.net ([63.178.90.141] helo=moo.holy.cow)
	by falcon.prod.itd.earthlink.net with esmtp (Exim 3.33 #1)
	id 16jAxT-00036c-00
	for FreeBSD-gnats-submit@freebsd.org; Thu, 07 Mar 2002 19:22:16 -0800
Received: by moo.holy.cow (Postfix, from userid 1001)
	id 2D38650B81; Thu,  7 Mar 2002 22:24:28 -0500 (EST)
Message-Id: <20020308032428.2D38650B81@moo.holy.cow>
Date: Thu,  7 Mar 2002 22:24:28 -0500 (EST)
From: parv_@yahoo.com
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: x11-fonts/webfonts extract fails
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         35659
>Category:       ports
>Synopsis:       x11-fonts/webfonts extract fails
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 07 19:30:01 PST 2002
>Closed-Date:    Sat Apr 20 16:27:34 PDT 2002
>Last-Modified:  Sat Apr 20 16:27:34 PDT 2002
>Originator:     parv
>Release:        FreeBSD 4.5-STABLE i386
>Organization:
>Environment:
System: FreeBSD moo.holy.cow 4.5-STABLE

using cabextract-0.2 w/ recently cvsup'd ports tree

>Description:

 "make extract" fails for x11-fonts/webfonts w/ this message...

===>  Extracting for webfonts-0.21
>How-To-Repeat:

try make extract target in webfonts w/ cabextract 0.2 

>Fix:

TEMPORARY fix:
--------------
- set EXTRACT_BEFORE_ARGS to nothing in the Makefile
- "make extract"
- ignore the error message of move failure
- "cd work"
- "touch -f .extract_done.webfonts-0.21"
- run the perl program below, may be overkill

#! /usr/bin/perl -w

use strict;

# modules to move & parse file name
use File::Basename;
use File::Copy;

# noisy option controls how much output is generated.
#  0   only fatal error messages are generated; marked by
#      '*'
#  1   as 0, plus non-fatal error messages are shown;
#      marked by '#'
#  2   default.  as 1, plus converted file names are
#      shown; marked by '-'
#  3   as 2, plus okay/unchanged old file names are
#      shown; marked by '-'
#
# if lowercase is non zero, on [a-z] characters are used for file names
# otherwise [a-zA-Z] are used
#

my ($noisy, $lowercase) = (2, 1);

my $valid_alpha;

if ( $lowercase ) { $valid_alpha = join('', ('a' .. 'z')) }
else              { $valid_alpha = join('', ('a' .. 'z', 'A' .. 'Z')) }

foreach (@ARGV)
{
  my ($old_file,$path) = fileparse($_,'');

  ## sanity check

  die "\* destination, $path, is either not a directory or is not writable, exiting... \n"
    unless (-d $path || -w $path);

  unless ( -e $path . $old_file )
  {
    warn("# ${path}${old_file} doesn't exist, skipping...\n")
      if ( $noisy >= 1 );

    next;
  }

  # see if the old name is okay; if so skip it...
  #
  if ( $old_file !~ m#[^\d\Q${valid_alpha}_-.\E]# )
  {
    print "- ok  ${path}${old_file} ...\n"
      if ( $noisy >= 3 );

    next;
  }


  ## calculate new file name

  my $new_file = $old_file;

  $new_file =~ tr [A-Z] [a-z] if ($lowercase);

  # very unlikely scenario that _current_ file name will be same
  # as the calculated one from this _current_ name
  #
  if ( $old_file eq $new_file )
  {
    warn("# calculated new name seem to be same as the old;\n   ${path}${old_file} is not moved...\n")
      if ( $noisy >= 1 );

    next;
  }

  # calculated name has higher probability of not existing. so
  # deal w/ that case first
  #
  if ( ! -e $path . $new_file )
  {
    move_file($path . $old_file, $path . $new_file);
    next;
  }

  warn("# ${path}${new_file} already exists, ${path}${old_file} skipped ...\n")
    if ( $noisy >= 1 );

}

print "...done\n" if ( $noisy );


## subroutines

sub move_file
{
  my ($old,$new) = @_;

  print "- $old  ->  $new ... \n"
    if ( $noisy >= 1 );

  move("$old","$new")
    || die "\* couldn't move $old to $new : $! \n" ;

  return;
}


__END__


- "mv * webfonts-0.2/"
- "cd .."
- run rest of make targets as usual

>Release-Note:
>Audit-Trail:

From: parv <parv_@yahoo.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:  
Subject: Re: ports/35659: x11-fonts/webfonts extract fails
Date: Thu, 7 Mar 2002 22:56:01 -0500

 in message <20020308032428.2D38650B81@moo.holy.cow>, 
 wrote parv thusly...
 >
 > >Number:         35659
 > >Category:       ports
 > >Synopsis:       x11-fonts/webfonts extract fails
 > 
 > >Description:
 > 
 >  "make extract" fails for x11-fonts/webfonts w/ this message...
 ...
 > >Fix:
 ...
 > >Audit-Trail:
 > >Unformatted:
 ...
 >  ===>   webfonts-0.21 depends on executable: ttmkfdir - found
 >  ===>   webfonts-0.21 depends on executable: cabextract - found
 >  ===>   webfonts-0.21 depends on shared library: X11.6 - found
 >  --lowercase: No such file or directory
 >  *** Error code 1
 ...
 >  ..."make -d v extract 2>&1 | grep EXTRACT | sort -bdf | uniq" gives...
 ...
 >  Global:EXTRACT_BEFORE_ARGS = --lowercase --quiet
 >  Global:EXTRACT_CMD = ${LOCALBASE}/bin/cabextract
 ...
 >  ...if "lowercase" and "quiet" are the options being passed to
 >  cabextract, i don't see those two options in my manpage.  only option
 >  is "v" for file listing only not actual extraction.
 >
 >  commenting out "EXTRACT_BEFORE_ARGS" in the Makefile doesn't help,
 >  as another option "dc" is passed, supposedly, to cabextract.
 >
 >  setting EXTRACT_BEFORE_ARGS to nothing helps...
 
 whoa!
 
 i don't know what happened w/ send-pr, but the above "unformatted/audit
 trail" text belongs to the "description".
 
   - parv
 -- 
 

From: Alan Eldridge <alane@geeksrus.net>
To: parv_@yahoo.com
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: ports/35659: x11-fonts/webfonts extract fails
Date: Thu, 7 Mar 2002 22:55:16 -0500

 On Thu, Mar 07, 2002 at 10:24:28PM -0500, parv_@yahoo.com wrote:
 >
 >>Number:         35659
 >>Category:       ports
 >>Synopsis:       x11-fonts/webfonts extract fails
 >>Confidential:   no
 
 Just did it here. No problem.
 
 >using cabextract-0.2 w/ recently cvsup'd ports tree
 
 [alane ~]$ pkg_info -I -x cabex
 cabextract-0.5      A program to extract Microsoft cabinet (.CAB) files
 
 Maybe you should upgrade your cabextract port. :)
 
 -- 
 Alan Eldridge
 "Dave's not here, man."

From: parv <parv_@yahoo.com>
To: Alan Eldridge <alane@geeksrus.net>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: ports/35659: x11-fonts/webfonts extract fails
Date: Fri, 8 Mar 2002 01:08:56 -0500

 in message <20020308035516.GA385@wwweasel.geeksrus.net>, 
 wrote Alan Eldridge thusly...
 >
 > On Thu, Mar 07, 2002 at 10:24:28PM -0500, parv_@yahoo.com wrote:
 > >
 > >>Number:         35659
 > >>Category:       ports
 > >>Synopsis:       x11-fonts/webfonts extract fails
 > >>Confidential:   no
 > 
 > Just did it here. No problem.
 > 
 > >using cabextract-0.2 w/ recently cvsup'd ports tree
 > 
 > [alane ~]$ pkg_info -I -x cabex
 > cabextract-0.5      A program to extract Microsoft cabinet (.CAB) files
 > 
 > Maybe you should upgrade your cabextract port. :)
 
 if the port doesn't itself care about the version of a dependent
 software, then why should i?
 
 "--lowercase" option need to be taken care of in a more general way.
 there may be other instances when file names might need to be
 converted to lower case.  "sed" or "tr" w/ "mv" are more than able
 to take care of that.  and "--quiet" option, well, that's why we
 have "/dev/null".
 
 it's too expensive to ask for port upgrade just for only those two
 options.  unless i am missing something else, otherwise, cabextract
 0.2 is just as fine do everything that's needed by webfonts.
 
  - parv
 
 -- 
  

From: Alan Eldridge <alane@geeksrus.net>
To: FreeBSD-gnats-submit@FreeBSD.ORG
Cc:  
Subject: Re: ports/35659: x11-fonts/webfonts extract fails
Date: Fri, 8 Mar 2002 01:38:40 -0500

 On Fri, Mar 08, 2002 at 01:08:56AM -0500, parv wrote:
 >in message <20020308035516.GA385@wwweasel.geeksrus.net>, 
 >wrote Alan Eldridge thusly...
 >>
 >> On Thu, Mar 07, 2002 at 10:24:28PM -0500, parv_@yahoo.com wrote:
 >> >>Synopsis:       x11-fonts/webfonts extract fails
 >> >using cabextract-0.2 w/ recently cvsup'd ports tree
 >> [alane ~]$ pkg_info -I -x cabex
 >> cabextract-0.5      A program to extract Microsoft cabinet (.CAB) files
 >> Maybe you should upgrade your cabextract port. :)
 
 >if the port doesn't itself care about the version of a dependent
 >software, then why should i?
 
 The dependencies don't have a way to express it. Obviously the port
 *does* care; it's failure to build with an antiquated version of
 cabextract is its only way of telling you.
 
 >it's too expensive to ask for port upgrade just for only those two
 >options.  unless i am missing something else, otherwise, cabextract
 >0.2 is just as fine do everything that's needed by webfonts.
 
 Clearly, the errors you've seen indicate that cabextract-0.2 does *not*
 do everything that's needed.
 
 It is most unlikely that anyone would consent to modifying the webfonts
 port so that you can avoid a 60 second (or less) upgrade process.
 
 Please upgrade your cabextract to the current version. 
 
 Pete, Pat, anybody? Please close this PR.
 
 -- 
 Alan Eldridge
 "Dave's not here, man."

From: Alan E <alane@geeksrus.net>
To: freebsd-gnats-submit@FreeBSD.org, parv_@yahoo.com
Cc:  
Subject: Re: ports/35659: x11-fonts/webfonts extract fails
Date: Fri, 8 Mar 2002 01:51:51 -0500

 Sorry. It's not my port to ask that the PR get closed. I do think that 
 "upgrade cabextract" is the final answer, though.
 -- 
 Alan Eldridge
 

From: parv <parv_@yahoo.com>
To: Alan Eldridge <alane@geeksrus.net>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: ports/35659: x11-fonts/webfonts extract fails
Date: Fri, 8 Mar 2002 02:44:25 -0500

 in message <200203080640.g286e2a50164@freefall.freebsd.org>, 
 wrote Alan Eldridge thusly...
 >
 >  On Fri, Mar 08, 2002 at 01:08:56AM -0500, parv wrote:
 >  >in message <20020308035516.GA385@wwweasel.geeksrus.net>, 
 >  >wrote Alan Eldridge thusly...
 >  >>
 >  >> >using cabextract-0.2 w/ recently cvsup'd ports tree
 >  >> [alane ~]$ pkg_info -I -x cabex cabextract-0.5      A program
 >  >> to extract Microsoft cabinet (.CAB) files Maybe you should
 >  >> upgrade your cabextract port. :)
 >  
 >  >if the port doesn't itself care about the version of a dependent
 >  >software, then why should i?
 >  
 >  The dependencies don't have a way to express it.  ... it's
 >  failure to build with an antiquated version of cabextract is its
 >  only way of telling you.
 
 that, and a pr, are rather round about ways to find out about
 the need of new versions of dependent software.
 
 
 >  >it's too expensive to ask for port upgrade just for only those
 >  >two options.  unless i am missing something else, otherwise,
 >  >cabextract 0.2 is just as fine do everything that's needed by
 >  >webfonts.
 >  
 >  Clearly, the errors you've seen indicate that cabextract-0.2 does
 >  *not* do everything that's needed.
 
 my point was, and is, that "lowercase" and "quiet" options could
 have been handled in much more generalized way.
 
 for some unknown reason, the work of "lowercase" was "cleaned" in
 this pr, supposedly to make it better...
 
 http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/32046
 
 ...only to be worse.
 
 and i was hoping of being asked for, then submit, a patch to handle
 work of above two options.
 
 what a sorry state of the ports! :(
 
 
  - parv
 
 -- 
  

From: Konstantinos Konstantinidis <kkonstan@duth.gr>
To: freebsd-gnats-submit@FreeBSD.org, parv_@yahoo.com?s
Cc:  
Subject: Re: ports/35659: x11-fonts/webfonts extract fails
Date: Sun, 17 Mar 2002 11:18:47 +0200

 Hello,
 
 The updated version of cabextract is a 76KB download and it
 builds in a few seconds even on older hardware. I fail to
 see why anyone would consider it a "bug" that webfonts uses
 the new features of cabextract.
 
 As you noticed, the original port used sed/tr/mv to do the
 renaming before cabextract was updated. Since this required
 functionality is now available from cabextract, it made sense
 to remove those hacks from the ports Makefile, and expect
 people to use a recent cabextract package.
 
 So, unless anyone has any good reasons why we should add more
 cruft the the webfonts Makefile, can someone close this PR?
 
 Regards,
 
 --kkonstan
 
 
State-Changed-From-To: open->closed 
State-Changed-By: anders 
State-Changed-When: Sat Apr 20 16:13:46 PDT 2002 
State-Changed-Why:  
There is no reason for webfonts to do work-arounds for older versions of 
cabextract. This is portupgrade / ports infrastructure food. Hopefully, 
one day we will be able to specify dependencies more closely. You're 
welcome to help out. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=35659 
>Unformatted:
 >> Checksum OK for webfonts/andale32.exe.
 >> Checksum OK for webfonts/trebuc32.exe.
 >> Checksum OK for webfonts/georgi32.exe.
 >> Checksum OK for webfonts/verdan32.exe.
 >> Checksum OK for webfonts/comic32.exe.
 >> Checksum OK for webfonts/arialb32.exe.
 >> Checksum OK for webfonts/impact32.exe.
 >> Checksum OK for webfonts/arial32.exe.
 >> Checksum OK for webfonts/times32.exe.
 >> Checksum OK for webfonts/courie32.exe.
 >> Checksum OK for webfonts/webdin32.exe.
 ===>   webfonts-0.21 depends on executable: ttmkfdir - found
 ===>   webfonts-0.21 depends on executable: cabextract - found
 ===>   webfonts-0.21 depends on shared library: X11.6 - found
 --lowercase: No such file or directory
 *** Error code 1
 
 Stop in /source/ports/x11-fonts/webfonts.
 *** Error code 1
 
 
 ..."make -d v extract 2>&1 | grep EXTRACT | sort -bdf | uniq" gives...
 
 Command:REAL_EXTRACT = yes
 Global:EXTRACT_AFTER_ARGS = 
 Global:EXTRACT_BEFORE_ARGS = --lowercase --quiet
 Global:EXTRACT_CMD = ${LOCALBASE}/bin/cabextract
 Global:EXTRACT_COOKIE = ${WRKDIR}/.extract_done.${PKGNAME}
 Global:EXTRACT_ONLY = ${_DISTFILES}
 Global:EXTRACT_SUFX = .tar.gz
 
 
 ...if "lowercase" and "quiet" are the options being passed to
 cabextract, i don't see those two options in my manpage.  only option
 is "v" for file listing only not actual extraction.
 
 commenting out "EXTRACT_BEFORE_ARGS" in the Makefile doesn't help,
 as another option "dc" is passed, supposedly, to cabextract.
 
 setting EXTRACT_BEFORE_ARGS to nothing helps, but then a move fails
 because mv tries to move nonexistent work/licen.txt to
 work/webfonts; however work/Licen.TXT exists.  that's what, i
 suppose, EXTRACT_BEFORE_ARGS would have taken care of it.  that
 just, however, doesn't work as indicated above.
 
 
