SUMMARY: Solaris package creation - using a sed class script to r emove par t of a file

From: BAUMLER Julie L (julie.x.baumler@co.multnomah.or.us)
Date: Mon Oct 16 2000 - 19:08:58 CDT


I got one answer, from Hendrik Visage [hvisage@is.co.za]suggested using a
preremove or postremove script. I think I probably should have taken his
advice! Sun's "Application Package Developer's Guide" has a similar example
(a device driver) where they state "The pkgrm command does not run the
removal part of the script."
(http://docs.sun.com/ab2/coll.45.10/PACKINSTALL/@Ab2PageView/idmatch(CH5PKGC
ASESTUDIES-64)#CH5PKGCASESTUDIES-64?Ab2Lang=C&Ab2Enc=iso-8859-1)
Nevertheless, with further testing, it seems that this works sometimes; I
don't think I'd want to rely on this if it were critical that the data gets
removed though (in this case, it's not.) I'm not sure why, but using pkgrm
-v; it seems like the removal script doesn't always run (strange error in my
class script or sed code?) Given that the documentation seems to imply this
is the expected behavior; I guess I'm just going to live with this....

Thanks,
Julie

-----Original Message-----
From: BAUMLER Julie L [mailto:julie.x.baumler@co.multnomah.or.us]
Sent: Friday, October 13, 2000 10:57 AM
To: sun-managers@sunmanagers.ececs.uc.edu
Subject: Solaris package creation - using a sed class script to remove
par t of a file

Hello -

I'm trying to create solaris packages for perl modules. (Using the info
from sunfreeware and sun.com on how to do this.) I'm using a sed class to
edit the perllocal.pod file. Everything works fine for creating and
installing the package, but when
I try to remove the package, perllocal.pod is not changed (but the rest of
the removal works). The remove portion of my script works fine as a
standalone sed script. Any ideas on what I'm doing wrong? My pkginfo and
sed class scripts are appended below.

Thanks in advance! I'll summarize.

Julie

PKGINFO:

PKG="TSpmd5"
NAME="perl_module_Digest-MD5"
ARCH="sun4u"
VERSION="1.0"
CATEGORY="application"
VENDOR="CPAN"
EMAIL="gisle@aas.no"
PSTAMP="Julie Baumler"
BASEDIR="/opt"
CLASSES="sed none"

SED CLASS SCRIPT:

# sed class script to add the appropriate entries to perllocal.pod

!remove
# remove all entries from the file that are associated
# with this package, though not necessarily just
# with this package instance
/^=head2 .* C<Module> L<Digest::MD5>$/,/^=head2 .* C<Module> L<.*>$/{
        /^=head2 .* C<Module> L<Digest::MD5>$/d
        /^=head2 .* C<Module> L<.*>$/!d
}
!install
# add the needed entry at the end of the table
$a\
=head2 Thu Oct 12 11:57:29 2000: C<Module> L<Digest::MD5>\
\
=over 4\
\
=item *\
\
C<installed into: /opt/lib/perl5/5.00503>\
C<installed into: /opt/lib/perl5/5.00503>\
\
=item *\
\
C<LINKTYPE: dynamic>\
\
=item *\
\
C<VERSION: 2.12>\
\
=item *\
\
C<EXE_FILES: >\
\
=back\

(there is a blank line right above this as the last line of the file)

PROTOTYPE:

i pkginfo=./pkginfo
d none lib 0755 bin bin
d none lib/perl5 0755 bin bin
d none lib/perl5/5.00503 0755 bin bin
d none lib/perl5/5.00503/sun4-solaris 0755 bin bin
d none lib/perl5/5.00503/sun4-solaris/auto 0755 bin bin
d none lib/perl5/5.00503/sun4-solaris/auto/Digest 0755 bin bin
d none lib/perl5/5.00503/sun4-solaris/auto/Digest/MD5 0755 bin bin
f none lib/perl5/5.00503/sun4-solaris/auto/Digest/MD5/MD5.so 0555 bin bin
f none lib/perl5/5.00503/sun4-solaris/auto/Digest/MD5/MD5.bs 0444 bin bin
f none lib/perl5/5.00503/sun4-solaris/auto/Digest/MD5/.packlist 0644 bin bin
d none lib/perl5/5.00503/sun4-solaris/auto/Digest/MD2 0755 bin bin
f none lib/perl5/5.00503/sun4-solaris/auto/Digest/MD2/MD2.so 0555 bin bin
f none lib/perl5/5.00503/sun4-solaris/auto/Digest/MD2/MD2.bs 0444 bin bin
d none lib/perl5/5.00503/sun4-solaris/auto/Digest/SHA1 0755 bin bin
f none lib/perl5/5.00503/sun4-solaris/auto/Digest/SHA1/SHA1.so 0555 bin bin
f none lib/perl5/5.00503/sun4-solaris/auto/Digest/SHA1/SHA1.bs 0444 bin bin
d none lib/perl5/5.00503/sun4-solaris/Digest 0755 bin bin
f none lib/perl5/5.00503/sun4-solaris/Digest/MD5.pm 0444 bin bin
f none lib/perl5/5.00503/sun4-solaris/Digest/HMAC.pm 0444 bin bin
f none lib/perl5/5.00503/sun4-solaris/Digest/HMAC_SHA1.pm 0444 bin bin
f none lib/perl5/5.00503/sun4-solaris/Digest/HMAC_MD5.pm 0444 bin bin
f none lib/perl5/5.00503/sun4-solaris/Digest/MD2.pm 0444 bin bin
f none lib/perl5/5.00503/sun4-solaris/Digest/SHA1.pm 0444 bin bin
f none lib/perl5/5.00503/sun4-solaris/Digest.pm 0444 bin bin
f none lib/perl5/5.00503/sun4-solaris/MD5.pm 0444 bin bin
f none lib/perl5/5.00503/sun4-solaris/SHA.pm 0444 bin bin
e sed lib/perl5/5.00503/sun4-solaris/perllocal.pod ? ? ?
d none man 0755 bin bin
d none man/man3 0755 bin bin
f none man/man3/Digest::MD2.3 0444 bin bin
f none man/man3/Digest::SHA1.3 0444 bin bin
f none man/man3/SHA.3 0444 bin bin
f none man/man3/Digest::HMAC.3 0444 bin bin
f none man/man3/Digest.3 0444 bin bin
f none man/man3/Digest::MD5.3 0444 bin bin
f none man/man3/Digest::HMAC_SHA1.3 0444 bin bin
f none man/man3/Digest::HMAC_MD5.3 0444 bin bin
f none man/man3/MD5.3 0444 bin bin

S
U BEFORE POSTING please READ the FAQ located at
N ftp://ftp.cs.toronto.edu/pub/jdd/sun-managers/faq
. and the list POLICY statement located at
M ftp://ftp.cs.toronto.edu/pub/jdd/sun-managers/policy
A To submit questions/summaries to this list send your email message to:
N sun-managers@sunmanagers.ececs.uc.edu
A To unsubscribe from this list please send an email message to:
G majordomo@sunmanagers.ececs.uc.edu
E and in the BODY type:
R unsubscribe sun-managers
S Or
. unsubscribe sun-managers original@subscription.address
L To view an archive of this list please visit:
I http://www.latech.edu/sunman.html
S
T

S
U BEFORE POSTING please READ the FAQ located at
N ftp://ftp.cs.toronto.edu/pub/jdd/sun-managers/faq
. and the list POLICY statement located at
M ftp://ftp.cs.toronto.edu/pub/jdd/sun-managers/policy
A To submit questions/summaries to this list send your email message to:
N sun-managers@sunmanagers.ececs.uc.edu
A To unsubscribe from this list please send an email message to:
G majordomo@sunmanagers.ececs.uc.edu
E and in the BODY type:
R unsubscribe sun-managers
S Or
. unsubscribe sun-managers original@subscription.address
L To view an archive of this list please visit:
I http://www.latech.edu/sunman.html
S
T



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:14:20 CDT