Re: Installing package *NOT* in repository
On Tue 21 Aug 2018 at 08:02:02 (-0400), Gene Heskett wrote:
> On Tuesday 21 August 2018 06:56:45 Vincent Lefevre wrote:
> > On 2018-08-17 13:48:11 -0500, David Wright wrote:
> > > On Fri 17 Aug 2018 at 07:31:34 (-0400), Gene Heskett wrote:
> > > > On Friday 17 August 2018 05:29:07 Vincent Lefevre wrote:
> > > > > On 2018-08-13 09:38:48 -0300, Samuel Henrique wrote:
> > > > > > If you pass a file as parameter to apt install, like:
> > > > > > apt install ./package.deb
> > > > > > It will work, at least on buster.
> > > > >
> > > > > And the "./" is important, otherwise it will not work (until
> > > > > now, for this reason, I didn't know that passing a file was
> > > > > supported). I don't know the exact rule, but it seems that the
> > > > > pathname needs to start with either "/", "./" or "../".
> > > >
> > > > The effect is where the search for the given file is anchored
> > > > just a plain filename is assumed to be someplace in the $PATH
> > >
> > > It would be very odd to place a package file into one's $PATH.
> > Yes, the use of $PATH is awkward. PATH is where executable files are
> > searched for. But Debian packages are not executable.
> Which is why for dpkg|apt work, you should cd to the location of the deb,
Why? The rule above (start with either "/", "./" or "../") doesn't
> and give it the package name in ./name.deb format.
> Or, give it /the/full/path/to/the/package/name.deb.
> > But I doubt that this is true. If I use a plain filename, strace
> > doesn't show any attempt to look at the file anywhere.
Yes, logical. (Be aware that "But I doubt that this is true"
refers to the lines starting "The effect is where the search for …").
> Odd, maybe apt does not look in $PATH? That, in some $PATH environments,
> would be a huge time waster when its not expected to be there anyway.
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.