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 04-29-2008, 03:28 AM
Dan McGee
 
Default Remove unnecessary archive_entry_set_pathname() calls

I'm not sure why these were ever here, as by this point we have already
extracted the file meaning a call to this function is basically a no-op.

Signed-off-by: Dan McGee <dan@archlinux.org>
---
lib/libalpm/add.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index ca4cfa9..6795d52 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -500,19 +500,16 @@ static int extract_single_file(struct archive *archive,

/* move the existing file to the "pacorig" */
if(rename(filename, newpath)) {
- archive_entry_set_pathname(entry, filename);
_alpm_log(PM_LOG_ERROR, _("could not rename %s (%s)
"), filename, strerror(errno));
alpm_logaction("error: could not rename %s (%s)
", filename, strerror(errno));
errors++;
} else {
/* copy the tempfile we extracted to the real path */
if(_alpm_copyfile(tempfile, filename)) {
- archive_entry_set_pathname(entry, filename);
_alpm_log(PM_LOG_ERROR, _("could not copy tempfile to %s (%s)
"), filename, strerror(errno));
alpm_logaction("error: could not copy tempfile to %s (%s)
", filename, strerror(errno));
errors++;
} else {
- archive_entry_set_pathname(entry, filename);
_alpm_log(PM_LOG_WARNING, _("%s saved as %s
"), filename, newpath);
alpm_logaction("warning: %s saved as %s
", filename, newpath);
}
@@ -531,7 +528,6 @@ static int extract_single_file(struct archive *archive,
_alpm_log(PM_LOG_ERROR, _("could not copy tempfile to %s (%s)
"), filename, strerror(errno));
errors++;
}
- archive_entry_set_pathname(entry, filename);
} else {
/* there's no sense in installing the same file twice, install
* ONLY is the original and package hashes differ */
--
1.5.5.1


_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 04-29-2008, 03:34 AM
Dan McGee
 
Default Remove unnecessary archive_entry_set_pathname() calls

I'm not sure why these were ever here, as by this point we have already
extracted the file meaning a call to this function is basically a no-op.

Signed-off-by: Dan McGee <dan@archlinux.org>
---
lib/libalpm/add.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index ca4cfa9..6795d52 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -500,19 +500,16 @@ static int extract_single_file(struct archive *archive,

/* move the existing file to the "pacorig" */
if(rename(filename, newpath)) {
- archive_entry_set_pathname(entry, filename);
_alpm_log(PM_LOG_ERROR, _("could not rename %s (%s)
"), filename, strerror(errno));
alpm_logaction("error: could not rename %s (%s)
", filename, strerror(errno));
errors++;
} else {
/* copy the tempfile we extracted to the real path */
if(_alpm_copyfile(tempfile, filename)) {
- archive_entry_set_pathname(entry, filename);
_alpm_log(PM_LOG_ERROR, _("could not copy tempfile to %s (%s)
"), filename, strerror(errno));
alpm_logaction("error: could not copy tempfile to %s (%s)
", filename, strerror(errno));
errors++;
} else {
- archive_entry_set_pathname(entry, filename);
_alpm_log(PM_LOG_WARNING, _("%s saved as %s
"), filename, newpath);
alpm_logaction("warning: %s saved as %s
", filename, newpath);
}
@@ -531,7 +528,6 @@ static int extract_single_file(struct archive *archive,
_alpm_log(PM_LOG_ERROR, _("could not copy tempfile to %s (%s)
"), filename, strerror(errno));
errors++;
}
- archive_entry_set_pathname(entry, filename);
} else {
/* there's no sense in installing the same file twice, install
* ONLY is the original and package hashes differ */
--
1.5.5.1


_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 

Thread Tools




All times are GMT. The time now is 05:43 AM.

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