Le Mercredi 27 Avril 2005 14:57, Jeffrey Squyres a �crit�:
> I am unfortunately traveling much of the time between now and Canada --
> can we ensure to have some sit down/beer time to discuss this stuff?
> (actually, feel free to continue the discussions without me -- I've
> already thrown in my $0.02! ;-) )
I will be in travel from May-7 to the symposium so I agree, the best solution
should be to speak about that during in Canada.
>
> I think this stuff has great promise, and is the Right Way to go for
> OSCAR.
[...]
>
> > Repository.pm
> > * check_local_repository: check/setup of the local repository, called
> > only in
> > install_cluster to remove commands for a specific binary package format
>
> I'm not quite sure I understand this -- can you explain more?
In the current install_script, we have the following code:
# Sanity check: ensure that /tftpboot/rpm exists
oscar_log_subsection("Quick sanity check for /tftpboot/rpm");
if (! -d "/tftpboot/rpm") {
print("ERROR: /tftpboot/rpm directory does not exist. blabla.\n");
die("Cannot continue");
}
[...]
# Check to see if rpms for tftp and/or tftp-server are installed.
# If so, remove them because they conflict with the tftp-hpa rpm.
foreach my $rpm ('tftp', 'tftp-server')
{
if ( !system("rpm -q $rpm >/dev/null 2>/dev/null") )
{
system("rpm -e $rpm");
oscar_log_subsection("Removing $rpm RPM");
}
}
my $pqtv = `rpm -q --quiet --qf '%{VERSION}' perl-Qt 2>/dev/null`;
if ( $pqtv && $pqtv < 3 ) {
!system("rpm -e perl-Qt") or warn("Couldn't remove perl-Qt");
oscar_log_subsection("Removing perl-Qt RPM");
}
As you can see, this code is a problem for Debian.
For example, with Debian, I am using /tftpboot/deb instead of /tftpboot/rpm
and I also need to setup some specific Debian stuff. So I put this kind of
stuff in the check_local_repository.
But to summarize, the organization of the install_cluster script is:
* [...]
* check the local repostository
* check the status of some basic packages (tftp, tftpserver)
* ...Etc.
Unfortunately, the current code of these two steps is RPM based.
check_local_repository and remove_pkg allows to have a generic code for such
scripts.
>
> > PkgInfo.pm
> > * which_perlQt_name: package name does not follow same rules for Deb
> > packages
> > and RPM packages so we need to find the good name for perlQt (which is
> > prereqs packages so we do not have a mechanism like for OPKG with the
> > config.xml file to automatically find the name of packages).
> > * which_perltk_name: same thing for perl-tk
>
> Hmm. I'm wary of these 2 which_*_names functions for a generalized
> interface. What exactly is the problem here? I'm not quite sure I
> understand your explanation...
The problem is that the name of these packages differs between RPM based
distro and Debian. For example, on RedHat we have perl-Qt and on Debian
libqt-perl. This package is a prereq so to install or remove it, current
scripts use command like "rpm -i/e <package-name>". So we need to find a
solution to: (i) find the correct package name and (ii) manage the package.
>
> > * get_pkg_dir: allows to find the directory for packages (ie Debs or
> > RPM);
> > used in some scripts
>
> Ah -- so this would return a tuple of dirs, e.g., ("RPMS", "SRPMS")?
Exactly, and Deb for Debian packages for example.
>
> > * get_package_version: gets the version of a given package
> > * get_pkg_list_in_dir remove_pkg: gets the list of binary packages in
> > a given
> > directory.
>
> Is remove_pkg related to this? I'm not quite sure why it's listed
> here...?
The current code (the install_cluster script) includes some commands like "rpm
-e <packagename> and I don't want to break everything, so a first solution
may be to use a remove_pkg function which deals with differences between
RPM/Deb/....
But I am pretty sure that his kind of function can be integrated to PackMan.
I think the most important is to decide what we can put in PackMan/DepMan to
make the OSCAR code less specific to RPM packages.
I think this answer is clear enough and feel free to contact me if it is not.
--
Geoffroy Vall�e, Ph.D.
SSI-OSCAR (http://ssi-oscar.irisa.fr/)
OSCARonDebian (http://ssi-oscar.irisa.fr/oscarondebian/)
-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start! http://www.idcswdc.com/cgi-bin/survey?id5hix
_______________________________________________
Oscar-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oscar-devel