[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Need feedback on dpkg's behaviour with multiarch packages

]] Raphael Hertzog 


| * Assume foo == foo:native.
|   + Simple and straightforward mapping rule.
|   + Can be applied in all contexts (including dpkg --set-selections).
|   + Won't break scripts.
|   - Requires a new syntax (foo:*) to say "all instances of this package".
|   - Might surprise the user with a "package not installed" error when he
|     wants to refer to a foreign package and he forgets to precise the
|     architecture name.

I think this is the most sensible option.  Sure, it's not very DWIM, but
it's the most conservative one.  The new syntax is a bit annoying, but
that's life (maybe allow «foo:» as an alias for «foo:*», since that
means less quoting in shells?).  As for error messages, we can add logic
that looks for foo:otherarch if foo:same doesn't match, or at least add
that bit to the error message.

| My suggestion is along those lines:
| - any package of foreign arch should always have its architecture appended
|   to its package name
| - package of native arch which are multi-arch same should have the
|   architecture appended only if there are other instances of the same
|   package installed
| - other packages do not need the arch qualifier
| Does that seem reasonable enough?

You should be able to use the output as input, which I think this
allows.  I'm leaning slightly towards making it output foo:native as
just foo, but I don't have a strong preference.

I think the real question is: Do we want to end up with foo:$arch being
the preferred name everywhere or not?  We should print it in the form we
want to be the preferred one.

| One more question:
| - shall we invent a "foo:native" syntax that we can output instead of
|   "foo:i386" in the output of dpkg --get-selections so that transferring
|   the selection over to another computer running another architecture
|   will still work ?

I think using the string «native» as a magic alias for what arch this is
on would be useful, yes.  I'm not convinced it should be used in output
by default, it's trivial to use sed to change it, after all.

Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are

Reply to: