hi, I use `pacstrap -U` to install locally forged packages in a dedicated folder. this dedicated folder already contains some files and some of these files are causing problems for `pacstrap -U` (eg. `pacman -U`). i'd like to be able to use `--overwrite` option and pass it from `pacstrap`. is it possible to pass options to `pacman` via `pacstrap` ? regards, lacsaP.
On Wed, Nov 1, 2023 at 1:45 AM lacsaP Patatetom <patatetom@gmail.com> wrote:
I use `pacstrap -U` to install locally forged packages in a dedicated folder. this dedicated folder already contains some files and some of these files are causing problems for `pacstrap -U` (eg. `pacman -U`).
i'd like to be able to use `--overwrite` option and pass it from `pacstrap`.
is it possible to pass options to `pacman` via `pacstrap` ?
It seems pacstrap is passing any additional flags to pacman: https://github.com/archlinux/arch-install-scripts/blob/master/pacstrap.in#L1... So you should be able to pass options using e.g.: $ pacstrap -U /mnt linux -- --overwrite
Le mer. 1 nov. 2023 à 14:51, Christoph Gysin <christoph.gysin@gmail.com> a écrit :
On Wed, Nov 1, 2023 at 1:45 AM lacsaP Patatetom <patatetom@gmail.com> wrote:
I use `pacstrap -U` to install locally forged packages in a dedicated folder. this dedicated folder already contains some files and some of these files are causing problems for `pacstrap -U` (eg. `pacman -U`).
i'd like to be able to use `--overwrite` option and pass it from `pacstrap`.
is it possible to pass options to `pacman` via `pacstrap` ?
It seems pacstrap is passing any additional flags to pacman:
https://github.com/archlinux/arch-install-scripts/blob/master/pacstrap.in#L1...
So you should be able to pass options using e.g.:
$ pacstrap -U /mnt linux -- --overwrite
hi, here's a case study that might be more telling : ``` # pacstrap -c -C target/etc/pacman.conf -U target/ pkg/numix-gtk-theme-git-2.6.7.r55.ad4b345-1-any.pkg.tar.zst ==> Creating install root at target/ ==> Installing packages to target/ loading packages... resolving dependencies... looking for conflicting packages... Packages (1) numix-gtk-theme-git-2.6.7.r55.ad4b345-1 Total Installed Size: 3.77 MiB :: Proceed with installation? [Y/n] (1/1) checking keys in keyring [#############################################################################] 100% (1/1) checking package integrity [#############################################################################] 100% (1/1) loading package files [#############################################################################] 100% (1/1) checking for file conflicts [#############################################################################] 100% error: failed to commit transaction (conflicting files) numix-gtk-theme-git: target/usr/share/themes/Numix/gtk-3.20/gtk.css exists in filesystem numix-gtk-theme-git: target/usr/share/themes/Numix/openbox-3/themerc exists in filesystem Errors occurred, no packages were upgraded. ==> ERROR: Failed to install packages to new root # pacstrap -c -C target/etc/pacman.conf -U target/ pkg/numix-gtk-theme-git-2.6.7.r55.ad4b345-1-any.pkg.tar.zst -- --overwrite ==> Creating install root at target/ ==> Installing packages to target/ loading packages... error: '--overwrite': could not find or read package error: '--config=target/etc/pacman.conf': could not find or read package error: '--noconfirm': could not find or read package ==> ERROR: Failed to install packages to new root ``` the `numix` package simply comes from AUR and the two files I'm following (eg. versioned) `target/usr/share/themes/Numix/gtk-3.20/gtk.css` and `target/usr/share/themes/Numix/openbox-3/themerc` are already present in the tree and make some changes to the files supplied by default with the package. note that the `--overwrite` option is not passed on to `pacman` and that the problem does not recur if I try to reinstall the package, even though the two files are still present. regards, lacsaP.
On 06-11-2023 11:25, lacsaP Patatetom wrote:
# pacstrap -c -C target/etc/pacman.conf -U target/ pkg/numix-gtk-theme-git-2.6.7.r55.ad4b345-1-any.pkg.tar.zst -- --overwrite ==> Creating install root at target/ ==> Installing packages to target/ loading packages... error: '--overwrite': could not find or read package error: '--config=target/etc/pacman.conf': could not find or read package error: '--noconfirm': could not find or read package ==> ERROR: Failed to install packages to new root ```
the `numix` package simply comes from AUR and the two files I'm following (eg. versioned) `target/usr/share/themes/Numix/gtk-3.20/gtk.css` and `target/usr/share/themes/Numix/openbox-3/themerc` are already present in the tree and make some changes to the files supplied by default with the package.
note that the `--overwrite` option is not passed on to `pacman` and that the problem does not recur if I try to reinstall the package, even though the two files are still present.
regards, lacsaP.
Hi,
error: '--overwrite': could not find or read package
clearly shows --overwrite is passed to pacman . What you don't realise is that --overwrite requires a parameter like to-be-deleted-file.css . man pacman for details. There's another more important issue though : Why do you feel the need to run pacman -U through pacstrap instead of directly ? Lone_Wolf
My bad, it seems the extra dashes are not needed, pacstrap ignores unknown options. Try: # pacstrap -c -C target/etc/pacman.conf -U target/ pkg/numix-gtk-theme-git-2.6.7.r55.ad4b345-1-any.pkg.tar.zst --overwrite On Mon, Nov 6, 2023 at 2:51 PM lacsaP Patatetom <patatetom@gmail.com> wrote:
Le mer. 1 nov. 2023 à 14:51, Christoph Gysin <christoph.gysin@gmail.com> a écrit :
On Wed, Nov 1, 2023 at 1:45 AM lacsaP Patatetom <patatetom@gmail.com> wrote:
I use `pacstrap -U` to install locally forged packages in a dedicated folder. this dedicated folder already contains some files and some of these files are causing problems for `pacstrap -U` (eg. `pacman -U`).
i'd like to be able to use `--overwrite` option and pass it from `pacstrap`.
is it possible to pass options to `pacman` via `pacstrap` ?
It seems pacstrap is passing any additional flags to pacman:
https://github.com/archlinux/arch-install-scripts/blob/master/pacstrap.in#L1...
So you should be able to pass options using e.g.:
$ pacstrap -U /mnt linux -- --overwrite
hi,
here's a case study that might be more telling :
``` # pacstrap -c -C target/etc/pacman.conf -U target/ pkg/numix-gtk-theme-git-2.6.7.r55.ad4b345-1-any.pkg.tar.zst ==> Creating install root at target/ ==> Installing packages to target/ loading packages... resolving dependencies... looking for conflicting packages... Packages (1) numix-gtk-theme-git-2.6.7.r55.ad4b345-1 Total Installed Size: 3.77 MiB :: Proceed with installation? [Y/n] (1/1) checking keys in keyring [#############################################################################] 100% (1/1) checking package integrity [#############################################################################] 100% (1/1) loading package files [#############################################################################] 100% (1/1) checking for file conflicts [#############################################################################] 100% error: failed to commit transaction (conflicting files) numix-gtk-theme-git: target/usr/share/themes/Numix/gtk-3.20/gtk.css exists in filesystem numix-gtk-theme-git: target/usr/share/themes/Numix/openbox-3/themerc exists in filesystem Errors occurred, no packages were upgraded. ==> ERROR: Failed to install packages to new root
# pacstrap -c -C target/etc/pacman.conf -U target/ pkg/numix-gtk-theme-git-2.6.7.r55.ad4b345-1-any.pkg.tar.zst -- --overwrite ==> Creating install root at target/ ==> Installing packages to target/ loading packages... error: '--overwrite': could not find or read package error: '--config=target/etc/pacman.conf': could not find or read package error: '--noconfirm': could not find or read package ==> ERROR: Failed to install packages to new root ```
the `numix` package simply comes from AUR and the two files I'm following (eg. versioned) `target/usr/share/themes/Numix/gtk-3.20/gtk.css` and `target/usr/share/themes/Numix/openbox-3/themerc` are already present in the tree and make some changes to the files supplied by default with the package.
note that the `--overwrite` option is not passed on to `pacman` and that the problem does not recur if I try to reinstall the package, even though the two files are still present.
regards, lacsaP.
Le jeu. 9 nov. 2023 à 21:52, Christoph Gysin <christoph.gysin@gmail.com> a écrit :
My bad, it seems the extra dashes are not needed, pacstrap ignores unknown options. Try:
# pacstrap -c -C target/etc/pacman.conf -U target/ pkg/numix-gtk-theme-git-2.6.7.r55.ad4b345-1-any.pkg.tar.zst --overwrite
On Mon, Nov 6, 2023 at 2:51 PM lacsaP Patatetom <patatetom@gmail.com> wrote:
Le mer. 1 nov. 2023 à 14:51, Christoph Gysin <christoph.gysin@gmail.com> a écrit :
On Wed, Nov 1, 2023 at 1:45 AM lacsaP Patatetom <patatetom@gmail.com> wrote:
I use `pacstrap -U` to install locally forged packages in a dedicated folder. this dedicated folder already contains some files and some of these files are causing problems for `pacstrap -U` (eg. `pacman -U`).
i'd like to be able to use `--overwrite` option and pass it from `pacstrap`.
is it possible to pass options to `pacman` via `pacstrap` ?
It seems pacstrap is passing any additional flags to pacman:
https://github.com/archlinux/arch-install-scripts/blob/master/pacstrap.in#L1...
So you should be able to pass options using e.g.:
$ pacstrap -U /mnt linux -- --overwrite
hi,
here's a case study that might be more telling :
``` # pacstrap -c -C target/etc/pacman.conf -U target/ pkg/numix-gtk-theme-git-2.6.7.r55.ad4b345-1-any.pkg.tar.zst ==> Creating install root at target/ ==> Installing packages to target/ loading packages... resolving dependencies... looking for conflicting packages... Packages (1) numix-gtk-theme-git-2.6.7.r55.ad4b345-1 Total Installed Size: 3.77 MiB :: Proceed with installation? [Y/n] (1/1) checking keys in keyring [#############################################################################] 100% (1/1) checking package integrity [#############################################################################] 100% (1/1) loading package files [#############################################################################] 100% (1/1) checking for file conflicts [#############################################################################] 100% error: failed to commit transaction (conflicting files) numix-gtk-theme-git: target/usr/share/themes/Numix/gtk-3.20/gtk.css exists in filesystem numix-gtk-theme-git: target/usr/share/themes/Numix/openbox-3/themerc exists in filesystem Errors occurred, no packages were upgraded. ==> ERROR: Failed to install packages to new root
# pacstrap -c -C target/etc/pacman.conf -U target/ pkg/numix-gtk-theme-git-2.6.7.r55.ad4b345-1-any.pkg.tar.zst -- --overwrite ==> Creating install root at target/ ==> Installing packages to target/ loading packages... error: '--overwrite': could not find or read package error: '--config=target/etc/pacman.conf': could not find or read package error: '--noconfirm': could not find or read package ==> ERROR: Failed to install packages to new root ```
the `numix` package simply comes from AUR and the two files I'm following (eg. versioned) `target/usr/share/themes/Numix/gtk-3.20/gtk.css` and `target/usr/share/themes/Numix/openbox-3/themerc` are already present in the tree and make some changes to the files supplied by default with the package.
note that the `--overwrite` option is not passed on to `pacman` and that the problem does not recur if I try to reinstall the package, even though the two files are still present.
regards, lacsaP.
you're right, don't add extra dashes (and add the necessary <glob> to the overwrite option) : # pacstrap -c -C target/etc/pacman.conf -U target/ pkg/numix-gtk-theme-git-2.6.7.r55.ad4b345-1-any.pkg.tar.zst --overwrite '*' thank you for this tip from the bowels of pacstrap because this option-passing method is not specified in the pacstrap man. have a good day, regards, lacsaP.
On Fri, 10 Nov 2023 08:40:35 +0100 lacsaP Patatetom <patatetom@gmail.com> wrote:
# pacstrap -c -C target/etc/pacman.conf -U target/ pkg/numix-gtk-theme-git-2.6.7.r55.ad4b345-1-any.pkg.tar.zst --overwrite '*'
thank you for this tip from the bowels of pacstrap because this option-passing method is not specified in the pacstrap man.
have a good day, regards, lacsaP.
Why aren't you just using pacman --sysroot here?
Le ven. 10 nov. 2023 à 17:41, Doug Newgard <dnewgard@outlook.com> a écrit :
On Fri, 10 Nov 2023 08:40:35 +0100 lacsaP Patatetom <patatetom@gmail.com> wrote:
# pacstrap -c -C target/etc/pacman.conf -U target/ pkg/numix-gtk-theme-git-2.6.7.r55.ad4b345-1-any.pkg.tar.zst --overwrite '*'
thank you for this tip from the bowels of pacstrap because this option-passing method is not specified in the pacstrap man.
have a good day, regards, lacsaP.
Why aren't you just using pacman --sysroot here?
what would be the difference between using `pacman` directly and using `pacstrap` ?
participants (4)
-
Christoph Gysin
-
Doug Newgard
-
lacsaP Patatetom
-
Lone_Wolf