You are not logged in.
Hi everyone,
is there a way to remove specific files from an existing package? And is there a way to automatically re-do this every time that package is reinstalled?
??Why woud you even want this??
Consider gcc-multilib. Besides all the really necessary files, there are some man pages, with some of the man pages being specific to gcc and some others describing parts of the c++ standard lib. However, not all of the standard lib is covered and when working while under way, I often have to wait until there is internet access to look up stuff that is missing in this set of documentation. Then there is the AUR package stdman which encapsulates the cppreference, which should solve most of my problems, but cannot be installed because it clashes with the standard lib documentation of gcc-multilib.
Since stdman is an AUR package, I could remove the offending files there, but I would rather have consistent man pages from one package. On the other hand, I could edit the PKGBUILD for gcc-multilib, too, but I would prefer not having to re-compile gcc myself every time.
Removing files from existing packages would provide an --at least to me-- elegant solution.
I have found Skip files from being installed to system but I guess this would also block the files from the package whose files I want, wouldn't it?
Best regards,
mox
p.S.:
Out of curiosity, I tried, if I could do this manually and it seems to have worked. The steps:
pacman -Sw <package> to download the package one wants to modify
cp /var/cache/pacman/pgk/<package_file> /tmp/<scratchdir> && cd /tmp/<scratchdir>
tar xf <package_file> && rm <package_file>
xargs rm < <file_with_list_of_files_to_remove>
tar -cf - .PKGINFO * | xz -c -z - > ../<package_file>
pacman -U ../<package_file>Now this is obviously quite hacky, but it shows is can be done.
Last edited by Mox (2016-09-05 19:57:27)
Offline
https://wiki.archlinux.org/index.php/Arch_Build_System
EDIT: My bad, you don't want to recompile.
Last edited by Awebb (2016-09-05 22:07:01)
Offline
man pacman.conf -> NoExtract
Offline
Hey Allan,
I'm sorry, I only saw your reply now. And thank you for reply!
There are two problems with using NoExtract (and NoUpgrade):
I seem to misunderstand how to use it. By now, I have added the following lines to /etc/pacman.conf
NoUpgrade = usr/share/man/man3/std::allocator.3.gz
NoUpgrade = usr/share/man/man3/std::allocator_traits.3.gz
NoUpgrade = usr/share/man/man3/std::array.3.gz
NoUpgrade = usr/share/man/man3/std::atomic.3.gz
NoUpgrade = usr/share/man/man3/std::atomic_flag.3.gz
...
NoExtract = usr/share/man/man3/std::allocator.3.gz
NoExtract = usr/share/man/man3/std::allocator_traits.3.gz
NoExtract = usr/share/man/man3/std::array.3.gz
NoExtract = usr/share/man/man3/std::atomic.3.gz
NoExtract = usr/share/man/man3/std::atomic_flag.3.gz
...but when I run pacman -Syu (which involves an update for gcc-multilib), I get
error: failed to commit transaction (conflicting files)
gcc-multilib: /usr/share/man/man3/std::allocator.3.gz exists in filesystem
gcc-multilib: /usr/share/man/man3/std::allocator_traits.3.gz exists in filesystem
gcc-multilib: /usr/share/man/man3/std::array.3.gz exists in filesystem
gcc-multilib: /usr/share/man/man3/std::atomic.3.gz exists in filesystem
gcc-multilib: /usr/share/man/man3/std::atomic_flag.3.gz exists in filesystem
...What would I do to update the package that provides those man pages? Is there a way to automatically use a special pacman.conf file for updating that package?
Offline