You are not logged in.

#1 2016-01-14 23:35:13

michis
Member
Registered: 2015-12-12
Posts: 77

pacman.conf NoExtract syntax for filelist over multiple lines

Hi,

I couldn't figure out the corerct syntax for the NoExtract= option in pacman.conf
I want to do something like this

NoExtract = file1
            file2
            file3

writing all files in one line like this works

NoExtract = file1 file2 file3

but then it would be a really long line...

I tried it with a backslash  at the line ends, but does not work.

NoExtract = file1 \
            file2 \
            file3

Do I have to write NoExtract= in every line like this?

NoExctract = file1
NoExctract = file2
NoExctract = file3

Offline

#2 2016-01-15 00:06:47

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 5,557

Re: pacman.conf NoExtract syntax for filelist over multiple lines

See https://wiki.archlinux.org/index.php/Pa … _to_system

Although I have a space-separated list of files:

NoExtract   = etc/fonts/conf.d/10-scale-bitmap-fonts.conf usr/share/xsessions/openbox-*

Which works just as well.


Sakura:-
Mobo: ASUS P8Z77-V PRO // Processor: Intel Core i7-3770K 3.4GHz // GFX: nVidia GeForce GTX 970 Ti // RAM: 32GB (4x 8GB) Corsair DDR3 (@ 2133MHz) // Storage: 1x 3TB Seagate SATAII 5x 1TB Samsung SATAII, 2x 120GB Corsair SSD

Offline

#3 2016-01-15 00:26:16

michis
Member
Registered: 2015-12-12
Posts: 77

Re: pacman.conf NoExtract syntax for filelist over multiple lines

ok, so if I understand the wiki right I have to put NoExtract= to the beginning of each line?
I thought there might be some syntax to avoid that...

Another thing:
I noticed the NoExtract option deletes files when the package is updated and a file is present in the filesystem.
E.g

Package A contains /usr/share/pixmaps/some-icon.png
I replaced this with another file and set
NoExtract = usr/share/pixmaps/some-icon.png

When package A is updated then pacman deletes /usr/share/pixmaps/some-icon.png
I thought the file will only not be installed.

Ok, then to prevent overwriting I have to use NoUpgrade=
That will create /usr/shre/pixmaps/some-icon.png.pacnew and keep my version of the file, that's what i want.
But in this case I don't want pacman to create a .pacnew file... and get the warnings every time the package is updated.

Is there an option to configure pacman to not create pacnew files for certain files in NoUpgrade= ?

Last edited by michis (2016-01-15 00:31:04)

Offline

#4 2016-01-15 05:41:28

x33a
Forum Moderator
Registered: 2009-08-15
Posts: 3,430
Website

Re: pacman.conf NoExtract syntax for filelist over multiple lines

michis wrote:

Another thing:
I noticed the NoExtract option deletes files when the package is updated and a file is present in the filesystem.
E.g

Package A contains /usr/share/pixmaps/some-icon.png
I replaced this with another file and set
NoExtract = usr/share/pixmaps/some-icon.png

When package A is updated then pacman deletes /usr/share/pixmaps/some-icon.png
I thought the file will only not be installed.

This sounds like a bug. Even if it is by design, you should open a report for the same on the bug tracker.

Ok, then to prevent overwriting I have to use NoUpgrade=
That will create /usr/shre/pixmaps/some-icon.png.pacnew and keep my version of the file, that's what i want.
But in this case I don't want pacman to create a .pacnew file... and get the warnings every time the package is updated.

Is there an option to configure pacman to not create pacnew files for certain files in NoUpgrade= ?

I am not aware of any such option. As for the warnings, it is to bring it to the user's attention, so that the user can merge the changes manually.

Offline

#5 2016-01-15 06:05:38

apg
Developer
Registered: 2012-11-10
Posts: 126

Re: pacman.conf NoExtract syntax for filelist over multiple lines

michis wrote:

ok, so if I understand the wiki right I have to put NoExtract= to the beginning of each line?
I thought there might be some syntax to avoid that...

Another thing:
I noticed the NoExtract option deletes files when the package is updated and a file is present in the filesystem.
E.g

Package A contains /usr/share/pixmaps/some-icon.png
I replaced this with another file and set
NoExtract = usr/share/pixmaps/some-icon.png

When package A is updated then pacman deletes /usr/share/pixmaps/some-icon.png
I thought the file will only not be installed.

Ok, then to prevent overwriting I have to use NoUpgrade=
That will create /usr/shre/pixmaps/some-icon.png.pacnew and keep my version of the file, that's what i want.
But in this case I don't want pacman to create a .pacnew file... and get the warnings every time the package is updated.

Is there an option to configure pacman to not create pacnew files for certain files in NoUpgrade= ?

Add the file to both NoExtract and NoUpgrade.

x33a wrote:

This sounds like a bug. Even if it is by design, you should open a report for the same on the bug tracker.

This is the intended behavior.  https://bugs.archlinux.org/task/39842

Offline

#6 2016-01-15 06:09:32

x33a
Forum Moderator
Registered: 2009-08-15
Posts: 3,430
Website

Re: pacman.conf NoExtract syntax for filelist over multiple lines

apg wrote:
x33a wrote:

This sounds like a bug. Even if it is by design, you should open a report for the same on the bug tracker.

This is the intended behavior.  https://bugs.archlinux.org/task/39842

Thanks for the link. Maybe it should be better documented. But in my opinion, it shouldn't touch existing files at all.

Offline

#7 2016-01-15 14:10:08

michis
Member
Registered: 2015-12-12
Posts: 77

Re: pacman.conf NoExtract syntax for filelist over multiple lines

apg wrote:
michis wrote:

Is there an option to configure pacman to not create pacnew files for certain files in NoUpgrade= ?

Add the file to both NoExtract and NoUpgrade.

That's it, thanks. smile
Hm, maybe there should be an option IgnoreFile for such cases?

From the pacman.conf man page it was not clear to me that NoExtract beahves like if the file isn't in the package at all.

Last edited by michis (2016-01-15 14:10:22)

Offline

#8 2016-01-15 15:29:08

apg
Developer
Registered: 2012-11-10
Posts: 126

Re: pacman.conf NoExtract syntax for filelist over multiple lines

michis wrote:
apg wrote:
michis wrote:

Is there an option to configure pacman to not create pacnew files for certain files in NoUpgrade= ?

Add the file to both NoExtract and NoUpgrade.

That's it, thanks. smile
Hm, maybe there should be an option IgnoreFile for such cases?

Why?  Using NoExtract and NoUpgrade together already does what you want.

michis wrote:

From the pacman.conf man page it was not clear to me that NoExtract beahves like if the file isn't in the package at all.

Patches are of course welcome, but NoExtract does exactly what the documentation says: it prevents the extraction of the file during installation.  It does absolutely nothing when the package is removed, which is the first step in upgrading the package.

Offline

#9 2016-01-15 16:27:32

michis
Member
Registered: 2015-12-12
Posts: 77

Re: pacman.conf NoExtract syntax for filelist over multiple lines

apg wrote:
michis wrote:

Hm, maybe there should be an option IgnoreFile for such cases?

Why?  Using NoExtract and NoUpgrade together already does what you want.

Ok, it was just a quick idea that came into mind:

"Why use two options if it could be done with just one? If I want to put many files to NoUpgrade and NoExtract I have to write all the lines twice".

Humans are lazy... wink
But, yes the functionality is already there.
So never mind, as already mentioned it was just a not long thought about idea. "Hey would be nice if I could do this with just one option".

apg wrote:

It does absolutely nothing when the package is removed, which is the first step in upgrading the package.

"The package is removed first" , that's what I had not mind (removed completly first) but is necessary to understand why a file is deletetd if it's only in NoExtract.

Last edited by michis (2016-01-15 16:43:03)

Offline

#10 2016-01-16 10:31:29

x33a
Forum Moderator
Registered: 2009-08-15
Posts: 3,430
Website

Re: pacman.conf NoExtract syntax for filelist over multiple lines

Moving to "Pacman & Package Upgrade Issues".

Offline

Board footer

Powered by FluxBB