Pacman

Historical bug tracker for the Pacman package manager.

The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues

This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
Tasklist

FS#13051 - Allow pacman to cross-install with an --arch flag

Attached to Project: Pacman
Opened by Aaron Griffin (phrakture) - Friday, 30 January 2009, 17:19 GMT
Last edited by Xavier (shining) - Monday, 07 September 2009, 15:06 GMT
Task Type Feature Request
Category Backend/Core
Status Closed
Assigned To Xavier (shining)
Dan McGee (toofishes)
Architecture All
Severity Low
Priority Normal
Reported Version 3.2.1
Due in Version 3.4.0
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Just had an idea that might be nice. I am thinking from the arena of installation ISOs, here.

Allow the target architecture to be passed to pacman, using $(uname -m) if none is present. This will set a $arch variable in server parsing, similar to the $repo variable.

Additionally, the functionality of util-linux-ng's setarch util may need to be used before chrooting. See http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git;a=blob;f=sys-utils/setarch.c

Doing this allows us to very simply install a different architecture. The only thing I worry about is scriptlet execution.
This task depends upon

Closed by  Xavier (shining)
Monday, 07 September 2009, 15:06 GMT
Reason for closing:  Implemented
Additional comments about closing:  $arch in Server parsing is implemented. for the rest, using linux32/linux64 is fine :)
Comment by Aaron Griffin (phrakture) - Friday, 30 January 2009, 17:21 GMT
Just a note as to why this came up: Why not have ONE install ISO that will install either architecture?
Comment by Ondřej Konečný (andrew9888) - Thursday, 23 July 2009, 08:00 GMT
I am thinking about it other way. It would be useful for 64bit users who want to get some 32bit apps running on their machine (I am one of them). They would simply add a 32bit repository and install the packages they need. The packages would be installed in /opt/$arch_pkg or so.
Comment by Nahum Shalman (nshalman) - Thursday, 13 August 2009, 17:28 GMT
One more vote for $arch in Server parsing. Perhaps it should be a new task? I'd love to be able to use a single mirrorlist file on any machine whether it's i686 or x86_64.

I'm attaching a sample (probably broken, not tested, not inteded for use) patch to pacman that suggests a way to get pacman to parse a $arch variable in Server entries.
If it works, it would only work when you're processing a Server entry on a machine where you want to make sure you're talking to a repo of the same architecture as the running kernel.
Comment by Aaron Griffin (phrakture) - Monday, 17 August 2009, 20:16 GMT
Tag!
Comment by Xavier (shining) - Wednesday, 19 August 2009, 20:38 GMT
I like the idea of the $arch var a lot :)
Attaching a patch (but it depends on my two other patches for  FS#15622 )

About the setarch stuff, I am unsure. It only works in some situations. For example, here is my config :
Linux xps-m1530 2.6.30-ARCH #1 SMP PREEMPT Fri Jul 31 18:10:38 UTC 2009 i686 Intel(R) Core(TM)2 Duo CPU T8100 @ 2.10GHz GenuineIntel GNU/Linux
and linux64 does not allow me to run 64 bit binaries.

Maybe if I was running a 64 bit kernel, linux32 would allow me to run 32 bit binaries. But well, it looks easy enough to run manually setarch/linux32/linux64 when we know it is supposed to work and when it is appropriate.
Also I am worried about the portability of this thing.
Comment by Xavier (shining) - Monday, 07 September 2009, 10:58 GMT
the $arch stuff has been implemented : http://code.toofishes.net/cgit/xavier/pacman.git/commit/?id=65c1f06be5a9c4bdb197b61563da7c2e28162392

is it sufficient to close this ?
Comment by Ondřej Konečný (andrew9888) - Monday, 07 September 2009, 13:25 GMT
Is with this patch possible to install 32bit packages on 64bit machines (with some --arch pacman option)? I use 64bit Archlinux but I also must (because of my work) use some 32 apps (namely Adobe Air). Or is it just simplifying and unification of the mirrorlist files?
Comment by Xavier (shining) - Monday, 07 September 2009, 13:35 GMT
Above patch is just simplification and unification of mirrorlist files.

I also made other patches for  FS#15622  , but this only checks the architecture defined in the packages.
For example, if you consider this package : http://aur.archlinux.org/packages/bin32-skype/bin32-skype/PKGBUILD
it is a 32bit app made for x86_64, so it will be only installable on x86_64 (if you enable the architecture check).
If you have different needs, you can just disable the check, so don't worry.
Comment by Dan McGee (toofishes) - Monday, 07 September 2009, 14:45 GMT
If you wrap the pacman call in a linux32 call, the scriptlets will see an environment that looks like a 32-bit one, correct? That seems to be the only remaining question here, and if that is true then we can close this.
Comment by Xavier (shining) - Monday, 07 September 2009, 14:53 GMT
That's correct, this is what people are doing already. e.g. I talked with thomas, he is doing that and happy enough with that method.

I think what Aaron was suggesting was to move this functionality inside pacman. I first found it interesting, but after some thinking, I would much prefer to keep that code and functionality outside (in linux32 / linux64).
Comment by Dan McGee (toofishes) - Monday, 07 September 2009, 14:54 GMT
Let's stay simple here; I don't think it makes sense to have pacman do what other tools do perfectly well.

Loading...