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

Re: [RFC] Multi-arch-enabled command-line interface



David Kalnischkies <kalnischkies+debian@gmail.com> writes:

> 2010/8/12 Julian Andres Klode <jak@debian.org>:
>> For read operations (show,showpkg,policy):
>>        NAME      - Display the package for all architectures
>>        NAME:ARCH - Display the package for the ARCH architecture
>
> Most show* commands for different architectures are pretty boring.
> The show-entry for apt:i386 and apt:amd64 differs only in the
> Architecture line. I would expect that show shows me the
> package i would get by installing "apt"?
>
> In APT policy is currently the only one differing and i am not
> completely sure about that one either?

Currently show shows all versions, not just the one it would
install. The same should be true for archs.

>> For install:
>>        NAME      - Install the native candidate (or Architecture: all)
>>        NAME:ARCH - Install the candidate for ARCH
>
> Imagine a package only existing in i386 and your are native amd64.
> Do you want that the user really worries about the architecture of
> this package? APT uses "the best" architecture to install
> (best defined as non-virtual architecture listed at first).

The native arch should have a higher pin than non-native archs by
default as was present in my patch. That would make a native package the
candidate if it is awaylable automatically and users can trivially use
pinning to change the preference for all or individual packages.

Then "NAME" should install the candidate with the highest pin regardless
of arch.

>> For remove and purge:
>>        NAME      - Remove all packages named NAME
>>        NAME:ARCH - Remove the package NAME for architecture ARCH
>
> I admit that i haven't thought about that before as i am removing to
> few packages by hand? ;) APT currently chooses again "the best".

Currently the NAME is unique so one can't really say there is any
choosing. :)

> I guess it feels more natural to have the same meaning for
> "no arch provided" in all commands than giving it a new meaning
> for each command.
>
> I mean, you looked at the package with "show", you installed it
> with "install" and you removed it later on with "purge".
> The first will possibly display a lot of entries and the last will
> have "unexpected" results as it removes ALL packages with this
> name rather than only the one installed before?

Alternatively, if multiple archs are installed, "NAME" could print a
list of matching packages and tell the user to be more specific. Like it
does when installing a virtual package now.

>> Does this make sense? For APT2, this would be extended with versions for
>> RPM (as RPM allows multiple version to be installed at the same time);
>> show show all version, install installs the candidate, and remove
>> removes all versions (of course accepting =ver and /archive for limiting
>> this everywhere).
>
> I have basically zero knowledge about the RPM world so no comment
> on that one, but have you looked at apt-rpm?
> Maybe they had some clever idea?
>
>
> Best regards,
>
> David Kalnischkies

MfG
        Goswin


Reply to: