AOSC-Archive / autobuild3

AOSC OS package maintenance toolkit (version 3)
https://aosc.io
GNU General Public License v2.0
24 stars 17 forks source link

PM: conffiles gets into the way of sourcing #60

Closed MingcongBai closed 9 years ago

MingcongBai commented 9 years ago

When using dpkg or rpm to install autobuild3, it is possible that the package manager will attempt to ask about (dpkg), or simply preserve (rpm) user's old configuration files. However, this process will leave user with *.dpkg-dist, *.dpkg-orig, or *.dist files (last one from RPM).

Not only that, if one chooses to backup a configuration file, say, packaging.bak, autobuild will still attempt to source that, and of course, it will succeed in doing that. Put in the consideration on file sorting, it is true that autobuild will source those files with "extensions" (autobuild3 runs on C locale so this is not a variable).

Can we just to use shopt -s extglob and exclude ALL files with extenstions; or simply, set the only files to be sources (a whitelist to be said).

Artoria2e5 commented 9 years ago

Use extglob. It should look like recsr blah/*!(.dpkg*|dist).

MingcongBai commented 9 years ago

Use extglob. It should look like recsr blah/!(.dpkg|dist).

Sounds good.