-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
second argument #4
Comments
That is indeed a good idea, to crawl through the script to guess interesting versions. We should also probably find all the uses of |
Right, we also have to look at dpkg --compare-version. The order on debian versions is dense without endpoints. However, it is trivial to construct from a given version one that is strictly smaller (by adding " |
Are we sure that we can find these versions statically? Or do we need to start with a random version and gather a list of comparisons we have made so that we can produce other versions that should be executed? (A bit like concolic execution).
This doesn't make much sens though. But since versions are not very complicated objects, could we maybe handle them symbolically? I mean, we already have a symbolic engine, so…
— Nicolas Jeannerod
Le 24 juin 2019 02:39:09 GMT-07:00, Ralf Treinen <[email protected]> a écrit :
…Right, we also have to look at dpkg --compare-version.
The order on debian versions is dense without endpoints. However, it is
trivial to construct from a given version one that is strictly smaller
(by adding "~" at the end") and one that is strictly larger (by adding
something not starting on "~" at the end)
|
I cannot imagine that anyone does computations on version numbers. On the
other hand there are some varieble setting to take into considerations,
like sometimes scripts do something like LASTVERSION=$2 and then
call dpkg --compare-versions on $LASTVERSION.
So I would expect that just taking all constant arguments of dpkg
--compare-versions would work in a majority of cases.
|
An idea for the second argument of the maintainer scripts:
one place where these are used is when the arguments of the maintainer script are passed on to dpkg-maintscript-helper. Dpkg-maintscript helper then checks whether the version passed as
second argument to the script is <= than the version pased as prior-version to dpkg-maintscript helper.
So what one could do is go over the CST of the scripts of the package and identify all
prior-version arguments of dpkg-maintscript-helper (these are expected at different positions that depend on the sub-command to dpkg-maintscript-helper) and use these as possible
second arguments to the maintainer script. This would IMO allow to execute the different code paths of dpkg-maintscript-helper.
The text was updated successfully, but these errors were encountered: