Re[2]: [Slapt-get-user] Package won't install with really long name.

Jason Woodward slapt-get-user@software.jaos.org
Fri, 13 Aug 2004 16:01:38 -0400


--boundary-1092424224
Content-Type: text/plain; charset="us-ascii"
Content-Length: 3970
Lines: 83

Hi Luke,

> > I try and perform a "slapt-get --install kernel-ide-as-i686", it comes back
> > to me saying that there is no package named kernel.
> 
> Ok, the same thing happens with alsa-driver packages. I am able to specify the
> alsa-driver-i686 package on the command-line, and slapt-get responds as it
> should, saying it exists and all, but when I try and install the package
> alsa-driver-smp-i686, the same thing happens. Can't find package alsa.
> 
> I don't think it is my repository, so I think there is a problem with slapt-get
> somewhere, and not being able to handle more than 3 dash-separated name fields.

It's  not that it can't handle the 3 dash seperated package names, b/c it can.  The regular
expression I use for the full package name works with your packages as you can see when you use
--search or --list or --installed. 

Example:
# file name
echo kernel-ide-as-i686-2.4.27-i686-1AudSlack.tgz| sed -re
"s/(.*{1,})\\-(.*[\\.\\-].*[\\.\\-].*).tgz[ ]{0,}$/\1/"
# /var/log/packages file name (missing .tgz)
echo kernel-ide-as-i686-2.4.27-i686-1AudSlack| sed -re "s/^(.*{1,})\\-(.*[\\.\\-].*[\\.\\-].*)/\2/"


The trick comes when you try to install the package.  The same regular expression (that is used
to parse /var/log/packages file names) is used but at this point you are leaving off all the
extra information of the full package file name.  The regular expression simply cannot tell the
different between kernel-ide-as-i686 and kernel-ide-2.4.26-i486-4.

So a design change is in order.  What now happens is that even if the regular expression
matches, if it fails to lookup the package using the parsed package name (which we know will be
wrong), it will attempt to use the entire install argument string as the package name (as if
the regular expression had failed to begin with).  This is a simple change to test as I am not
changing any regular expressions that may affect other packages etc.  

I just committed this change to cvs.  If you would test yourself to double check me, I'll put
out a new version of slapt-get addressing this issue.


Thanks for the heads up, Luke.


take care,
jason

--
Jason Woodward
woodwardj@jaos.org

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
 
mQGiBDrwHPoRBAC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2KjChZat4VC
qkZciEYEGBECAAYFAjrwHP0ACgkQa7bah1Sn+h7qkQCePz0ds5O/dsZrm450pjLs
2V3BkMAAn2/6alBBC9b9F94svdOf0mGY/G5w
=4p8c
-----END PGP PUBLIC KEY BLOCK-----

my($c,@s)=(0,qw( | / - \ ));$|++;my$p;&{sub{map{$p.=chr$_}
unpack(join('a',('',split(//,$_->[1]))),$_->[0]);}}foreach
[qw/74117115116 2333/],[qw/65110111116104101114 2333333/],
[qw/80101114108 2333/],[qw/729799107101114 222333/];{my$z=
$c<4?$s[$c++]:$s [$c=0];printf"\ec%s%s%s",$z,$p,$z,select*
STDOUT,*STDOUT,*STDOUT,0.1,;redo;}##########JAPH##########

--boundary-1092424224--