Ignore:
Timestamp:
May 12, 2012, 1:46:09 AM (8 years ago)
Author:
Bruno Cornec
Message:
  • pb.conf: add auto-agree-with-licenses for opensuse, other failures on install can occur. partially fix dependencies for opensuse-11.2, stopped because the version isn't supported. remove cracklib-dict-small, not actually a dependency. (Eric Anderson)
  • Distribution.pm: Fix bug, if we install with yum, put the repo in the yum location. If we install with zypper, put it in the zypper location. Otherwise complain that we don't know what to do with the file. (Eric Anderson/Bruno? Cornec)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb-modules/lib/ProjectBuilder/Distribution.pm

    r1520 r1521  
    555555            }
    556556        } elsif ($bn =~ /\.repo$/) {
    557             # Yum repo
    558             my $dest = "/etc/yum.repos.d/$bn";
     557            my $dirdest = "";
     558            my $reponame = "";
     559            # TODO: could go in pb.conf in fact
     560            if ($pbos->{install} =~ /\byum\b/) {
     561                $reponame="yum";
     562                $dirdest = "/etc/yum.repos.d";
     563            } elsif ($pbos->{install} =~ /\bzypper\b/) {
     564                $reponame="zypper";
     565                $dirdest = "/etc/zypp/repos.d";
     566            } else {
     567                die "Unknown location for repository file for '$pbos->{install}' command";
     568            }
     569            my $dest = "$dirdest/$bn";
    559570            return if (pb_distro_compare_repo($ENV{'PBTMP'}/$bn,$dest));
    560             pb_system("sudo mv $ENV{'PBTMP'}/$bn /etc/yum.repos.d","Adding yum repository") if (not -f "/etc/yum.repos.d/$bn");
     571            die "Missing directory $dirdest ($reponame)" unless (-d $dirdest);
     572            pb_system("sudo mv $ENV{'PBTMP'}/$bn $dirdest/$bn","Adding $reponame repository") if (not -f "$dirdest/$bn");
    561573        } elsif ($bn =~ /\.addmedia/) {
    562574            # URPMI repo
Note: See TracChangeset for help on using the changeset viewer.