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
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
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"
17 .Ip "\(bu \-\-force" 4
19 +.Ip "\(bu \-\-ignorearch" 4
20 +.IX Item "--ignorearch"
21 .Ip "\(bu \-\-install" 4
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
28 pakiet A wymaga foo >= 1.0, podczas gdy pakiet B dostarcza "foo" be¿ ¿adnej
31 -=item B<--nodeps>; B<--justdb>; B<--force>; B<--root>;
32 +=item B<--nodeps>; B<--ignorearch>; B<--justdb>; B<--force>; B<--root>;
34 Ma takie znaczenie jak w przypadku RPM. Patrz nastêpna sekcja.
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
49 # define OPT_SHELL_CMD 1032
52 +#define OPT_INST_IGNOREARCH 1040
53 #define OPT_INST_INSTDIST 1041
54 #define OPT_INST_UPGRDIST 1042
55 #define OPT_INST_NODEPS 1043
57 {"nodeps", OPT_INST_NODEPS, 0, 0,
58 N_("Install packages with broken dependencies"), 71 },
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 },
64 {"force", OPT_INST_FORCE, 0, 0,
65 N_("Be unconcerned"), 71 },
68 argsp->inst.flags |= INSTS_NODEPS;
71 + case OPT_INST_IGNOREARCH:
72 + argsp->inst.flags |= INSTS_IGNOREARCH;
76 argsp->inst.flags |= INSTS_FORCE;
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
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 */
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
101 if (instflags & INSTS_UPGRADE)
102 flags |= PKGINST_UPGRADE;
104 + if (instflags & INSTS_IGNOREARCH)
105 + flags |= PKGINST_IGNOREARCH;
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
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 */
119 #define INSTS_INTERACTIVE_ON (INSTS_CONFIRM_INST | INSTS_EQPKG_ASKUSER)
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 @@
128 -static int valid_arch_os(tn_array *pkgs)
129 +static int valid_arch_os(tn_array *pkgs, struct inst_s *inst)
133 for (i=0; i<n_array_size(pkgs); i++) {
134 struct pkg *pkg = n_array_nth(pkgs, i);
137 + if (inst->flags & (INSTS_IGNOREARCH)) { } else
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);
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 @@
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))
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
162 msgid "no packages specified"
163 msgstr "nie podano pakietów"
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."
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
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"
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"
187 .Ip "\(bu \-\-force" 4
189 +.Ip "\(bu \-\-ignorearch" 4
190 +.IX Item "--ignorearch"
191 .Ip "\(bu \-\-install" 4
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
198 package A requires capability foo >= 1.0 while package B provides "foo"
201 -=item B<--nodeps>; B<--justdb>; B<--force>; B<--root>;
202 +=item B<--nodeps>; B<--ignorearch>; B<--justdb>; B<--force>; B<--root>;
204 Have the same meanings like RPM ones. See next section.
210 +=item * --ignorearch
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
219 argv[n++] = "--define";
220 argv[n++] = n_array_nth(inst->rpmacros, i);
223 + if (inst->flags & INSTS_IGNOREARCH)
224 + argv[n++] = "--ignorearch"; /* ignore architecture */
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
233 #define OPT_INST_FORCE 3
234 #define OPT_INST_REINSTALL 4
235 #define OPT_INST_DOWNGRADE 5
237 +#define OPT_INST_IGNOREARCH 6
239 static struct argp_option options[] = {
240 {"mercy", 'm', 0, 0, N_("Be tolerant for bugs which RPM tolerates"), 1},
242 {"nodeps", OPT_INST_NODEPS, 0, 0,
243 N_("Install packages with broken dependencies"), 1 },
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 },
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 },
253 cmdarg->sh_s->inst->flags |= INSTS_FORCE;
256 + case OPT_INST_IGNOREARCH:
257 + cmdarg->sh_s->inst->flags |= INSTS_IGNOREARCH;
261 if (cmdarg->sh_s->inst->flags & INSTS_TEST)