FreeBSD Bugzilla – Attachment 162410 Details for
Bug 198877
CPUTYPE in make.conf gets changed, breaks lang/gcc
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch adding GitHub/PyPI site handlers
portscout-add-github-pypy-site-handler.diff (text/plain), 23.76 KB, created by
Kubilay Kocak
on 2015-10-24 09:33:56 UTC
(
hide
)
Description:
Patch adding GitHub/PyPI site handlers
Filename:
MIME Type:
Creator:
Kubilay Kocak
Created:
2015-10-24 09:33:56 UTC
Size:
23.76 KB
patch
obsolete
>Index: ports-mgmt/portscout/Makefile >=================================================================== >--- ports-mgmt/portscout/Makefile (revision 400103) >+++ ports-mgmt/portscout/Makefile (working copy) >@@ -3,18 +3,34 @@ > > PORTNAME= portscout > PORTVERSION= 0.8.1 >-PORTREVISION= 3 >+PORTREVISION= 4 > CATEGORIES= ports-mgmt >-MASTER_SITES= http://mirror.inerd.com/FreeBSD/distfiles/${PORTNAME}/ \ >- http://www.atarininja.org/~wxs/distfiles/ \ >+MASTER_SITES= http://mirror.inerd.com/FreeBSD/distfiles/${PORTNAME}/ \ >+ http://www.atarininja.org/~wxs/distfiles/ \ > http://www.inerd.com/software/${PORTNAME}/ > > MAINTAINER= shaun@FreeBSD.org > COMMENT= Tool to scan for new versions of FreeBSD ports > >-OPTIONS_DEFINE= SQLITE3 DOCS >-SQLITE3_DESC= Use SQLite backend instead of PostgreSQL >+LICENSE= BSD2CLAUSE > >+RUN_DEPENDS= p5-DBI>=0:${PORTSDIR}/databases/p5-DBI \ >+ p5-Proc-Queue>=0:${PORTSDIR}/devel/p5-Proc-Queue \ >+ p5-Net>=0:${PORTSDIR}/net/p5-Net \ >+ p5-URI>=0:${PORTSDIR}/net/p5-URI \ >+ p5-XML-XPath>=0:${PORTSDIR}/textproc/p5-XML-XPath \ >+ p5-MIME-Lite>=0:${PORTSDIR}/mail/p5-MIME-Lite \ >+ p5-libwww>=0:${PORTSDIR}/www/p5-libwww \ >+ p5-JSON>0:${PORTSDIR}/converters/p5-JSON >+ >+OPTIONS_DEFINE= DOCS >+OPTIONS_DEFAULT= PGSQL >+ >+OPTIONS_MULTI= DATABASE >+OPTIONS_MULTI_DATABASE= SQLITE PGSQL >+ >+DATABASE_DESC= Database Backends >+ > USES= perl5 shebangfix > NO_BUILD= yes > SHEBANG_FILES= ${WRKSRC}/portscout.pl >@@ -21,26 +37,16 @@ > > PORTDOCS= UPDATING portscout-portconfig.txt xml-datasrc-example.xml > >-RUN_DEPENDS= p5-DBI>=0:${PORTSDIR}/databases/p5-DBI \ >- p5-Proc-Queue>=0:${PORTSDIR}/devel/p5-Proc-Queue \ >- p5-Net>=0:${PORTSDIR}/net/p5-Net \ >- p5-URI>=0:${PORTSDIR}/net/p5-URI \ >- p5-XML-XPath>=0:${PORTSDIR}/textproc/p5-XML-XPath \ >- p5-MIME-Lite>=0:${PORTSDIR}/mail/p5-MIME-Lite \ >- p5-libwww>=0:${PORTSDIR}/www/p5-libwww >+SQLITE_USE= SQLITE=3 >+SQLITE_RUN_DEPENDS= p5-DBD-SQLite>=0:${PORTSDIR}/databases/p5-DBD-SQLite > >+PGSQL_USES= pgsql >+PGSQL_RUN_DEPENDS= p5-DBD-Pg>=0:${PORTSDIR}/databases/p5-DBD-Pg >+ > .include <bsd.port.options.mk> > >-.if ${PORT_OPTIONS:MSQLITE3} >-#USE_SQLITE= 3 >-#RUN_DEPENDS+= p5-DBD-SQLite>=0:${PORTSDIR}/databases/p5-DBD-SQLite >-.elif !defined(WITHOUT_PGSQL) >-#USES+= pgsql >-#RUN_DEPENDS+= p5-DBD-Pg>=0:${PORTSDIR}/databases/p5-DBD-Pg >-.endif >- > pre-everything:: >-.if ${PORT_OPTIONS:MSQLITE3} >+.if ${PORT_OPTIONS:MSQLITE} > @${ECHO_MSG} "+-------------------------------------------------------------+" > @${ECHO_MSG} "| Warning! although SQLite is supported, portscout will only |" > @${ECHO_MSG} "| operate in non-forking mode with this database backend. It |" >@@ -48,8 +54,12 @@ > @${ECHO_MSG} "+-------------------------------------------------------------+" > .endif > >+post-extract: >+ @${CP} ${FILESDIR}/files-Portscout-SiteHandler-GitHub.pm ${WRKSRC}/Portscout/SiteHandler/GitHub.pm >+ @${CP} ${FILESDIR}/files-Portscout-SiteHandler-PyPI.pm ${WRKSRC}/Portscout/SiteHandler/PyPI.pm >+ > post-patch: >-.if ${PORT_OPTIONS:MSQLITE3} >+.if ${PORT_OPTIONS:MSQLITE} > @${REINPLACE_CMD} 's/^\([^#]*DBI:Pg.*\)$$/#\1/g' ${WRKSRC}/portscout.conf > @${REINPLACE_CMD} 's/^#\(.*DBI:SQLite.*\)$$/\1/g' ${WRKSRC}/portscout.conf > .endif >@@ -96,7 +106,7 @@ > test: > ${PERL} ${WRKSRC}/t/00-use.t > ${PERL} ${WRKSRC}/t/01-vercompare.t >-.if ${PORT_OPTIONS:MSQLITE3} >+.if ${PORT_OPTIONS:MSQLITE} > ${PERL} ${WRKSRC}/t/10-sqlite.t > #.else > # ${PERL} ${WRKSRC}/10-postgresql.t >Index: ports-mgmt/portscout/files/files-Portscout-SiteHandler-GitHub.pm >=================================================================== >--- ports-mgmt/portscout/files/files-Portscout-SiteHandler-GitHub.pm (nonexistent) >+++ ports-mgmt/portscout/files/files-Portscout-SiteHandler-GitHub.pm (working copy) >@@ -0,0 +1,175 @@ >+#------------------------------------------------------------------------------ >+# Copyright (C) 2014, Jasper Lievisse Adriaanse <jasper@openbsd.org> >+# >+# Permission to use, copy, modify, and distribute this software for any >+# purpose with or without fee is hereby granted, provided that the above >+# copyright notice and this permission notice appear in all copies. >+# >+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES >+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF >+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR >+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES >+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN >+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF >+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. >+# >+#------------------------------------------------------------------------------ >+ >+package Portscout::SiteHandler::GitHub; >+ >+use JSON qw(decode_json); >+use LWP::UserAgent; >+ >+use Portscout::Const; >+use Portscout::Config; >+ >+use strict; >+ >+require 5.006; >+ >+ >+#------------------------------------------------------------------------------ >+# Globals >+#------------------------------------------------------------------------------ >+ >+push @Portscout::SiteHandler::sitehandlers, __PACKAGE__; >+ >+our %settings; >+ >+ >+#------------------------------------------------------------------------------ >+# Func: new() >+# Desc: Constructor. >+# >+# Args: n/a >+# >+# Retn: $self >+#------------------------------------------------------------------------------ >+ >+sub new >+{ >+ my $self = {}; >+ my $class = shift; >+ >+ $self->{name} = 'GitHub'; >+ >+ bless ($self, $class); >+ return $self; >+} >+ >+ >+#------------------------------------------------------------------------------ >+# Func: CanHandle() >+# Desc: Ask if this handler (package) can handle the given site. >+# >+# Args: $url - URL of site. >+# >+# Retn: $res - true/false. >+#------------------------------------------------------------------------------ >+ >+sub CanHandle >+{ >+ my $self = shift; >+ >+ my ($url) = @_; >+ >+ return ($url =~ /^https?:\/\/([^\/.]+\.)?github\.com\/(.*?)\/tar.gz/); >+} >+ >+ >+#------------------------------------------------------------------------------ >+# Func: GetFiles() >+# Desc: Extract a list of files from the given URL. In the case of GitHub, >+# we are actually pulling the files from the project's Atom feed and >+# extract the release url, containing the tag it was based on. >+# >+# Args: $url - URL we would normally fetch from. >+# \%port - Port hash fetched from database. >+# \@files - Array to put files into. >+# >+# Retn: $success - False if file list could not be constructed; else, true. >+#------------------------------------------------------------------------------ >+ >+sub GetFiles >+{ >+ my $self = shift; >+ >+ my ($url, $port, $files) = @_; >+ my $projname; >+ >+ if ($url =~ /https:\/\/github\.com\/(.*?)\/archive\//) { >+ $projname = $1; >+ } elsif ($url =~ /https:\/\/github.com\/downloads\/(.*)\//) { >+ $projname = $1; >+ } >+ >+ if ($projname) { >+ my ($query, $ua, $response, $items, $json); >+ >+ # First check if there's a latest releases endpoint >+ $query = 'https://api.github.com/repos/' . $projname . '/releases/latest'; >+ >+ _debug("GET $query"); >+ $ua = LWP::UserAgent->new; >+ $ua->agent(USER_AGENT); >+ $ua->timeout($settings{http_timeout}); >+ >+ $response = $ua->request(HTTP::Request->new(GET => $query)); >+ >+ if (!$response->is_success || $response->status_line !~ /^2/) { >+ _debug('GET failed: ' . $response->status_line); >+ # Project didn't do any releases, so let's try tags instead. >+ $query = 'https://api.github.com/repos/' . $projname . '/tags'; >+ _debug("GET $query"); >+ $ua = LWP::UserAgent->new; >+ $ua->agent(USER_AGENT); >+ $ua->timeout($settings{http_timeout}); >+ >+ $response = $ua->request(HTTP::Request->new(GET => $query)); >+ >+ if (!$response->is_success || $response->status_line !~ /^2/) { >+ _debug('GET failed: ' . $response->status_line); >+ return 0; >+ } >+ >+ $json = decode_json($response->decoded_content); >+ foreach my $tag (@$json) { >+ my $tag_url = $tag->{tarball_url}; >+ push(@$files, $tag_url); >+ } >+ >+ _debug('Found ' . scalar @$files . ' files'); >+ return 1; >+ } >+ >+ $json = decode_json($response->decoded_content); >+ push(@$files, $json->{tarball_url}); >+ >+ _debug('Found ' . scalar @$files . ' files'); >+ } else { >+ return 0; >+ } >+ >+ return 1; >+} >+ >+ >+#------------------------------------------------------------------------------ >+# Func: _debug() >+# Desc: Print a debug message. >+# >+# Args: $msg - Message. >+# >+# Retn: n/a >+#------------------------------------------------------------------------------ >+ >+sub _debug >+{ >+ my ($msg) = @_; >+ >+ $msg = '' if (!$msg); >+ >+ print STDERR "(" . __PACKAGE__ . ") $msg\n" if ($settings{debug}); >+} >+ >+1; > >Property changes on: ports-mgmt/portscout/files/files-Portscout-SiteHandler-GitHub.pm >___________________________________________________________________ >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:keywords >## -0,0 +1 ## >+FreeBSD=%H >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: ports-mgmt/portscout/files/files-Portscout-SiteHandler-PyPI.pm >=================================================================== >--- ports-mgmt/portscout/files/files-Portscout-SiteHandler-PyPI.pm (nonexistent) >+++ ports-mgmt/portscout/files/files-Portscout-SiteHandler-PyPI.pm (working copy) >@@ -0,0 +1,147 @@ >+#------------------------------------------------------------------------------ >+# Copyright (C) 2015, Jasper Lievisse Adriaanse <jasper@openbsd.org> >+# >+# Permission to use, copy, modify, and distribute this software for any >+# purpose with or without fee is hereby granted, provided that the above >+# copyright notice and this permission notice appear in all copies. >+# >+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES >+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF >+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR >+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES >+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN >+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF >+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. >+# >+#------------------------------------------------------------------------------ >+ >+package Portscout::SiteHandler::PyPI; >+ >+use JSON qw(decode_json); >+use LWP::UserAgent; >+ >+use Portscout::Const; >+use Portscout::Config; >+ >+use strict; >+ >+require 5.006; >+ >+ >+#------------------------------------------------------------------------------ >+# Globals >+#------------------------------------------------------------------------------ >+ >+push @Portscout::SiteHandler::sitehandlers, __PACKAGE__; >+ >+our %settings; >+ >+ >+#------------------------------------------------------------------------------ >+# Func: new() >+# Desc: Constructor. >+# >+# Args: n/a >+# >+# Retn: $self >+#------------------------------------------------------------------------------ >+ >+sub new >+{ >+ my $self = {}; >+ my $class = shift; >+ >+ $self->{name} = 'PyPI'; >+ >+ bless ($self, $class); >+ return $self; >+} >+ >+ >+#------------------------------------------------------------------------------ >+# Func: CanHandle() >+# Desc: Ask if this handler (package) can handle the given site. >+# >+# Args: $url - URL of site. >+# >+# Retn: $res - true/false. >+#------------------------------------------------------------------------------ >+ >+sub CanHandle >+{ >+ my $self = shift; >+ >+ my ($url) = @_; >+ >+ return ($url =~ /https?:\/\/pypi\.python\.org\//); >+} >+ >+ >+#------------------------------------------------------------------------------ >+# Func: GetFiles() >+# Desc: Extract a list of files from the given URL. Simply query the API. >+# >+# Args: $url - URL we would normally fetch from. >+# \%port - Port hash fetched from database. >+# \@files - Array to put files into. >+# >+# Retn: $success - False if file list could not be constructed; else, true. >+#------------------------------------------------------------------------------ >+ >+sub GetFiles >+{ >+ my $self = shift; >+ >+ my ($url, $port, $files) = @_; >+ >+ my ($pypi, $package, $resp, $query, $ua); >+ $pypi = 'https://pypi.python.org/pypi/'; >+ >+ # Strip all the digits at the end to keep the stem of the module. >+ if ($port->{distname} =~ /(.*?)-(\d+)/) { >+ $package = $1; >+ } >+ >+ $query = $pypi . $package . '/json'; >+ >+ _debug("GET $query"); >+ $ua = LWP::UserAgent->new; >+ $ua->agent(USER_AGENT); >+ $resp = $ua->request(HTTP::Request->new(GET => $query)); >+ if ($resp->is_success) { >+ my ($json, $info, $version); >+ >+ $json = decode_json($resp->decoded_content); >+ $info = $json->{info}; >+ $version = $info->{version}; >+ next unless $version; >+ >+ push(@$files, $json->{releases}{$version}[0]{filename}); >+ } else { >+ _debug("GET failed: " . $resp->code); >+ return 0; >+ } >+ >+ return 1; >+} >+ >+ >+#------------------------------------------------------------------------------ >+# Func: _debug() >+# Desc: Print a debug message. >+# >+# Args: $msg - Message. >+# >+# Retn: n/a >+#------------------------------------------------------------------------------ >+ >+sub _debug >+{ >+ my ($msg) = @_; >+ >+ $msg = '' if (!$msg); >+ >+ print STDERR "(" . __PACKAGE__ . ") $msg\n" if ($settings{debug}); >+} >+ >+1; > >Property changes on: ports-mgmt/portscout/files/files-Portscout-SiteHandler-PyPI.pm >___________________________________________________________________ >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:keywords >## -0,0 +1 ## >+FreeBSD=%H >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: ports-mgmt/portscout/files/patch-Portscout_DataSrc_Ports.pm >=================================================================== >--- ports-mgmt/portscout/files/patch-Portscout_DataSrc_Ports.pm (nonexistent) >+++ ports-mgmt/portscout/files/patch-Portscout_DataSrc_Ports.pm (working copy) >@@ -0,0 +1,80 @@ >+--- Portscout/DataSrc/Ports.pm.orig 2011-04-09 17:19:03 UTC >++++ Portscout/DataSrc/Ports.pm >+@@ -201,7 +201,7 @@ sub BuildDB >+ >+ my $lastbuild = getstat('buildtime', TYPE_INT); >+ >+- print "Looking for updated ports...\n\n" >++ print "Incremental build: Looking for updated ports...\n\n" >+ if ($incremental); >+ >+ $got_ports = 0; >+@@ -243,12 +243,15 @@ sub BuildDB >+ my (@fields, $maintainer, $port); >+ >+ @fields = split /\|/; >+- $maintainer = $fields[5]; >++ $maintainer = lc($fields[5]); >+ $port = $fields[1]; >+ $port =~ s/^(?:.*\/)?([^\/]+)\/([^\/]+)$/$1\/$2/; >+ >+- $portsmaintok{$port} = $maintainer >+- if ($maintainers{$maintainer}); >++ if ($maintainers{$maintainer}) { >++ $portsmaintok{$port} = $maintainer; >++ print "Maintainer match: $maintainer $port \n" >++ unless ($settings{quiet}); >++ } >+ } >+ >+ close $if; >+@@ -264,7 +267,7 @@ sub BuildDB >+ >+ opendir my $catdir, $settings{ports_dir}."/$cat"; >+ >+- print "Scanning $cat...\n" >++ print "Scanning $cat ...\n" >+ unless ($settings{quiet}); >+ >+ while (my $name = readdir $catdir) { >+@@ -276,9 +279,9 @@ sub BuildDB >+ # port directory's mtime; skip if not updated. >+ if ($incremental) { >+ my ($updated); >+- >+ opendir my $portdir, $settings{ports_dir}."/$cat/$name"; >+- >++ print "Scanning $cat/$name ... " >++ unless ($settings{debug}); >+ while (my $subfile = readdir $portdir) { >+ my ($subfile_path, $fi); >+ >+@@ -289,12 +292,18 @@ sub BuildDB >+ or die "Couldn't stat $subfile_path: $!"; >+ >+ if ($fi->mtime > $lastbuild) { >++ print "$subfile (mtime: $fi->mtime) modified updated since last build: $lastbuild \n" >++ unless ($settings{debug}); >+ $updated = 1; >+ last; >+ } >+ } >+ >+- next if (!$updated); >++ if (!$updated) { >++ print "Not modified since last build: $lastbuild \n" >++ unless ($settings{debug}); >++ next; >++ } >+ } >+ >+ # Check this port is wanted by user >+@@ -307,7 +316,7 @@ sub BuildDB >+ && $settings{indexfile_enable}) { >+ next if (!$portsmaintok{"$cat/$name"}); >+ } >+- >++ print "Matched: " . $cat/$name . "\n"; >+ push @ports, "$cat/$name"; >+ } >+ } > >Property changes on: ports-mgmt/portscout/files/patch-Portscout_DataSrc_Ports.pm >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:keywords >## -0,0 +1 ## >+FreeBSD=%H >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: ports-mgmt/portscout/files/patch-Portscout_SiteHandler.pm >=================================================================== >--- ports-mgmt/portscout/files/patch-Portscout_SiteHandler.pm (nonexistent) >+++ ports-mgmt/portscout/files/patch-Portscout_SiteHandler.pm (working copy) >@@ -0,0 +1,11 @@ >+--- Portscout/SiteHandler.pm.orig 2010-04-29 01:07:51 UTC >++++ Portscout/SiteHandler.pm >+@@ -31,6 +31,8 @@ package Portscout::SiteHandler; >+ use XML::XPath; >+ use XML::XPath::XMLParser; >+ >++use Portscout::SiteHandler::GitHub; >++use Portscout::SiteHandler::PyPI; >+ use Portscout::SiteHandler::SourceForge; >+ >+ use strict; > >Property changes on: ports-mgmt/portscout/files/patch-Portscout_SiteHandler.pm >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:keywords >## -0,0 +1 ## >+FreeBSD=%H >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: ports-mgmt/portscout/files/patch-Portscout_SiteHandler_GitHub.pm >=================================================================== >--- ports-mgmt/portscout/files/patch-Portscout_SiteHandler_GitHub.pm (nonexistent) >+++ ports-mgmt/portscout/files/patch-Portscout_SiteHandler_GitHub.pm (working copy) >@@ -0,0 +1,13 @@ >+--- Portscout/SiteHandler/GitHub.pm.orig 2015-10-24 04:02:57 UTC >++++ Portscout/SiteHandler/GitHub.pm >+@@ -97,7 +97,9 @@ sub GetFiles >+ my ($url, $port, $files) = @_; >+ my $projname; >+ >+- if ($url =~ /https:\/\/github\.com\/(.*?)\/archive\//) { >++ if ($url =~ /https?:\/\/codeload\.github\.com\/(.*?)\/tar.gz\//) { >++ $projname = $1; >++ } elsif ($url =~ /https:\/\/github\.com\/(.*?)\/archive\//) { >+ $projname = $1; >+ } elsif ($url =~ /https:\/\/github.com\/downloads\/(.*)\//) { >+ $projname = $1; > >Property changes on: ports-mgmt/portscout/files/patch-Portscout_SiteHandler_GitHub.pm >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:keywords >## -0,0 +1 ## >+FreeBSD=%H >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: ports-mgmt/portscout/files/patch-Portscout_SiteHandler_PyPI.pm >=================================================================== >--- ports-mgmt/portscout/files/patch-Portscout_SiteHandler_PyPI.pm (nonexistent) >+++ ports-mgmt/portscout/files/patch-Portscout_SiteHandler_PyPI.pm (working copy) >@@ -0,0 +1,11 @@ >+--- Portscout/SiteHandler/PyPI.pm.orig 2015-10-24 04:03:07 UTC >++++ Portscout/SiteHandler/PyPI.pm >+@@ -115,7 +115,7 @@ sub GetFiles >+ $info = $json->{info}; >+ $version = $info->{version}; >+ next unless $version; >+- >++ _debug("GET success: " . $resp->code . " Filename: " . $json->{releases}{$version}[0]{filename}); >+ push(@$files, $json->{releases}{$version}[0]{filename}); >+ } else { >+ _debug("GET failed: " . $resp->code); > >Property changes on: ports-mgmt/portscout/files/patch-Portscout_SiteHandler_PyPI.pm >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:keywords >## -0,0 +1 ## >+FreeBSD=%H >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: ports-mgmt/portscout/files/patch-portscout.pl >=================================================================== >--- ports-mgmt/portscout/files/patch-portscout.pl (nonexistent) >+++ ports-mgmt/portscout/files/patch-portscout.pl (working copy) >@@ -0,0 +1,47 @@ >+--- portscout.pl.orig 2015-10-24 04:02:57 UTC >++++ portscout.pl >+@@ -463,7 +463,7 @@ sub VersionCheck >+ >+ $i++; >+ >+- info($k, 'Checking site: ' . strchop($site, 60)); >++ info($k, 'Checking site: ' . strchop($site, 200)); >+ >+ # Look to see if the URL contains the distfile version. >+ # This will affect our checks and guesses later on. >+@@ -493,6 +493,7 @@ sub VersionCheck >+ } >+ >+ # Check for special handler for this site first >++ print "Checking for site handler for $site \n"; >+ if (my $sh = Portscout::SiteHandler->FindHandler($site)) >+ { >+ info($k, $site, 'Using dedicated site handler for site.'); >+@@ -699,7 +700,7 @@ sub VersionCheck >+ # We keep a counter of "lies" from each site, and only >+ # re-check every so often. >+ >+- if ($sitedata->{liecount} > 0) { >++ if ($sitedata->{liecount} > 0 && $settings{skip_liars}) { >+ info($k, $site, 'Not doing any guessing; site has previously lied.'); >+ $sths->{sitedata_decliecount}->execute($sitedata->{host}) >+ unless($settings{precious_data}); >+@@ -713,7 +714,8 @@ sub VersionCheck >+ >+ # Got a response which wasn't HTTP 4xx -> bail out >+ if ($response->is_success && $response->status_line !~ /^4/) { >+- info($k, $site, 'Not doing any guessing; site is lieing to us.'); >++ print "URL: $url\n"; >++ info($k, $site, "Skip guessing: Response not 4xx to a file that shouldnt exist (". $response->status_line .")"); >+ $sths->{sitedata_initliecount}->execute($sitedata->{host}) >+ unless($settings{precious_data}); >+ next; >+@@ -797,7 +799,7 @@ sub VersionCheck >+ $new_found = 1; >+ last; >+ } else { >+- info($k, $site, "Guess failed $port->{ver} -> $guess_v"); >++ info($k, $site, "Guess failed $port->{ver} -> $guess_v (". $response->status_line .")"); >+ } >+ >+ last if ($new_found); > >Property changes on: ports-mgmt/portscout/files/patch-portscout.pl >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:executable >## -0,0 +1 ## >+* >\ No newline at end of property >Added: svn:keywords >## -0,0 +1 ## >+FreeBSD=%H >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: ports-mgmt/portscout/pkg-plist >=================================================================== >--- ports-mgmt/portscout/pkg-plist (revision 400103) >+++ ports-mgmt/portscout/pkg-plist (working copy) >@@ -14,19 +14,21 @@ > %%DATADIR%%/sql/sqlite_init.sql > %%DATADIR%%/sql/sqlite_destroy.sql > %%DATADIR%%/sql/sqlite_upgrade_0.8_to_0.8.1.sql >-%%SITE_PERL%%/Portscout/SQL/SQLite.pm >-%%SITE_PERL%%/Portscout/SQL/Pg.pm >-%%SITE_PERL%%/Portscout/SiteHandler/SourceForge.pm >+%%SITE_PERL%%/Portscout.pm >+%%SITE_PERL%%/Portscout/API.pm >+%%SITE_PERL%%/Portscout/Config.pm >+%%SITE_PERL%%/Portscout/Const.pm >+%%SITE_PERL%%/Portscout/DataSrc.pm > %%SITE_PERL%%/Portscout/DataSrc/Ports.pm > %%SITE_PERL%%/Portscout/DataSrc/XML.pm >+%%SITE_PERL%%/Portscout/Make.pm >+%%SITE_PERL%%/Portscout/SQL.pm >+%%SITE_PERL%%/Portscout/SQL/Pg.pm >+%%SITE_PERL%%/Portscout/SQL/SQLite.pm > %%SITE_PERL%%/Portscout/SiteHandler.pm >-%%SITE_PERL%%/Portscout/SQL.pm >-%%SITE_PERL%%/Portscout/Make.pm >-%%SITE_PERL%%/Portscout/Const.pm >-%%SITE_PERL%%/Portscout/DataSrc.pm >+%%SITE_PERL%%/Portscout/SiteHandler/GitHub.pm >+%%SITE_PERL%%/Portscout/SiteHandler/PyPI.pm >+%%SITE_PERL%%/Portscout/SiteHandler/SourceForge.pm > %%SITE_PERL%%/Portscout/Template.pm > %%SITE_PERL%%/Portscout/Util.pm >-%%SITE_PERL%%/Portscout/API.pm >-%%SITE_PERL%%/Portscout/Config.pm >-%%SITE_PERL%%/Portscout.pm > %%SITE_PERL%%/portscout.pod
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 198877
:
162410