[pacman-dev] [PATCH 0/1] Introduce "AssumeInstalled" option in the config file
I have had at least two or three use cases for this option, * one has been since I always have to type pacman -Syu --assume-installed noto-fonts when plasma-integration is updated * `pacman -Syu --assume-installed perl` since it's needlesly pulled by openssl and I didn't need it for containers and similar Having this in the config file allows to use the option together with pacstrap too. Please review and if the change is acceptable suggest what else needs to be added Дамјан Георгиевски (1): AssumeInstalled option in the config file etc/pacman.conf.in | 1 + src/pacman/conf.c | 2 ++ 2 files changed, 3 insertions(+) -- 2.28.0
--assume-installed is already an option to transactions. This change allow setting a list of packages in the config file. Signed-off-by: Дамјан Георгиевски <gdamjan@gmail.com> --- etc/pacman.conf.in | 1 + src/pacman/conf.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/etc/pacman.conf.in b/etc/pacman.conf.in index 634ecc06..9be40179 100644 --- a/etc/pacman.conf.in +++ b/etc/pacman.conf.in @@ -25,6 +25,7 @@ Architecture = auto #IgnorePkg = #IgnoreGroup = +#AssumeInstalled = #NoUpgrade = #NoExtract = diff --git a/src/pacman/conf.c b/src/pacman/conf.c index 3a3ef605..d02adc64 100644 --- a/src/pacman/conf.c +++ b/src/pacman/conf.c @@ -632,6 +632,8 @@ static int _parse_options(const char *key, char *value, setrepeatingoption(value, "IgnoreGroup", &(config->ignoregrp)); } else if(strcmp(key, "HoldPkg") == 0) { setrepeatingoption(value, "HoldPkg", &(config->holdpkg)); + } else if(strcmp(key, "AssumeInstalled") == 0) { + setrepeatingoption(value, "AssumeInstalled", &(config->assumeinstalled)); } else if(strcmp(key, "CacheDir") == 0) { setrepeatingoption(value, "CacheDir", &(config->cachedirs)); } else if(strcmp(key, "HookDir") == 0) { -- 2.28.0
On 8/30/20 1:07 PM, Дамјан Георгиевски wrote:
I have had at least two or three use cases for this option, * one has been since I always have to type pacman -Syu --assume-installed noto-fonts when plasma-integration is updated * `pacman -Syu --assume-installed perl` since it's needlesly pulled by openssl and I didn't need it for containers and similar
Having this in the config file allows to use the option together with pacstrap too.
Please review and if the change is acceptable suggest what else needs to be added
I'm not sure it's a good idea to encourage this in the general case. Supporting it only as a command-line option is still useful since it can help resolve certain types of manual itervention. One alternative would be to create a dummy package providing it. That being said, I'm not necessarily saying this must be rejected... aside: for perl, see https://bugs.archlinux.org/task/54887
Дамјан Георгиевски (1): AssumeInstalled option in the config file
etc/pacman.conf.in | 1 + src/pacman/conf.c | 2 ++ 2 files changed, 3 insertions(+)
-- Eli Schwartz Bug Wrangler and Trusted User
On Sun, 30 Aug 2020 at 19:13, Eli Schwartz <eschwartz@archlinux.org> wrote:
On 8/30/20 1:07 PM, Дамјан Георгиевски wrote:
I have had at least two or three use cases for this option, * one has been since I always have to type pacman -Syu --assume-installed noto-fonts when plasma-integration is updated * `pacman -Syu --assume-installed perl` since it's needlesly pulled by openssl and I didn't need it for containers and similar
Having this in the config file allows to use the option together with pacstrap too.
Please review and if the change is acceptable suggest what else needs to be added
I'm not sure it's a good idea to encourage this in the general case. Supporting it only as a command-line option is still useful since it can help resolve certain types of manual itervention.
I agree that the option is a bit heavy handed (the cli one too) - but these situations will arise (unneeded deps), and I was wondering about the pacstrap use-case and couldn't think of anything better.
One alternative would be to create a dummy package providing it.
That being said, I'm not necessarily saying this must be rejected...
aside: for perl, see https://bugs.archlinux.org/task/54887
I know that issue (hint: see the reporter) :) -- damjan
On 8/30/20 1:18 PM, Damjan Georgievski wrote:
On Sun, 30 Aug 2020 at 19:13, Eli Schwartz <eschwartz@archlinux.org> wrote:
aside: for perl, see https://bugs.archlinux.org/task/54887
I know that issue (hint: see the reporter) :)
haha :p I did not notice that. -- Eli Schwartz Bug Wrangler and Trusted User
On Sun, 30 Aug 2020 at 19:13, Eli Schwartz <eschwartz@archlinux.org> wrote:
On 8/30/20 1:07 PM, Дамјан Георгиевски wrote:
I have had at least two or three use cases for this option, * one has been since I always have to type pacman -Syu --assume-installed noto-fonts when plasma-integration is updated * `pacman -Syu --assume-installed perl` since it's needlesly pulled by openssl and I didn't need it for containers and similar
Having this in the config file allows to use the option together with pacstrap too.
Please review and if the change is acceptable suggest what else needs to be added
I'm not sure it's a good idea to encourage this in the general case. Supporting it only as a command-line option is still useful since it can help resolve certain types of manual itervention.
maybe I should remove it from etc/pacman.conf.in so in essence it can be a hidden option? I still think that CLI options should be able to be specified in a config file (or possibly env vars).
On 09/03/20 at 12:17pm, Damjan Georgievski wrote:
On Sun, 30 Aug 2020 at 19:13, Eli Schwartz <eschwartz@archlinux.org> wrote:
On 8/30/20 1:07 PM, Дамјан Георгиевски wrote:
I have had at least two or three use cases for this option, * one has been since I always have to type pacman -Syu --assume-installed noto-fonts when plasma-integration is updated * `pacman -Syu --assume-installed perl` since it's needlesly pulled by openssl and I didn't need it for containers and similar
Having this in the config file allows to use the option together with pacstrap too.
Please review and if the change is acceptable suggest what else needs to be added
I'm not sure it's a good idea to encourage this in the general case. Supporting it only as a command-line option is still useful since it can help resolve certain types of manual itervention.
maybe I should remove it from etc/pacman.conf.in so in essence it can be a hidden option?
I still think that CLI options should be able to be specified in a config file (or possibly env vars).
Without a better use case, I'm -1 on this. --assume-installed was intended for ignoring individual dependencies in exceptional circumstances, not permanently ignore a dependency you don't like. The preferred way of dealing with that, should you feel the need, is with a meta package.
On Fri, 4 Sep 2020 at 03:35, Andrew Gregory <andrew.gregory.8@gmail.com> wrote:
On 09/03/20 at 12:17pm, Damjan Georgievski wrote:
On Sun, 30 Aug 2020 at 19:13, Eli Schwartz <eschwartz@archlinux.org> wrote:
On 8/30/20 1:07 PM, Дамјан Георгиевски wrote:
I have had at least two or three use cases for this option, * one has been since I always have to type pacman -Syu --assume-installed noto-fonts when plasma-integration is updated * `pacman -Syu --assume-installed perl` since it's needlesly pulled by openssl and I didn't need it for containers and similar
Having this in the config file allows to use the option together with pacstrap too.
Please review and if the change is acceptable suggest what else needs to be added
I'm not sure it's a good idea to encourage this in the general case. Supporting it only as a command-line option is still useful since it can help resolve certain types of manual itervention.
maybe I should remove it from etc/pacman.conf.in so in essence it can be a hidden option?
I still think that CLI options should be able to be specified in a config file (or possibly env vars).
Without a better use case, I'm -1 on this. --assume-installed was intended for ignoring individual dependencies in exceptional circumstances, not permanently ignore a dependency you don't like. The preferred way of dealing with that, should you feel the need, is with a meta package.
and how do I plug that into pacstrap? custom repo? that seems like a much bigger overkill :/ -- damjan
On 9/5/20 3:11 AM, Damjan Georgievski wrote:
On Fri, 4 Sep 2020 at 03:35, Andrew Gregory <andrew.gregory.8@gmail.com> wrote:
Without a better use case, I'm -1 on this. --assume-installed was intended for ignoring individual dependencies in exceptional circumstances, not permanently ignore a dependency you don't like. The preferred way of dealing with that, should you feel the need, is with a meta package.
and how do I plug that into pacstrap? custom repo? that seems like a much bigger overkill :/
Do you need to install it during pacstrap itself to override packages in the base install? If not, you can simply execute pacstrap && pacman -r /mnt -U /path/to/metapackage. About a year ago, I added a -U option to pacstrap, which makes it use pacman -U for all packages; you may therefore pipe a list of packages to install as such: mkdir ./fakedb { pacman --dbpath ./fakedb -Syp base; echo /path/to/metapackage; } | pacstrap -U /mnt - Since pacstrap may be repeatedly run on the same existing root and does not require that it be the one to create said root, you may also do this much simpler form (assuming the metapackage does not have dependencies, which it presumably shouldn't): pacstrap -U /mnt /path/to/metapackage pacstrap /mnt [base otherpackages] Either way, I'm even less convinced of the need for a pacman.conf option if the only time it is needed is during pacstrap and never again; even if it were true that you needed it then, I'd argue you could just as well install as normal, then replace the package you didn't want with a metapackage after chrooting in. -- Eli Schwartz Bug Wrangler and Trusted User
participants (4)
-
Andrew Gregory
-
Damjan Georgievski
-
Eli Schwartz
-
Дамјан Георгиевски