mirror of
https://github.com/moparisthebest/pacman
synced 2025-03-01 09:51:50 -05:00
repo-add : don't change the modification time on depends and desc
The modification time on depends and desc file were changed to match the modification time of the package file. I don't see why and we are actualling losing information here. If we want to know the date of the package file, we can just look inside the depends file. If we want to know when the entry was created, we should not alter the modification time of depends and desc. Besides, this had the non-obvious and undocumented side effect that the depends file was always created, even if it was empty. And pacman actually does require that. So I added a "touch depends" to always create the file. Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
This commit is contained in:
parent
59b4725bbb
commit
91d43ba4b4
@ -262,6 +262,8 @@ db_write_entry()
|
||||
|
||||
# create depends entry
|
||||
msg2 "$(gettext "Creating 'depends' db entry...")"
|
||||
# create the file even if it will remain empty
|
||||
touch "depends"
|
||||
write_list_entry "DEPENDS" "$_depends" "depends"
|
||||
write_list_entry "CONFLICTS" "$_conflicts" "depends"
|
||||
write_list_entry "PROVIDES" "$_provides" "depends"
|
||||
@ -269,11 +271,6 @@ db_write_entry()
|
||||
|
||||
cd "$startdir"
|
||||
|
||||
# preserve the modification time
|
||||
# Xav : what for?
|
||||
pkgdir="$gstmpdir/$pkgname-$pkgver"
|
||||
touch -r "$pkgfile" "$pkgdir/desc" "$pkgdir/depends"
|
||||
|
||||
return 0
|
||||
} # end db_write_entry
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user