Hi Hans, Here are two proposed changes. First the gpt/write_back change, and then one to decouple the library and package version numbers.
>From ea4d764d5df16fa17ef77c55a59587ca33e7546a Mon Sep 17 00:00:00 2001 From: Jim Meyering <[email protected]> Date: Fri, 12 Feb 2010 14:59:04 +0100 Subject: [PATCH 1/2] gpt: clean-up wrt write_back (no semantic change) * libparted/labels/gpt.c (gpt_read): Initialize write_back to 0 once again, and set it to 1 on the sole path that requires that. --- libparted/labels/gpt.c | 10 ++-------- 1 files changed, 2 insertions(+), 8 deletions(-) diff --git a/libparted/labels/gpt.c b/libparted/labels/gpt.c index 48d580e..40ee0c1 100644 --- a/libparted/labels/gpt.c +++ b/libparted/labels/gpt.c @@ -898,7 +898,7 @@ gpt_read (PedDisk *disk) GPTDiskData *gpt_disk_data = disk->disk_specific; int i; #ifndef DISCOVER_ONLY - int write_back = 1; + int write_back = 0; #endif ped_disk_delete_all (disk); @@ -949,16 +949,12 @@ gpt_read (PedDisk *disk) case PED_EXCEPTION_FIX: ptt_clear_sectors (disk->dev, PED_LE64_TO_CPU (primary_gpt->AlternateLBA), 1); + write_back = 1; break; default: - write_back = 0; break; } } - else - { - write_back = 0; - } #endif /* !DISCOVER_ONLY */ gpt = primary_gpt; pth_free (backup_gpt); @@ -984,7 +980,6 @@ gpt_read (PedDisk *disk) goto error_free_gpt; gpt = primary_gpt; - write_back = 0; } else /* !primary_gpt && backup_gpt */ { @@ -997,7 +992,6 @@ gpt_read (PedDisk *disk) goto error_free_gpt; gpt = backup_gpt; - write_back = 0; } backup_gpt = NULL; primary_gpt = NULL; -- 1.7.0.rc2.170.gbc565 >From 885d60458ce6e980d57a3e28ecc2fcba2af4d26c Mon Sep 17 00:00:00 2001 From: Jim Meyering <[email protected]> Date: Sat, 13 Feb 2010 09:25:56 +0100 Subject: [PATCH 2/2] libparted: set the shared library version number manually * libparted/Makefile.am (CURRENT, REVISION, AGE): Define here. (libparted_la_LDFLAGS): Use them, rather than using the automatically-defined LT_-prefixed variables. Stop using the "-release" option. Hans De Goede pointed out that the build process was automatically changing the shared library name. --- libparted/Makefile.am | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/libparted/Makefile.am b/libparted/Makefile.am index 2bdadd8..fb8351e 100644 --- a/libparted/Makefile.am +++ b/libparted/Makefile.am @@ -21,8 +21,15 @@ SUBDIRS = labels fs . $(SUBDIRS_CHECK) partedincludedir = -I$(top_srcdir)/lib -I$(top_srcdir)/include lib_LTLIBRARIES = libparted.la -libparted_la_LDFLAGS = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ - -release $(LT_RELEASE) + +# Set the shared library version, per Libtool's guidelines. +# For details, see the "Libtool's versioning system" section of "info libtool" +CURRENT = 0 +REVISION = 1 +AGE = 0 + +libparted_la_LDFLAGS = -version-info $(CURRENT):$(REVISION):$(AGE) + libparted_la_SOURCES = debug.c \ architecture.c \ architecture.h \ -- 1.7.0.rc2.170.gbc565 _______________________________________________ parted-devel mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/parted-devel

