[Aptitude-devel] Bug#403289: add shorcut to compile a software

Manuel A. Fernandez Montecelo manuel.montezelo at gmail.com
Wed Mar 30 11:33:17 UTC 2016


Control: tags -1 + wontfix


Hi Ludovic,

2006-12-15 23:04 Ludovic Gasc:
>Package: aptitude
>Version: 0.4.4-1
>
>With apt-build, it's possible to recompile easily a deb.
>
>It would be greatful if it's possible with a keyboard shortcut to
>select a software to recompile.
>
>Thanks for your response.


2011-08-30 08:50 Daniel Hartwig:
>severity 403289 wishlist
>block 403289 by 403372 468897
>quit
>
>Compiling source packages requires fetching both the source [1] and
>any build-dep [2].
>
>
>[1]  403372 -- To include option for download the source archives
>[2]  468897 -- implement build-dep and source actions


(The following is mostly a consideration of the difficulty of the
problem, not a reply to the original report per se).


The implementation of this feature is not trivial, and there are many
considerations to make.

Firstly, fetching source and installing build-dependencies is not a
solved problem in aptitude, as the reply above said; so these mechanisms
would have to be implemented first.

But what it's more important, aptitude would have to make several
non-trivial decisions or implement quite a few things with the requested
feature, with such as a high-level thing as compiling by pressing a key.

For example, one has to download and install all build-dependencies,
which can mean a huge amount of data to download (e.g. installing tetex
to create the documentation), so a warning has to be issued in this case
(perhaps the user thinks that compiling a small package is a small
matter, but the process can eat up a lot of bandwith and surprise/annoy
the user).

Another matter is where to download the source.  There's a well
established place for downloading packages to be installed
(/var/cache/apt/archives), but not so for such things as a package to be
compiled.

/usr/local/src?  Maybe, but /usr/ can be mounted as read-only.

/tmp/ or /var/tmp?  /var/cache/aptitude-build?  Perhaps, but compiling
big packages like the web browsers can use a huge amount of space and
could fill /tmp or the root partition with pretty disastrous
consequences, so the program would have to get some kind of confirmation
from the user of where to download this.  A config variable could be
used for that, but at least for the first time, the user would have to
acknowledge it.  apt-build doesn't suffer from this because it does that
in the current directory, I think.

There are other non-trivial questions to be solved like what to do when
aptitude is root, because running such things as root is perhaps not the
wisest thing to do; or what to do if the user is in the middle of a
session of installing/removing packages (installing build-deps could
ruin, or conflict, with the current actions).

apt-build doesn't have to deal with the problem of being in the middle
of a session, or being run interactively in ncurses.  Doing this with
the command line of aptitude could have similar advantages of
simplifying the process a lot, but then again we already have apt-build
for that.

The last thing to consider that I will delve into is... why do all of
this?  In the original request, this is to "recompile" software.  If
it's software available in Debian (so build-deps can be installed and
the package source downloaded), specially with the drive towards
reproducible builds, the result should be an identical binary package,
so I am not sure if this is the goal.

If the goal is to (re)compile a package with some modifications, then
the process cannot be automated, and a shell has to be spawned to be
able to apply patches, or changing commands in debian/rules,
enabling/disabling features (e.g. support for wayland, or codecs) or
issuing different compilation flags.  This is again another thing that
would be better served by something more like apt-build (or apt source +
HACK + debuild; or git-buildpackage; or any of the other tools) and not
doing it interactively from the curses interface of aptitude.


... so these are some of the problems that come to mind as decisions to
make to implement this feature.  A simple keypress triggering actions
like recompiling a package is not straightforward to implement at all.

Given that this has been requested a decade ago and there's no drive to
implement this any time soon, I am marking it as +wontfix for the time
being.


Cheers.
-- 
Manuel A. Fernandez Montecelo <manuel.montezelo at gmail.com>



More information about the Aptitude-devel mailing list