portupgrade not finding ports?
James Harrison
oscartheduck at gmail.com
Thu Dec 31 06:03:41 UTC 2009
On Dec 30, 2009, at 10:23 PM 12/30/09, James Harrison wrote:
>
> On Dec 30, 2009, at 9:48 AM 12/30/09, Michael R. Wayne wrote:
>
>>
>> I've seen this a few times, just curious why it's failing on just
>> the port name? Didn't seem worth a PR...
>>
>> /\/\ \/\/
>>
>> 380> sudo portinstall --fetch-only --upward-recursive apache22
>> ** No such package or port: apache22
>>
>> 381> sudo portinstall --fetch-only --upward-recursive www/apache22
>> [Gathering depends for www/apache22 ..................... done]
>>
>> (works)
>
> I'm completely new to looking at portupgrade, so don't take my word for anything.
>
> That said, I took a look into this and I saw that the method generating the error begins with:
>
> if $portsdb.exist?(arg)
>
> So I looked around and found out what class portsdb is an instance of, then read the exist? method:
>
> def exist?(port, quick = false)
> return if %r"^[^/]+/[^/]+$" !~ port
>
> dir = portdir(port)
>
> return false if not File.file?(File.join(dir, 'Makefile'))
>
> return true if quick
>
> make_var('PKGNAME', dir) || false
> end
>
> So, either the regex isn't matching (my regexfu is weak, so I'm working on parsing the regex in my head, which is slow going), or the make_var method is failing, or there's no Makefile for apache22.
>
> A quick look in www/apache22 reveals that the Makefile exists happily, so that's not the issue.
>
> That's what I've discovered so far.
>
> James
Re-reading the above, it looks like it shouldn't be the regex that's returning false, as it has no boolean associated with its return. Leaving the make_var method. Time for more researchings...
More information about the freebsd-ruby
mailing list