FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 09-09-2012, 03:55 AM
Allan McRae
 
Default Remove leading "./" from filenames in mtree file

A properly formatted mtree file may stick a leading "./" in front
of file names in the root directory. Strip this if present.

Signed-off-by: Allan McRae <allan@archlinux.org>
---

Sending for completeness. The full mtree patchset can be seen at
https://patchwork.archlinux.org/user/bundle/8/?state=*

The whole patchset requires libarchives mtree generation to be fixed
using this patch:
https://github.com/allanbrokeit/libarchive/commit/32675a90


src/pacman/check.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/src/pacman/check.c b/src/pacman/check.c
index d325a99..2ccf51d 100644
--- a/src/pacman/check.c
+++ b/src/pacman/check.c
@@ -242,6 +242,11 @@ int check_pkg_full(alpm_pkg_t *pkg)
mode_t type;
size_t file_errors = 0;

+ /* strip leading "./" from path entries */
+ if(path[0] == '.' && path[1] == '/') {
+ path += 2;
+ }
+
if(strcmp(path, ".INSTALL") == 0) {
char filename[PATH_MAX];
snprintf(filename, PATH_MAX, "%slocal/%s-%s/install",
--
1.7.12
 

Thread Tools




All times are GMT. The time now is 09:43 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org