All of fink needs to be built with this patch before releasing this. We've never audited this policy, my guess is a lot of stuff will break.

-Ben

On Feb 3, 2005, at 10:29 AM, TheSin wrote:

Also this needs to be docu'd and a policy for this needs to be made. Lots of perlmods don't comply to this.
---
TS
http://southofheaven.org
Chaos is the beginning and end, try dealing with the rest.


On 3-Feb-05, at 11:07 AM, Daniel Macks wrote:

Update of /cvsroot/fink/fink/perlmod/Fink
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23893

Modified Files:
        PkgVersion.pm ChangeLog
Log Message:
Buildlocks use BuildDepends only (not Depends), in accord with #fink
that "install-time deps are not implicitly also compile-time deps".

Implement get_family_parent().


Index: PkgVersion.pm =================================================================== RCS file: /cvsroot/fink/fink/perlmod/Fink/PkgVersion.pm,v retrieving revision 1.351 retrieving revision 1.352 diff -u -d -r1.351 -r1.352 --- PkgVersion.pm 1 Feb 2005 17:15:32 -0000 1.351 +++ PkgVersion.pm 3 Feb 2005 18:07:42 -0000 1.352 @@ -930,6 +930,15 @@ return @list; }

+# returns the parent of the family
+
+sub get_family_parent {
+       my $self = shift;
+       return exists $self->{parent}
+               ? $self->{parent}
+               : $self;
+}
+
 # returns whether this fink package is of a given Type:

 sub is_type {
@@ -2247,8 +2256,8 @@
        # generate dpkg "control" file

my ($pkgname, $parentpkgname, $version, $field, $section, $instsize);
- $parentpkgname = $pkgname = $self->get_name();
- $parentpkgname = $self->{parent}->get_name() if exists $self->{parent};
+ $pkgname = $self->get_name();
+ $parentpkgname = $self->get_family_parent->get_name();
$version = $self->get_fullversion();
$section = $self->get_section();
$instsize = $self->get_instsize("$destdir$basepath"); # kilobytes!
@@ -2872,37 +2881,15 @@
Provides: fink-buildlock
EOF


- my( @pkglist, $deplist );
-
- # BuildConflicts of parent pkg are Conflicts of lockpkg
- if (exists $self->{parent}) {
- @pkglist = @{pkglist2lol($self->{parent}->pkglist('BuildConflicts'))};
- } else {
- @pkglist = @{pkglist2lol($self->pkglist('BuildConflicts'))};
- }
- $deplist = &lol2pkglist([EMAIL PROTECTED]);
- $control .= "Conflicts: $deplist\n" if length $deplist;
-
- # All *Depends of whole family of pkgs are Depends of lockpkg...
- @pkglist = ();
- foreach my $pkg ($self->get_splitoffs(1,1)) {
- push @pkglist, map { @{&pkglist2lol($pkg->pkglist($_))} } (qw(Depends Pre-Depends BuildDepends));
- }
-
- # ...but remove pkgs being built now (avoid chicken-and-egg)
- my $pkgregex = join "|", map { quotemeta($_->get_name()) } $self->get_splitoffs(1,1);
- $pkgregex = qr/^(?:$pkgregex)(?:\s*\(|\Z)/; # a pkglist atom of any of us
- foreach my $deplist (@pkglist) {
- # nuke the whole OR cluster if any atom matches
- # ($deplist is the listref value from @depends so changing
- # $deplist changes the list linked from @depends; no need
- # to edit @depends directly)
- $deplist = [] if grep { /$pkgregex/ } @$deplist;
+ # build (anti)dependencies of pkg family are "real" (anti)dependencies of lockpkg
+ my $parent_pkg = $self->get_family_parent;
+ foreach my $field (qw(Conflicts Depends)) {
+ my $build_field = "Build$field";
+ if ($parent_pkg->has_pkglist($build_field)) {
+ $control .= "$field: ".&collapse_space($parent_pkg->pkglist($build_field))."\n";
+ }
}


- $deplist = &lol2pkglist([EMAIL PROTECTED]);
- $control .= "Depends: $deplist\n" if length $deplist;
-
### write "control" file
open(CONTROL,">$destdir/DEBIAN/control") or die "can't write control file for $lockpkg: $!\n";
print CONTROL $control;


Index: ChangeLog
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/ChangeLog,v
retrieving revision 1.842
retrieving revision 1.843
diff -u -d -r1.842 -r1.843
--- ChangeLog   3 Feb 2005 17:32:17 -0000       1.842
+++ ChangeLog   3 Feb 2005 18:07:43 -0000       1.843
@@ -1,3 +1,8 @@
+2005-02-03  Daniel Macks  <[EMAIL PROTECTED]>
+
+       * PkgVersion.pm: Change set_buildlock so that Depends are not
+       included. Implement get_family_parent().
+
 2005-02-03  Benjamin Reed  <[EMAIL PROTECTED]>

        * Notify/Growl.pm: add support for new images, and sticky defaults



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-commits





------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Fink-devel mailing list Fink-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fink-devel




------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Fink-devel mailing list Fink-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to