Score:-1

script to modify repository to new release

eg flag

do you use a script to modify all repository to new ubuntu release?

example, i upgrade from jammy to kinetic, exist a script to verify if exist (and do the edit ONLY IF exists) the new channel kinetic and modify the ppa? as below:

FROM: less oibaf-ubuntu-graphics-drivers-jammy.list

deb http://ppa.launchpad.net/oibaf/graphics-drivers/ubuntu/ jammy main

TO: less oibaf-ubuntu-graphics-drivers-kinetic.list

deb http://ppa.launchpad.net/oibaf/graphics-drivers/ubuntu/ kinetic main

THANKS GUYS!

guiverc avatar
cn flag
It would be pretty easy to write such a script (*I'd do it if I felt I needed to*), but to me the idea is improper anyway. Ubuntu & Debian are different systems, and [*Ubuntu release upgrader* Tools](https://launchpad.net/ubuntu/+source/ubuntu-release-upgrader) do more than that, with that approach better fitting Debian.
Terrance avatar
id flag
I agree with @guiverc as there is a reason why when you run a `do-release-upgrade` that it disables all of your 3rd party repositories that the repository itself may not be ready for the newer version of Ubuntu. The `do-release-upgrade` will make that change to the repo line automatically for you, but it will be commented out so you can make sure that the repo is ready before you uncomment it.
Score:2
id flag

You don't need an automated script. You can use what is already on the system You can use a sed command to change all of the instances of jammy to kinetic.

sudo sed -i 's/jammy/kinetic/' *.list 

would change all the list files that contained the word jammy to kinetic if it exists in the file that is in the directory that you are in.

If you wanted to create backups of the files in place it would be pretty much the same command.

sudo sed -i.bak 's/jammy/kinetic/' *.list
Score:1
vn flag

Yes, it's called "Search and Replace" in your text editor.

However, the real challenge is to be sure that a certain PPA has updated packages to the version of Ubuntu you're upgrading to.

You could maybe code a web scraper to find out this info, but I don't think it's feasible. So I'm afraid you have to manually check that each PPA is compatible with your desired version of Ubuntu, then remove invalid PPA's (or hold your upgrade), and finally Search and Replace the distro name in your sources list.

So does a script exist? Not to my knowledge. But I've given the details about how I believe the task should be solved.

dacorsa avatar
eg flag
yes i know @Artur but i ask for and automated script, and search and replace not verify if exist a new channel for the new ubuntu release
dacorsa avatar
eg flag
i asked for an automated script because i have 216 repository
Artur Meinild avatar
vn flag
If you find a bullet-proof way to check that 216 PPA's have a valid upgrade path to the next version of Ubuntu, I'm sure it would be interesting to someone.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.