FS#61195 - repo-add adding incorrect filenames to deltas for packages with epoch in version

Attached to Project: Pacman
Opened by Nigel Kukard (nkukard) - Thursday, 27 December 2018, 22:38 GMT
Last edited by Eli Schwartz (eschwartz) - Thursday, 21 March 2019, 23:01 GMT
Task Type Bug Report
Category Scripts & Tools
Status Closed
Assigned To Eli Schwartz (eschwartz)
Architecture All
Severity Low
Priority Normal
Reported Version git
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Summary and Info:

repo-add is not adding the correct filename in the package DB when using delta generation.

Field 4 and field 5 are incorrect?

# cat */deltas | grep -v DELTAS | grep 1.0.3
julia-docs-2:1.0.3-1_to_2:1.0.3-2-x86_64.delta 2d396cd81a6976787576322033812ed1 17680 1.0.3-1-x86_64.pkg.tar.xz 1.0.3-2-x86_64.pkg.tar.xz


Steps to Reproduce:
repo-add /tmp/file.db.tar.gz julia-docs-2:1.0.3-1-x86_64.pkg.tar.xz
repo-add --delta /tmp/file.db.tar.gz julia-docs-2:1.0.3-2-x86_64.pkg.tar.xz
tar -zxvf /tmp/file.db.tar.gz
cat julia-docs-2:1.0.3-2/deltas
This task depends upon

Closed by  Eli Schwartz (eschwartz)
Thursday, 21 March 2019, 23:01 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in git, and also completely removed from the tree in git. Well, it is definitely fixed....
Comment by Nigel Kukard (nkukard) - Thursday, 27 December 2018, 23:02 GMT
I sent a patch to the ML, attached here too.
Comment by Eli Schwartz (eschwartz) - Thursday, 27 December 2018, 23:21 GMT
The ":" is our delimiter for parsing the xdelta3 headers in order to figure out the original filename, which means our sed pattern sucks (and also runs a second grep process for no good reason).

Your patch:
https://lists.archlinux.org/pipermail/pacman-dev/2018-December/023031.html
My patch, before I noticed you submitted one:
https://lists.archlinux.org/pipermail/pacman-dev/2018-December/023032.html

Comment by Nigel Kukard (nkukard) - Thursday, 27 December 2018, 23:23 GMT
One sed is definitely better :)

Loading...