[pacman-dev] [PATCH 0/7] [RFC] extract_single_file cleanup

Andrew Gregory andrew.gregory.8 at gmail.com
Wed Oct 1 07:05:52 UTC 2014


This is my attempt to clean up the behemoth extract_single_file function.  In
order to do this I have made the following user-visible changes that I would
like feedback on:

* skip mtree, noupgrade, noextract checks for db files
* remove .pacorig support, use .pacnew instead
* extract backup files directly to .pacnew instead of .paccheck

This takes extract_single_file down from 340 lines to 225 and considerably
reduces the number of nested conditionals

Andrew Gregory (7):
  extract_single_file: consolidate needbackup checks
  extract_single_file: reduce indentation
  extract_single_file: factor out db file extraction
  extract_single_file: use full path in messages
  remove support for .pacorig files
  extract_single_file: use .pacnew for check files
  extract_single_file: consolidate extraction logic

 contrib/README                  |   2 +-
 contrib/pacdiff.sh.in           |   9 +-
 doc/pacman.8.txt                |   5 +-
 lib/libalpm/add.c               | 413 ++++++++++++++++------------------------
 lib/libalpm/alpm.h              |  15 +-
 src/pacman/callback.c           |  16 --
 test/pacman/README              |   1 -
 test/pacman/pmrule.py           |   3 -
 test/pacman/tests/upgrade015.py |   1 -
 test/pacman/tests/upgrade016.py |   5 +-
 test/pacman/tests/upgrade027.py |   1 -
 test/pacman/tests/upgrade028.py |   1 -
 test/pacman/tests/upgrade029.py |   1 -
 13 files changed, 171 insertions(+), 302 deletions(-)

-- 
2.1.1


More information about the pacman-dev mailing list