Re: pacman via pacstrap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Le mer. 1 nov. 2023 à 14:51, Christoph Gysin <christoph.gysin@xxxxxxxxx> a écrit :

On Wed, Nov 1, 2023 at 1:45 AM lacsaP Patatetom <patatetom@xxxxxxxxx> 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.

[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux