MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: rpm installation failure



Quoting Dave Ogren (ogren@atcnet.net):
> Following numerous failed attempts, I now beg for help...
> 
> I am attempting to install the 3.14 i386 rpm on an Intel p100 with 40mg
> RAM, running RedHat Linux 6.0, perl5.00503-4 and the perl- Minivend
> Bundle. Not wanting to much with existing permissions, I have tried
> installing as both root and minivend. The root attempt works until
> starting the daemon:
> Starting minivend: bash: /root/.bashrc: Permission denied
> Cant't locate HTML/Entities.pm in @INC (@INC contains:
> /usr/lib/minivend/lib /usr/lib/perl5/5.00503/i386-linux
> /usr/lib/perl5/5.00503 /usr/lib/perl5/site_perl/5.005/i386-linux
> /usr/lib/perl5/site_perl/5.005 .) at
> /usr/lib/minivend/lib/Vend/Parser.pm line 107.
> BEGIN failed--compilation aborted at
> /usr/lib/minivend/lib/Vend/Parser.pm line 107.
> BEGIN failed--compilation aborted at
> /usr/lib/minivend/lib/Vend/Config.pm line 40.
> BEGIN failed--compilation aborted at /usr/lib/minivend/bin/minivend line
> 223.
> 

Apparently you didn't install Bundle::MiniVend, and it looks like
our RPM doesn't include that. I have attached the Entities.pm file,
so do:

	mkdir /usr/lib/minivend/lib/HTML
	cp Entities.pm  /usr/lib/minivend/lib/HTML

-- 
Mike Heins                          http://www.minivend.com/  ___ 
                                    Internet Robotics        |_ _|____
                                    131 Willow Lane, Floor 2  | ||  _ \
It's a little-known fact            Oxford, OH  45056         | || |_) |
that the Y1K problem caused         <mikeh@minivend.com>     |___|  _ <
the Dark Ages. -- unknown           513.523.7621 FAX 7501        |_| \_\
package HTML::Entities;

# $Id: Entities.pm,v 1.1 1998/08/16 10:26:14 mike Exp $

=head1 NAME

decode - Expand HTML entities in a string

encode - Encode chars in a string using HTML entities

=head1 SYNOPSIS

 use HTML::Entities;

 $a = "V&aring;re norske tegn b&oslash;r &#230res";
 decode_entities($a);
 encode_entities($a, "\200-\377");

=head1 DESCRIPTION

The decode_entities() routine replaces valid HTML entities found
in the string with the corresponding ISO-8859/1 character.

The encode_entities() routine replaces the characters specified by the
second argument with their entity representation.  The default set of
characters to expand are control chars, high-bit chars and the '<',
'&', '>' and '"' character.

Both routines modify the string passed in as the first argument and
return it.

If you prefer not to import these routines into your namespace you can
call them as:

  use HTML::Entities ();
  $encoded = HTML::Entities::encode($a);
  $decoded = HTML::Entities::decode($a);

The module can also export the %char2entity and the %entity2char
hashes which contains the mapping from all characters to the
corresponding entities.

=head1 COPYRIGHT

Copyright 1995, 1996 Gisle Aas. All rights reserved.

This library is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.

=head1 AUTHOR

Gisle Aas <aas@sn.no>

=cut


require Exporter;
@ISA = qw(Exporter);

@EXPORT = qw(encode_entities decode_entities);
@EXPORT_OK = qw(%entity2char %char2entity);

$VERSION = sprintf("%d.%02d", q$Revision: 1.1 $ =~ /(\d+)\.(\d+)/);
sub Version { $VERSION; }


%entity2char = (
 # Some normal chars that have special meaning in SGML context
 amp    => '&',  # ampersand 
'gt'    => '>',  # greater than
'lt'    => '<',  # less than
 quot   => '"',  # double quote

 # PUBLIC ISO 8879-1986//ENTITIES Added Latin 1//EN//HTML
 AElig	=> '&#198;',  # capital AE diphthong (ligature)
 Aacute	=> '&#193;',  # capital A, acute accent
 Acirc	=> '&#194;',  # capital A, circumflex accent
 Agrave	=> '&#192;',  # capital A, grave accent
 Aring	=> '&#197;',  # capital A, ring
 Atilde	=> '&#195;',  # capital A, tilde
 Auml	=> '&#196;',  # capital A, dieresis or umlaut mark
 Ccedil	=> '&#199;',  # capital C, cedilla
 ETH	=> '&#208;',  # capital Eth, Icelandic
 Eacute	=> '&#201;',  # capital E, acute accent
 Ecirc	=> '&#202;',  # capital E, circumflex accent
 Egrave	=> '&#200;',  # capital E, grave accent
 Euml	=> '&#203;',  # capital E, dieresis or umlaut mark
 Iacute	=> '&#205;',  # capital I, acute accent
 Icirc	=> '&#206;',  # capital I, circumflex accent
 Igrave	=> '&#204;',  # capital I, grave accent
 Iuml	=> '&#207;',  # capital I, dieresis or umlaut mark
 Ntilde	=> '&#209;',  # capital N, tilde
 Oacute	=> '&#211;',  # capital O, acute accent
 Ocirc	=> '&#212;',  # capital O, circumflex accent
 Ograve	=> '&#210;',  # capital O, grave accent
 Oslash	=> '&#216;',  # capital O, slash
 Otilde	=> '&#213;',  # capital O, tilde
 Ouml	=> '&#214;',  # capital O, dieresis or umlaut mark
 THORN	=> '&#222;',  # capital THORN, Icelandic
 Uacute	=> '&#218;',  # capital U, acute accent
 Ucirc	=> '&#219;',  # capital U, circumflex accent
 Ugrave	=> '&#217;',  # capital U, grave accent
 Uuml	=> '&#220;',  # capital U, dieresis or umlaut mark
 Yacute	=> '&#221;',  # capital Y, acute accent
 aacute	=> '&#225;',  # small a, acute accent
 acirc	=> '&#226;',  # small a, circumflex accent
 aelig	=> '&#230;',  # small ae diphthong (ligature)
 agrave	=> '&#224;',  # small a, grave accent
 aring	=> '&#229;',  # small a, ring
 atilde	=> '&#227;',  # small a, tilde
 auml	=> '&#228;',  # small a, dieresis or umlaut mark
 ccedil	=> '&#231;',  # small c, cedilla
 eacute	=> '&#233;',  # small e, acute accent
 ecirc	=> '&#234;',  # small e, circumflex accent
 egrave	=> '&#232;',  # small e, grave accent
 eth	=> '&#240;',  # small eth, Icelandic
 euml	=> '&#235;',  # small e, dieresis or umlaut mark
 iacute	=> '&#237;',  # small i, acute accent
 icirc	=> '&#238;',  # small i, circumflex accent
 igrave	=> '&#236;',  # small i, grave accent
 iuml	=> '&#239;',  # small i, dieresis or umlaut mark
 ntilde	=> '&#241;',  # small n, tilde
 oacute	=> '&#243;',  # small o, acute accent
 ocirc	=> '&#244;',  # small o, circumflex accent
 ograve	=> '&#242;',  # small o, grave accent
 oslash	=> '&#248;',  # small o, slash
 otilde	=> '&#245;',  # small o, tilde
 ouml	=> '&#246;',  # small o, dieresis or umlaut mark
 szlig	=> '&#223;',  # small sharp s, German (sz ligature)
 thorn	=> '&#254;',  # small thorn, Icelandic
 uacute	=> '&#250;',  # small u, acute accent
 ucirc	=> '&#251;',  # small u, circumflex accent
 ugrave	=> '&#249;',  # small u, grave accent
 uuml	=> '&#252;',  # small u, dieresis or umlaut mark
 yacute	=> '&#253;',  # small y, acute accent
 yuml	=> '&#255;',  # small y, dieresis or umlaut mark

 # Some extra Latin 1 chars that are listed in the HTML3.2 draft (21-May-96)
 copy   => '&#169;',  # copyright sign
 reg    => '&#174;',  # registered sign
 nbsp   => "\240", # non breaking space

 # Additional ISO-8859/1 entities listed in rfc1866 (section 14)
 iexcl  => '&#161;',
 cent   => '&#162;',
 pound  => '&#163;',
 curren => '&#164;',
 yen    => '&#165;',
 brvbar => '&#166;',
 sect   => '&#167;',
 uml    => '&#168;',
 ordf   => '&#170;',
 laquo  => '&#171;',
'not'   => '&#172;',    # not is a keyword in perl
 shy    => '&#173;',
 macr   => '&#175;',
 deg    => '&#176;',
 plusmn => '&#177;',
 sup1   => '&#185;',
 sup2   => '&#178;',
 sup3   => '&#179;',
 acute  => '&#180;',
 micro  => '&#181;',
 para   => '&#182;',
 middot => '&#183;',
 cedil  => '&#184;',
 ordm   => '&#186;',
 raquo  => '&#187;',
 frac14 => '&#188;',
 frac12 => '&#189;',
 frac34 => '&#190;',
 iquest => '&#191;',
'times' => '&#215;',    # times is a keyword in perl
 divide => '&#247;',
);

# Make the oposite mapping
while (($entity, $char) = each(%entity2char)) {
    $char2entity{$char} = "&$entity;";
}

# Fill inn missing entities
for (0 .. 255) {
    next if exists $char2entity{chr($_)};
    $char2entity{chr($_)} = "&#$_;";
}


sub decode_entities
{
    for (@_) {
	s/(&\#(\d+);?)/$2 < 256 ? chr($2) : $1/eg;
	s/(&(\w+);?)/$entity2char{$2} || $1/eg;
    }
    $_[0];
}

sub encode_entities
{
    if (defined $_[1]) {
	unless (exists $subst{$_[1]}) {
	    # Because we can't compile regex we fake it with a cached sub
	    $subst{$_[1]} =
	      eval "sub {\$_[0] =~ s/([$_[1]])/\$char2entity{\$1}/g; }";
	    die $@ if $@;
	}
	&{$subst{$_[1]}}($_[0]);
    } else {
	# Encode control chars, high bit chars and '<', '&', '>', '"'
	$_[0] =~ s/([^\n\t !\#\$%\'-;=?-~])/$char2entity{$1}/g;
    }
    $_[0];
}

# Set up aliases
*encode = \&encode_entities;
*decode = \&decode_entities;

1;

Search for: Match: Format: Sort by: