]> git.pld-linux.org Git - packages/poldek.git/blob - poldek-ignorearch.patch
- Patches should always be included in SRPM
[packages/poldek.git] / poldek-ignorearch.patch
1 diff -Nur old/doc/pl/poldek.1 new/doc/pl/poldek.1
2 --- old/doc/pl/poldek.1 2003-04-02 13:04:26.000000000 +0000
3 +++ new/doc/pl/poldek.1 2004-03-08 23:19:52.000000000 +0000
4 @@ -384,8 +384,8 @@
5  B±d¼ tolerancyjny w stosunku do zale¿no¶ci od wersji, które toleruje \s-1RPM\s0, np.:
6  pakiet A wymaga foo >= 1.0, podczas gdy pakiet B dostarcza \*(L"foo\*(R" be¿ ¿adnej
7  wersji.
8 -.Ip "\fB\*(--nodeps\fR; \fB\*(--justdb\fR; \fB\*(--force\fR; \fB\*(--root\fR;" 4
9 -.IX Item "nodeps; justdb; force; root;"
10 +.Ip "\fB\*(--nodeps\fR; \fB\*(--ignorearch\fR; \fB\*(--justdb\fR; \fB\*(--force\fR; \fB\*(--root\fR;" 4
11 +.IX Item "nodeps; ignorearch; justdb; force; root;"
12  Ma takie znaczenie jak w przypadku \s-1RPM\s0. Patrz nastêpna sekcja.
13  .Ip "\fB\-N, \-\-nofollow\fR" 4
14  .IX Item "-N, --nofollow"
15 @@ -423,6 +423,8 @@
16  .PD 0
17  .Ip "\(bu \-\-force" 4
18  .IX Item "--force"
19 +.Ip "\(bu \-\-ignorearch" 4
20 +.IX Item "--ignorearch"
21  .Ip "\(bu \-\-install" 4
22  .IX Item "--install"
23  .Ip "\(bu \-\-justdb" 4
24 diff -Nur old/doc/pl/poldek.pod new/doc/pl/poldek.pod
25 --- old/doc/pl/poldek.pod       2002-11-07 18:41:49.000000000 +0000
26 +++ new/doc/pl/poldek.pod       2004-03-08 23:20:25.000000000 +0000
27 @@ -289,7 +289,7 @@
28  pakiet A wymaga foo >= 1.0, podczas gdy pakiet B dostarcza "foo" be¿ ¿adnej
29  wersji.
30  
31 -=item B<--nodeps>; B<--justdb>; B<--force>; B<--root>;
32 +=item B<--nodeps>; B<--ignorearch>; B<--justdb>; B<--force>; B<--root>;
33  
34  Ma takie znaczenie jak w przypadku RPM. Patrz nastêpna sekcja.
35  
36 @@ -342,6 +342,8 @@
37  
38  =item * --force
39  
40 +=item * --ignorearch
41 +
42  =item * --install
43  
44  =item * --justdb
45 diff -Nur old/main.c new/main.c
46 --- old/main.c  2004-01-10 17:27:45.000000000 +0000
47 +++ new/main.c  2004-03-08 23:38:22.000000000 +0000
48 @@ -201,6 +201,7 @@
49  # define OPT_SHELL_CMD             1032
50  #endif
51  
52 +#define OPT_INST_IGNOREARCH       1040
53  #define OPT_INST_INSTDIST         1041
54  #define OPT_INST_UPGRDIST         1042
55  #define OPT_INST_NODEPS           1043
56 @@ -382,6 +383,10 @@
57  {"nodeps", OPT_INST_NODEPS, 0, 0,
58       N_("Install packages with broken dependencies"), 71 },
59      
60 +{"ignorearch", OPT_INST_IGNOREARCH, 0, 0,
61 +     N_("Allow installation or upgrading even if the architectures of the "
62 +                   "binary package and host don't match."), 71 },
63 +
64  {"force", OPT_INST_FORCE, 0, 0,
65       N_("Be unconcerned"), 71 },
66      
67 @@ -854,6 +859,10 @@
68              argsp->inst.flags  |= INSTS_NODEPS;
69              break;
70  
71 +        case OPT_INST_IGNOREARCH:
72 +            argsp->inst.flags  |= INSTS_IGNOREARCH;
73 +            break;
74 +
75          case OPT_INST_FORCE:
76              argsp->inst.flags |= INSTS_FORCE;
77              break;
78 @@ -933,6 +942,7 @@
79                      strncmp(optname, "install", 7) == 0 ||
80                      strncmp(optname, "upgrade", 7) == 0 ||
81                      strncmp(optname, "nodeps", 6) == 0  ||
82 +                   strncmp(optname, "ignorearch", 6) == 0  ||
83                      strncmp(optname, "justdb", 6) == 0  ||
84                      strncmp(optname, "test", 4) == 0    ||
85                      strncmp(optname, "root", 4) == 0)
86 diff -Nur old/pkgdb.h new/pkgdb.h
87 --- old/pkgdb.h 2002-04-05 15:58:52.000000000 +0000
88 +++ new/pkgdb.h 2004-03-08 22:16:55.000000000 +0000
89 @@ -12,6 +12,7 @@
90  #define PKGINST_NODEPS        (1 << 1) /* rpm --nodeps */
91  #define PKGINST_JUSTDB        (1 << 2) /* rpm --justdb */
92  #define PKGINST_TEST          (1 << 3) /* rpm --test */
93 +#define PKGINST_IGNOREARCH    (1 << 4) /* rpm --ignorearch */
94  #define PKGINST_FORCE         (1 << 6) /* rpm --force */
95  #define PKGINST_UPGRADE       (1 << 7) /* rpm -U  */
96  
97 diff -Nur old/pkgset.c new/pkgset.c
98 --- old/pkgset.c        2002-11-14 18:21:42.000000000 +0000
99 +++ new/pkgset.c        2004-03-08 21:09:57.000000000 +0000
100 @@ -637,6 +637,9 @@
101      if (instflags & INSTS_UPGRADE)
102          flags |= PKGINST_UPGRADE;
103  
104 +    if (instflags & INSTS_IGNOREARCH)
105 +        flags |= PKGINST_IGNOREARCH;
106 +
107      return flags;
108  }
109         
110 diff -Nur old/pkgset.h new/pkgset.h
111 --- old/pkgset.h        2003-04-02 14:54:08.000000000 +0000
112 +++ new/pkgset.h        2004-03-08 21:07:08.000000000 +0000
113 @@ -71,6 +71,7 @@
114  #define INSTS_CONFIRM_INST    (1 << 28) /* confirm_installation = yes  */
115  #define INSTS_CONFIRM_UNINST  (1 << 29) /* confirm_removal = yes  */
116  #define INSTS_EQPKG_ASKUSER   (1 << 30) /* choose_equivalents_manually = yes */
117 +#define INSTS_IGNOREARCH      (1 << 31) /* --ignorearch */
118  
119  #define INSTS_INTERACTIVE_ON  (INSTS_CONFIRM_INST | INSTS_EQPKG_ASKUSER)
120  
121 diff -Nur old/pkgset-install.c new/pkgset-install.c
122 --- old/pkgset-install.c        2003-12-30 18:19:52.000000000 +0000
123 +++ new/pkgset-install.c        2004-03-08 22:30:57.000000000 +0000
124 @@ -1662,19 +1662,22 @@
125  #endif
126  
127  
128 -static int valid_arch_os(tn_array *pkgs) 
129 +static int valid_arch_os(tn_array *pkgs, struct inst_s *inst)
130  {
131      int i, nerr = 0;
132      
133      for (i=0; i<n_array_size(pkgs); i++) {
134          struct pkg *pkg = n_array_nth(pkgs, i);
135  
136 +
137 +    if (inst->flags & (INSTS_IGNOREARCH)) { } else
138 +      {
139          if (pkg->arch && !rpmMachineScore(RPM_MACHTABLE_INSTARCH, pkg->arch)) {
140              logn(LOGERR, _("%s: package is for a different architecture (%s)"),
141                  pkg_snprintf_s(pkg), pkg->arch);
142              nerr++;
143          }
144 -        
145 +      }
146          if (pkg->os && !rpmMachineScore(RPM_MACHTABLE_INSTOS, pkg->os)) {
147              logn(LOGERR, _("%s: package is for a different operating system (%s)"),
148                  pkg_snprintf_s(pkg), pkg->os);
149 @@ -1952,7 +1955,7 @@
150          return 0;
151      
152      if ((inst->flags & (INSTS_JUSTPRINTS | INSTS_JUSTFETCH)) == 0)
153 -        if (!valid_arch_os(upg->install_pkgs)) 
154 +        if (!valid_arch_os(upg->install_pkgs,inst)) 
155              return 0;
156  
157  
158 diff -Nur old/po/pl.po new/po/pl.po
159 --- old/po/pl.po        2004-01-10 14:23:51.000000000 +0000
160 +++ new/po/pl.po        2004-03-09 00:04:13.000000000 +0000
161 @@ -550,6 +550,9 @@
162  msgid "no packages specified"
163  msgstr "nie podano pakietów"
164  
165 +msgid "Allow installation or upgrading even if the architectures of the binary package and host don't match."
166 +msgstr "Umo¿liwia instalacjê lub  uaktualnienie  nawet  w  wypadku,  gdy architektury binarnego pakietu i hosta nie odpowiadaj± sobie."
167 +
168  #: main.c:1871
169  msgid "I'm set*id'ed, give up"
170  msgstr "Mam ustawiony bit suid/sgid, wymiêkam"
171 diff -Nur old/poldek.1 new/poldek.1
172 --- old/poldek.1        2003-04-02 13:04:44.000000000 +0000
173 +++ new/poldek.1        2004-03-08 22:59:12.000000000 +0000
174 @@ -380,8 +380,8 @@
175  Be tolerant for unmatched versioned dependencies which \s-1RPM\s0 tolerates, e.g.
176  package A requires capability foo >= 1.0 while package B provides \*(L"foo\*(R"
177  without any version.
178 -.Ip "\fB\*(--nodeps\fR; \fB\*(--justdb\fR; \fB\*(--force\fR; \fB\*(--root\fR;" 4
179 -.IX Item "nodeps; justdb; force; root;"
180 +.Ip "\fB\*(--nodeps\fR; \fB\*(--ignorearch\fR; \fB\*(--justdb\fR; \fB\*(--force\fR; \fB\*(--root\fR;" 4
181 +.IX Item "nodeps; ignorearch; justdb; force; root;"
182  Have the same meanings like \s-1RPM\s0 ones. See next section.
183  .Ip "\fB\-N, \-\-nofollow\fR" 4
184  .IX Item "-N, --nofollow"
185 @@ -417,6 +417,8 @@
186  .PD 0
187  .Ip "\(bu \-\-force" 4
188  .IX Item "--force"
189 +.Ip "\(bu \-\-ignorearch" 4
190 +.IX Item "--ignorearch"
191  .Ip "\(bu \-\-install" 4
192  .IX Item "--install"
193  .Ip "\(bu \-\-justdb" 4
194 diff -Nur old/poldek.pod new/poldek.pod
195 --- old/poldek.pod      2002-10-18 10:35:18.000000000 +0000
196 +++ new/poldek.pod      2004-03-08 22:58:56.000000000 +0000
197 @@ -286,7 +286,7 @@
198  package A requires capability foo >= 1.0 while package B provides "foo"
199  without any version.
200  
201 -=item B<--nodeps>; B<--justdb>; B<--force>; B<--root>;
202 +=item B<--nodeps>; B<--ignorearch>; B<--justdb>; B<--force>; B<--root>;
203  
204  Have the same meanings like RPM ones. See next section.
205  
206 @@ -337,6 +337,8 @@
207  
208  =item * --force
209  
210 +=item * --ignorearch
211 +
212  =item * --install
213  
214  =item * --justdb
215 diff -Nur old/rpminstall.c new/rpminstall.c
216 --- old/rpminstall.c    2002-10-24 16:23:10.000000000 +0000
217 +++ new/rpminstall.c    2004-03-08 21:04:19.000000000 +0000
218 @@ -308,6 +308,10 @@
219              argv[n++] = "--define";
220              argv[n++] = n_array_nth(inst->rpmacros, i);
221          }
222 +
223 +    if (inst->flags & INSTS_IGNOREARCH)
224 +           argv[n++] = "--ignorearch"; /* ignore architecture */
225 +
226      
227      if (inst->rpmopts) 
228          for (i=0; i<n_array_size(inst->rpmopts); i++)
229 diff -Nur old/shell/install.c new/shell/install.c
230 --- old/shell/install.c 2002-11-14 18:21:43.000000000 +0000
231 +++ new/shell/install.c 2004-03-08 23:37:47.000000000 +0000
232 @@ -36,7 +36,7 @@
233  #define OPT_INST_FORCE      3
234  #define OPT_INST_REINSTALL  4
235  #define OPT_INST_DOWNGRADE  5
236 -
237 +#define OPT_INST_IGNOREARCH 6
238  
239  static struct argp_option options[] = {
240  {"mercy", 'm', 0, 0, N_("Be tolerant for bugs which RPM tolerates"), 1},
241 @@ -61,6 +61,10 @@
242  {"nodeps", OPT_INST_NODEPS, 0, 0,
243   N_("Install packages with broken dependencies"), 1 },
244  
245 +{"ignorearch", OPT_INST_IGNOREARCH, 0, 0,
246 + N_("Allow installation or upgrading even if the architectures of the "
247 +      "binary package and host don't match."), 1 },
248 +
249  {0,  'v', 0, 0, N_("Be verbose."), 1 },
250  {NULL, 'h', 0, OPTION_HIDDEN, "", 1 }, /* alias for -? */
251  { 0, 0, 0, 0, 0, 0 },
252 @@ -131,6 +135,9 @@
253              cmdarg->sh_s->inst->flags |= INSTS_FORCE;
254              break;
255              
256 +        case OPT_INST_IGNOREARCH:
257 +            cmdarg->sh_s->inst->flags |= INSTS_IGNOREARCH;
258 +            break;
259              
260          case 't':
261              if (cmdarg->sh_s->inst->flags & INSTS_TEST)
This page took 0.041685 seconds and 3 git commands to generate.