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

Re: Installing package *NOT* in repository



On Tue, Aug 21, 2018 at 10:04:58AM -0500, David Wright wrote:
> Why would you expect it to look for a «file» at all? If you write
>     # apt install gem.deb
> then apt should try to install any «packages» it finds called
> "gemadeb", "gembdeb", "gemcdeb", "gemddeb", etc, and will
> consequently install the «package» gem2deb, which is likely
> not what you expected unless you read the man page for apt-get
> in combination with that for apt.

First of all, the . character is valid in a package name, and is supposed
to be treated literally.  A package named python3.5 exists, for example.

The . character can be a single-character wildcard in some kinds of
regular expression, but one would hope (I certainly hope) that when
an exactly matching package name exists in the database, the exact
match should win out over a regex(7) match.

The . character is NOT a single-character wildcard to the shell, so it
does not need escaping or quoting to survive the shell's argument
parsing.  You might be thinking of the ? character.

Second, this whole thread has been about the undocumented feature of
apt (but not apt-get) that allows you to specify a pathname to a .deb
file on an "apt install" command.  Nobody was quite sure how it worked,
because it's undocumented.

However, Michael Stone was kind enough to point out the line of code
which is partly responsible for this feature (thank you).  So, now we
know that "apt install" can take a pathname argument, but only if the
pathname begins with "/" or "./" or "../".  This seems like a strange
choice to me (I would've gone with "contains a slash", because there's
precedent for that, and because it allows pathnames like "foo/bar.deb"
which the current code does not allow).  But at least now we know.


Reply to: