MX Package Installer has a difficulty writing file in /tmp  [Solved]

Help with the version of MX KDE officially released by the Development Team.
When asking for help, use Quick System Info from MX Tools. It will be properly formatted using the following steps.
1. Click on Quick System Info in MX Tools
2. Right click in your post and paste.
Message
Author
User avatar
abhidesh128
Posts: 83
Joined: Sun Nov 08, 2020 6:03 am

Re: MX Package Installer has a difficulty writing file in /tmp

#11 Post by abhidesh128 »

Adrian wrote: Fri Oct 18, 2024 8:23 am The issue is a network error, not a write error. So for some reason the app cannot download the file. Do you use a proxy? Do you do anything fancy with your networking? Can you access http://mxrepo.com/mx/ ?
I do not use any proxy, but I share network to my computer via mobile hotspot. I'll test my carrier settings and reply back.
Loving Linux...Since ages...!

User avatar
Adrian
Developer
Posts: 9264
Joined: Wed Jul 12, 2006 1:42 am

Re: MX Package Installer has a difficulty writing file in /tmp

#12 Post by Adrian »

I doubt it's that, it's a download issue, the error message is wrong, I will fix that.

The question is why can't you download?

User avatar
abhidesh128
Posts: 83
Joined: Sun Nov 08, 2020 6:03 am

Re: MX Package Installer has a difficulty writing file in /tmp

#13 Post by abhidesh128 »

Okay. I can confirm that I can access http://mxrepo.com/mx/ from my computer. When I curl this URL, I get a 301. When I explicitly type https, it does access the root directory of repo. I am not sure of my conclusion, but could the difference be the culprit ?

In the source code -

Code: Select all

 QFile file(tmp_dir.path() + "/mxPackages.gz");
            QString url {"http://mxrepo.com/mx/testrepo/dists/"};
            if (!cmd.run("apt-get update --print-uris | tac | grep -m1 -oP 'https?://.*/mx/testrepo/dists/(?="
                         + ver_name + "/test/)'")) {
                cmd.run("apt-get update --print-uris | tac | grep -m1 -oE 'https?://.*/mx/repo/dists/" + ver_name
                        + "/main/' | sed -e 's:/mx/repo/dists/" + ver_name
                        + "/main/:/mx/testrepo/dists/:' | grep -oE 'https?://.*/mx/testrepo/dists/'");
            }
The URL string is http
Loving Linux...Since ages...!

User avatar
Adrian
Developer
Posts: 9264
Joined: Wed Jul 12, 2006 1:42 am

Re: MX Package Installer has a difficulty writing file in /tmp

#14 Post by Adrian »

301 is a permanent redirection, I wonder if it was just forwarded to https. For me that works but I will change the code to use https and also change the error message to add that it could be a download issue.

User avatar
fehlix
Developer
Posts: 12957
Joined: Wed Apr 11, 2018 5:09 pm

Re: MX Package Installer has a difficulty writing file in /tmp

#15 Post by fehlix »

Adrian wrote: Fri Oct 18, 2024 10:02 am 301 is a permanent redirection, I wonder if it was just forwarded to https. For me that works but I will change the code to use https and also change the error message to add that it could be a download issue.
Actualy the reason that it uses the fallback "http://mxrepo.com/mx/testrepo/dists/"
is b/c of this MX repo line within /etc/apt/sources.list.d/mx.list:

Code: Select all

deb https://mirror.kku.ac.th/mx-packages/mx//repo/ bookworm main non-free
The doubled slash "//" bewteen in "mx//repo", prevents the detection of the current used MX-repos.
If the mx-repos list within /etc/apt/sources.list.d/mx.list
would be fixed by replacing the double-slash "//" by one slash "/"

Code: Select all

deb https://mirror.kku.ac.th/mx-packages/mx/repo/ bookworm main non-free
deb https://mirror.kku.ac.th/mx-packages/mx/repo/ bookworm ahs
The MX Package installer would not use the fallback but the testrepo of the current mx-repo.
But anyway, it's good the remove the unneeded redirection and use https://mxrepo.com/
within the fallback.

User avatar
abhidesh128
Posts: 83
Joined: Sun Nov 08, 2020 6:03 am

Re: MX Package Installer has a difficulty writing file in /tmp  [Solved]

#16 Post by abhidesh128 »

I edited mx.list to remove the extra forward slash and it solved my 2 issues:
  • It solved the download error with MXPI.
  • It solved issue with MX Repo Manager where it was unable to set another mirror.
Although, I am not sure how that extra / appeared in mx.list. This is a fresh install an I did not modify any apt settings. I was unable to do so because repo manager was not having any effect on mx.list. But, both of these issues have been solved now.
Loving Linux...Since ages...!

User avatar
Adrian
Developer
Posts: 9264
Joined: Wed Jul 12, 2006 1:42 am

Re: MX Package Installer has a difficulty writing file in /tmp

#17 Post by Adrian »

A new MXPI package upcoming that is using https for mxrepo.com link, also clarified a bit the error message
https://build.opensuse.org/projects/hom ... 2/binaries

User avatar
fehlix
Developer
Posts: 12957
Joined: Wed Apr 11, 2018 5:09 pm

Re: MX Package Installer has a difficulty writing file in /tmp

#18 Post by fehlix »

abhidesh128 wrote: Fri Oct 18, 2024 11:30 am I edited mx.list to remove the extra forward slash and it solved my 2 issues:
  • It solved the download error with MXPI.
  • It solved issue with MX Repo Manager where it was unable to set another mirror.
Although, I am not sure how that extra / appeared in mx.list. This is a fresh install an I did not modify any apt settings. I was unable to do so because repo manager was not having any effect on mx.list. But, both of these issues have been solved now.
The reason for the doubled forward slash "//" within the mx-repo deb line's,
is actually an "typo" within the localization routine /sbin/localize-repo
used during LiveBoot_

Code: Select all

in_MX_HOST=https://mirror.kku.ac.th/mx-packages/mx/
That's the only one MX repo-line which ends with /mx/, end creates such
a deb-repo line shown with the QSI:

Code: Select all

  Active apt repos in: /etc/apt/sources.list.d/mx.list
    1: deb https://mirror.kku.ac.th/mx-packages/mx//repo/ bookworm main non-free
    2: deb https://mirror.kku.ac.th/mx-packages/mx//repo/ bookworm ahs
And b/c of "/mx/repo" is used as a search pattern
within MX Package Installer and MX Repo Mananger, would fail due to the
unfortune typo with that line.
One potential "workaround" besides editing manually mx.list ( /etc/apt/sources.list.d/mx.list )
in order to remove the extra forward slash would be to reset orignal apt sources
from within MX Repo Manager:
Restore_original_APT_sources.jpg
But note: The orignal apt-sources do not have "ahs" repo line enabled:
Restore_original_APT_sources_but_AHS.jpg
So you would re-select ahs-repo line again, and afterwards, select the MX repo from the MX Repo list to use.

Suggest, to get the ahs-repos enabled automatically when resettings APT repos,
at least in those cases where detection of ahs in use would be possible @Adrian

Also maybe would be nice to have localize-repo "fixed" in order to prevent snapshot's would re-create
those mx-repo lines with doublo-slashes "//" as well. @dolphin_oracle
You do not have the required permissions to view the files attached to this post.

User avatar
Adrian
Developer
Posts: 9264
Joined: Wed Jul 12, 2006 1:42 am

Re: MX Package Installer has a difficulty writing file in /tmp

#19 Post by Adrian »

How would I detect if AHS were in use?

User avatar
fehlix
Developer
Posts: 12957
Joined: Wed Apr 11, 2018 5:09 pm

Re: MX Package Installer has a difficulty writing file in /tmp

#20 Post by fehlix »

Adrian wrote: Fri Oct 18, 2024 3:11 pm How would I detect if AHS were in use?
Only if current mx repo sources.lists would not be completely been out of order ("borked"),
something like as normal user - no root required.
Either query with apt:

Code: Select all

apt-get update --print-uris | grep -c _ahs_binary
or maybe just check whether some ahs binary lists (still) exist

Code: Select all

ls -d /var/lib/apt/lists/* | grep -c  _ahs_binary
would be greater zero, if ahs is currently been enabled.
Sure if neither lists exist or no valid line found in sources lists, this would not help anyway.
But at least this would keep the ahs line after reset, otherwise ahs line reverts always to get disabled.
+++EDIT+++ adjusted typos

Post Reply

Return to “MX KDE Official Release”