Hi Erich,

Is there any way to prevent some packages from being removed/ uninstalled?

As far as I am concerned, MySQL can be used by used since oscar is set up and people may add some new database and they may want to keep them when they run "start_over".

But right now, it just simply uninstall MySQL and its some related RPMS (but not all).

I think you have set up some scripts to return the list of rpms for the specific pacakge on the specific distro. Can you point out what it is? I am sorry for my laziness not looking for it yet. If we can get the list, it would be easy to avoid uninstalling the necessary RPMs.

Regards,

- DongInn

On May 24, 2006, at 1:32 PM, [EMAIL PROTECTED] wrote:

Author: efocht
Date: 2006-05-24 13:32:13 -0400 (Wed, 24 May 2006)
New Revision: 4848

Modified:
   trunk/scripts/start_over
Log:
Attempt to adapt start_over to the new structure. It uses yume-opkg to remove all RPMs installed by OSCAR. This was the reason why I had to remove the base
package, as its removal was leading to erasing almost every RPM on the
system.

This is untested, just checking it in such that people can take it and improve
it...


Modified: trunk/scripts/start_over
===================================================================
--- trunk/scripts/start_over    2006-05-24 17:11:23 UTC (rev 4847)
+++ trunk/scripts/start_over    2006-05-24 17:32:13 UTC (rev 4848)
@@ -29,53 +29,19 @@
 my $oscar_pkg_pool = &OSCAR::PackagePath::oscar_repo_url();
 my $distro_pkg_pool = &OSCAR::PackagePath::distro_repo_url();

+my @repos = split(",","$distro_pkg_pool,$oscar_pkg_pool");
[EMAIL PROTECTED] = map { "--repo $_" } @repos;

-my @known_rpms = qw(
-                    apache
-                    autoupdate
-                    autoupdate-cfg-redhat
-                    autoupdate-oscar
-                    c3-profiled
-                    c3
-                    hdf5-oscar
-                    hdf5-oscar-module
-                    lam-module
-                    lam
-                    loghost
-                    mpich-oscar-module
-                    mpich-oscar
-                    mysql
-                    mysql-common
-                    mysql-server
-                    netbootmgr
-                    ntpconfig
-                    pvm-modules-oscar
-                    pvm
-                    openpbs-oscar
-                    openpbs-oscar-mom
-                    openpbs-oscar-server
-                    openpbs-oscar-gui
-                    openpbs-oscar-commands
-                    openpbs-oscar-client
-                    sync_users-oscar
-                    ssh-oscar
-                    maui-oscar
-                    libdbdcsv-perl
-                    libappconfig-perl
-                    perl-DBD-MySQL
-                    rrdtool
-                    systeminstaller
-                    systeminstaller-x11
-                    systemconfigurator
-                    systemimager-server
-                    systemimager-common
-                    systemimager-client
-                    systemimager-i386boot
-                    systemimager-ia64boot
-                    env-switcher
-                    modules
-                   );
+print "##### deleting all OSCAR packages and their dependencies #####\n";
+my @opkgs = `yume-opkg --list --all`;
[EMAIL PROTECTED] = map { chomp $_ } @opkgs;

+# Try doing this smartly: with yume-opkg
+
+my $cmd = "yume-opkg ".join(" ",@repos)." --remove ".join(" ",@opkgs);
+print "Executing: $cmd\n";
+system($cmd);
+
 my @known_services = qw(
                         dhcpd
                         gmond
@@ -88,10 +54,6 @@
                         systemimager
                        );

-my @leave_rpms = qw(
-                    libpng
-                   );
-
 # find oscar home directory
 my $oscar_home = "";
 if ( exists $ENV{OSCAR_HOME} && -d $ENV{OSCAR_HOME} ) {
@@ -117,41 +79,6 @@
 use lib "../lib";
 use Carp;

-my $opd_dir = "/var/lib/oscar";
-my @oscar_rpm_paths = ();
-
-# find a list of the full path names of all the non-source oscar rpm files,
-# a list of the file names of all the non-source oscar rpm files,
-# and a list of all the rpm names corresponding to the non-source rpm files.
-
-if (-d "$opd_dir") {
- print "Searching for non-source rpm files in $oscar_home and $opd_dir ... ";
-  @oscar_rpm_paths = `find $oscar_home/* $opd_dir/* -name '*.rpm'`;
-} else {
-  print "Searching for non-source rpm files in $oscar_home ... ";
-  @oscar_rpm_paths = `find $oscar_home/* -name '*.rpm'`;
-}
-
-chomp @oscar_rpm_paths;
[EMAIL PROTECTED] = grep( !/\.src\.rpm$/, @oscar_rpm_paths );
[EMAIL PROTECTED] = sort_uniq( @oscar_rpm_paths );
-#print "oscar_rpm_paths=\n";foreach my $rpm_file (@oscar_rpm_paths) {print "$rpm_file\n";}
-my @oscar_rpm_files = @oscar_rpm_paths;
-foreach ( @oscar_rpm_files ) {
-  $_ =~ s,^.*/,,g;
-}
[EMAIL PROTECTED] = sort_uniq( @oscar_rpm_files );
-#print "oscar_rpm_files=\n";foreach my $rpm_file (@oscar_rpm_files) {print "$rpm_file\n";}
-my @oscar_rpms = @oscar_rpm_files;
-foreach ( @oscar_rpms ) {
-#  $_ =~ s,\.[^\.]+\.rpm$,,g;
-  $_ =~ s,\-[0-9]+.*$,,g;
-}
[EMAIL PROTECTED] = sort_uniq( @oscar_rpms );
-#print "oscar_rpms=\n";foreach my $rpm (@oscar_rpms){print "$rpm\n";}
-my $paths_count = scalar @oscar_rpm_paths;
-print "found $paths_count rpm files.\n";
-
 # delete the oscar database

 print "Deleting oda database ...\n";
@@ -192,8 +119,6 @@
 do_command( "/usr/bin/mksimachine --Delete --all" )
   if -x "/usr/bin/mksimachine";

-uninstall_rpms(@oscar_rpms);
-
 my %orepo_done;
 my $err = 0;
 for my $dist (keys %distro_pools) {



-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk! Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel? cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Oscar-checkins mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/oscar-checkins



-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Oscar-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oscar-devel

Reply via email to