summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-sysadm/2011-January/001564.html
blob: e851c2def736be0a7e3c27a7c7e40b2bb4382c06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
 <HEAD>
   <TITLE> [Mageia-sysadm] [217] remove Mandriva_upload_pre.pm as it seems to	be obsolete and not used
   </TITLE>
   <LINK REL="Index" HREF="index.html" >
   <LINK REL="made" HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20%5B217%5D%20remove%20Mandriva_upload_pre.pm%20as%20it%20seems%20to%0A%09be%20obsolete%20and%20not%20used&In-Reply-To=%3C20110106021129.2679E419C7%40valstar.mageia.org%3E">
   <META NAME="robots" CONTENT="index,nofollow">
   <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
   <LINK REL="Previous"  HREF="001563.html">
   <LINK REL="Next"  HREF="001565.html">
 </HEAD>
 <BODY BGCOLOR="#ffffff">
   <H1>[Mageia-sysadm] [217] remove Mandriva_upload_pre.pm as it seems to	be obsolete and not used</H1>
    <B>root at mageia.org</B> 
    <A HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20%5B217%5D%20remove%20Mandriva_upload_pre.pm%20as%20it%20seems%20to%0A%09be%20obsolete%20and%20not%20used&In-Reply-To=%3C20110106021129.2679E419C7%40valstar.mageia.org%3E"
       TITLE="[Mageia-sysadm] [217] remove Mandriva_upload_pre.pm as it seems to	be obsolete and not used">root at mageia.org
       </A><BR>
    <I>Thu Jan  6 03:11:29 CET 2011</I>
    <P><UL>
        <LI>Previous message: <A HREF="001563.html">[Mageia-sysadm] Request of mailing lists for i18n language teams
</A></li>
        <LI>Next message: <A HREF="001565.html">[Mageia-sysadm] [218] rename Mandriva_upload.pm to Mageia_upload.pm
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#1564">[ date ]</a>
              <a href="thread.html#1564">[ thread ]</a>
              <a href="subject.html#1564">[ subject ]</a>
              <a href="author.html#1564">[ author ]</a>
         </LI>
       </UL>
    <HR>  
<!--beginarticle-->
<PRE>Revision: 217
Author:   boklm
Date:     2011-01-06 03:11:28 +0100 (Thu, 06 Jan 2011)
Log Message:
-----------
remove Mandriva_upload_pre.pm as it seems to be obsolete and not used

Removed Paths:
-------------
    build_system/mdv-youri-core/trunk/lib/Youri/Repository/Mandriva_upload_pre.pm

Deleted: build_system/mdv-youri-core/trunk/lib/Youri/Repository/Mandriva_upload_pre.pm
===================================================================
--- build_system/mdv-youri-core/trunk/lib/Youri/Repository/Mandriva_upload_pre.pm	2011-01-06 01:08:18 UTC (rev 216)
+++ build_system/mdv-youri-core/trunk/lib/Youri/Repository/Mandriva_upload_pre.pm	2011-01-06 02:11:28 UTC (rev 217)
@@ -1,276 +0,0 @@
-# $Id: /local/youri/soft/trunk/lib/Youri/Upload/Action/RSS.pm 857 2006-01-29T10:15:43.298856Z guillaume  $
-package Youri::Repository::Mandriva_upload_pre;
-
-=head1 NAME
-
-Youri::Repository::PLF - PLF repository implementation
-
-=head1 DESCRIPTION
-
-This module implements PLF repository.
-
-=cut
-
-use warnings;
-use strict;
-use Carp;
-use Memoize;
-use File::Find 'find';
-use base qw/Youri::Repository/;
-use SVN::Client;
-use constant {
-    PACKAGE_CLASS   =&gt; 'Youri::Package::URPM',
-    PACKAGE_CHARSET =&gt; 'utf8'
-};
-
-memoize('_get_section');
-
-my @pkgsections = qw/core nonfree tainted/;
-
-sub _init {
-    my $self   = shift;
-    my %options = (
-        module =&gt; 'SPECS', # CVS module
-        noarch =&gt; 'i586', # noarch packages policy
-	svn    =&gt; '',
-	upload_root =&gt; '',
-        @_
-    );
-
-    $self-&gt;{_module} = $options{module};
-    $self-&gt;{_noarch} = $options{noarch};
-    $self-&gt;{_svn} = $options{svn};
-    $self-&gt;{_upload_root} = $options{upload_root};
-
-    my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime(time);
-    $year+=1900;
-    my $hostname = `hostname`;
-    my ($host) = $hostname =~ /([^.]*)/;
-    $self-&gt;{group_dir} = sprintf &quot;$ENV{SUDO_USER}.$host.$$.$year%02d%02d%02d%02d%02d&quot;, $mon, $mday, $hour, $min, $sec;
-}
-
-sub get_package_class {
-    return PACKAGE_CLASS;
-}
-
-sub package_in_svn {
-    my ($self, $srpm_name) = @_;
-    my $ctx = new SVN::Client(
-	auth =&gt; [SVN::Client::get_simple_provider(),
-	SVN::Client::get_simple_prompt_provider(\&amp;simple_prompt,2),
-	SVN::Client::get_username_provider()]
-    );
-
-    my $svn_entry = $ctx-&gt;ls(&quot;$self-&gt;{_svn}/&quot;, 'HEAD', 0);
-    foreach (keys %{$svn_entry}) {
-	if ($srpm_name eq $_) {
-	    print &quot;Package $_ is in the SVN\n&quot;;
-	    return 1
-	}
-    }
-}
-
-sub get_svn_url {
-    my ($self) = @_;
-    $self-&gt;{_svn}
-}
-
-sub get_revisions {
-    my ($self, $package, $target, $define, $filter) = @_;
-    croak &quot;Not a class method&quot; unless ref $self;
-    print &quot;Looking for package $package revisions for $target\n&quot;
-        if $self-&gt;{_verbose} &gt; 0;
-
-    my $arch = $define-&gt;{arch} || $package-&gt;get_arch;
-    if ($arch eq 'src') {
-	$arch = 'SRPMS'
-    } else {
-	$arch .= '/media'
-    }
-    my @packages;
-    foreach my $dir (@pkgsections) {
-	print &quot;Looking into $self-&gt;{_install_root}/$target/$arch/$dir/release\n&quot;;
-	push @packages, 
-	map { $self-&gt;get_package_class()-&gt;new(file =&gt; $_) }
-	$self-&gt;get_files(
-	    $self-&gt;{_install_root},
-	    &quot;$target/$arch/$dir/release&quot; ,
-	    $self-&gt;get_package_class()-&gt;get_pattern($package-&gt;get_name(),undef, undef, $arch)
-	);
-    }
-
-    @packages = grep { $filter-&gt;($_) } @packages if $filter;
-
-    return
-        sort { $b-&gt;compare($a) } # sort by revision order
-        @packages;
-}
-
-sub get_package_charset {
-    return PACKAGE_CHARSET;
-}
-
-sub get_upload_dir {
-    my ($self, $package, $target, $define) = @_;
-    croak &quot;Not a class method&quot; unless ref $self;
-    my $arch = $package-&gt;get_arch();
-    my $section = $self-&gt;_get_section($package, $target, $define);
-    my $media_path = $section eq 'main' ? $target  : $target =~ /^cooker/ ? &quot;contrib&quot; : &quot;$target/contrib&quot;;
-    my $arch_path = $arch eq 'src' ? 'SRPMS' : 'RPMS';
-    my $force = $target =~ /_force/ ? 'force' : '';
-    $self-&gt;{_upload_root} .  &quot;/$media_path/$force/$arch_path/&quot;
-}
-
-sub get_arch {
-    my ($self, $package, $target, $define) = @_;
-    my $arch = $package-&gt;get_arch();
-    if ($arch eq 'noarch') {
-	$arch = $self-&gt;{_noarch} 
-    }
-    $arch
-}
-
-sub get_install_path {
-    my ($self, $package, $target, $define) = @_;
-
-    return $self-&gt;_get_path($package, $target, $define);
-}
-
-sub get_archive_path {
-    my ($self, $package, $target, $define) = @_;
-
-    return $self-&gt;_get_path($package, $target, $define);
-}
-
-sub _get_path {
-    my ($self, $package, $target, $define) = @_;
-
-    my $arch = $package-&gt;get_arch;
-    if ($arch eq 'src') {
-	$arch = 'SRPMS'
-    } else {
-	$arch .= '/media'
-    }
-    my $section = $self-&gt;_get_section($package, $target, $define);
-
-    return &quot;$target/$arch/$section/release/&quot;;
-}
-
-
-sub get_version_path {
-    my ($self, $package, $target, $define) = @_;
-
-    my $section = $self-&gt;_get_section($package, $target, $define);
-
-    return &quot;$self-&gt;{_module}/$section/release/&quot;;
-}
-
-=head2 get_replaced_packages($package, $target, $define)
-
-Overrides parent method to add libified packages.
-
-=cut
-
-sub get_replaced_packages {
-    my ($self, $package, $target, $define) = @_;
-    croak &quot;Not a class method&quot; unless ref $self;
-
-    my @replaced_packages = 
-        $self-&gt;SUPER::get_replaced_packages($package, $target, $define);
-
-    # mandriva lib policy:
-    # library package names change with revision, making mandatory to
-    # duplicate older revisions search with a custom pattern
-    my $name = $package-&gt;get_name();
-    if ($name =~ /^(lib\w+[a-zA-Z_])[\d_\.]+([-\w]*)$/) {
-        push(@replaced_packages,
-            grep { $package-&gt;compare($_) &gt; 0 }
-            map { PACKAGE_CLASS-&gt;new(file =&gt; $_) }
-            $self-&gt;get_files(
-                $self-&gt;{_install_root},
-                $self-&gt;get_install_path($package, $target, $define),
-                PACKAGE_CLASS-&gt;get_pattern(
-                    $1 . '[\d_\.]+' . $2, # custom name pattern
-                    undef,
-                    undef,
-                    $package-&gt;get_arch()
-                ),
-            )
-        );
-    }
-
-    return @replaced_packages;
-       
-}
-
-sub _get_section {
-    my ($self, $package, $target, $define) = @_;
-
-    my $section;
-
-    # try to find section automatically
-    my $arch = $package-&gt;get_arch();
-    $arch = $self-&gt;{_noarch} if $arch eq 'noarch';
-
-    my $source_pattern = PACKAGE_CLASS-&gt;get_pattern(
-        $package-&gt;get_canonical_name(),
-        undef,
-        undef,
-        'src'
-    );
-
-    my $binary_pattern = PACKAGE_CLASS-&gt;get_pattern(
-        $package-&gt;get_name(),
-        undef,
-        undef,
-        $arch
-    );
-
-    # for each potential section, try to match
-    # a suitable source patten in source directory
-    # a suitable binary patten in binary directory
-    foreach my $dir (@pkgsections) {
-        next unless
-            $self-&gt;get_files(
-                $self-&gt;{_install_root},
-                &quot;$target/SRPMS/$dir/release&quot;,
-                $source_pattern
-            ) || $self-&gt;get_files(
-                $self-&gt;{_install_root},
-                &quot;$target/$arch/media/$dir/release&quot;,
-                $binary_pattern
-            );
-	print &quot;Section is $dir\n&quot;;
-        $section = $dir;
-        last;
-    }
-
-    # use defined section if not found
-    $section = $define-&gt;{section} unless $section;
-
-    $section || 'core'
-}
-
-sub get_upload_newer_revisions {
-    my ($self, $package, $target, $define) = @_;
-    croak &quot;Not a class method&quot; unless ref $self;
-    my $arch = $package-&gt;get_arch();
-    my $pattern = $self-&gt;get_package_class()-&gt;get_pattern($package-&gt;get_name(), undef, undef, $arch);
-    print &quot;Looking for package $package revisions for $target in $self-&gt;{_upload_root} (pattern $pattern)\n&quot;;
-    my @packages;
-    foreach my $dir ('cooker', 'contrib') {
-	find(sub { return if ! /^$pattern/; print &quot;Find $_\n&quot;; push @packages, $File::Find::name if $package-&gt;compare($self-&gt;get_package_class()-&gt;new(file =&gt; $File::Find::name)) &lt;= 0 }, &quot;$self-&gt;{_upload_root}/$dir&quot;);
-    }
-    return
-        @packages;
-}
-
-=head1 COPYRIGHT AND LICENSE
-
-Copyright (C) 2002-2006, YOURI project
-
-This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
-
-=cut
-
-1;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: &lt;/pipermail/mageia-sysadm/attachments/20110106/cface7f3/attachment-0001.html&gt;
</PRE>













<!--endarticle-->
    <HR>
    <P><UL>
        <!--threads-->
	<LI>Previous message: <A HREF="001563.html">[Mageia-sysadm] Request of mailing lists for i18n language teams
</A></li>
	<LI>Next message: <A HREF="001565.html">[Mageia-sysadm] [218] rename Mandriva_upload.pm to Mageia_upload.pm
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#1564">[ date ]</a>
              <a href="thread.html#1564">[ thread ]</a>
              <a href="subject.html#1564">[ subject ]</a>
              <a href="author.html#1564">[ author ]</a>
         </LI>
       </UL>

<hr>
<a href="https://www.mageia.org/mailman/listinfo/mageia-sysadm">More information about the Mageia-sysadm
mailing list</a><br>
</body></html>