You are not logged in.

#1 2013-07-22 05:16:17

thorion
Member
Registered: 2012-02-06
Posts: 19

pacarm - script using ARM to resolve pacman 404 errors

Say you haven't updated your Arch box in a few weeks, and you suddenly realize you need to install package foo. In the last few weeks, foo-2.0 has been replaced by foo-2.1 in the Arch repos, so when you run "pacman -S foo", pacman looks for foo-2.0, doesn't find it, and throws a 404 error. At this point, you could either (1) update your entire system, which can be time-consuming, and then install foo-2.1, or (2) find foo-2.0 in the Arch Rollback Machine, install it, and update your system later. pacarm is a script that aims to automate this second option.

Depends on xyne's armh (available in AUR).

Disclaimers: This is the first script I've posted on here, so:

1. This script is quickly written, inefficient, and probably unsafe. Use at your own risk.
2. It depends heavily on searching output (lots of `grep`ing and `cut`ing), so if `pacman` or `armh` change the way their output is formatted, this script will break.
3. This allows you to install *outdated* packages. *DO NOT* report bugs for packages if you use `pacarm` as the versions of the packages you're using will probably be unsupported.

https://github.com/xerebus/pacarm

Last edited by thorion (2013-07-22 05:17:47)

Offline

#2 2013-07-22 05:20:42

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: pacarm - script using ARM to resolve pacman 404 errors

GIven that partial upgrades are unsupported, you might want to reverse the order of your
disclaimers...

While I applaud your ingenuity, this just seems like a very bad idea™


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2013-07-22 05:51:17

thorion
Member
Registered: 2012-02-06
Posts: 19

Re: pacarm - script using ARM to resolve pacman 404 errors

Correct me if I'm wrong, but this isn't a partial upgrade because it's not an upgrade at all.

Say that foo-2.0 depended on bar-1.0, and when it was replaced in the repos by foo-2.1, bar-1.1 was also added to the repos. Now, if you have a system with bar-1.0, and you try to install foo-2.1, this could break the system as it is a partial upgrade (foo has been upgraded to the latest version, but bar hasn't). However, if you use pacarm, you would not be installing foo-2.1. You would be installing foo-2.0, which is the version that was in the Arch repos at the time that you last updated and installed bar-1.0. Using pacarm to install foo would get you the same result as having installed foo a few weeks ago when you updated.

The third disclaimer doesn't refer to partial upgrades, it refers to the fact that the versions of packages you will be using are no longer supported by Arch package maintainers. It's the same as just not updating your system for a month and filing a bug report for firefox, while in that month a new version of firefox was put in the repos.

tl;dr You're not partially upgrading the system, you're installing the old package that corresponds to your local pacman database. In fact, the goal of using pacarm is to avoid partial upgrades.

Last edited by thorion (2013-07-22 06:02:18)

Offline

#4 2013-07-22 06:06:40

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: pacarm - script using ARM to resolve pacman 404 errors

thorion wrote:

Correct me if I'm wrong, but this isn't a partial upgrade because it's not an upgrade at all.

Yes: my bad, I had focussed on the option 2 sentence. This is more like freezing
your system at a point in time, so not a completely bad idea™ - aspersion
retracted.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB