Le jeu. 9 nov. 2023 à 21:52, Christoph Gysin <christoph.gy...@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 <patate...@gmail.com> > wrote: > >> Le mer. 1 nov. 2023 à 14:51, Christoph Gysin <christoph.gy...@gmail.com> >> a écrit : >> >>> >>> On Wed, Nov 1, 2023 at 1:45 AM lacsaP Patatetom <patate...@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#L141 >>> >>> 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.