Ticket #45 (closed Defect: fixed)

Opened 22 months ago

Last modified 11 months ago

Should warn that users that 64-bit systems don't work

Reported by: taj Owned by: isak
Priority: Medium Milestone:
Component: main Version: 1.2.4
Severity: Normal Keywords: 64bit, stub
Cc:

Description

When attempting to install an Autopackage on a 64-bit system, Autopackage should tell the user that "64 bits don't work!" instead of dieing spectacularly (like in #42).

Just a quick test in the stub to make sure we're on 32-bit x86 should be good enough.

Attachments

64bit-detection.diff (4.4 kB) - added by taj 18 months ago.
64-bit Detection and Warning
lib64.patch (2.1 kB) - added by Jan-Nik 15 months ago.
checks if /usr/lib64 exists; let user continue installation if arch check fails.

Change History

Changed 18 months ago by taj

64-bit Detection and Warning

  Changed 18 months ago by isak

Patch reviewed and tested on an AMD64 system running Ubuntu 7.04 - worked fine. (Warning received in both X and console, depending on how I ran the package)

  Changed 18 months ago by taj

  • status changed from new to closed
  • resolution set to fixed

Committed in r2425.

  Changed 18 months ago by isak

  • keywords 64bit, added; 64-bit, removed

  Changed 15 months ago by Jan-Nik

  • status changed from closed to reopened
  • resolution fixed deleted

I'm currently on openSUSE 10.3 x86_64 and getting this error although I have compatibility libraries installed (inside /usr/lib), because "uname -m" still returns "x86_64".

I think the error should be changed to a warning. With only a warning, users could still run these packages if they have a special case machine in which x86 does work. (for example if "uname -m" returns "athlon", isn't that x86, too?)

Changed 15 months ago by Jan-Nik

checks if /usr/lib64 exists; let user continue installation if arch check fails.

follow-up: ↓ 6   Changed 15 months ago by isak

  • owner changed from taj to isak
  • status changed from reopened to new

Hmm, this patch will cause problems for people on 64bit system which does not have 32bit compat libs installed. They should not be allowed to install 32bit packages at all.

The proper fix would be to detect 32bit libraries regardless of where they are. Can we do that somehow (without breaking the API)?

in reply to: ↑ 5   Changed 15 months ago by Jan-Nik

Replying to isak:

Hmm, this patch will cause problems for people on 64bit system which does not have 32bit compat libs installed. They should not be allowed to install 32bit packages at all.

That's right, but I think the code for doing this should be moved to the support code, not in the package header.

I already managed to build the support code on x86_64 btw and it works flawlessly. If this build would be uploaded after someone created a package with 1.2.5, the 1.2.5 package won't allow you to download and install the autopackage support code (because the warning is inside the package file), although it's now online.

The proper fix would be to detect 32bit libraries regardless of where they are. Can we do that somehow (without breaking the API)?

Yes, I think that's possible. But as I said, it might be the best to let the support code do that. I looked inside the testForLib function and i saw that it already tests for 32bit libs only.

IMHO it would be best to remove the detection/error for 64bit system completely and build 1.2.5 on x86_64. This way 64 bit users won't be able to install 32 bit packages without the compatibility libs, too: The dependency detection (testForLib, ...) will tell them which libraries are missing.

(hope you understand what I'm trying to say)

  Changed 15 months ago by isak

Yes, it should be handled by the support code. The problem is that we cannot add new functions to the support code which is called from package stubs since it'll break on systems with autopackage < 1.2.5 (This is what caused the _checkEULA problems).

I'm not sure how to solve this in the least painful way.

  Changed 11 months ago by Jan-Nik

  • status changed from new to closed
  • resolution set to fixed

I close this for now as the next release will have 64 bit support, so a warning won't be needed any more.

Note: See TracTickets for help on using tickets.