diff options
author | Thierry Vignaud <tv@mageia.org> | 2013-03-21 17:12:31 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2013-03-21 17:12:31 +0000 |
commit | e87bd3a7e7a00df990cce06e6f43badbc3442f55 (patch) | |
tree | ec005f1e85d896b2db80268871520db80e3bab44 | |
parent | c6d3e2c946d7feccb06059592e0223405ae778db (diff) | |
download | rpmdrake-e87bd3a7e7a00df990cce06e6f43badbc3442f55.tar rpmdrake-e87bd3a7e7a00df990cce06e6f43badbc3442f55.tar.gz rpmdrake-e87bd3a7e7a00df990cce06e6f43badbc3442f55.tar.bz2 rpmdrake-e87bd3a7e7a00df990cce06e6f43badbc3442f55.tar.xz rpmdrake-e87bd3a7e7a00df990cce06e6f43badbc3442f55.zip |
merge curl_download into Rpmdrake::edit_urpm_sources
rationale:
- it's its only user
- it has nothing to do with curl since 2008
(and old XS curl code wasn't used anymore since 2003-05-12 when gurpm*
stuff was merged in urpmi/gurpm*, grpmi/grpm.pl itself being killed on
2004-01-21)
- gc was lazy
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | Rpmdrake/edit_urpm_sources.pm | 20 | ||||
-rw-r--r-- | grpmi/Makefile | 37 | ||||
-rw-r--r-- | grpmi/curl_download/Makefile | 13 | ||||
-rwxr-xr-x | grpmi/curl_download/Makefile.PL | 9 | ||||
-rw-r--r-- | grpmi/curl_download/curl_download.pm | 24 |
6 files changed, 18 insertions, 87 deletions
@@ -1,7 +1,7 @@ VERSION = 5.43 NAME = rpmdrake -DIRS = grpmi po data mime +DIRS = po data mime PREFIX = /usr/local DATADIR = $(PREFIX)/share diff --git a/Rpmdrake/edit_urpm_sources.pm b/Rpmdrake/edit_urpm_sources.pm index 46cab7b5..960ac7f4 100644 --- a/Rpmdrake/edit_urpm_sources.pm +++ b/Rpmdrake/edit_urpm_sources.pm @@ -552,8 +552,7 @@ sub proxy_callback { my $medium_name = $medium ? $medium->{name} : ''; my $w = ugtk2->new(N("Configure proxies"), grab => 1, center => 1, transient => $::main_window); local $::main_window = $w->{real_window}; - require curl_download; - my ($proxy, $proxy_user) = curl_download::readproxy($medium_name); + my ($proxy, $proxy_user) = readproxy($medium_name); my ($user, $pass) = $proxy_user =~ /^([^:]*):(.*)$/; my ($proxybutton, $proxyentry, $proxyuserbutton, $proxyuserentry, $proxypasswordentry); my $sg = Gtk2::SizeGroup->new('horizontal'); @@ -618,7 +617,7 @@ sub proxy_callback { $w->main and do { $something_changed = 1; - curl_download::writeproxy($proxy, $proxy_user, $medium_name); + writeproxy($proxy, $proxy_user, $medium_name); }; } @@ -1211,5 +1210,20 @@ packages as well?")); $res; } +sub readproxy (;$) { + my $proxy = get_proxy($_[0]); + ($proxy->{http_proxy} || $proxy->{ftp_proxy} || '', + defined $proxy->{user} ? "$proxy->{user}:$proxy->{pwd}" : ''); +} + +sub writeproxy { + my ($proxy, $proxy_user, $o_media_name) = @_; + my ($user, $pwd) = split /:/, $proxy_user; + set_proxy_config(user => $user, $o_media_name); + set_proxy_config(pwd => $pwd, $o_media_name); + set_proxy_config(http_proxy => $proxy, $o_media_name); + set_proxy_config(ftp_proxy => $proxy, $o_media_name); + dump_proxy_config(); +} 1; diff --git a/grpmi/Makefile b/grpmi/Makefile deleted file mode 100644 index 29be902e..00000000 --- a/grpmi/Makefile +++ /dev/null @@ -1,37 +0,0 @@ - #****************************************************************************** - # - # Guillaume Cottenceau (gc@mandrakesoft.com) - # - # Copyright 2002 MandrakeSoft - # - # This software may be freely redistributed under the terms of the GNU - # public license. - # - # You should have received a copy of the GNU General Public License - # along with this program; if not, write to the Free Software - # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - # - #***************************************************************************** - -DIRS = curl_download - -PREFIX = /usr/local -DATADIR = $(PREFIX)/share -SBINDIR = $(PREFIX)/sbin - -all: dirs - -dirs: - @for n in . $(DIRS); do \ - [ "$$n" = "." ] || make -C $$n || exit 1 ;\ - done - -install: $(ALL) - @for n in $(DIRS); do \ - (cd $$n; $(MAKE) install) \ - done - -clean: - @for n in $(DIRS); do \ - (cd $$n; make clean) \ - done diff --git a/grpmi/curl_download/Makefile b/grpmi/curl_download/Makefile deleted file mode 100644 index 363ad0af..00000000 --- a/grpmi/curl_download/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -.PHONY: clean - -curl_download: - test -e Makefile_c || perl Makefile.PL - $(MAKE) -f Makefile_c - -install: - test -e Makefile_c || perl Makefile.PL - $(MAKE) -f Makefile_c install - -clean: - test ! -e Makefile_c || $(MAKE) -f Makefile_c clean - rm -f *~ *.o diff --git a/grpmi/curl_download/Makefile.PL b/grpmi/curl_download/Makefile.PL deleted file mode 100755 index 9bb1eebe..00000000 --- a/grpmi/curl_download/Makefile.PL +++ /dev/null @@ -1,9 +0,0 @@ -use ExtUtils::MakeMaker; - -WriteMakefile( - 'NAME' => 'curl_download', - 'INSTALLDIRS' => 'vendor', - 'VERSION_FROM' => 'curl_download.pm', # finds VERSION - 'INC' => '-I.', - 'MAKEFILE' => 'Makefile_c', -); diff --git a/grpmi/curl_download/curl_download.pm b/grpmi/curl_download/curl_download.pm deleted file mode 100644 index 034df5f6..00000000 --- a/grpmi/curl_download/curl_download.pm +++ /dev/null @@ -1,24 +0,0 @@ -package curl_download; - -use strict; -use urpm::download; - -our $VERSION = '1.2'; - -sub readproxy (;$) { - my $proxy = get_proxy($_[0]); - ($proxy->{http_proxy} || $proxy->{ftp_proxy} || '', - defined $proxy->{user} ? "$proxy->{user}:$proxy->{pwd}" : ''); -} - -sub writeproxy { - my ($proxy, $proxy_user, $o_media_name) = @_; - my ($user, $pwd) = split /:/, $proxy_user; - set_proxy_config(user => $user, $o_media_name); - set_proxy_config(pwd => $pwd, $o_media_name); - set_proxy_config(http_proxy => $proxy, $o_media_name); - set_proxy_config(ftp_proxy => $proxy, $o_media_name); - dump_proxy_config(); -} - -1; |