diff options
Diffstat (limited to 'SBO-Lib/lib/SBO/Lib/Repo.pm')
-rw-r--r-- | SBO-Lib/lib/SBO/Lib/Repo.pm | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/SBO-Lib/lib/SBO/Lib/Repo.pm b/SBO-Lib/lib/SBO/Lib/Repo.pm index e920b6b..e2c5bae 100644 --- a/SBO-Lib/lib/SBO/Lib/Repo.pm +++ b/SBO-Lib/lib/SBO/Lib/Repo.pm @@ -4,9 +4,9 @@ use 5.016; use strict; use warnings; -our $VERSION = '2.1'; +our $VERSION = '2.5'; -use SBO::Lib::Util qw/ %config prompt usage_error get_slack_version script_error open_fh open_read in /; +use SBO::Lib::Util qw/ %config prompt usage_error get_slack_version script_error open_fh open_read in _ERR_DOWNLOAD /; use Cwd; use File::Copy; @@ -242,7 +242,7 @@ sub git_sbo_tree { } else { chdir $config{SBO_HOME} or return 0; remove_tree($repo_path) if -d $repo_path; - $res = system(qw/ git clone /, $url, $repo_path) == 0; + $res = system(qw/ git clone --no-local /, $url, $repo_path) == 0; } _race::cond '$cwd could be deleted here'; return 1 if chdir $cwd and $res; @@ -300,6 +300,8 @@ sub pull_sbo_tree { $res = git_sbo_tree($url); } + if ($res == 0) { warn "Could not sync from $url.\n"; exit _ERR_DOWNLOAD; } + my $wanted = sub { chown 0, 0, $File::Find::name; }; find($wanted, $repo_path) if -d $repo_path; if ($res and not chk_slackbuilds_txt()) { @@ -324,7 +326,7 @@ sub rsync_sbo_tree { my @info; # only slackware versions above 14.1 have an rsync that supports --info=progress2 if (versioncmp(get_slack_version(), '14.1') == 1) { @info = ('--info=progress2'); } - my @args = ('rsync', @info, '-a', '--exclude=*.tar.gz', '--exclude=*.tar.gz.asc', '--delete', $url); + my @args = ('rsync', @info, '-a', '--delete', $url); return system(@args, $repo_path) == 0; } @@ -378,7 +380,7 @@ Guldstrand <andreas.guldstrand@gmail.com>. The sbotools are licensed under the WTFPL <http://sam.zoy.org/wtfpl/COPYING>. -Copyright (C) 2012-2016, Jacob Pipkin, Luke Williams, Andreas Guldstrand. +Copyright (C) 2012-2017, Jacob Pipkin, Luke Williams, Andreas Guldstrand. =cut |