You are not logged in.

#1 2021-01-06 04:53:17

Coalms
Member
Registered: 2020-04-22
Posts: 59

[SOLVED]pacman and aur returning 404 unless I pacman -Syy

The issue is pretty self explanatory based on the subject but I am going to give a more thorough explanation for obvious reasons:


○What I haven't confirmed(you can skip this part):
The problem lies (probably)because I use my phone as a wifi router and(probably) it has everchanging IP address every once in a while causing my latpop to lose connection with the server and mirrors ,just like having a map on where local towns are but always changing your direction and never remembering it,it happens every few hours or so the least

○What I know for a fact:
Calling pacman -Syy fixes the problem,placing it on .xprofile solves the issue,in a crude way that is

○Why I posted this topic:
I've heard that its not wise to refresh the database constantly as it can cause issues when downloading new packages downloaded through pacman -S ,as I as well have probably already confirmed with my few recent "fk cant boot, welp time to liveboot again..." problems

○Advice I am looking for:
A confirmation to if calling pacman -Syy through .xprofile can cause such problems or/and a more sophisticated (than my knowledge and ways) way to solve the issue at hand

Last edited by Coalms (2021-01-10 22:53:19)

Offline

#2 2021-01-06 05:16:51

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: [SOLVED]pacman and aur returning 404 unless I pacman -Syy

This makes no sense to me. Does this happen every time you boot? If you only notice this sometimes, maybe you are just not updating often enough? If you are not updating your system, the 404 simply means you need to update.

If it's a weird network problem, maybe there's another way to get it to work instead of doing pacman -Syy. I'd try experimenting with things like doing "ping -c 1" to the mirrors in /etc/pacman.d/mirrorlist.

It's dangerous to do -Sy instead of -Syu so you should not put -Syy into your .xprofile. You can do the following to be safe:

fakeroot -- pacman -Syy --dbpath /tmp

This will download the package database into a folder in /tmp and will not touch your system's database.

Offline

#3 2021-01-06 06:17:43

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED]pacman and aur returning 404 unless I pacman -Syy

Coalms wrote:

The issue is pretty self explanatory based on the subject but I am going to give a more thorough explanation for obvious reasons:


○What I haven't confirmed(you can skip this part):
The problem lies (probably)because I use my phone as a wifi router and(probably) it has everchanging IP address every once in a while causing my latpop to lose connection with the server and mirrors ,just like having a map on where local towns are but always changing your direction and never remembering it,it happens every few hours or so the least

That's not how the internet works.

Coalms wrote:

○What I know for a fact:
Calling pacman -Syy fixes the problem,placing it on .xprofile solves the issue,in a crude way that is

○Why I posted this topic:
I've heard that its not wise to refresh the database constantly as it can cause issues when downloading new packages downloaded through pacman -S ,as I as well have probably already confirmed with my few recent "fk cant boot, welp time to liveboot again..." problems

○Advice I am looking for:
A confirmation to if calling pacman -Syy through .xprofile can cause such problems or/and a more sophisticated (than my knowledge and ways) way to solve the issue at hand

If you get 404 errors when installing new packages with "pacman -S someprogram", then use "pacman -Syu someprogram".

DO NOT USE -Sy, or -Syy, if you use it you are AUTOMATICALLY wrong unless you've been advised to do so by a pacman developer, or can write a 1000-word essay on what the difference is between -Sy and -Syu.

In short, this is an advanced debugging option, which will break your system if you use it without being an expert.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#4 2021-01-07 07:36:59

Coalms
Member
Registered: 2020-04-22
Posts: 59

Re: [SOLVED]pacman and aur returning 404 unless I pacman -Syy

Replying to both I want to say a few things,

I will try the tmp database file later and the ping -c 1 thanks, It happens every ~9~15 hours its just that I use my computer for  min 4 max 12 hours at a time so the .xprofile diabolical way of fixing things was the only thing I could think of

Also eschwartz thanks for informing me about the dangers of Syy Sy

I dont WANT to pqcman -Syy I am just forced to since I cant download anything otherwise I just figured since the problem fixes itself every time I Syu i should just drop the u altogether for my daily needs(download a single font from aur for example....)to be honest Im really confused on why this happens thats why I pointed out my wifi tethering situation since its the only thing that is different from past arch installs and the problem on this one started arising roughly the month I started tethering for wifi, didn't mean to confuse or irrigate with my explanations


In general just gave a rough explanation of how I see things could be wrong and why I have to act the way I act, unorthodoxly with the terminal, again, hence this post

Last edited by Coalms (2021-01-07 07:38:12)

Offline

#5 2021-01-07 08:27:59

kermit63
Member
Registered: 2018-07-04
Posts: 225

Re: [SOLVED]pacman and aur returning 404 unless I pacman -Syy

Perhaps this link from the arch wiki might help. Just stick to the recommended parameters and you won't get in trouble especially if you're new to arch in general and pacman in particular.

... I just figured since the problem fixes itself every time I Syu i should just drop the u altogether for my daily needs(download a single font from aur for example...

This statement doesn't make sense. Pacman has nothing to do with the AUR. I think you need to read up on Arch Package Management.

Offline

#6 2021-01-07 08:30:18

seth
Member
Registered: 2012-09-03
Posts: 57,175

Re: [SOLVED]pacman and aur returning 404 unless I pacman -Syy

I dont WANT to pqcman -Syy I am just forced to since I cant download anything otherwise I just figured since the problem fixes itself every time I Syu

1. check "man pacman" on what -Syy actually does and then stop doing that (hint: it's *not*: "-Sy, but y harder!")
2. It "fixes" itself w/ -Syu because "-Syu" implies "-Sy"
3. You get 404's w/o "-Sy" because the package was updated on the mirror in comparism to your database and you're trying to fetch an old package, If you read up what "-Sy" does yo should understand why "-Sy" fixed the dated-database problem
4. This entire thread makes utterly clear that you are in no positition to conduct the partial updates that an unconditional "-Sy" implies (unlike "-Syu" which will update the database and all packages)
5. Henceforth you shall exclusively run "pacman -Syu somepackage" and never "pacman -Sy somepackage" or "pacman -Sy; pacman -S somepackage" until you submitted an explanation why and in what context and cases it would be ok (but unlike eschwartz, I'll go w/ less than 1000 words - it you know what you're doing, there's no reason to bloat that ;-)

@kermit63, the thread mentions "aur" but I assume that's some helper and this is really just about the repos.

Offline

#7 2021-01-07 09:37:58

Coalms
Member
Registered: 2020-04-22
Posts: 59

Re: [SOLVED]pacman and aur returning 404 unless I pacman -Syy

Apologies there might be some misunderstandings,from previous knowledge and reassurance from this thread I can totally understand that Sy and Syy is a taboo action that can damage my system in ways I cannot completely understand ,although Im still looking at the information I have been presented with but I want to make things more clear in case there is confusion

I dont know why but yes I have confirmed that pac -Syy helps with aur( with yay command)probably because of needed dependencies that are downloaded from mirrors

Im not using pac -Sy or -Sy to download a package like so

pacman -Sy packagename

but rather I am just calling pacman -Sy and then pacman -S packagename just like

seth wrote:

pacman -Sy; pacman -S somepackage

stated  ,although I don't see a difference in doing either way ,haven't yet completly checked @kermit63's link will reply to ya by this afternoon ,although in any context your link is useful to compare linux distro package manager commands

As a reply to @seth ,
well first

seth wrote:

passing two --refresh or -y flags will force a refresh of all package databases,even if they appear to be up-to-date.

Does that mean that I shouldn't have a problem pacman -Sy(even though you later in your post go against it for not so obvious reasons to me) to fix the problem,that question goes along with

seth wrote:

You get 404's w/o "-Sy" because the package was updated on the mirror in comparism to your database and you're trying to fetch an old package

,that is my understanding(kind of)as well but its very eerie when every single package I download when that happens returns a 404,happening consistently every few hours(again) until I  -Sy

as I have stated before in this thread I am posting here to find a way to stop using pacman -Syy since I know how harmful it is,next it happens I will copy the log from the terminal to give you the exit code or the like but in short either 404 will continue until all available mirrors that can be checked have and the dependency or package cant be found or each dependency will go trough the whole process of checking each mirror getting 404 and going to the next,until what dependency or package is found ,this whole process takes an unbelievable long amount of time for a simple package with 5 or 6 dependencies,causing me to either
a)Download anything I want only when I have time to spare once every 2 days and stand there playing on my phone or reading a book until its done (since my computer is way to old and just downloading from pacman is a heavy process for me) 
b)A few months later I realized that refresh with -Syy and save at least 10 mins of my life of doing nothing but looking at the computer screen and I've been using it since

Until now I can see myself seem like the most arrogant or perhaps more so stubborn person in the forum based on my responses ,and I don't want to look like that,
the current situation is like my being depressed and someone telling be "just be happy",all the while i inject myself with a drug called Syy

Looking back I should have phrased things better and for that I am sorry

Lastly since I have been using Syy for about a month now,I will stop it for a few days until it happens again so I get the output log for you

Offline

#8 2021-01-07 09:53:27

loqs
Member
Registered: 2014-03-06
Posts: 17,908

Re: [SOLVED]pacman and aur returning 404 unless I pacman -Syy

Coalms wrote:

Im not using pac -Sy or -Sy to download a package like so

pacman -Sy packagename

but rather I am just calling pacman -Sy and then pacman -S packagename just like

seth wrote:

pacman -Sy; pacman -S somepackage

stated  ,although I don't see a difference in doing either way

There is no difference with respect to both performing partial updates and you should not perform either.

Offline

#9 2021-01-07 10:21:28

Coalms
Member
Registered: 2020-04-22
Posts: 59

Re: [SOLVED]pacman and aur returning 404 unless I pacman -Syy

loqs wrote:
Coalms wrote:

Im not using pac -Sy or -Sy to download a package like so

pacman -Sy packagename

but rather I am just calling pacman -Sy and then pacman -S packagename just like

seth wrote:

pacman -Sy; pacman -S somepackage

stated  ,although I don't see a difference in doing either way

There is no difference with respect to both performing partial updates and you should not perform either.

Noted,thanks

Offline

#10 2021-01-07 12:03:30

seth
Member
Registered: 2012-09-03
Posts: 57,175

Re: [SOLVED]pacman and aur returning 404 unless I pacman -Syy

The additional "y" will allow you to downgrade the database and since that's hardly ever what you want is just a way to shoot your own foot.



I'll try to illustrate why you encounter the 404, why -Sy lessthamagically "fixes" that and why it's a bad idea nevertheless:

Last week you ran a complete system upgrade (pacman -Syu)

Yesterday SuperTurboTurkeyPuncher game was updated to v3 (ultrablood patch) and you decide to install thatt (pacman -S superturboturkeypuncher) but the local database was updated a week ago (-Syu) and references v2 of the game (which has a nasty bug and uses a chicken instead of a turkey model) and that is what pacman tries to download.

Since the old version of the package is no longer in the repos, it's url is now invalid and you get error 404.

So you run "pacman -Sy" what updates the local package database that now references v3 of the game, so the subsequent installation succeeds (death to the turkey!)

Unfortunately, the ultrablood patch relied on the new DirectVulkanGL 8.2 library which is in the repos, but not on your harddisk, because it was only updated w/ the game and you still have DirectVulkanGL 7.6 (the previous release that came w/ the update last week) - you have installed the game, but it crashes when you try to run it.

You google the crash message and figure it's because your DirectVulkanGL is too old (stupid archlinux)

So you try to update the library (pacman -S directvulkangl) and.... yes! take this, turkey! and this! and that as well!!!

More unfortunately, however, is that Your desktop environment "DWARF" uses DirectVulkanGL as well and so does your office suite "JailOffice" and the image program "PIMP". And most unfortunately, DirectVulkanGL 8.2 is not compatible with DirectVulkanGL 7.6 and because your desktop, office and image program all link the wrong library now, they'll all crash what you're gonna figure, when you try to start the computer tomorrow morning.

If you had instead run "pacman -Syu superturboturkeypuncher" you would have gotten the game, the new version of DirectVulkanGL and a compatible desktop, office and image editor, be killig turkeys right now and your system would just boot tomorrow.


PS, google the game ;-)

Offline

#11 2021-01-07 15:45:50

CarbonChauvinist
Member
Registered: 2012-06-16
Posts: 413
Website

Re: [SOLVED]pacman and aur returning 404 unless I pacman -Syy

seth wrote:

The additional "y" will allow you to downgrade the database and since that's hardly ever what you want is just a way to shoot your own foot.

Erm, I think you've made a typo here - I'm normally loathe to jump in especially when more knowledgable people are already helping, but this is such a fundamental misunderstanding of many new Archers that I think it's worthwhile to make sure the point is noted here.

AFIAK an additional "u"(i.e `pacman -S{y}uu`) will allow downgrades for installed packages (mainly used for instance when jumping off testing repos and going back to mainline repos), while an additional "y" (i.e `pacman -Syy{u}`) will force a sync of the repos even if one is not needed.


I'll try to illustrate why you encounter the 404, why -Sy lessthamagically "fixes" that and why it's a bad idea nevertheless:
...

Thanks for this, a lot of people seem to have a hard time with this concept and this explains it well and with a bit of levity to boot (I really did chuckle out loud at DWARF).

Last edited by CarbonChauvinist (2021-01-07 15:49:06)


"the wind-blown way, wanna win? don't play"

Offline

#12 2021-01-07 15:49:51

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,234
Website

Re: [SOLVED]pacman and aur returning 404 unless I pacman -Syy

CarbonChauvinist wrote:

while an additional "y" (i.e `pacman -Syy{u}`) will force a sync of the repos even if one is not needed.

And one is not needed when the timestamp on the server is equal to or less than the timestamp on the local database file.  So adding an additional 'y' forces a download of the databse in these conditions which would allow one to downgrade the database which is what was stated.  Downgrading packages with two 'u's is entirely tangential.

Last edited by Trilby (2021-01-07 15:59:56)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#13 2021-01-07 15:54:32

seth
Member
Registered: 2012-09-03
Posts: 57,175

Re: [SOLVED]pacman and aur returning 404 unless I pacman -Syy

One is simply an implication of the other.

man pacman wrote:

Passing two --refresh or -y flags will force a refresh of all package databases, even if they appear to be up-to-date.

Normally, if you incorporate a mirror w/ a *database* older than your local one (eg. an outdated mirror), pacman won't downgrade to the dated *database*.
https://wiki.archlinux.org/index.php/Arch_Linux_Archive

Another reason would be if the local database is somehow corrupted, but the "regular" reason (and usual one - I assume, I've no stats on that ;-) would be a downgrade.

As you actually correctly noted, the second "u" will allow *package* downgrades.

Edit: ninja'd

Last edited by seth (2021-01-07 15:55:08)

Offline

#14 2021-01-07 15:56:55

CarbonChauvinist
Member
Registered: 2012-06-16
Posts: 413
Website

Re: [SOLVED]pacman and aur returning 404 unless I pacman -Syy

Trilby wrote:

And one is not needed when the timestamp on the server is equal to or less than the timestamp on the local database file.  So adding an additional 'y' forces a download of the databse in these conditions which would allow one to downgrade the database which is what was stated.  Downgrading packages with two 'u's is enterily tangential.

Ahhh, I see, thanks for the clarifications @Trilby and @seth.

Last edited by CarbonChauvinist (2021-01-07 15:58:44)


"the wind-blown way, wanna win? don't play"

Offline

#15 2021-01-10 19:53:43

Coalms
Member
Registered: 2020-04-22
Posts: 59

Re: [SOLVED]pacman and aur returning 404 unless I pacman -Syy

Missed 2 days cuz life and I come back to a gentleman's friendly convo,

IMO @seth gave a wonderful explanation using a story from a parallel universe of GNU + Frame Hal9000 with a few shining additions from everyone else

But I have to ask,wourld Syuu help solving buggy software or make aur packages unusable at some stages
Isn't it advised against upgrading the system all the time with -Syu (so should I just download packages every other day for a more healthy system and less bugs due to "missing(upgraded)" dependencies?
Lastly the way I understand it

-Syy = fast way to screw with a friends computer
-Syy = short way to screw with a friends computer
-Syu = Normal way to upgrade the computer ?and download packages?
-S = normal way to download packages when last computer upgrade was a recent one?
-Syuu = Downgrade packages to the most stable and (dependency wise)shared (between packages) in the system
-Syyuu = same as above but its the "I want to be trans-buntu and you have no say in this" way

I hope I got everything right Ill close the topic after

Last edited by Coalms (2021-01-10 19:55:56)

Offline

#16 2021-01-10 20:27:52

loqs
Member
Registered: 2014-03-06
Posts: 17,908

Re: [SOLVED]pacman and aur returning 404 unless I pacman -Syy

-Syuu = Full system update allow downgrading of packages if the version in the database is older than the installed version,  this will not fetch old database from mirror provided yours is more recent so will not downgrade to old versions on mirror.
-Syyuu = Full system update force download of database allow downgrading of packages if the version in the database is older than the installed version,  force use of potentially dated database and older packages.

Offline

#17 2021-01-10 20:45:36

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,234
Website

Re: [SOLVED]pacman and aur returning 404 unless I pacman -Syy

In a vast - exceedingly vast - majority of cases, you should only use -Syu or -S.  All other combinations listed should simply not be used.  There are extremely rare cases where two 'y's or two 'u's might be called for as a remedy for a very specific and very rare problem - but if you don't know exactly why you are using one of those and exactly what problem it is designed to solve, don't use them.  Any combination of 'y' withou 'u' should simply never be used, ever.

Last edited by Trilby (2021-01-10 20:45:59)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#18 2021-01-10 22:52:48

Coalms
Member
Registered: 2020-04-22
Posts: 59

Re: [SOLVED]pacman and aur returning 404 unless I pacman -Syy

Sweet I got everything I needed here and definitely future mistakes won't happen , thanks a million , ppl

Offline

Board footer

Powered by FluxBB