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 07-04-2011, 03:29 PM
Allan McRae
 
Default repo-add: backup old database signature too

If you are keeping a copy of the old database, you probably want
to keep a copy of its signature too.

Signed-off-by: Allan McRae <allan@archlinux.org>
---
scripts/repo-add.sh.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in
index 415ad41..cad02a9 100644
--- a/scripts/repo-add.sh.in
+++ b/scripts/repo-add.sh.in
@@ -642,7 +642,7 @@ if (( success )); then
create_signature "$tmpdir/$filename"

[[ -f $REPO_DB_FILE ]] && mv -f "$REPO_DB_FILE" "${REPO_DB_FILE}.old"
- [[ -f $REPO_DB_FILE.sig ]] && rm -f "$REPO_DB_FILE.sig"
+ [[ -f $REPO_DB_FILE.sig ]] && mv -f "$REPO_DB_FILE.sig" "$REPO_DB_FILE.old.sig"
[[ -f $tmpdir/$filename ]] && mv "$tmpdir/$filename" "$REPO_DB_FILE"
[[ -f $tmpdir/$filename.sig ]] && mv "$tmpdir/$filename.sig" "$REPO_DB_FILE.sig"
dblink="${REPO_DB_FILE%.tar*}"
--
1.7.6
 
Old 07-05-2011, 04:05 AM
Allan McRae
 
Default repo-add: backup old database signature too

If you are keeping a copy of the old database, you probably want
to keep a copy of its signature too. Also, delete the previously
backed-up database signature if no new one is being copied.

Signed-off-by: Allan McRae <allan@archlinux.org>
---
scripts/repo-add.sh.in | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in
index 415ad41..1d04d3b 100644
--- a/scripts/repo-add.sh.in
+++ b/scripts/repo-add.sh.in
@@ -642,7 +642,8 @@ if (( success )); then
create_signature "$tmpdir/$filename"

[[ -f $REPO_DB_FILE ]] && mv -f "$REPO_DB_FILE" "${REPO_DB_FILE}.old"
- [[ -f $REPO_DB_FILE.sig ]] && rm -f "$REPO_DB_FILE.sig"
+ [[ -f $REPO_DB_FILE.sig ]] && mv -f "$REPO_DB_FILE.sig" "$REPO_DB_FILE.old.sig" ||
+ rm -f "$REPO_DB_FILE.old.sig"
[[ -f $tmpdir/$filename ]] && mv "$tmpdir/$filename" "$REPO_DB_FILE"
[[ -f $tmpdir/$filename.sig ]] && mv "$tmpdir/$filename.sig" "$REPO_DB_FILE.sig"
dblink="${REPO_DB_FILE%.tar*}"
--
1.7.6
 

Thread Tools




All times are GMT. The time now is 07:30 AM.

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