apologies Marc.. I know better :)

On Fri, Nov 14, 2008 at 10:09 AM, Marc Espie <[EMAIL PROTECTED]> wrote:
> On Fri, Nov 14, 2008 at 09:00:13AM -0500, Jason Beaudoin wrote:
>> ion# pkg_add -i librsvg
>> Ambiguous: choose package for librsvg
>>          0: <None>
>>          1: librsvg-2.20.0p3
>>          2: librsvg-2.20.0p3-no_gnome
>> Your choice: 2
>> Use of uninitialized value $j in hash element at /usr/sbin/pkg_add line 59.
>> Use of uninitialized value $j in hash element at /usr/sbin/pkg_add line 59.
>> Use of uninitialized value $pkg in hash element at /usr/sbin/pkg_add line 82.
>> Can't call method "plist" on unblessed reference at /usr/sbin/pkg_add line 
>> 764.
>
> Since pkg_add frequently changes, this is worthless if you don't say where
> your pkg_add comes from (current ? 4.4 ? other ?) The lines numbers will be
> different, very often...
>

this is pkg_add from Tuesday's (11.11) snapshot - build 1480, using
the accompanying install sets (new install). the packages were built
last week, on my workstation with the GENERIC#1450 snapshot.

I have since wiped my ports objworkdir and packages, run a make clean
and cvs up on /usr/ports, and begun a clean bulk build inside the
chroot (built with yesterday's snapshot); I believe a fresh start is
in, but I am curious about what went wrong, or is broken.

error refers to the following (from the laptop pkg_add 11.11 snapshot):

$j in line 59:

# one-level dependencies tree, for nicer printouts
sub build_deptree
{
        my ($state, $pkg, @deps) = @_;

        my $tree = $state->{deptree};
        $pkg = OpenBSD::PackageName::url2pkgname($pkg);
        # flatten info
        if (defined $tree->{$pkg}) {
                $pkg = $tree->{$pkg};
        }
        for my $i (@deps) {
                my $j = $i->handle->{pkgname};
                $tree->{$j} = $pkg unless defined $tree->{$j};
        }
}


------------------------------------------------------------

$pkg from line 82 is:

sub is_installed
{
        my ($state, $pkg) = @_;
        return $state->{installed}->{$pkg};
}

------------------------------------------------------------

here is the beginning portion of the function, $plist on line 764 is
referred to:
sub get_plist
{
        my ($handle, $state) = @_;

        my $location = $handle->{location};
        my $pkg = $handle->{pkgname};

        if ($state->{verbose}) {
                print $state->deptree_header($pkg);
                print "parsing $pkg\n";
        }
        my $plist = $location->plist;
        unless (defined $plist) {
                print "Can't find CONTENTS from ", $location->url, "\n";
                $location->close_with_client_error;
                $location->wipe_info;
                $handle->set_error(BAD_PACKAGE);
                return;
        }
        if ($plist->localbase ne $state->{localbase}) {
                print "Localbase mismatch: package has: ",
$plist->localbase, " , user wants: ", $state->{localbase}, "\n";
                $location->close_with_client_error;
                $location->wipe_info;
                $handle->set_error(BAD_PACKAGE);
                return;
        }
        my $pkgname = $handle->{pkgname} = $plist->pkgname;


------------------------------------------------------------

thanks!
~Jason

Reply via email to