You are not logged in.

#1 2024-05-02 17:39:32

Anakievs
Member
Registered: 2023-06-12
Posts: 18

How to put modified files in archiso without conflicts?

I want to put two files in iso that were modified. I've followed the Arch wiki which points me to Pacman:Skip file from being upgraded.

I've put them inside /home/user/archISO/releng/pacman.conf (where the whole project is saved) like this:

NoUpgrade=usr/avr/include/avr/io.h usr/share/applications/org.inkscape.Inkscape.desktop

I've also tried with:

NoExtract=usr/avr/include/avr/io.h usr/share/applications/org.inkscape.Inkscape.desktop

And also with both together.

But it still complains:

error: failed to commit transaction (conflicting files)
avr-libc: /tmp/work_dir/x86_64/airootfs/usr/avr/include/avr/io.h exists in filesystem
inkscape: /tmp/work_dir/x86_64/airootfs/usr/share/applications/org.inkscape.Inkscape.desktop exists in filesystem
Errors occurred, no packages were upgraded.
==> ERROR: Failed to install packages to new root

I want to avoid 'customize_airootfs.sh' but so far this is the only option which works.
What is the correct procedure to put the modified files?
Thanks!

Offline

#2 2024-05-06 05:45:49

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 620

Re: How to put modified files in archiso without conflicts?

pacman will complain about those files even if you add them to NoExtract. See https://bbs.archlinux.org/viewtopic.php?id=290721 for a similar thread about this issue.
The solution is to place those file somewhere else. Try using /usr/local/share/applications/ instead of /usr/share/applications/.
I can't think of a solution for /usr/avr/include/avr/io.h, though. sad

Offline

#3 2024-05-07 19:28:45

Anakievs
Member
Registered: 2023-06-12
Posts: 18

Re: How to put modified files in archiso without conflicts?

I've thought there is a standard way to do it I don't know of. Then I've found four approaches. All of them are very inconvenient but I will post them in case someone else needs a solution.

1. Put the original .desktop file in NoExtract and rename the custom one to something else. Only for .desktop files.
2. Extract the package, modify it and repack it. Requires custom local repository.
3. Modify /usr/bin/mkarchiso.
4. Modify the file while mkarchiso is running before the squashfs compression.

Offline

Board footer

Powered by FluxBB