Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

some prefix fixes

  • Loading branch information...
commit 7ca6f3eccd352bc7b9427e924ad0ff69414f651d 1 parent 0066a3e
Dave Vasilevsky authored
View
5 ChangeLog
@@ -1,3 +1,8 @@
+2006-03-18 Dave Vasilevsky <vasi@users.sourceforge.net>
+
+ * fink-scanpackages.in: Indicate the prefix explicitly, so we don't have
+ to load Fink.
+
2006-03-17 Dave Vasilevsky <vasi@users.sourceforge.net>
* fink-scanpackages.in: New program to substitute for apt-ftparchive and
View
2  fink-scanpackages.in
@@ -89,7 +89,7 @@ apt-ftparchive(1), dpkg-scanpackages(8), fink(8)
use Getopt::Long;
use Pod::Usage;
-my %opts = (verbosity => 1);
+my %opts = (verbosity => 1, prefix => $PREFIX);
my ($help, $man, $bad) = (0, 0, 0);
Getopt::Long::Configure('bundling');
View
4 perlmod/Fink/ChangeLog
@@ -1,5 +1,9 @@
2006-03-18 Dave Vasilevsky <vasi@users.sourceforge.net>
+ * Scanpackages.pm: Run the dpkg-deb in the current prefix.
+
+2006-03-18 Dave Vasilevsky <vasi@users.sourceforge.net>
+
* Scanpackages.pm: Maybe I should brush up on my perl one of these days...
2006-03-18 Dave Vasilevsky <vasi@users.sourceforge.net>
View
23 perlmod/Fink/Scanpackages.pm
@@ -96,6 +96,12 @@ If true, do index License: Restrictive. Defaults to true.
An integer. If non-zero, various messages will be printed. The default is 1.
+=item prefix
+
+The prefix where dpkg-deb can be found. This defaults to the Fink prefix, but
+supplying this option explicitly may allow scanpackages to run even without
+a properly configured Fink.
+
=back
=item scan
@@ -311,8 +317,9 @@ sub initialize {
sub _control {
my ($self, $path) = @_;
- my (%control, $field);;
- open CONTROL, '-|', 'dpkg-deb', '-f', $path
+ my (%control, $field);
+ my $dpkgdeb = $self->_prefix . "/bin/dpkg-deb";
+ open CONTROL, '-|', $dpkgdeb, '-f', $path
or die "SKIPPING: Can't read control for '$path': $!\n";
eval {
while (<CONTROL>) {
@@ -553,6 +560,18 @@ sub DESTROY {
$self->finish;
}
+# Get the prefix to find dpkg-deb
+#
+# my $prefix = $self->_prefix;
+sub _prefix {
+ my ($self) = @_;
+ unless (exists $self->{_prefix}) {
+ $self->_ensure_fink;
+ $self->{_prefix} = $Fink::Config::basepath;
+ }
+ return $self->{_prefix};
+}
+
#### Deal with different versions of Fink
Please sign in to comment.
Something went wrong with that request. Please try again.