OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 21-Mar-2003 15:49:14
Branch: OPENPKG_1_STABLE Handle: 2003032114491400
Modified files: (Branch: OPENPKG_1_STABLE)
openpkg-src/openpkg-tool
openpkg-build.pl openpkg-tool.spec
Log:
MFC: upgrade to latest version
Summary:
Revision Changes Path
1.39.2.6 +72 -36 openpkg-src/openpkg-tool/openpkg-build.pl
1.27.2.8 +2 -2 openpkg-src/openpkg-tool/openpkg-tool.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/openpkg-tool/openpkg-build.pl
============================================================================
$ cvs diff -u -r1.39.2.5 -r1.39.2.6 openpkg-build.pl
--- openpkg-src/openpkg-tool/openpkg-build.pl 19 Mar 2003 13:57:45 -0000
1.39.2.5
+++ openpkg-src/openpkg-tool/openpkg-build.pl 21 Mar 2003 14:49:14 -0000
1.39.2.6
@@ -848,22 +848,27 @@
$mywith = $with;
}
- $rec = {
- href => (relurl($url, undef, $href))[0],
- name => $name,
- version => $version,
- release => $release,
- depends => depend_list(swith($bags,'bprereq',$mywith)),
- keeps => depend_list(swith($bags,'prereq',$mywith)),
- conflicts => swith($bags,'conflicts',$mywith),
- source => swith($bags,'source',$mywith),
- nosource => swith($bags,'nosource',$mywith),
- desc => $desc,
- platform => $platform,
- prefix => $prefix,
- OPTIONS => $options,
- DEFOPTS => { %$options }
+ eval {
+ $rec = {
+ href => (relurl($url, undef, $href))[0],
+ name => $name,
+ version => $version,
+ release => $release,
+ depends => depend_list(swith($bags,'bprereq',$mywith)),
+ keeps => depend_list(swith($bags,'prereq',$mywith)),
+ conflicts => swith($bags,'conflicts',$mywith),
+ source => swith($bags,'source',$mywith),
+ nosource => swith($bags,'nosource',$mywith),
+ desc => $desc,
+ platform => $platform,
+ prefix => $prefix,
+ OPTIONS => $options,
+ DEFOPTS => { %$options }
+ };
};
+ if ($@) {
+ die "ERROR: when reading entry '$name'\n".$@;
+ }
foreach (@provides) {
push(@{$map->{$_->{name}}->{vs($_)}}, $rec);
@@ -944,22 +949,27 @@
$mywith = $with;
}
- $rec = {
- href => (relurl($url, undef, $href))[0],
- name => $name,
- version => $version,
- release => $release,
- platform => xel($_->{'Platform'}),
- prefix => xel($_->{'Prefixes'}),
- depends => depend_list(xwith($_->{'BuildPreReq'}, $mywith)),
- keeps => depend_list(xwith($_->{'PreReq'}, $mywith)),
- conflicts => xwith($_->{'Conflicts'}, $mywith),
- source => xwith($_->{'Source'}, $mywith),
- nosource => xwith($_->{'NoSource'}, $mywith),
- desc => $desc,
- OPTIONS => $options,
- DEFOPTS => { %$options }
+ eval {
+ $rec = {
+ href => (relurl($url, undef, $href))[0],
+ name => $name,
+ version => $version,
+ release => $release,
+ platform => xel($_->{'Platform'}),
+ prefix => xel($_->{'Prefixes'}),
+ depends => depend_list(xwith($_->{'BuildPreReq'}, $mywith)),
+ keeps => depend_list(xwith($_->{'PreReq'}, $mywith)),
+ conflicts => xwith($_->{'Conflicts'}, $mywith),
+ source => xwith($_->{'Source'}, $mywith),
+ nosource => xwith($_->{'NoSource'}, $mywith),
+ desc => $desc,
+ OPTIONS => $options,
+ DEFOPTS => { %$options }
+ };
};
+ if ($@) {
+ die "ERROR: when reading entry '$name'\n".$@;
+ }
foreach (@provides) {
push(@{$map->{$_->{name}}->{vs($_)}}, $rec);
@@ -1342,7 +1352,7 @@
my($dep, $env) = @_;
my($name,$op,@vers);
my($i,$r,$b,$cond,$version);
- my($t,$tdef);
+ my($t,$tdef,$why);
($name, $op, $version) = ($dep->{name}, $dep->{op}, $dep->{val});
@@ -1370,6 +1380,10 @@
$tdef = undef;
+ #
+ # search installed target that matches requirement
+ # use it if we are not upgrading (no -U)
+ #
if ($i && (@vers = get_versions($i, $cond))) {
foreach (@vers) {
$t = $i->{$_}->[0];
@@ -1382,17 +1396,36 @@
}
}
}
+
+ #
+ # search target in current build list that matches requirement
+ # use it if it exists
+ #
if ($b && (@vers = get_versions($b, $cond))) {
return ($b->{$vers[0]}->[0], 1);
}
+ #
+ # search target in repository and install it, if it is newer
+ # than corresponding installed versions
+ # avoid repository packages that would install 'new' (i.e.
+ # are not an upgrade of an existing package)
+ #
$t = chose_source($env, $name, undef, $r, get_versions($r, $cond));
if ($t) {
- if (!$tdef || target_better($env, $t, $env->{installed})) {
+ if (!$tdef || (
+ $why = target_better($env, $t, $env->{installed}) &&
+ $why ne 'new'
+ )) {
return ($t, 0);
}
}
+ #
+ # if nothing is suitable in repository then fall back to
+ # anything we already have installed but that we skipped
+ # above to look for upgrades.
+ #
if ($tdef) {
return ($tdef, 1);
}
@@ -1445,7 +1478,7 @@
} elsif ($why = target_better($env, $target, $env->{installed})) {
target_setstatus($target,'UPDATE',3);
print "# rebuilding $target->{name} ($why)\n";
- } elsif (!target_suitable($t, $env->{with})) {
+ } elsif ($target->{GOAL} && !target_suitable($t, $env->{with})) {
target_setstatus($target,'MISMATCH',2);
print "# rebuilding $target->{name} (parameter mismatch)\n";
} else {
@@ -1794,12 +1827,13 @@
# then map the result to --define command line arguments
# suitable for rpm
#
-sub make_defines ($$$$) {
- my($old, $new, $def, $c) = @_;
+sub make_defines ($$$$$) {
+ my($old, $new, $def, $c, $isgoal) = @_;
my($with);
$old = {} unless $old;
$def = {} unless $def;
+ $new = {} unless $isgoal;
#
# override old parameters with new parameters
@@ -1857,7 +1891,9 @@
if ($uncond || !-f $bpkg ||
!target_suitable(binary_target($_, $bpkg),$with)) {
- $opt = make_defines($_->{OPTIONS}, $with, $_->{DEFOPTS}, $c);
+ $opt = make_defines($_->{OPTIONS}, $with,
+ $_->{DEFOPTS}, $c,
+ $_->{GOAL});
#
# proxy packages are rebuilt from their maste
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/openpkg-tool/openpkg-tool.spec
============================================================================
$ cvs diff -u -r1.27.2.7 -r1.27.2.8 openpkg-tool.spec
--- openpkg-src/openpkg-tool/openpkg-tool.spec 19 Mar 2003 10:46:14 -0000
1.27.2.7
+++ openpkg-src/openpkg-tool/openpkg-tool.spec 21 Mar 2003 14:49:14 -0000
1.27.2.8
@@ -32,8 +32,8 @@
Distribution: OpenPKG [PLUS]
Group: Bootstrapping
License: GPL
-Version: 1.20030319
-Release: 1.20030319
+Version: 1.20030321
+Release: 1.20030321
# list of sources
Source0: openpkg.sh
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]