Those 2 patches fixes oscar-selector.($current_package_set not set and 
$selected_package_set used insted (but useless))
ERROR: Impossible to read the package set 
(/usr/share/oscar/package_sets//rhel-5-x86_64.xml

It also add a check so list <class> will actualy check that the <class> is 
valid (core, included, third party, all)

Still one pb I can't find: the package class (core , included, third party, 
...) is not listed and I'm unable to find how to retrieve it.

# oscar-selector --interactive
Verbosity: 0

selector> list
ERROR: Impossible to read the package set 
(/usr/share/oscar/package_sets//rhel-5-x86_64.xml) at 
/usr/lib/perl5/vendor_perl/5.8.8/OSCAR/SelectorCommon.pm line 55
   Status           Name          Class        Version
---------------------------------------------------------
[INFO] http://mirror.centos.org/centos/5.4/os/x86_64/ is in cache
[INFO] http://mirror.centos.org/centos/5.4/extras/x86_64/ is in cache
[INFO] http://bison.csm.ornl.gov/repos/unstable/rhel-5-x86_64 is in cache
Error: No matching Packages to list
ERROR during execution 256
 unselected

Please check that my change are correct. I'm still not familiar with perl and 
far from being good at understanding perl code.

Regards,

Olivier.
-- 
        Olivier LAHAYE
        CEA Saclay
        DRT-LIST-DETECS-SSTM
--- /usr/bin/oscar-selector.orig	2009-11-23 15:57:44.000000000 +0100
+++ /usr/bin/oscar-selector	2009-11-23 15:58:02.000000000 +0100
@@ -77,7 +77,7 @@
     my $selected_group;
 
     # Currently we only deal with the Default package set
-    my $selected_package_set = "Default";
+    $current_package_set = "Default";
 
     #Get a list of all the packages
     my $distro = OSCAR::PackagePath::get_distro();
@@ -86,12 +86,12 @@
     }
     my $compat_distro = OSCAR::PackagePath::get_compat_distro ($distro);
     my @opkgs = 
-        OSCAR::PackageSet::get_list_opkgs_in_package_set($selected_package_set,
+        OSCAR::PackageSet::get_list_opkgs_in_package_set($current_package_set,
                                                         $compat_distro);
 
     #List the packages and start getting input
     #Print the packages before giving a prompt
-#     OSCAR::SelectorCommon::printPackages("all", $selected_package_set);
+#     OSCAR::SelectorCommon::printPackages("all", $current_package_set);
 
 
     #Start the prompt section
--- /usr/lib/perl5/vendor_perl/5.8.8/OSCAR/SelectorCommon.pm.orig	2009-11-23 15:57:50.000000000 +0100
+++ /usr/lib/perl5/vendor_perl/5.8.8/OSCAR/SelectorCommon.pm	2009-11-23 15:58:15.000000000 +0100
@@ -41,6 +41,16 @@
 # party, all) with their <status> <short package name> <class> <version>
 sub printPackages ($$) {
     my ($class, $package_set) = @_;
+    my %known_classes = ('all' => 1, 'core' => 2, 'included' => 3, 'third party' => 4 );
+
+    if (!defined $class || $class eq "") {
+        $class = "all";
+    }
+
+    if (!defined %known_classes->{$class}) {
+	print "ERROR: Unknown class $class\nAvailable class: core, included, third party, all\n";
+	return -1;
+    }
 
     # we currently assume we deal only with the local distro
     my $distro = OSCAR::PackagePath::get_distro();
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Oscar-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oscar-devel

Reply via email to