On 2/17/07, Joel Brooks <jbrooks@oddelement.com> wrote:
Hi,
i'm trying to make a port for a package (liblockfile from debian).
the package name at the download source contains an underscore (_) character.
the source line in the Pkgfile is:
source=(http://ftp.debian.org/debian/pool/main/libl/$name/$name_$version.tar.gz)
when i do a pkgmk in my port directory, i get the following:
=======> ERROR: Source file '/usr/ports/oddelement/liblockfile/1.06.1.tar.gz' not found (use option -d to download).
note the file name part of the error message only contains the $version. the $name is gone.
I think it has something to do with this line in pkgmk:
local FILE="`echo $1 | sed 's|^.*://.*/||g'`" (line 36)
when i simulate this on the command line, i get this: # echo http://ftp.debian.org/debian/pool/main/libl/liblockfile/1.06.1.tar.gz |sed 's|^.*://.*/||g' 1.06.1.tar.gz #
it seems that what is happening is that the sed line is stripping the $name part of the source line at the underscore.
No, this has nothing to do with pkgmk; try this on a shell for example: aap=noot echo $aap- echo ${aap}- echo $aap_ echo ${aap}_ The reason for the difference is that '-' is not a valid character for a variable name, while '_' is. This following example might make things more obvious: aap=noot aap_=mies echo $aap_ echo ${aap}_ Greetings, Sander.