GithubHelp home page GithubHelp logo

fabiomux / zypper-upgradedistro Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 38 KB

Interactive script helping to smoothly upgrade openSUSE Leap

Home Page: https://freeaptitude.altervista.org/projects/zypper-upgradedistro.html

License: GNU General Public License v3.0

Makefile 5.22% Shell 84.70% Roff 10.08%
linux opensuse opensuse-leap opensuse-upgrade upgrade zypper zypper-upgraderepo

zypper-upgradedistro's People

Contributors

fabiomux avatar

Stargazers

 avatar  avatar

Watchers

 avatar

zypper-upgradedistro's Issues

zypper-upgradedistro

This is a Bash script that collects all the required steps to upgrade openSUSE Leap to another release among those available, to check and upgrade the repositories it makes use of the zypper-upgraderepo package.

Step-by-step informs and drives the user to every action to perform:

  1. Check the get.opensuse.org website for a new release;
  2. update the packages to their last version;
  3. check for the enabled repository URLs for the upgraded versions, otherwise, raise an error;
  4. once all the enabled repositories are found, upgrade them;
  5. start downloading the packages which upgrade the distribution and cache them;
  6. once all the packages are downloaded upgrade the distro;
  7. reboot the system.

Besides the main features, it must:

  • keep track of the achieved steps in order to provide a resume option;
  • allow skipping some steps that can be avoided without breaking the upgrade process;
  • take care of the export/import of the invalid repository URLs.

/usr/bin/upgradedistro: line 203: /tmp/upgradedistro.2r8u4lGY7ne: Permission denied

Hi Fabio,

thanks for this script. Until now, I performed almost the exact same procedure manually as you did, so I am happy to try out this script!

I ran the script as root, but somehow it fails to access the tmp file. I am now in an infinite loop, as I guess for the same reason (no access) the check-next command does not pickup my edits to the tmp file. See this output:

# zypper upgradedistro
[V] The version Leap 15.4 is available
[?] Do you want to perform an upgrade? [y/N]: y
[V] Selected the last available
[V] System correctly updated         
Checking the Repositories... Error! The repository n.1 named fabiomux can't be upgraded, a manual check is required!
[W] Some repository can't get upgraded, so you can...
[*] 1) Disable the repositories having an invalid URL
[*] 2) Try to find a valid URL to replace it
    
    Continue to apply one of these changes to invalid URLs [RETURN]
1
[V] List ready to be edited [RETURN]

/usr/bin/upgradedistro: line 203: /tmp/upgradedistro.2r8u4lGY7ne: Permission denied
Checking repositories again...Error! The repository n.1 named fabiomux doesn't contain the URL key!
[E] Other problems have been detected!    
    
    Press the [RETURN] key to edit the file again

/usr/bin/upgradedistro: line 203: /tmp/upgradedistro.2r8u4lGY7ne: Permission denied
Checking repositories again...Error! The repository n.1 named fabiomux doesn't contain the URL key!
[E] Other problems have been detected!    
    
    Press the [RETURN] key to edit the file again

/usr/bin/upgradedistro: line 203: /tmp/upgradedistro.2r8u4lGY7ne: Permission denied
Checking repositories again...Error! The repository n.1 named fabiomux doesn't contain the URL key!
[E] Other problems have been detected!    
    
    Press the [RETURN] key to edit the file again

In the above scenario, I first selected "1" as input, then I realized I had to edit the tmp file. I edited the tmp file as follows:

[repository_1]
name=fabiomux
alias=fabiomux
old_url=https://download.opensuse.org/repositories/home:/FabioMux/openSUSE_Leap_15.3/
# The interpolated URL is invalid, try overriding with the one suggested
# in the fields below or find it manually starting from the old_url.
# The alternatives are:
# 1. Waiting for a repository upgrade;
# 2. Change the provider for the related installed packages;
# 3. Disable the repository putting the enabled status to 'No'.
#
url=https://download.opensuse.org/repositories/home:/FabioMux/15.4/
priority=99
enabled=Yes
status=Not Found
hint=Override with this one
suggested_url=https://download.opensuse.org/repositories/home:/FabioMux/15.4/

so i simply copy/pasted the suggested_url into the url field.
But this command still fails:
zypper-upgraderepo --check-next --only-enabled --load-overrides "$tmpfile" --ini --only-invalid 1> $tmpfile
I think because it does not pick up my changes, but it does have permission to overwrite the file again!
I also tried disabling the repo in the override file, but same problem.

I wonder if maybe some file handle is not closed or something.. or maybe it already writes something to stdout before the overrides have been loaded.. causing to load an empty override file..?
just thinking out loud here..

still, I can't understand why the script cannot launch the editor on the tmp file. Btw, these are the permissions:

ls -la /tmp/upgradedistro.2r8u4lGY7ne
-rw------- 1 root root 615  4 dec 18:45 /tmp/upgradedistro.2r8u4lGY7ne

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.