summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-sysadm/attachments/20110128/0abd8443/attachment.html
blob: 995238bd4285b825cfec62dbbecb048ccd5ffbe2 (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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[371] add binrepo revision options</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd>371</dd>
<dt>Author</dt> <dd>boklm</dd>
<dt>Date</dt> <dd>2011-01-28 19:27:48 +0100 (Fri, 28 Jan 2011)</dd>
</dl>

<h3>Log Message</h3>
<pre>add binrepo revision options</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#build_systemmgarepotrunkMgaRepobinrepopy">build_system/mgarepo/trunk/MgaRepo/binrepo.py</a></li>
<li><a href="#build_systemmgarepotrunkMgaRepocommandscopy">build_system/mgarepo/trunk/MgaRepo/commands/co.py</a></li>
<li><a href="#build_systemmgarepotrunkMgaRepocommandsgetsrpmpy">build_system/mgarepo/trunk/MgaRepo/commands/getsrpm.py</a></li>
<li><a href="#build_systemmgarepotrunkMgaRepocommandsmarkreleasepy">build_system/mgarepo/trunk/MgaRepo/commands/markrelease.py</a></li>
<li><a href="#build_systemmgarepotrunkMgaReporpmutilpy">build_system/mgarepo/trunk/MgaRepo/rpmutil.py</a></li>
</ul>

</div>
<div id="patch"><pre>
<a id="build_systemmgarepotrunkMgaRepobinrepopy">Modified: build_system/mgarepo/trunk/MgaRepo/binrepo.py</a>
===================================================================
--- build_system/mgarepo/trunk/MgaRepo/binrepo.py	2011-01-28 17:49:40 UTC (rev 370)
+++ build_system/mgarepo/trunk/MgaRepo/binrepo.py	2011-01-28 18:27:48 UTC (rev 371)
@@ -151,7 +151,7 @@
         os.symlink(linkpath, destpath)
 
 def download(targetdir, pkgdirurl=None, export=False, show=True,
-        revision=None, symlinks=True, check=False):
+        revision=None, binrev=None, symlinks=True, check=False):
     assert not export or (export and pkgdirurl)
     svn = SVN()
     sourcespath = os.path.join(targetdir, &quot;SOURCES&quot;)
@@ -160,8 +160,7 @@
         topurl = translate_url(pkgdirurl)
     else:
         topurl = translate_topdir(targetdir)
-    binrev = None
-    if revision:
+    if revision and not binrev:
         if pkgdirurl:
             binrev = mapped_revision(pkgdirurl, revision)
         else:
@@ -409,9 +408,10 @@
     binrev = &quot;{%s}&quot; % date
     return binrev
 
-def markrelease(sourceurl, releasesurl, version, release, revision):
+def markrelease(sourceurl, releasesurl, version, release, revision, binrev):
     svn = SVN()
-    binrev = mapped_revision(sourceurl, revision)
+    if not binrev:
+	binrev = mapped_revision(sourceurl, revision)
     binsource = translate_url(sourceurl)
     binreleases = translate_url(releasesurl)
     versiondir = mirror._joinurl(binreleases, version)

<a id="build_systemmgarepotrunkMgaRepocommandscopy">Modified: build_system/mgarepo/trunk/MgaRepo/commands/co.py</a>
===================================================================
--- build_system/mgarepo/trunk/MgaRepo/commands/co.py	2011-01-28 17:49:40 UTC (rev 370)
+++ build_system/mgarepo/trunk/MgaRepo/commands/co.py	2011-01-28 18:27:48 UTC (rev 371)
@@ -19,6 +19,7 @@
     -d      The distribution branch to checkout from
     -b      The package branch
     -r REV  Revision to checkout
+    -R REV  binrepo revision to checkout
     -S      Do not download sources from the binaries repository
     -L      Do not make symlinks of the binaries downloaded in SOURCES/
     -s      Only checkout the SPECS/ directory
@@ -37,6 +38,7 @@
 def parse_options():
     parser = OptionParser(help=HELP)
     parser.add_option(&quot;-r&quot;, dest=&quot;revision&quot;)
+    parser.add_option(&quot;-R&quot;, dest=&quot;binrev&quot;)
     parser.add_option(&quot;-S&quot;, dest=&quot;use_binrepo&quot;, default=True,
             action=&quot;store_false&quot;)
     parser.add_option(&quot;--check&quot;, dest=&quot;binrepo_check&quot;, default=False,

<a id="build_systemmgarepotrunkMgaRepocommandsgetsrpmpy">Modified: build_system/mgarepo/trunk/MgaRepo/commands/getsrpm.py</a>
===================================================================
--- build_system/mgarepo/trunk/MgaRepo/commands/getsrpm.py	2011-01-28 17:49:40 UTC (rev 370)
+++ build_system/mgarepo/trunk/MgaRepo/commands/getsrpm.py	2011-01-28 18:27:48 UTC (rev 371)
@@ -24,6 +24,7 @@
     -p         Use files in pristine/ directory
     -v VER     Use files from the version specified by VER (e.g. 2.2.1-2cl)
     -r REV     Use files from current directory, in revision REV (e.g. 1001)
+    -R REV     Use binrepo files from current directory, in revision REV (e.g. 1001)
     -t DIR     Put SRPM file in directory DIR when done (default is &quot;.&quot;)
     -P USER    Define the RPM packager inforamtion to USER
     -s FILE    Run script with &quot;FILE TOPDIR SPECFILE&quot; command
@@ -41,7 +42,7 @@
     mgarepo getsrpm -l python
     mgarepo getsrpm http://foo.bar/svn/cnc/snapshot/python
     mgarepo getsrpm -p http://foo.bar/svn/cnc/releases/8cl/python
-    mgarepo getsrpm -r 1001 file:///svn/cnc/snapshot/python
+    mgarepo getsrpm -r 1001 -R 101 file:///svn/cnc/snapshot/python
 &quot;&quot;&quot;
 
 def mode_callback(option, opt, val, parser, mode):
@@ -78,6 +79,7 @@
     parser.add_option(&quot;-n&quot;, dest=&quot;revname&quot;, action=&quot;store_true&quot;)
     parser.add_option(&quot;-l&quot;, dest=&quot;svnlog&quot;, action=&quot;store_true&quot;)
     parser.add_option(&quot;-T&quot;, dest=&quot;template&quot;, type=&quot;string&quot;, default=None)
+    parser.add_option(&quot;-R&quot;, dest=&quot;binrev&quot;, type=&quot;string&quot;, default=None)
     parser.add_option(&quot;-S&quot;, dest=&quot;use_binrepo&quot;, default=True,
             action=&quot;store_false&quot;)
     parser.add_option(&quot;--check&quot;, dest=&quot;binrepo_check&quot;, default=False,

<a id="build_systemmgarepotrunkMgaRepocommandsmarkreleasepy">Modified: build_system/mgarepo/trunk/MgaRepo/commands/markrelease.py</a>
===================================================================
--- build_system/mgarepo/trunk/MgaRepo/commands/markrelease.py	2011-01-28 17:49:40 UTC (rev 370)
+++ build_system/mgarepo/trunk/MgaRepo/commands/markrelease.py	2011-01-28 18:27:48 UTC (rev 371)
@@ -30,6 +30,7 @@
 Options:
     -f FILE Try to extract information from given file
     -r REV  Revision which will be used to make the release copy tag
+    -R REV  binrepo revision which will be used to make the release copy tag
     -v VER  Version which will be used to make the release copy tag
     -n      Append package name to provided URL
     -h      Show this message
@@ -51,9 +52,11 @@
     parser = OptionParser(help=HELP)
     parser.defaults[&quot;version&quot;] = None
     parser.defaults[&quot;release&quot;] = None
+    parser.defaults[&quot;binrev&quot;] = None
     parser.add_option(&quot;-v&quot;, action=&quot;callback&quot;, callback=version_callback,
             nargs=1, type=&quot;string&quot;, dest=&quot;__ignore&quot;)
     parser.add_option(&quot;-r&quot;, dest=&quot;revision&quot;)
+    parser.add_option(&quot;-R&quot;, dest=&quot;binrev&quot;)
     parser.add_option(&quot;-f&quot;, dest=&quot;filename&quot;)
     parser.add_option(&quot;-n&quot;, dest=&quot;appendname&quot;, action=&quot;store_true&quot;)
     opts, args = parser.parse_args()

<a id="build_systemmgarepotrunkMgaReporpmutilpy">Modified: build_system/mgarepo/trunk/MgaRepo/rpmutil.py</a>
===================================================================
--- build_system/mgarepo/trunk/MgaRepo/rpmutil.py	2011-01-28 17:49:40 UTC (rev 370)
+++ build_system/mgarepo/trunk/MgaRepo/rpmutil.py	2011-01-28 18:27:48 UTC (rev 371)
@@ -61,6 +61,7 @@
              version = None,
              release = None,
              revision = None,
+             binrev = None,
              packager = &quot;&quot;,
              revname = 0,
              svnlog = 0,
@@ -105,7 +106,7 @@
             binrepo_check = (binrepo_check or 
                     config.getbool(&quot;binrepo&quot;, &quot;getsrpm-check&quot;, False))
             download_binaries(tmpdir, geturl, revision=revision,
-                    export=True, check=binrepo_check)
+                    binrev=binrev, export=True, check=binrepo_check)
         srpmsdir = os.path.join(tmpdir, &quot;SRPMS&quot;)
         os.mkdir(srpmsdir)
         specsdir = os.path.join(tmpdir, &quot;SPECS&quot;)
@@ -462,7 +463,7 @@
             &quot;nocurrent&quot;: nocurrent,
             &quot;nopristine&quot;: nopristine}
 
-def checkout(pkgdirurl, path=None, revision=None, branch=None, distro=None,
+def checkout(pkgdirurl, path=None, revision=None, binrev=None, branch=None, distro=None,
         spec=False, use_binrepo=False, binrepo_check=True, binrepo_link=True):
     o_pkgdirurl = pkgdirurl
     pkgdirurl = layout.package_url(o_pkgdirurl, distro=distro)
@@ -477,7 +478,7 @@
     svn = SVN()
     svn.checkout(current, path, rev=revision, show=1)
     if use_binrepo:
-        download_binaries(path, revision=revision, symlinks=binrepo_link,
+        download_binaries(path, revision=revision, binrev=binrev, symlinks=binrepo_link,
                 check=binrepo_check)
     
 def getpkgtopdir(basedir=None):
@@ -609,13 +610,13 @@
     return sources
     
 def download_binaries(target, pkgdirurl=None, export=False, revision=None,
-        symlinks=True, check=False):
+        binrev=None, symlinks=True, check=False):
     refurl = pkgdirurl
     if refurl is None:
         refurl = binrepo.svn_root(target)
     if binrepo.enabled(refurl):
         binrepo.download(target, pkgdirurl, export=export,
-                revision=revision, symlinks=symlinks, check=check)
+                revision=revision, binrev=binrev symlinks=symlinks, check=check)
 
 def update(target=None):
     svn = SVN()

</pre></div>

</body>
</html>